loom.eka.operations.logical_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.eka.operations.logical_operation.CNOT(*args, **kwargs)[source]

Bases: LogicalOperation

Describes a CNOT gate between two logical qubits.

Parameters:
  • control_qubit (str) – Name of the control logical qubit.

  • target_qubit (str) – Name of the target logical qubit.

control_qubit: str
target_qubit: str
class loom.eka.operations.logical_operation.Hadamard(*args, **kwargs)[source]

Bases: LogicalOperation

Describes a Hadamard gate on a logical qubit.

Parameters:

target_qubit (str) – Name of the target logical qubit.

target_qubit: str
class loom.eka.operations.logical_operation.LogicalOperation(*args, **kwargs)[source]

Bases: Operation

Parent class for all logical operations in the Eka. All logical operations acts on logical qubits. Details of implementation are abstracted away, including how the qubits are constructed. E.g. they may be constructed from multiple blocks with a single qubit each, or from a single block with multiple qubits.

Note that these operations only modify the state of the logical qubits, they do not perform any code level operations like making sure the structure of the code is preserved (e.g. a block ends up being rotated).

class loom.eka.operations.logical_operation.Phase(*args, **kwargs)[source]

Bases: LogicalOperation

Describes a Phase gate on a logical qubit.

Parameters:

target_qubit (str) – Name of the target logical qubit.

target_qubit: str
class loom.eka.operations.logical_operation.PhaseInverse(*args, **kwargs)[source]

Bases: LogicalOperation

Describes an inverse Phase gate on a logical qubit.

Parameters:

target_qubit (str) – Name of the target logical qubit.

target_qubit: str
class loom.eka.operations.logical_operation.Reset(*args, **kwargs)[source]

Bases: LogicalOperation

Reset a logical qubit to one of the supported states.

Parameters:
state: SingleQubitPauliEigenstate
target_qubit: str
class loom.eka.operations.logical_operation.T(*args, **kwargs)[source]

Bases: LogicalOperation

Describes a T gate on a logical qubit.

Parameters:

target_qubit (str) – Name of the target logical qubit.

target_qubit: str
class loom.eka.operations.logical_operation.X(*args, **kwargs)[source]

Bases: LogicalOperation

Describes an X gate on a logical qubit.

Parameters:

target_qubit (str) – Name of the target logical qubit.

target_qubit: str
class loom.eka.operations.logical_operation.Y(*args, **kwargs)[source]

Bases: LogicalOperation

Describes a Y gate on a logical qubit.

Parameters:

target_qubit (str) – Name of the target logical qubit.

target_qubit: str
class loom.eka.operations.logical_operation.Z(*args, **kwargs)[source]

Bases: LogicalOperation

Describes a Z gate on a logical qubit.

Parameters:

target_qubit (str) – Name of the target logical qubit.

target_qubit: str