primitivesΒΆ

Implementations of primitives for the Steane QEC architecture.

Primitives should be restricted to the most fundamental building blocks of a QEC architecture. Operations that comprise multiple primitives should be added to logical instead.

Based on https://arxiv.org/abs/2107.07505

Classes

RawMeasurement()

An immutable Guppy struct of N measurement outcomes of the physical qubits in a logical block.

Functions

cx(ctl, tgt)

Logical CX gate between two Steane blocks.

cz(q0, q1)

Logical CZ gate between two Steane blocks.

decode(m)

Decode Steane measurement of logical block

h(blk)

Logical H gate on a Steane block.

inject_t(blk, t_state)

Apply T gate via injection.

inject_tdg(blk, t_state)

Apply Tdg gate via injection.

knill_qec_cycle(q, a0, a1)

Implements Knill style syndrome extraction.

measure_z(blk)

Measure Steane block in the Z basis.

prep_t_state_ft()

Attempt to prepare a T|+> logical state on a Steane block.

prep_zero_ft()

Attempt fault-tolerant zero preparation state once.

prep_zero_non_ft()

Prepare Steane block in the logical zero state.

s(blk)

Logical S gate on a Steane block.

sdg(blk)

Logical S dagger gate on a Steane block.

steane_x_qec_cycle(q, a)

Implements X syndrome extraction via Steane with one-qubit teleportation.

steane_z_qec_cycle(q, a)

Implements Z syndrome extraction via Steane with one-qubit teleportation.

x(blk)

Logical X gate on a Steane block.

y(blk)

Logical Y gate on a Steane block.

z(blk)

Logical Z gate on a Steane block.