loom.cliffordsim.operations.resize_operation

Copyright 2024 Entropica Labs Pte Ltd

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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.