loom.eka.utilities.logical_operator_finding
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.eka.utilities.logical_operator_finding.find_logical_operator_set(stabarr)[source]
Given a stabilizer array of a code, find a set of X and Z logical operators. The Z logical operators shall contain only Z operators while the X logical operators may contain both X and Z operators. They may not be in their simplified form.
This algorithm follows the notation and algorithm described in: Nielsen, M. A., & Chuang, I. L. (2011). (p.470-471) Quantum Computation and Quantum Information: 10th Anniversary Edition. Cambridge University Press,
How it works (ignoring signs):
1. The stabilizer array is first put into standard form. The standard form is of the form:
(I, A1, A2 | B, 0, C) (0, 0, 0 | D, I, E)
Note that the stabilizer array has to be reindexed to the standard form.
The Z logical operators are then given by:
(0, 0, 0 | A2^T, 0, I)
and the X logical operators are given by:
(0, E^T, I | C^T , 0, 0)
Reindex the logical operators to the original qubit order.