HelixOpsExtension

class guppyft.extensions.helix.HelixOpsExtension[source]

Extension providing Helix logical operations.

Each block comprises two logical qubits, labelled 0 and 1. These indices are runtime HUGR inputs.

__call__() → Extension[source]

Return the Helix ops extension with its type dependencies resolved.

cx() → ExtOp[source]

CX from logical qubit 0 to 1.

cx_between_blocks() → ExtOp[source]

Targeted CX from the first block to the second. Runtime indices select the control and target.

property cx_between_blocks_def: OpDef

Definition of the cx_between_blocks operation.

For the instantiated operation, see cx_between_blocks.

property cx_def: OpDef

Definition of the cx operation.

For the instantiated operation, see cx.

cx_transversal() → ExtOp[source]

Apply CX from each logical qubit in the first block to the corresponding logical qubit in the second block.

property cx_transversal_def: OpDef

Definition of the cx_transversal operation.

For the instantiated operation, see cx_transversal.

cz() → ExtOp[source]

Logical CZ.

property cz_def: OpDef

Definition of the cz operation.

For the instantiated operation, see cz.

free() → ExtOp[source]

Discard a block.

property free_def: OpDef

Definition of the free operation.

For the instantiated operation, see free.

free_t_state() → ExtOp[source]

Discard an unused T-state resource.

property free_t_state_def: OpDef

Definition of the free_t_state operation.

For the instantiated operation, see free_t_state.

h_all() → ExtOp[source]

Hadamard on each logical qubit.

property h_all_def: OpDef

Definition of the h_all operation.

For the instantiated operation, see h_all.

inject_t() → ExtOp[source]

Instantiate the inject_t operation.

Consume a T-state resource and apply T to the logical qubit selected by a runtime index.

property inject_t_def: OpDef

Definition of the inject_t operation.

For the instantiated operation, see inject_t.

inject_tdg() → ExtOp[source]

Instantiate the inject_tdg operation.

Consume a T-state resource and apply Tdg to the logical qubit selected by a runtime index.

property inject_tdg_def: OpDef

Definition of the inject_tdg operation.

For the instantiated operation, see inject_tdg.

measure_x_all() → ExtOp[source]

Destructively measure both logical qubits in the X basis.

property measure_x_all_def: OpDef

Definition of the measure_x_all operation.

For the instantiated operation, see measure_x_all.

measure_z_all() → ExtOp[source]

Destructively measure both logical qubits in the Z basis.

property measure_z_all_def: OpDef

Definition of the measure_z_all operation.

For the instantiated operation, see measure_z_all.

prep_plus() → ExtOp[source]

Prepare the |++> state on a block.

property prep_plus_def: OpDef

Definition of the prep_plus operation.

For the instantiated operation, see prep_plus.

prep_t_state() → ExtOp[source]

Instantiate the prep_t_state operation.

Supply a resource which can be consumed to apply a T or Tdg gate to a logical qubit.

property prep_t_state_def: OpDef

Definition of the prep_t_state operation.

For the instantiated operation, see prep_t_state.

prep_zero() → ExtOp[source]

Prepare the all-zero state on a block.

property prep_zero_def: OpDef

Definition of the prep_zero operation.

For the instantiated operation, see prep_zero.

qec_cycle() → ExtOp[source]

Perform syndrome extraction and recovery (or a Pauli-frame update). Ideally preserves the logical state, including external entanglement.

property qec_cycle_def: OpDef

Definition of the qec_cycle operation.

For the instantiated operation, see qec_cycle.

ss() → ExtOp[source]

Logical S on both qubits.

property ss_def: OpDef

Definition of the ss operation.

For the instantiated operation, see ss.

swap() → ExtOp[source]

Swap the two qubits in the block.

property swap_def: OpDef

Definition of the swap operation.

For the instantiated operation, see swap.

x() → ExtOp[source]

Apply X to the logical qubit selected by a runtime index.

property x_def: OpDef

Definition of the x operation.

For the instantiated operation, see x.

y() → ExtOp[source]

Apply Y to the logical qubit selected by a runtime index.

property y_def: OpDef

Definition of the y operation.

For the instantiated operation, see y.

z() → ExtOp[source]

Apply Z to the logical qubit selected by a runtime index.

property z_def: OpDef

Definition of the z operation.

For the instantiated operation, see z.