Skip to main content
IBM Quantum Platform

PreChangeBasis

class samplomatic.pre_samplex.PreChangeBasis(subsystems: Partition[int], direction: Direction, register_type: VirtualType, basis_ref: str, basis_change: Literal['local_clifford', 'pauli_prepare', 'pauli_measure'], *, trace_info: TraceInfo | None = None, twirl_gate: str | None = None)

GitHub

Bases: PreEmit

The basis emit node type used during samplex building.

Attributes Summary

Column 1
Column 2
basis_changeWhat kind of basis change to use.
basis_refUnique identifier of this basis change.
directionThe direction of virtual gates that can interact with this node.
register_typeThe virtual register type of the basis change.
subsystemsThe subsystems that virtual gates act on.
trace_infoDebug trace information, populated when building with debug=True.
twirl_gateThe gate name used for gate-dependent sampling, or None.

Methods Summary

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

Attributes Documentation

basis_change

Type: Literal['local_clifford', 'pauli_prepare', 'pauli_measure']

Default value: <dataclasses._MISSING_TYPE object>

What kind of basis change to use.

basis_ref

Type: str

Default value: <dataclasses._MISSING_TYPE object>

Unique identifier of this basis change.

direction

Type: Direction

Default value: <dataclasses._MISSING_TYPE object>

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

register_type

Type: VirtualType

Default value: <dataclasses._MISSING_TYPE object>

The virtual register type of the basis change.

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.

twirl_gate

Type: str | None

Default value: None

The gate name used for gate-dependent sampling, or None.

Methods Documentation

get_style

get_style() → NodeStyle

GitHub

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

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