PauliTable#

class cuquantum.stabilizer.PauliTable(
x_table: ndarray | cp.ndarray,
z_table: ndarray | cp.ndarray,
num_paulis: int,
num_qubits: int,
bit_packed: bool = False,
)[source]#

Holds Pauli frame table data.

The table can store data in one of 4 formats:

  • bit-packed on CPU

  • unpacked on GPU

  • bit-packed on GPU

  • unpacked on CPU

Methods

__init__(
x_table: ndarray | cp.ndarray,
z_table: ndarray | cp.ndarray,
num_paulis: int,
num_qubits: int,
bit_packed: bool = False,
)[source]#

Initialize a PauliTable.

Parameters:
  • x_table – X bit table (NumPy or CuPy array)

  • z_table – Z bit table (NumPy or CuPy array)

  • num_paulis – Number of Pauli samples

  • num_qubits – Number of qubits

  • bit_packed – Whether tables are in bit-packed format (default: False)

Attributes

num_qubits: int#

number of qubits

num_paulis: int#

number of paulis

x_table: ndarray | cp.ndarray#

X bits of Pauli frames

z_table: ndarray | cp.ndarray#

Z bits of Pauli frames

bit_packed: bool#

whether the X and Z bit tables are in bit-packed format