- class EquivalenceLibrary(*, base=None)¶
A library providing a one-way mapping of Gates to their equivalent implementations as QuantumCircuits.
Create a new equivalence library.
base (Optional[EquivalenceLibrary]) – Base equivalence library to be referenced if an entry is not found in this library.
Add a new equivalence to the library.
Draws the equivalence relations available in the library.
Gets the set of QuantumCircuits circuits from the library which equivalently implement the given Gate.
Check if a library contains any decompositions for gate.
Return list of keys to key to node index map.
Return node index for a given key.
Set the equivalence record for a Gate.
Return graph representing the equivalence library data.
This property should be treated as read-only as it provides a reference to the internal state of the
EquivalenceLibraryobject. If the graph returned by this property is mutated it could corrupt the the contents of the object. If you need to modify the output
PyDiGraphbe sure to make a copy prior to any modification.
A graph object with equivalence data in each node.
- Return type