Equivalence Checking

The equivalence checking problem for quantum error-correction codes can be defined as follows:

Given two quantum error-correction codes \(\text{C}\) and \(\text{C}'\), do they define the same code space under a set of admissible transformations?

Equivalence notions define the admissible transformations. In the following, we briefly explain the considered equivalence notions, and their restrictions in our implementation.

1from mqt.qecc import (
2    StabilizerCode,
3    are_local_clifford_equivalent,
4    are_permutation_equivalent,
5    is_local_clifford_equivalent_to_css,
6)
7
8base_code = StabilizerCode(generators=["XXXX","ZZII","IIZZ"])

Equivalence Notions

Exact Equivalence

Two stabilizer codes \(\text{C}\) and \(\text{C}'\) are considered exactly equivalent, if and only if they have exactly the same code space, which is precisely the case when they have the same stabilizer group.

This notion is checked with the function equal_stabilizer_group:

1other_code = StabilizerCode(generators=["ZZZZ", "YYYY", "ZZII"])
2
3print(base_code.equal_stabilizer_group(other_code))
True

Note

Unlike exact equivalence, the following permutation and local Clifford equivalence use the unsigned stabilizer group: generator phases are ignored. Thus, stabilizers only need to be mapped onto each other up to signs. Any remaining signs can be corrected by a Pauli operation on the physical qubits.

Permutation Equivalence

Two codes \(\text{C}\) and \(\text{C}'\) are considered permutation-equivalent if and only if their code spaces are related by a permutation of the physical qubits. Equivalently, their stabilizer groups differ by a common permutation of the Pauli operators in their elements.

This notion is checked, and a potential witness permutation extracted, using the function are_permutation_equivalent:

1other_code = StabilizerCode(generators=["XXXX","ZIZI","IZIZ"])
2
3print(are_permutation_equivalent(base_code, other_code))
[0, 2, 1, 3]

Local Clifford Equivalence

Two codes \(\text{C}\) and \(\text{C}'\) are regarded Local-Clifford-equivalent if and only if they have the same code space up to a local Clifford operation on the physical qubits. This is precisely the case when their stabilizer groups differ by the conjugation with a common local Clifford operation on their elements.

This notion is checked, and a potential witness operation extracted, using the function are_local_clifford_equivalent:

1other_code = StabilizerCode(generators=["ZXXX","XZII","IIZZ"])
2
3print(are_local_clifford_equivalent(base_code, other_code))
['H', 'I', 'I', 'I']

Local Clifford Equivalence to a CSS Code

The module also supports deciding, whether a given stabilizer code is local-Clifford-equivalent to an arbitrary CSS Code. As an example, this can be used to enable a more optimized encoder circuit synthesis (Encoding Circuit Synthesis) for the equivalent CSS code and modifying the resulting circuit with the witness operation to obtain an encoder circuit for the given stabilizer code.

For now, the current implementation does not support the extraction of a witness operation.

1stabilizer_code = StabilizerCode(generators=["YX"])
2
3print(is_local_clifford_equivalent_to_css(stabilizer_code))
True