PrePropagate¶
- class samplomatic.pre_samplex.PrePropagate(subsystems: Partition[int], direction: Direction, operation: Gate, partition: Partition[int], mode: InstructionMode, params: list[tuple[int | None, ParameterExpression]], bounded_params: Iterable[float] | None = None)[source]¶
Bases:
PreNodeThe propagation node type used during samplex building.
Attributes Summary
List of bounded params if
operationis a fractional gate with a bounded parameter.The direction of virtual gates that cat interact with this node.
How the operation acts on virtual gates.
The operation to propagate through.
The parameters required by the node.
A partition of subsystem indices, each of which is propagated jointly.
The subsystems that virtual gates act on.
Methods Summary
Summarizes the style of this node when plotted via
plot_graph().Attributes Documentation
- bounded_params: Iterable[float] | None = None¶
List of bounded params if
operationis a fractional gate with a bounded parameter.If the node involves a relevant operation with a single subsystem, the parameter is automatically extracted from the operation.
- direction: Direction = <dataclasses._MISSING_TYPE object>¶
The direction of virtual gates that cat interact with this node.
- mode: InstructionMode = <dataclasses._MISSING_TYPE object>¶
How the operation acts on virtual gates.
- operation: Gate = <dataclasses._MISSING_TYPE object>¶
The operation to propagate through.
Even when the
PrePropagaterepresents more than one subsystem (i.e more than one operation) only a single commonGateobject is stored, and possible parameters are stored elsewhere.
- params: list[tuple[int | None, ParameterExpression]] = <dataclasses._MISSING_TYPE object>¶
The parameters required by the node.
- partition: Partition[int] = <dataclasses._MISSING_TYPE object>¶
A partition of subsystem indices, each of which is propagated jointly.
For example, a CX gate propagates pairs of single-qubit subsystems jointly. In this case, a partition would be a list of pairs of subsystem indices, where pairs are disjoint from each other.
- subsystems: Partition[int] = <dataclasses._MISSING_TYPE object>¶
The subsystems that virtual gates act on.
Methods Documentation
- get_style()[source]¶
Summarizes the style of this node when plotted via
plot_graph().