Operations

The operations a code supports: one variant class per kind of operation, all derived from OperationVariant, and the read view of a group of variants.

MeasurementBasis(*values)

Measurement basis for a whole-block data measurement.

Operand(block, logical_qubit[, role])

One logical-qubit argument of a logical operation.

OperationVariant(*, name, circuit[, ...])

Shared base of the six operation-variant kinds.

StatePreparationVariant(*, name, circuit[, ...])

State-preparation variant for one target logical state.

ResetVariant(*, name, circuit[, registers, ...])

Reset variant for one target logical state.

DataMeasurementVariant(*, name, circuit[, ...])

Data-measurement variant for one measurement basis.

LogicalGateVariant(*, name, circuit[, ...])

Logical-gate variant for one gate and operand shape.

LogicalMeasurementVariant(*, name, circuit)

Logical-measurement variant for one observable and operand shape.

SyndromeMeasurementVariant(*, name, circuit)

Syndrome-measurement variant writing syndrome bits to output classical registers.

VariantGroup(variants, default)

Frozen read view of one variant group.

Operation sets

A QECXDocument holds the variants of each operation type in an operation set, which its properties return, such as logical_gates. The operation sets are not part of the top-level package: reach them through a document.

OperationSet(*args, **kwargs)

Structural protocol shared by the per-type operation-set containers.

StatePreparationSet(entries)

State-preparation variants grouped by target logical state.

ResetSet(entries)

Reset variants grouped by target logical state.

DataMeasurementSet(entries)

Data-measurement variants grouped by measurement basis.

LogicalGateSet(entries)

Logical-gate variants addressed by gate name and operand signature.

LogicalMeasurementSet(entries)

Logical-measurement variants addressed by observable and operand signature.

SyndromeMeasurementSet(variants, default)

The single group of syndrome-measurement variants.