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
In several applications we have a compute -> operation -> uncompute flow: we apply a certain series of gates, do some operation, and then apply the daggered series of gates. The gates that are uncomputed can be implemented up to multiplication with a diagonal unitary (a.k.a. up to relative phase). The relative phase version of the gates can have shorter, more efficient implementations than the exact gate. For example the Toffoli gate uses 6 CX gates whereas the relative phase version, sometimes called Margolus gate, requires only 3.
A generic implementation for multi-controlled single qubit gates exists already within Terra, but remains mostly unused. We could add a relative_phase/up_to_diagonal boolean flag to the gate initializers that indicate whether the gate could be implemented up to relative phase. Since we already plan a global_phase keyword (#3472) this doesn't disrupt the gate signature and could significantly simplify complex circuits.
Note that the relative phase CCX and CCCX are already used in computing the multi-controlled Toffoli.
From the implementation point-of-view, the functionality to decompose the relative phase version could become a transpiler pass / synthesizer (@ajavadia) during transpilation.
The text was updated successfully, but these errors were encountered:
What is the expected enhancement?
In several applications we have a
compute -> operation -> uncompute
flow: we apply a certain series of gates, do some operation, and then apply the daggered series of gates. The gates that are uncomputed can be implemented up to multiplication with a diagonal unitary (a.k.a. up to relative phase). The relative phase version of the gates can have shorter, more efficient implementations than the exact gate. For example the Toffoli gate uses 6 CX gates whereas the relative phase version, sometimes called Margolus gate, requires only 3.A generic implementation for multi-controlled single qubit gates exists already within Terra, but remains mostly unused. We could add a
relative_phase/up_to_diagonal
boolean flag to the gate initializers that indicate whether the gate could be implemented up to relative phase. Since we already plan aglobal_phase
keyword (#3472) this doesn't disrupt the gate signature and could significantly simplify complex circuits.Note that the relative phase CCX and CCCX are already used in computing the multi-controlled Toffoli.
From the implementation point-of-view, the functionality to decompose the relative phase version could become a transpiler pass / synthesizer (@ajavadia) during transpilation.
The text was updated successfully, but these errors were encountered: