French
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.quantum_info.PauliTable.to_labels

PauliTable.to_labels(array=False)[source]

Convert a PauliTable to a list Pauli string labels.

For large PauliTables converting using the array=True kwarg will be more efficient since it allocates memory for the full Numpy array of labels in advance.

Table 6 Pauli Representations

Label

Symplectic

Matrix

"I"

\([0, 0]\)

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

"X"

\([1, 0]\)

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

"Y"

\([1, 1]\)

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

"Z"

\([0, 1]\)

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

Paramètres

array (bool) – return a Numpy array if True, otherwise return a list (Default: False).

Renvoie

The rows of the PauliTable in label form.

Type renvoyé

list or array