PauliMatrices
- class PauliMatrices(num_qudits)[source]
Bases:
Sequence
[complex128
]Pauli group of matrices.
A PauliMatrices object represents the entire of set of Pauli matrices for some number of qubits.
- __init__(num_qudits)[source]
Construct the Pauli group for num_qudits number of qubits.
- Parameters:
num_qudits (
int
) – Power of the tensor product of the Pauli group.- Raises:
ValueError – If num_qudits is less than or equal to 0.
Attributes
The Identity Matrix.
The Pauli X Matrix.
The Pauli Y Matrix.
The Pauli Z Matrix.
The NumPy array holding the pauli matrices.
Methods
count
(value)dot_product
(alpha)Computes the standard dot product of alpha with the paulis.
from_string
(pauli_string)Construct pauli matrices from a string description.
get_projection_matrices
(q_set)Return the Pauli matrices that act only on qubits in q_set.
index
(value, [start, [stop]])Raises ValueError if the value is not present.