loom.interpreter.applicator.measure_logical_pauli

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.

loom.interpreter.applicator.measure_logical_pauli.measurelogicalpauli(interpretation_step, operation, same_timeslice, debug_mode)[source]

Measure a logical Pauli operator. Y logical measurements are not supported yet.

The algorithm is the following:

  • A.) Measure all data qubits in the block

  • B.) Update Syndromes for all stabilizers involved in the data qubits measured

  • C.) Create the logical observable including measured data qubits and all previous corrections

Parameters:
  • interpretation_step (InterpretationStep) – The interpretation step to which the operation should be applied.

  • operation (MeasureLogicalX | MeasureLogicalY | MeasureLogicalZ) – The operation to be applied, can either be a logical X, Y or Z measurement.

  • same_timeslice (bool) – Flag indicating whether the operation is part of the same timestep as the previous operation.

  • debug_mode (bool) – Flag indicating whether the interpretation should be done in debug mode. Activating debug mode will enable commutation validation for Block.

Returns:

New InterpretationStep containing all modifications due to the logical pauli measurement.

Return type:

InterpretationStep