GateSet

class GateSet(gates)[source]

Bases: Set[Gate]

A set of a quantum processing unit’s supported quantum gates.

__init__(gates)[source]

Initialize a GateSet object.

Attributes

many_qudit_gates

All gates that act on more than two qudits.

multi_qudit_gates

All gates that act on more than one qudits.

single_qudit_gates

All gates that act on only one qudit.

two_qudit_gates

All gates that act on two qudits.

Methods

build_layer_generator()

Build a standard layer generator compliant with this gate set.

build_mq_layer_generator()

Produce a layer generator using this gate set's multi-qudit gates.

default_gate_set([radixes])

Build a default gate set for a given radixes.

difference(*others)

Return a new GateSet with this set's elements but not the others.

get_general_sq_gate()

Return the gate set's arbitrary single-qudit gate.

intersection(*others)

Return a new GateSet with elements common to all sets.

isdisjoint(other)

Return True if two sets have a null intersection.

issubset(other)

Test whether every element in the gate set is in other.

issuperset(other)

Report whether this gate set contains other.

symmetric_difference(other)

Return a new GateSet with elements in either set but not both.

union(*others)

Return a new GateSet with elements from this one and all others.