Japanese
言語
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

EquivalenceLibrary

class EquivalenceLibrary(*, base=None)[ソース]

ベースクラス: object

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.

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.

戻り値

A graph object with equivalence data in each node.

戻り値の型

PyDiGraph