French
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.circuit.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.

Paramètres
  • gate (Gate) – A Gate instance.

  • equivalent_circuit (QuantumCircuit) – A circuit equivalently implementing the given Gate.