Skip to main content
IBM Quantum Platform

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)

GitHub

Bases: PreNode

The propagation node type used during samplex building.

Attributes Summary

Column 1
Column 2
bounded_paramsList of bounded params if operation is a fractional gate with a bounded parameter.
commutant_twirlWhether this operation should be twirled with its commutant.
directionThe direction of virtual gates that can interact with this node.
modeHow the operation acts on virtual gates.
operationThe operation to propagate through.
paramsThe parameters required by the node.
partitionA partition of subsystem indices, each of which is propagated jointly.
subsystemsThe subsystems that virtual gates act on.
trace_infoDebug trace information, populated when building with debug=True.

Methods Summary

Column 1
Column 2
from_cluster(nodes)
get_style()Summarizes the style of this node when plotted via plot_graph().
to_key()

Attributes Documentation

bounded_params

Type: list[float] | None

Default value: None

List of bounded params if operation is 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

Type: bool

Default value: 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, True signals that it should be twirled by its commutant, while False signals that its angle has been bound to a Clifford.

direction

Type: Direction

Default value: <dataclasses._MISSING_TYPE object>

The direction of virtual gates that can interact with this node.

mode

Type: InstructionMode

Default value: <dataclasses._MISSING_TYPE object>

How the operation acts on virtual gates.

operation

Type: Gate

Default value: <dataclasses._MISSING_TYPE object>

The operation to propagate through.

Even when the PrePropagate represents more than one subsystem (i.e more than one operation) only a single common Gate object is stored, and possible parameters are stored elsewhere.

params

Type: list[tuple[int | None, ParameterExpression]]

Default value: <dataclasses._MISSING_TYPE object>

The parameters required by the node.

partition

Type: Partition[int]

Default value: <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

Type: Partition[int]

Default value: <dataclasses._MISSING_TYPE object>

The subsystems that virtual gates act on.

trace_info

Type: TraceInfo | None

Default value: None

Debug trace information, populated when building with debug=True.

Methods Documentation

from_cluster

classmethod from_cluster(nodes: list[PrePropagate]) → PrePropagate

GitHub

get_style

get_style()

GitHub

Summarizes the style of this node when plotted via plot_graph().

to_key

to_key() → PrePropagateKey

GitHub
Was this page helpful?
Report a bug, typo, or request content on GitHub.