Expand description
Utility functions shared across quantum simulation backends.
Provides Kronecker-product assembly, gate-matrix conversion, bit-flip helpers, and other low-level routines used internally by the simulators.
Functionsยง
- bits_
to_ int - Calculate the integer representation of a bit string
- compute_
index - Compute the global index for a multi-qubit system
- controlled_
flip - Compute the index with a controlled bit flip
- flip_
bit - Compute the index with a bit flipped at the specified position
- gate_
vec_ to_ array2 - Convert a matrix representation of a gate (row-major) to a 2D ndarray
- int_
to_ bits - Calculate the bit representation of an integer
- kron
- Calculate the kronecker product of two matrices
- par_
indexed_ map - Parallel map over state vector elements with index
- tensor_
product - Calculate the tensor product of two state vectors