Skip to content
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

Add json resolvers for sympy relational operators #4767

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

daxfohl
Copy link
Contributor

@daxfohl daxfohl commented Dec 20, 2021

This adds json resolvres for the sympy relational operator classes.

It changes proper_repr for sympy, by overloading the sympy expression printer instead of just replacing substrings after printing. This is to prevent munging between GreaterThan and StrictGreaterThan, for instance. It's still not perfect, but better than it was.

Prereq for #4740 @95-martin-orion

@daxfohl daxfohl requested review from cduck, vtomole and a team as code owners December 20, 2021 18:48
@CirqBot CirqBot added the size: M 50< lines changed <250 label Dec 20, 2021
@daxfohl daxfohl requested a review from dabacon December 20, 2021 18:48
@95-martin-orion 95-martin-orion self-assigned this Dec 20, 2021
Copy link
Collaborator

@95-martin-orion 95-martin-orion left a comment

Choose a reason for hiding this comment

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

Thanks for splitting this off, LGTM!

@daxfohl
Copy link
Contributor Author

daxfohl commented Dec 20, 2021

Didn't automerge

@95-martin-orion 95-martin-orion merged commit e7892c3 into quantumlib:master Dec 20, 2021
MichaelBroughton pushed a commit to MichaelBroughton/Cirq that referenced this pull request Jan 22, 2022
@daxfohl daxfohl deleted the sympy-json branch March 30, 2022 14:20
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants