IcebergOpsExtension¶
- class guppyft.extensions.iceberg.IcebergOpsExtension[source]¶
Extension providing the Iceberg logical operations.
- all_but_one_rx(k: int, i: int) ExtOp[source]¶
Apply an Rx gate to all but one qubit.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit omitted.
- all_but_one_rx_d(k: int) ExtOp[source]¶
Apply an Rx gate to all but one qubit with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property all_but_one_rx_d_def: OpDef¶
Apply an Rx gate to all but one qubit with dynamic index.
This is the generic operation definition. For the instantiated operation, see all_but_one_rx_d.
- property all_but_one_rx_def: OpDef¶
Apply an Rx gate to all but one qubit.
This is the generic operation definition. For the instantiated operation, see all_but_one_rx.
- all_but_one_rz(k: int, i: int) ExtOp[source]¶
Apply an Rz gate to all but one qubit.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit omitted.
- all_but_one_rz_d(k: int) ExtOp[source]¶
Apply an Rz gate to all but one qubit with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property all_but_one_rz_d_def: OpDef¶
Apply an Rz gate to all but one qubit with dynamic index.
This is the generic operation definition. For the instantiated operation, see all_but_one_rz_d.
- property all_but_one_rz_def: OpDef¶
Apply an Rz gate to all but one qubit.
This is the generic operation definition. For the instantiated operation, see all_but_one_rz.
- all_but_one_x(k: int, i: int) ExtOp[source]¶
Apply an X gate to all but one qubit.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit omitted.
- all_but_one_x_d(k: int) ExtOp[source]¶
Apply an X gate to all but one qubit with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property all_but_one_x_d_def: OpDef¶
Apply an X gate to all but one qubit with dynamic index.
This is the generic operation definition. For the instantiated operation, see all_but_one_x_d.
- property all_but_one_x_def: OpDef¶
Apply an X gate to all but one qubit.
This is the generic operation definition. For the instantiated operation, see all_but_one_x.
- all_but_one_z(k: int, i: int) ExtOp[source]¶
Apply a Z gate to all but one qubit.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit omitted.
- all_but_one_z_d(k: int) ExtOp[source]¶
Apply a Z gate to all but one qubit with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property all_but_one_z_d_def: OpDef¶
Apply a Z gate to all but one qubit with dynamic index.
This is the generic operation definition. For the instantiated operation, see all_but_one_z_d.
- property all_but_one_z_def: OpDef¶
Apply a Z gate to all but one qubit.
This is the generic operation definition. For the instantiated operation, see all_but_one_z.
- all_h(k: int) ExtOp[source]¶
Apply an H gate to all qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
- property all_h_def: OpDef¶
Apply an H gate to all qubits.
This is the generic operation definition. For the instantiated operation, see all_h.
- all_rx(k: int) ExtOp[source]¶
Apply an Rx gate to all qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
- property all_rx_def: OpDef¶
Apply an Rx gate to all qubits.
This is the generic operation definition. For the instantiated operation, see all_rx.
- all_ry(k: int) ExtOp[source]¶
Apply an Ry gate to all qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
- property all_ry_def: OpDef¶
Apply an Ry gate to all qubits.
This is the generic operation definition. For the instantiated operation, see all_ry.
- all_rz(k: int) ExtOp[source]¶
Apply an Rz gate to all qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
- property all_rz_def: OpDef¶
Apply an Rz gate to all qubits.
This is the generic operation definition. For the instantiated operation, see all_rz.
- all_x(k: int) ExtOp[source]¶
Apply an X gate to all qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
- property all_x_def: OpDef¶
Apply an X gate to all qubits.
This is the generic operation definition. For the instantiated operation, see all_x.
- all_y(k: int) ExtOp[source]¶
Apply a Y gate to all qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
- property all_y_def: OpDef¶
Apply a Y gate to all qubits.
This is the generic operation definition. For the instantiated operation, see all_y.
- all_z(k: int) ExtOp[source]¶
Apply a Z gate to all qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
- property all_z_def: OpDef¶
Apply a Z gate to all qubits.
This is the generic operation definition. For the instantiated operation, see all_z.
- alloc_zero(k: int) ExtOp[source]¶
Allocate a block in the all-zero state.
- Parameters:
k – The number of logical qubits encoded in the block.
- property alloc_zero_def: OpDef¶
Allocate a block in the all-zero state.
This is the generic operation definition. For the instantiated operation, see alloc_zero.
- borrow(k: int, m: int) ExtOp[source]¶
Extraction of dynamic logical qubits from a block.
- Parameters:
k – The number of logical qubits encoded in the block.
m – The number of logical qubits to borrow.
- property borrow_def: OpDef¶
Extraction of dynamic logical qubits from a block.
This is the generic operation definition. For the instantiated operation, see borrow.
- borrow_more(k: int, m: int) ExtOp[source]¶
Extraction of dynamic logical qubits from an already-borrowed block.
- Parameters:
k – The number of logical qubits encoded in the block.
m – The number of logical qubits to borrow.
- property borrow_more_def: OpDef¶
Extraction of dynamic logical qubits from an already-borrowed block.
This is the generic operation definition. For the instantiated operation, see borrow_more.
- check_pre_block(k: int) ExtOp[source]¶
Check if a PreBlock is in a valid logical state.
- Parameters:
k – The number of logical qubits encoded in the block.
- property check_pre_block_def: OpDef¶
Check if a PreBlock is in a valid logical state.
This is the generic operation definition. For the instantiated operation, see check.
- cx(k: int, i: int, j: int) ExtOp[source]¶
Apply a CX gate to two qubits within a block.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the first logical qubit.
j – The index of the second logical qubit.
- cx_between_blocks(k: int, i: int, j: int) ExtOp[source]¶
Apply a CX gate to two qubits on different blocks of the same size.
- Parameters:
k – The number of logical qubits encoded in the blocks.
i – The index of the logical qubit in the first block.
j – The index of the logical qubit in the second block.
- cx_between_blocks_d(k: int) ExtOp[source]¶
Apply a CX gate to two qubits on different blocks of the same size with dynamic indices.
- Parameters:
k – The number of logical qubits encoded in the blocks.
- property cx_between_blocks_d_def: OpDef¶
Apply a CX gate to two qubits on different blocks of the same size with dynamic indices.
This is the generic operation definition. For the instantiated operation, see cx_between_blocks_d.
- property cx_between_blocks_def: OpDef¶
Apply a CX gate to two qubits on different blocks of the same size.
This is the generic operation definition. For the instantiated operation, see cx_between_blocks.
- cx_d(k: int) ExtOp[source]¶
Apply a CX gate to two qubits within a block with dynamic indices.
- Parameters:
k – The number of logical qubits encoded in the block.
- property cx_d_def: OpDef¶
Apply a CX gate to two qubits within a block with dynamic indices.
This is the generic operation definition. For the instantiated operation, see cx_d.
- property cx_def: OpDef¶
Apply a CX gate to two qubits within a block.
This is the generic operation definition. For the instantiated operation, see cx.
- cx_transversal(k: int) ExtOp[source]¶
Apply a CX gate transversally over two blocks of the same size.
- Parameters:
k – The number of logical qubits encoded in the blocks.
- property cx_transversal_def: OpDef¶
Apply a CX gate transversally over two blocks of the same size.
This is the generic operation definition. For the instantiated operation, see cx_transversal.
- fan_in(k: int, i: int) ExtOp[source]¶
Fan in to one qubit from the rest.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit.
- fan_in_d(k: int) ExtOp[source]¶
Fan in to one qubit from the rest with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property fan_in_d_def: OpDef¶
Fan in to one qubit from the rest with dynamic index.
This is the generic operation definition. For the instantiated operation, see fan_in_d.
- property fan_in_def: OpDef¶
Fan in to one qubit from the rest.
This is the generic operation definition. For the instantiated operation, see fan_in.
- fan_out(k: int, i: int) ExtOp[source]¶
Fan out from one qubit to the rest.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit.
- fan_out_d(k: int) ExtOp[source]¶
Fan out from one qubit to the rest with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property fan_out_d_def: OpDef¶
Fan out from one qubit to the rest with dynamic index.
This is the generic operation definition. For the instantiated operation, see fan_out_d.
- property fan_out_def: OpDef¶
Fan out from one qubit to the rest.
This is the generic operation definition. For the instantiated operation, see fan_out.
- free(k: int) ExtOp[source]¶
Free a block.
- Parameters:
k – The number of logical qubits encoded in the block.
- property free_def: OpDef¶
Free a block.
This is the generic operation definition. For the instantiated operation, see free.
- measure_all(k: int) ExtOp[source]¶
Destructively measure all qubits in the Z basis.
- Parameters:
k – The number of logical qubits encoded in the block.
- property measure_all_def: OpDef¶
Destructively measure all qubits in the Z basis.
This is the generic operation definition. For the instantiated operation, see measure_all.
- measure_syndrome(k: int) ExtOp[source]¶
Perform a syndrome measurement, producing (X,Z) error indicators.
- Parameters:
k – The number of logical qubits encoded in the block.
- property measure_syndrome_def: OpDef¶
Perform a syndrome measurement, producing (X,Z) error indicators.
This is the generic operation definition. For the instantiated operation, see measure_syndrome.
- restore(k: int, m: int) ExtOp[source]¶
Restoration of all dynamic logical qubits to their originating block.
- Parameters:
k – The number of logical qubits encoded in the block.
m – The number of logical qubits to restore.
- property restore_def: OpDef¶
Restoration of all dynamic logical qubits to their originating block.
This is the generic operation definition. For the instantiated operation, see restore.
- restore_some(k: int, m: int) ExtOp[source]¶
Restoration of some dynamic logical qubits to their originating block.
- Parameters:
k – The number of logical qubits encoded in the block.
m – The number of logical qubits to restore.
- property restore_some_def: OpDef¶
Restoration of some dynamic logical qubits to their originating block.
This is the generic operation definition. For the instantiated operation, see restore_some.
- rx(k: int, i: int) ExtOp[source]¶
Apply an Rx gate to one qubit.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit.
- rx_d(k: int) ExtOp[source]¶
Apply an Rx gate to one qubit with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property rx_d_def: OpDef¶
Apply an Rx gate to one qubit with dynamic index.
This is the generic operation definition. For the instantiated operation, see rx_d.
- property rx_def: OpDef¶
Apply an Rx gate to one qubit.
This is the generic operation definition. For the instantiated operation, see rx.
- ry(k: int, i: int) ExtOp[source]¶
Apply an Ry gate to one qubit.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit.
- ry_d(k: int) ExtOp[source]¶
Apply an Ry gate to one qubit with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property ry_d_def: OpDef¶
Apply an Ry gate to one qubit with dynamic index.
This is the generic operation definition. For the instantiated operation, see ry_d.
- property ry_def: OpDef¶
Apply an Ry gate to one qubit.
This is the generic operation definition. For the instantiated operation, see ry.
- rz(k: int, i: int) ExtOp[source]¶
Apply an Rz gate to one qubit.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit.
- rz_d(k: int) ExtOp[source]¶
Apply an Rz gate to one qubit with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property rz_d_def: OpDef¶
Apply an Rz gate to one qubit with dynamic index.
This is the generic operation definition. For the instantiated operation, see rz_d.
- property rz_def: OpDef¶
Apply an Rz gate to one qubit.
This is the generic operation definition. For the instantiated operation, see rz.
- swap(k: int, i: int, j: int) ExtOp[source]¶
Apply a SWAP gate to two qubits within a block.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the first logical qubit.
j – The index of the second logical qubit.
- swap_d(k: int) ExtOp[source]¶
Apply a SWAP gate to two qubits within a block with dynamic indices.
- Parameters:
k – The number of logical qubits encoded in the block.
- property swap_d_def: OpDef¶
Apply a SWAP gate to two qubits within a block with dynamic indices.
This is the generic operation definition. For the instantiated operation, see swap_d.
- property swap_def: OpDef¶
Apply a SWAP gate to two qubits within a block.
This is the generic operation definition. For the instantiated operation, see swap.
- try_alloc_zero(k: int) ExtOp[source]¶
Allocate a PreBlock in the all-zero state.
- Parameters:
k – The number of logical qubits encoded in the block.
- property try_alloc_zero_def: OpDef¶
Allocate a PreBlock in the all-zero state.
This is the generic operation definition. For the instantiated operation, see alloc_zero.
- try_measure_one_x(k: int, i: int) ExtOp[source]¶
Non-destructively measure one qubit in the X basis.
This operation is fallible and produces a future optional bool. A “none” value indicates a probable single-qubit error; QED may then be used to detect whether this was just a measurement error or whether it affected the data qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit.
- try_measure_one_x_d(k: int) ExtOp[source]¶
Non-destructively measure one qubit in the X basis with dynamic index.
This operation is fallible and produces a future optional bool. A “none” value indicates a probable single-qubit error; QED may then be used to detect whether this was just a measurement error or whether it affected the data qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
- property try_measure_one_x_d_def: OpDef¶
Non-destructively measure one qubit in the X basis with dynamic index.
This operation is fallible and produces a future optional bool. A “none” value indicates a probable single-qubit error; QED may then be used to detect whether this was just a measurement error or whether it affected the data qubits.
This is the generic operation definition. For the instantiated operation, see try_measure_one_x_d.
- property try_measure_one_x_def: OpDef¶
Non-destructively measure one qubit in the X basis.
This operation is fallible and produces a future optional bool. A “none” value indicates a probable single-qubit error; QED may then be used to detect whether this was just a measurement error or whether it affected the data qubits.
This is the generic operation definition. For the instantiated operation, see try_measure_one_x.
- try_measure_one_z(k: int, i: int) ExtOp[source]¶
Non-destructively measure one qubit in the Z basis.
This operation is fallible and produces a future optional bool. A “none” value indicates a probable single-qubit error; QED may then be used to detect whether this was just a measurement error or whether it affected the data qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit.
- try_measure_one_z_d(k: int) ExtOp[source]¶
Non-destructively measure one qubit in the Z basis with dynamic index.
This operation is fallible and produces a future optional bool. A “none” value indicates a probable single-qubit error; QED may then be used to detect whether this was just a measurement error or whether it affected the data qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
- property try_measure_one_z_d_def: OpDef¶
Non-destructively measure one qubit in the Z basis with dynamic index.
This operation is fallible and produces a future optional bool. A “none” value indicates a probable single-qubit error; QED may then be used to detect whether this was just a measurement error or whether it affected the data qubits.
This is the generic operation definition. For the instantiated operation, see try_measure_one_z_d.
- property try_measure_one_z_def: OpDef¶
Non-destructively measure one qubit in the Z basis.
This operation is fallible and produces a future optional bool. A “none” value indicates a probable single-qubit error; QED may then be used to detect whether this was just a measurement error or whether it affected the data qubits.
This is the generic operation definition. For the instantiated operation, see try_measure_one_z.
- property try_measure_x_dynq: OpDef¶
Fallible non-destructive measurement of a dynamic logical qubit in the X basis.
- property try_measure_z_dynq: OpDef¶
Fallible non-destructive measurement of a dynamic logical qubit in the Z basis.
- x(k: int, i: int) ExtOp[source]¶
Apply an X gate to one qubit.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit.
- x_d(k: int) ExtOp[source]¶
Apply an X gate to one qubit with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property x_d_def: OpDef¶
Apply an X gate to one qubit with dynamic index.
This is the generic operation definition. For the instantiated operation, see x_d.
- property x_def: OpDef¶
Apply an X gate to one qubit.
This is the generic operation definition. For the instantiated operation, see x.
- x_with_all_but_one_z(k: int, i: int) ExtOp[source]¶
Apply an X gate to one qubit and a Z to the rest.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit.
- x_with_all_but_one_z_d(k: int) ExtOp[source]¶
Apply an X gate to one qubit and a Z to the rest with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property x_with_all_but_one_z_d_def: OpDef¶
Apply an X gate to one qubit and a Z to the rest with dynamic index.
This is the generic operation definition. For the instantiated operation, see x_with_all_but_one_z_d.
- property x_with_all_but_one_z_def: OpDef¶
Apply an X gate to one qubit and a Z to the rest.
This is the generic operation definition. For the instantiated operation, see x_with_all_but_one_z.
- xx(k: int, i: int, j: int) ExtOp[source]¶
Apply an X gate to two qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the first logical qubit.
j – The index of the second logical qubit.
- xx_d(k: int) ExtOp[source]¶
Apply an X gate to two qubits with dynamic indices.
- Parameters:
k – The number of logical qubits encoded in the block.
- property xx_d_def: OpDef¶
Apply an X gate to two qubits with dynamic indices.
This is the generic operation definition. For the instantiated operation, see xx_d.
- property xx_def: OpDef¶
Apply an X gate to two qubits.
This is the generic operation definition. For the instantiated operation, see xx.
- xx_phase(k: int, i: int, j: int) ExtOp[source]¶
Apply an XXPhase gate to two qubits within a block.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the first logical qubit.
j – The index of the second logical qubit.
- xx_phase_between_blocks(k: int, i: int, j: int) ExtOp[source]¶
Apply an XXPhase gate to two qubits on different blocks of the same size.
- Parameters:
k – The number of logical qubits encoded in the blocks.
i – The index of the logical qubit in the first block.
j – The index of the logical qubit in the second block.
- xx_phase_between_blocks_d(k: int) ExtOp[source]¶
Apply an XXPhase gate to two qubits on different blocks of the same size with dynamic indices.
- Parameters:
k – The number of logical qubits encoded in the blocks.
- property xx_phase_between_blocks_d_def: OpDef¶
Apply an XXPhase gate to two qubits on different blocks of the same size with dynamic indices.
This is the generic operation definition. For the instantiated operation, see xx_phase_between_blocks_d.
- property xx_phase_between_blocks_def: OpDef¶
Apply an XXPhase gate to two qubits on different blocks of the same size.
This is the generic operation definition. For the instantiated operation, see xx_phase_between_blocks.
- xx_phase_d(k: int) ExtOp[source]¶
Apply an XXPhase gate to two qubits within a block with dynamic indices.
- Parameters:
k – The number of logical qubits encoded in the block.
- property xx_phase_d_def: OpDef¶
Apply an XXPhase gate to two qubits within a block with dynamic indices.
This is the generic operation definition. For the instantiated operation, see xx_phase_d.
- property xx_phase_def: OpDef¶
Apply an XXPhase gate to two qubits within a block.
This is the generic operation definition. For the instantiated operation, see xx_phase.
- y(k: int, i: int) ExtOp[source]¶
Apply a Y gate to one qubit.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit.
- y_d(k: int) ExtOp[source]¶
Apply a Y gate to one qubit with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property y_d_def: OpDef¶
Apply a Y gate to one qubit with dynamic index.
This is the generic operation definition. For the instantiated operation, see y_d.
- property y_def: OpDef¶
Apply a Y gate to one qubit.
This is the generic operation definition. For the instantiated operation, see y.
- yy(k: int, i: int, j: int) ExtOp[source]¶
Apply a Y gate to two qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the first logical qubit.
j – The index of the second logical qubit.
- yy_d(k: int) ExtOp[source]¶
Apply a Y gate to two qubits with dynamic indices.
- Parameters:
k – The number of logical qubits encoded in the block.
- property yy_d_def: OpDef¶
Apply a Y gate to two qubits with dynamic indices.
This is the generic operation definition. For the instantiated operation, see yy_d.
- property yy_def: OpDef¶
Apply a Y gate to two qubits.
This is the generic operation definition. For the instantiated operation, see yy.
- yy_phase(k: int, i: int, j: int) ExtOp[source]¶
Apply a YYPhase gate to two qubits within a block.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the first logical qubit.
j – The index of the second logical qubit.
- yy_phase_between_blocks(k: int, i: int, j: int) ExtOp[source]¶
Apply a YYPhase gate to two qubits on different blocks of the same size.
- Parameters:
k – The number of logical qubits encoded in the blocks.
i – The index of the logical qubit in the first block.
j – The index of the logical qubit in the second block.
- yy_phase_between_blocks_d(k: int) ExtOp[source]¶
Apply a YYPhase gate to two qubits on different blocks of the same size with dynamic indices.
- Parameters:
k – The number of logical qubits encoded in the blocks.
- property yy_phase_between_blocks_d_def: OpDef¶
Apply a YYPhase gate to two qubits on different blocks of the same size with dynamic indices.
This is the generic operation definition. For the instantiated operation, see yy_phase_between_blocks_d.
- property yy_phase_between_blocks_def: OpDef¶
Apply a YYPhase gate to two qubits on different blocks of the same size.
This is the generic operation definition. For the instantiated operation, see yy_phase_between_blocks.
- yy_phase_d(k: int) ExtOp[source]¶
Apply a YYPhase gate to two qubits within a block with dynamic indices.
- Parameters:
k – The number of logical qubits encoded in the block.
- property yy_phase_d_def: OpDef¶
Apply a YYPhase gate to two qubits within a block with dynamic indices.
This is the generic operation definition. For the instantiated operation, see yy_phase_d.
- property yy_phase_def: OpDef¶
Apply a YYPhase gate to two qubits within a block.
This is the generic operation definition. For the instantiated operation, see yy_phase.
- z(k: int, i: int) ExtOp[source]¶
Apply a Z gate to one qubit.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit.
- z_d(k: int) ExtOp[source]¶
Apply a Z gate to one qubit with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property z_d_def: OpDef¶
Apply a Z gate to one qubit with dynamic index.
This is the generic operation definition. For the instantiated operation, see z_d.
- property z_def: OpDef¶
Apply a Z gate to one qubit.
This is the generic operation definition. For the instantiated operation, see z.
- z_with_all_but_one_x(k: int, i: int) ExtOp[source]¶
Apply a Z gate to one qubit and an X to the rest.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the logical qubit.
- z_with_all_but_one_x_d(k: int) ExtOp[source]¶
Apply a Z gate to one qubit and an X to the rest with dynamic index.
- Parameters:
k – The number of logical qubits encoded in the block.
- property z_with_all_but_one_x_d_def: OpDef¶
Apply a Z gate to one qubit and an X to the rest with dynamic index.
This is the generic operation definition. For the instantiated operation, see z_with_all_but_one_x_d.
- property z_with_all_but_one_x_def: OpDef¶
Apply a Z gate to one qubit and an X to the rest.
This is the generic operation definition. For the instantiated operation, see z_with_all_but_one_x.
- zz(k: int, i: int, j: int) ExtOp[source]¶
Apply a Z gate to two qubits.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the first logical qubit.
j – The index of the second logical qubit.
- zz_d(k: int) ExtOp[source]¶
Apply a Z gate to two qubits with dynamic indices.
- Parameters:
k – The number of logical qubits encoded in the block.
- property zz_d_def: OpDef¶
Apply a Z gate to two qubits with dynamic indices.
This is the generic operation definition. For the instantiated operation, see zz_d.
- property zz_def: OpDef¶
Apply a Z gate to two qubits.
This is the generic operation definition. For the instantiated operation, see zz.
- zz_phase(k: int, i: int, j: int) ExtOp[source]¶
Apply a ZZPhase gate to two qubits within a block.
- Parameters:
k – The number of logical qubits encoded in the block.
i – The index of the first logical qubit.
j – The index of the second logical qubit.
- zz_phase_between_blocks(k: int, i: int, j: int) ExtOp[source]¶
Apply a ZZPhase gate to two qubits on different blocks of the same size.
- Parameters:
k – The number of logical qubits encoded in the blocks.
i – The index of the logical qubit in the first block.
j – The index of the logical qubit in the second block.
- zz_phase_between_blocks_d(k: int) ExtOp[source]¶
Apply a ZZPhase gate to two qubits on different blocks of the same size with dynamic indices.
- Parameters:
k – The number of logical qubits encoded in the blocks.
- property zz_phase_between_blocks_d_def: OpDef¶
Apply a ZZPhase gate to two qubits on different blocks of the same size with dynamic indices.
This is the generic operation definition. For the instantiated operation, see zz_phase_between_blocks_d.
- property zz_phase_between_blocks_def: OpDef¶
Apply a ZZPhase gate to two qubits on different blocks of the same size.
This is the generic operation definition. For the instantiated operation, see zz_phase_between_blocks.
- zz_phase_d(k: int) ExtOp[source]¶
Apply a ZZPhase gate to two qubits within a block with dynamic indices.
- Parameters:
k – The number of logical qubits encoded in the block.
- property zz_phase_d_def: OpDef¶
Apply a ZZPhase gate to two qubits within a block with dynamic indices.
This is the generic operation definition. For the instantiated operation, see zz_phase_d.