loom.eka.stabilizer

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.

class loom.eka.stabilizer.Stabilizer(*args, **kwargs)[source]

Bases: PauliOperator

A stabilizer, representing the parity of a set of data qubits in the basis as defined in pauli.

Parameters:
  • pauli (str) – The Pauli string of the stabilizer, i.e. in which basis the data qubits are included in the stabilizer.

  • data_qubits (tuple[tuple[int, ...], ...]) – Data qubits involved in the stabilizer. They are referred to by their coordinates in the lattice.

  • uuid (str) – Unique identifier of the stabilizer. This is automatically set to a random UUID.

  • ancilla_qubits (tuple[tuple[int, ...], ...], optional) – Ancilla qubits involved in the stabilizer. They are referred to by their coordinates in the lattice. Default is an empty tuple.

ancilla_qubits: tuple[tuple[int, ...], ...] = FieldInfo(annotation=tuple[tuple[int, ...], ...], required=False, default_factory=tuple, validate_default=True)
uuid: str = FieldInfo(annotation=str, required=False, default_factory=<lambda>, validate_default=True)