SteaneOpsExtension

class guppyft.extensions.steane.SteaneOpsExtension[source]

Extension providing the Steane logical operations.

__call__() → Extension[source]

Returns the Steane ops extension.

cx() → ExtOp[source]

Apply a CX gate to two qubits.

property cx_def: OpDef

Apply a CX gate to two qubits.

This is the generic operation definition. For the instantiated operation, see cx.

cz() → ExtOp[source]

Apply a CZ gate to two qubits.

property cz_def: OpDef

Apply a CZ gate to two qubits.

This is the generic operation definition. For the instantiated operation, see cz.

decode() → ExtOp[source]

Decode a measurement of a Steane logical qubit.

property decode_def: OpDef

Decode a measurement of a Steane logical qubit.

This is the generic operation definition. For the instantiated operation, see decode.

free() → ExtOp[source]

Free a block.

property free_def: OpDef

Free a logical qubit.

This is the generic operation definition. For the instantiated operation, see free.

h() → ExtOp[source]

Apply an H gate to one qubit.

property h_def: OpDef

Apply an H gate to one qubit.

This is the generic operation definition. For the instantiated operation, see h.

inject_t() → ExtOp[source]

Perform a T gate by injecting a magic state.

property inject_t_def: OpDef

Perform a T gate by injecting a magic state.

This is the generic operation definition. For the instantiated operation, see inject_t.

inject_tdg() → ExtOp[source]

Perform a Tdg gate by injecting a magic state.

property inject_tdg_def: OpDef

Perform a Tdg gate by injecting a magic state.

This is the generic operation definition. For the instantiated operation, see inject_tdg.

measure_z() → ExtOp[source]

Destructive measurement of a logical qubit in the Z basis.

property measure_z_def: OpDef

Destructive measurement of a logical qubit in the Z basis.

This is the generic operation definition. For the instantiated operation, see measure_z.

prep_t_state() → ExtOp[source]

Prepare a magic state that can be used to produce T-like states (T and Tdg).

property prep_t_state_def: OpDef

Prepare a magic state that can be used to produce T-like states (T and Tdg).

This is the generic operation definition. For the instantiated operation, see prep_t_state.

prep_zero() → ExtOp[source]

Allocate a block in the all-zero state.

property prep_zero_def: OpDef

Prepare a logical qubit in the all-zero state.

This is the generic operation definition. For the instantiated operation, see prep_zero.

qec_cycle() → ExtOp[source]

Perform a QEC cycle on a logical qubit.

property qec_cycle_def: OpDef

Perform a QEC cycle on a logical qubit.

This is the generic operation definition. For the instantiated operation, see qec_cycle.

s() → ExtOp[source]

Apply an S gate to one qubit.

property s_def: OpDef

Apply an S gate to one qubit.

This is the generic operation definition. For the instantiated operation, see s.

sdg() → ExtOp[source]

Apply an Sdg gate to one qubit.

property sdg_def: OpDef

Apply an Sdg gate to one qubit.

This is the generic operation definition. For the instantiated operation, see sdg.

swap() → ExtOp[source]

Apply a SWAP gate to two qubits.

property swap_def: OpDef

Apply a SWAP gate to two qubits.

This is the generic operation definition. For the instantiated operation, see swap.

x() → ExtOp[source]

Apply an X gate to one qubit.

property x_def: OpDef

Apply an X gate to one qubit.

This is the generic operation definition. For the instantiated operation, see x.

y() → ExtOp[source]

Apply an Y gate to one qubit.

property y_def: OpDef

Apply a Y gate to one qubit.

This is the generic operation definition. For the instantiated operation, see y.

z() → ExtOp[source]

Apply a Z gate to one qubit.

property z_def: OpDef

Apply a Z gate to one qubit.

This is the generic operation definition. For the instantiated operation, see z.