Spanish
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

EquivalenceLibrary

class EquivalenceLibrary(*, base=None)[fuente]

Bases: object

A library providing a one-way mapping of Gates to their equivalent implementations as QuantumCircuits.

Create a new equivalence library.

Parámetros

base (Optional[EquivalenceLibrary]) – Base equivalence library to be referenced if an entry is not found in this library.

Methods

add_equivalence

Add a new equivalence to the library.

draw

Draws the equivalence relations available in the library.

get_entry

Gets the set of QuantumCircuits circuits from the library which equivalently implement the given Gate.

has_entry

Check if a library contains any decompositions for gate.

keys

Return list of keys to key to node index map.

node_index

Return node index for a given key.

set_entry

Set the equivalence record for a Gate.

Attributes

graph

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 EquivalenceLibrary object. 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 PyDiGraph be sure to make a copy prior to any modification.

Devuelve

A graph object with equivalence data in each node.

Tipo del valor devuelto

PyDiGraph