StabilizerTable.from_labels

classmethod StabilizerTable.from_labels(labels)[source]

Construct a StabilizerTable from a list of Pauli stabilizer strings.

Pauli Stabilizer string labels are Pauli strings with an optional "+" or "-" character. If there is no +/-sign a + phase is used by default.

Table 12 Stabilizer Representations

Label

Phase

Symplectic

Matrix

Pauli

"+I"

0

\([0, 0]\)

\(\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\)

\(I\)

"-I"

1

\([0, 0]\)

\(\begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix}\)

\(-I\)

"X"

0

\([1, 0]\)

\(\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\)

\(X\)

"-X"

1

\([1, 0]\)

\(\begin{bmatrix} 0 & -1 \\ -1 & 0 \end{bmatrix}\)

\(-X\)

"Y"

0

\([1, 1]\)

\(\begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}\)

\(iY\)

"-Y"

1

\([1, 1]\)

\(\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\)

\(-iY\)

"Z"

0

\([0, 1]\)

\(\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}\)

\(Z\)

"-Z"

1

\([0, 1]\)

\(\begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}\)

\(-Z\)

Parameters

labels (list) – Pauli stabilizer string label(es).

Returns

the constructed StabilizerTable.

Return type

StabilizerTable

Raises

QiskitError – If the input list is empty or contains invalid Pauli stabilizer strings.