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: list[float] | None = None, commutant_twirl: bool = False, *, trace_info: TraceInfo | 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.Whether this operation should be twirled with its commutant.
The direction of virtual gates that can 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.
Debug trace information, populated when building with
debug=True.Methods Summary
Summarizes the style of this node when plotted via
plot_graph().Attributes Documentation
- bounded_params: list[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.
- commutant_twirl: bool = False¶
Whether this operation should be twirled with its commutant.
If the operation is not a fractional gate, this value will be
False. If it is a fractional gate,Truesignals that it should be twirled by its commutant, whileFalsesignals that its angle has been bound to a Clifford.
- direction: Direction = <dataclasses._MISSING_TYPE object>¶
The direction of virtual gates that can 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.
- trace_info: TraceInfo | None = None¶
Debug trace information, populated when building with
debug=True.
Methods Documentation
- get_style()[source]¶
Summarizes the style of this node when plotted via
plot_graph().