loom.cliffordsim.operations.resize_operation

Copyright (c) Entropica Labs Pte Ltd 2025.

Use, distribution and reproduction of this program in its source or compiled form is prohibited without the express written consent of Entropica Labs Pte Ltd.

class loom.cliffordsim.operations.resize_operation.AddQubit(target_qubit)[source]

Bases: ResizeOperation

An Operation that adds a qubit to the Engine during runtime. The qubit will be initialised in the |0> state.

name: str = 'AddQubit'
class loom.cliffordsim.operations.resize_operation.DeleteQubit(target_qubit)[source]

Bases: ResizeOperation

An Operation that deletes a qubit from the Engine during runtime.

name: str = 'DeleteQubit'
class loom.cliffordsim.operations.resize_operation.ResizeOperation(target_qubit)[source]

Bases: Operation

Operations of this type resize the number of qubits in the Engine during runtime.

operation_type: str = 'Resize'
target_qubit: int
with_ccontrol(reg_name, bit_order=None, bit_id=None)

This method returns a ControlledOperation wrapped version of the Operation class. The wrapped Operation class is classically controlled by the bit from the classical register specified by reg_name in bit_order or by bit_id.

NOTE: ControlledOperation(s) can only be conditioned on one classical bit.