-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Circuit Optimizer for sqrt-iSWAP #4224
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
Conversation
Blocked on #4213. |
This is unblocked now @tanujkhattar. I changed the API to match the updates in #4213. |
Fixed tricky merge issues caused by the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a first round of comments. PTAL.
cirq-core/cirq/optimizers/merge_interactions_to_sqrt_iswap_test.py
Outdated
Show resolved
Hide resolved
cirq.EjectZ().optimize_circuit, | ||
cirq.DropNegligible().optimize_circuit, | ||
cirq.DropEmptyMoments().optimize_circuit, | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the idea behind testing the behavior caused by other follow-up optimizations here? I think this has the risk of making the unit tests brittle. Maybe we should have a separate place for such integration tests where we actually prescribe this sequence of optimizations and then test their combined behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied most of the tests from merge_interactions_test.py
. I think the test is trying to be less brittle to changes in the two-qubit synthesis method by relying on more basic optimizers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Follow up to quantumlib#4213. Fixes quantumlib#4083. (Also contains a one-line change to fix quantumlib#4225.) I'm open to name suggestions for `MergeInteractionsToSqrtIswap`.
Follow up to quantumlib#4213. Fixes quantumlib#4083. (Also contains a one-line change to fix quantumlib#4225.) I'm open to name suggestions for `MergeInteractionsToSqrtIswap`.
Follow up to #4213. Fixes #4083. (Also contains a one-line change to fix #4225.)
I'm open to name suggestions for
MergeInteractionsToSqrtIswap
.