loom.interpreter.applicator.reset_all_data_qubits

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.reset_all_data_qubits.reset_all_data_qubits(interpretation_step, operation, same_timeslice, debug_mode)[source]

Resets all data qubits of a block to a specific SingleQubitPauliEigenstate. It also adds empty Syndrome objects for the stabilizers will be deterministic in the first round of syndrome measurement cycles dependent on the initialization state. This helps to put Detectors on these deterministic measurements when the block is measured.

NOTE: Initializing a Y state may come with some caveats, as the implementation of the initialization may not be fault-tolerant for some codes. For example, in the case of the Rotated Surface Code, initializing a Y state may require distillation for it to be fault-tolerant.

TODO: This function may need to reset the tracking of Pauli faults on the data qubits.

Parameters:
  • interpretation_step (InterpretationStep) – Interpretation step containing the blocks whose data qubits need to be reset.

  • operation (ResetAllDataQubits) – Reset data operation description.

  • 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:

Interpretation step after the reset data operation.

Return type:

InterpretationStep