loom.interpreter.applicator.logical_pauli

Copyright 2024 Entropica Labs Pte Ltd

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

Apply a logical X, Y or Z operator.

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

  • operation (LogicalX | LogicalY | LogicalZ) – The operation to be applied, can either be a logical X, Y or Z operation.

  • 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 gate.

Return type:

InterpretationStep