You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a use case or problem? Please describe. two_qubit_matrix_to_cz_operations and three_qubit_matrix_to_operations are used from within the decompose method of MatrixGate but they currently ignore global phase; because of which we don't support decomposing controlled versions of MatrixGate.
Describe the solution you'd like
In general, it'd be nice to write a method which, given a target unitary a and actual unitary b returns a cirq.GlobalPhaseGate() which can be used to match b to a s.t. a = global_phase_gate.coefficient * b. This would require minor modification to match_global_phasewhich already exists and can be used from within multiple anlaytical decompositions to "preserve" global phase by simply returning a GlobalPhaseGate() with the right phase.
We should also try to update as many anlaytical_decomposition as possible to preserve global phase.
Is your feature request related to a use case or problem? Please describe.
two_qubit_matrix_to_cz_operations
andthree_qubit_matrix_to_operations
are used from within the decompose method ofMatrixGate
but they currently ignore global phase; because of which we don't support decomposing controlled versions ofMatrixGate
.Describe the solution you'd like
In general, it'd be nice to write a method which, given a target unitary
a
and actual unitaryb
returns acirq.GlobalPhaseGate()
which can be used to matchb
toa
s.t.a = global_phase_gate.coefficient * b
. This would require minor modification tomatch_global_phase
which already exists and can be used from within multiple anlaytical decompositions to "preserve" global phase by simply returning aGlobalPhaseGate()
with the right phase.We should also try to update as many
anlaytical_decomposition
as possible to preserve global phase.This can be used to solve issues like #6517
The text was updated successfully, but these errors were encountered: