EquivalenceLibrary.add_equivalence¶
- EquivalenceLibrary.add_equivalence(gate, equivalent_circuit)[source]¶
Add a new equivalence to the library. Future queries for the Gate will include the given circuit, in addition to all existing equivalences (including those from base).
Parameterized Gates (those including qiskit.circuit.Parameters in their Gate.params) can be marked equivalent to parameterized circuits, provided the parameters match.
- Parameters
gate (Gate) – A Gate instance.
equivalent_circuit (QuantumCircuit) – A circuit equivalently implementing the given Gate.