Flipping of gate direction in Transpiler for CZ gate
See original GitHub issueWhat should we add?
The current version of the transpiler raises the following error when attempting to set the basis gate of a backend as cz
'Flipping of gate direction is only supported for CX, ECR, and RZX at this time, not cz.'
As far as I’m aware and through my own testing flipping of a CZ should be easy to implement as it’s “flip” produces the same unitary operator. There is no direct identity needed.
If this could get added that would be great! I would have done this via a pull request myself but it seems “too easy” of a solution that I must be missing something.
The Qiskit file that would need changing. https://github.com/Qiskit/qiskit-terra/blob/1312624309526812eb62b97e0d47699d46649a25/qiskit/transpiler/passes/utils/gate_direction.py
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
GateDirection - Qiskit
Modify asymmetric gates to match the hardware coupling direction. ... GateDirection pass. ... Check if the pass is an analysis pass. If the...
Read more >EdX Inverting CNOT & CZ - YouTube
In this video, we will learn what happens when the control and target terminals of CNOT and CZ are exchanged within a quantum...
Read more >Operations glossary - IBM Quantum
The NOT gate, also known as the Pauli X gate, flips the state to , and vice versa. The NOT gate is equivalent...
Read more >Programs and Gates — pyQuil 3.3.2 documentation
The Standard Gate Set¶ · Pauli gates I , X , Y , Z · Hadamard gate: H · Phase gates: PHASE(theta) ,...
Read more >Constructing quantum circuits with global gates - IOPscience
Let S1 be the set of qubits that have a CZ gate to qubit 1. ... a two-qubit GZZ gate with a single...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JMuff22 I encountered the same issue and took the liberty to create a PR based on your code.
I just got this error with some code I am testing:
qiskit.transpiler.exceptions.TranspilerError: 'Flipping of gate direction is only supported for CX, ECR, and RZX at this time, not cz.'
. My local version of qiskit terra isqiskit-terra==0.20.2
; is the fix not in the most current version of terra?