-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Deprecate MergeNQubitGates
optimizer
#5653
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
…ecate_merge_n_qubit_gates
@@ -89,6 +89,7 @@ def _interaction( | |||
) | |||
|
|||
|
|||
@cirq._compat.deprecated_class(deadline='v0.16', fix="Use cirq.merge_k_qubit_unitaries") | |||
class MergeNQubitGates(cirq.PointOptimizer): |
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.
This class does more than cirq.merge_k_qubit_unitaries
. It calls off to cirq.drop_negligible_operations
and cirq.drop_empty_moments
as well. Will existing tests for this optimizer pass if only cirq.merge_k_qubit_unitaries
is called?
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.
Can you point me to where MergeNQubitGates
optimizer calls off to cirq.drop_negligible_operations
and cirq.drop_empty_moments
?
Also, the call sites calling MergeNQubitGates
have been updated to call cirq.merge_k_qubit_unitaries
and no tests fail right now. But to answer your specific question, cirq.merge_k_qubit_unitaries
does not call cirq.drop_negligible_operations
and cirq.drop_empty_moments
by default.
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.
Whoops, i mistook this for simplify_expectation_value_circuit
that's after this.
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
Part of #5028