-
Notifications
You must be signed in to change notification settings - Fork 984
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
NoCompile Tag for optimizers #4253
Comments
I thought this was done as part of #2642. It seems like |
Hey! I'm new to cirq and I want to create/use a NoOptimizeTag. How should I do it? More specifically, I was hoping to create a cirq equivalent of barriers in qiskit/openqasm, so would there be a way to tag a group of successive operations with a NoOptimizeTag? Thank you! |
Created a draft pull request for this issue. Created a nocompile tag and edited the drop_negligible optimizer so as to ignore any gate that has a nocompile tag to it. Need to create test cases for the drop_negligible. Will continue editing the other optimizers as well and create tests for them. |
This will be taken care of during the transformer patterns roadmap item. #3237 |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days |
We need to further clarify the requirements for supporting
I would expect a |
…ers to support other operation types. (#4459) Proliferation of `isinstance(op, GateOperation)` checks results in many inconsistencies due to different available operation types like `ControlledOperations` and `TaggedOperations`. This PR fixes #4152 and is a first step towards fixing #3556 Note that `TaggedOperations` which were earlier ignored by the optimizers would now be considered, and hence this is potentially a breaking change if people were implicitly relying on TaggedOperations not getting compiled by the optimizers. Since the optimizer doesn't document / test this behavior, I consider it to be a bug rather than a feature and an explicit `NoCompile` tag should be implemented as part of #4253 This PR is blocked on submitting #4167 (tests will stop failing once the PR is submitted and this rebased). Update: This is now ready for review.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days |
Issue closed due to inactivity. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days |
All circuit optimizers have been migrated to the new transformer framework, which supports adding no compile tags for every transformer. I'll therefore mark this as complete and close the issue. |
…ers to support other operation types. (quantumlib#4459) Proliferation of `isinstance(op, GateOperation)` checks results in many inconsistencies due to different available operation types like `ControlledOperations` and `TaggedOperations`. This PR fixes quantumlib#4152 and is a first step towards fixing quantumlib#3556 Note that `TaggedOperations` which were earlier ignored by the optimizers would now be considered, and hence this is potentially a breaking change if people were implicitly relying on TaggedOperations not getting compiled by the optimizers. Since the optimizer doesn't document / test this behavior, I consider it to be a bug rather than a feature and an explicit `NoCompile` tag should be implemented as part of quantumlib#4253 This PR is blocked on submitting quantumlib#4167 (tests will stop failing once the PR is submitted and this rebased). Update: This is now ready for review.
…ronizeTerminalMeasurements` (quantumlib#4911) - Part of quantumlib#4722 - Follows the new Transformer API quantumlib#4483 - Supports no compile tags NoCompile Tag for optimizers quantumlib#4253 - Fixes quantumlib#4907
…es` (quantumlib#5054) - Part of quantumlib#5028 - Follows the new Transformer API quantumlib#4483 - Supports no compile tags NoCompile Tag for optimizers quantumlib#4253
Is your feature request related to a use case or problem? Please describe.
Certain use cases involve creating gates that should not be optimized. For instance, if you add spin echoes to an idle qubit to decrease dephasing errors, you do not want a merging optimizers to collapse them down again. Other benchmarking cases may want this as well.
Describe the solution you'd like
I would like to add a tag (either to cirq-core or to cirq-google) that specifies that compiles should skip this gate. Perhaps NoOptimizeTag() or something like that.
[optional] Describe alternatives/workarounds you've considered
What is the urgency from your perspective for this issue? Is it blocking important work?
P1 - I need this no later than the next release (end of quarter)
High priority nice-to-have, since it is blocking a nice end-to-end example of combining various optimization techniques together in order to increase fidelity.
The text was updated successfully, but these errors were encountered: