loom.eka.utilities.tableau

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.tableau.is_tableau_valid(tableau)[source]

Checks if a tableau is valid. This is done by checking if it generates the pauli group and whether the correct commutation relations hold.

For the commutation relations, the tableau is split into two sets of stabilizers of equal size calling them S (stabilizers) and D (destabilizers). The following is then checked:

  • All stabilizers of S commute with each other and all stabilizers of D

    commute with each other.

  • Stabilizer i from list S has to anti-commute with stabilizer j from list

    D if i=j. If i != j, they have to commute.

Parameters:

tableau (np.ndarray) – The tableau to be checked.

Returns:

Whether the tableau is valid.

Return type:

bool

loom.eka.utilities.tableau.tableau_generates_pauli_group(tableau)[source]

Given a tableau, check if all of its operators, (stabilizers & destabilizers) can generate the pauli group. This is done by checking if the tableau is equivalent to the identity matrix after performing gaussian elimination.

Parameters:

tableau (np.ndarray) – The tableau to be checked.

Returns:

Whether the tableau generates the Pauli group.

Return type:

bool