tqec.compile.specs.base.Substitution#
- class Substitution(src: dict[int, Plaquettes], dst: dict[int, Plaquettes])[source]#
Collection of plaquettes categorized by the layer index.
This specifies how to substitute plaquettes in the two CompiledBlock`s connected by a pipe. When applying the substitution, the plaquettes in the map will be used to update the corresponding layer in the `CompiledBlock.
Both the source and destination maps are indexed by the layer index in the CompiledBlock. The index can be negative, which means the layer is counted from the end of the layers list.
- src#
a mapping from the index of the layer in the source CompiledBlock to the plaquettes that should be used to update the layer.
- Type:
dict[int, tqec.plaquette.plaquette.Plaquettes]
- dst#
a mapping from the index of the layer in the destination CompiledBlock to the plaquettes that should be used to update
- Type:
dict[int, tqec.plaquette.plaquette.Plaquettes]
- __init__(src: dict[int, Plaquettes], dst: dict[int, Plaquettes]) None #
Methods
__init__
(src, dst)Attributes