tqec.plaquette.plaquette.Plaquettes#

class Plaquettes(collection: FrozenDefaultDict[int, Plaquette])[source]#

Represent a collection of plaquettes that might be applied to a Template instance.

The goal of this class is to abstract away how a “collection of plaquettes” is represented and to provide a unique interface in order to retrieve plaquettes when building a quantum circuit from a template and plaquettes.

It also checks that the represented collection is valid, which means that it does not include any plaquette associated with index 0 (that is internally and conventionally reserved for the empty plaquette).

__init__(collection: FrozenDefaultDict[int, Plaquette]) None#

Methods

__init__(collection)

map_indices(callable)

repeat(repetitions)

to_name_dict()

with_updated_plaquettes(plaquettes_to_update)

Attributes

has_default

collection