Skip to content

Remove pretty_name part 1 #1340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 6, 2024
Merged

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
8 checks passed
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