PreMeasure

class samplomatic.pre_samplex.PreMeasure(subsystems: Partition[int], creg_names: list[str], creg_offsets: list[int], *, trace_info: TraceInfo | None = None)[source]

Bases: PreNode

The propagation node type used for measurements during samplex building.

Attributes Summary

creg_names

The classical register names this measurement writes to, one per subsystem.

creg_offsets

The indices within the classical registers, one per subsystem.

direction

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

subsystems

The subsystems that virtual gates act on.

trace_info

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

Methods Summary

from_cluster(nodes)

get_style()

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

to_key()

Attributes Documentation

creg_names: list[str] = <dataclasses._MISSING_TYPE object>

The classical register names this measurement writes to, one per subsystem.

creg_offsets: list[int] = <dataclasses._MISSING_TYPE object>

The indices within the classical registers, one per subsystem.

direction: Direction = <dataclasses._MISSING_TYPE object>

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

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

classmethod from_cluster(nodes: list[PreMeasure]) PreMeasure[source]
get_style() NodeStyle[source]

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

to_key() Hashable[source]