-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
- Qiskit Terra version: lastest
- Python version:
- Operating system:
What is happening?
qc = QuantumCircuit(2)
qc.rzz(1,0,1)
qc.rzz(1,0,1)
qc.rzz(1,0,1)
gives a unique QASM3 gate definition for each gate above even though they are identical.
OPENQASM 3;
include "stdgates.inc";
gate rzz_4592196368(_gate_p_0) _gate_q_0, _gate_q_1 {
cx _gate_q_0, _gate_q_1;
rz(1) _gate_q_1;
cx _gate_q_0, _gate_q_1;
}
gate rzz_4592194880(_gate_p_0) _gate_q_0, _gate_q_1 {
cx _gate_q_0, _gate_q_1;
rz(1) _gate_q_1;
cx _gate_q_0, _gate_q_1;
}
gate rzz_4592190992(_gate_p_0) _gate_q_0, _gate_q_1 {
cx _gate_q_0, _gate_q_1;
rz(1) _gate_q_1;
cx _gate_q_0, _gate_q_1;
}
qubit[2] _all_qubits;
let q = _all_qubits[0:1];
rzz_4592196368(1) q[0], q[1];
rzz_4592194880(1) q[0], q[1];
rzz_4592190992(1) q[0], q[1];
How can we reproduce the issue?
Run above
What should happen?
Ideally, every unique gate would have a single definition.
Any suggestions?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working