loom.eka.operations.logical_measurement

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.operations.logical_measurement.LogicalMeasurement(*args, **kwargs)[source]

Bases: object

LogicalMeasurement acts as a wrapper to describe the type of logical measurement based on the block(s) involved and the pauli product of the observable. NOTE: Assumes that each block only consist of one logical qubit, and refers only to the latest logical measurement of the block(s).

E.g. LogicalMeasurement((“block0”, “block1”), “ZZ”) describes the joint ZZ measurement between block0 and block1.

Parameters:
  • blocks (tuple[str, ...]) – List of names of blocks that are involved in the logical measurement.

  • observable (str) – Pauli string describing the type of logical measurement.

blocks: tuple[str, ...]
observable: str