Skip to content

Conversation

@mpharrigan
Copy link
Collaborator

Change the default implementation of Bloq.pretty_name to go via __str__. Start removing pretty_name implementations and moving them to __str__ or wire_symbols as necessary.

towards #791

if len(point_str) < 5 or True:
return f'PE${point_str}$'
return 'PE(R)'
def __str__(self) -> str:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any concerns about dropping the long string condition?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you look closely, this seems to actually have been some debug code that snuck through (mea culpa) because of the or True condition.

@mpharrigan
Copy link
Collaborator Author

Test failure is due to different precision of string representations of floating point values locally vs ci. I can choose an arbitrary precision, but then the format string fails for sympy objects

@mpharrigan mpharrigan merged commit 21922ee into quantumlib:main Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants