loom.eka.operations.base_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.base_operation.BaseOperation(*args, **kwargs)[source]

Bases: Operation

Base class for all operations in the EKA.

NOTE: Base Operations are Operations that can be generalized to any setup of the EKA. They are not specific to a particular code or setup. This could range from single qubit gates on specific qubits to measuring specific stabilizers of the code.

class loom.eka.operations.base_operation.MeasureObservable(*args, **kwargs)[source]

Bases: BaseOperation

Measure an observable.

Parameters:

observable (PauliOperator) – Observable to measure.

observable: PauliOperator
class loom.eka.operations.base_operation.MeasureStabilizerSyndrome(*args, **kwargs)[source]

Bases: BaseOperation

Measure the syndrome of a single stabilizer.

Parameters:

stabilizer (Stabilizer) – Stabilizer to measure.

stabilizer: Stabilizer
class loom.eka.operations.base_operation.Operation(*args, **kwargs)[source]

Bases: object

Parent class for all operations in the EKA.

asdict()[source]

Serialize the operation to a dictionary.

classmethod fromdict(data_dict)[source]

Deserialize the operation from a dictionary.