loom_rotated_surface_code.applicator.grow

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

Grow a Block in the specified direction.

The algorithm is the following:

  • A.) Create the new piece of surface code (the “extra” part of the grown block)

    • A.1) Find the corner of the additional piece

    • A.2) Find the Pauli flavour of the upper left 4-body for the new piece

    • A.3) Create the new 4-body stabilizers

    • A.4) Create the new 2-body stabilizers

    • A.5) Identify the stabilizers to remove and the ones to replace them with

    • A.6) Add the new stabilizers to the stabilizer_evolution

  • B.) Create the reset circuit

    • B.1) Reset all data qubits involved in the growth in the right basis

    • B.2) Create empty syndromes for the relevant stabilizers

  • C.) Associate the new stabilizers to their respective syndrome circuits

    • C.1) Recover the syndrome circuits by name

    • C.2) Update the stabilizer to circuit mapping

  • D.) Create the new logical operators and keep track of the evolution

Parameters:
  • interpretation_step (InterpretationStep) – Interpretation step containing the block to grow.

  • operation (Grow) – Grow 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 grow operation.

Return type:

InterpretationStep