loom.cliffordsim.operations.gate_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.gate_operation.CNOT(control_qubit, target_qubit)[source]

Bases: TwoQubitGateOperation

The CNOT gate operation. Acts on two qubits, the control and target qubits.

name: str = 'CNOT'
class loom.cliffordsim.operations.gate_operation.CY(control_qubit, target_qubit)[source]

Bases: TwoQubitGateOperation

The CY gate operation. Acts on two qubits, the control and target qubits.

name: str = 'CY'
class loom.cliffordsim.operations.gate_operation.CZ(control_qubit, target_qubit)[source]

Bases: TwoQubitGateOperation

The CZ gate operation. Acts on two qubits, the control and target qubits.

name: str = 'CZ'
class loom.cliffordsim.operations.gate_operation.GateOperation[source]

Bases: Operation

Operations of this type perform quantum gate operations on qubits within the Engine during runtime.

abstract property operating_qubit

Returns a list of qubits that the gate operation acts on.

operation_type: str = 'QuantumGate'
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.

class loom.cliffordsim.operations.gate_operation.Hadamard(target_qubit)[source]

Bases: OneQubitGateOperation

The Hadamard gate operation. Acts on a single qubit.

name: str = 'Hadamard'
class loom.cliffordsim.operations.gate_operation.Identity(target_qubit)[source]

Bases: OneQubitGateOperation

The Identity gate operation. It does nothing to the qubit.

name: str = 'Identity'
class loom.cliffordsim.operations.gate_operation.OneQubitGateOperation(target_qubit)[source]

Bases: GateOperation

A gate operation that acts on a single qubit.

property operating_qubit

Returns a list of qubits that the gate operation acts on.

target_qubit: int
class loom.cliffordsim.operations.gate_operation.Phase(target_qubit)[source]

Bases: OneQubitGateOperation

The Phase gate operation. Acts on a single qubit.

name: str = 'Phase'
class loom.cliffordsim.operations.gate_operation.PhaseInv(target_qubit)[source]

Bases: OneQubitGateOperation

The Phase Inverse gate operation. Acts on a single qubit.

name: str = 'PhaseInv'
class loom.cliffordsim.operations.gate_operation.SWAP(control_qubit, target_qubit)[source]

Bases: TwoQubitGateOperation

The SWAP gate operation. Acts on two qubits, swapping their states.

name: str = 'SWAP'
class loom.cliffordsim.operations.gate_operation.TwoQubitGateOperation(control_qubit, target_qubit)[source]

Bases: GateOperation

A gate operation that acts on two qubits.

control_qubit: int
property operating_qubit

Returns a list of qubits that the gate operation acts on.

target_qubit: int
class loom.cliffordsim.operations.gate_operation.X(target_qubit)[source]

Bases: OneQubitGateOperation

The Pauli-X gate operation. Acts on a single qubit.

name: str = 'X'
class loom.cliffordsim.operations.gate_operation.Y(target_qubit)[source]

Bases: OneQubitGateOperation

The Pauli-Y gate operation. Acts on a single qubit.

name: str = 'Y'
class loom.cliffordsim.operations.gate_operation.Z(target_qubit)[source]

Bases: OneQubitGateOperation

The Pauli-Z gate operation. Acts on a single qubit.

name: str = 'Z'