compute_expectations_on_pauli_basis#
-
cuquantum.
bindings. custatevec. compute_expectations_on_pauli_basis( - intptr_t handle,
- intptr_t sv,
- int sv_data_type,
- uint32_t n_index_bits,
- intptr_t expectation_values,
- pauli_operators_array,
- uint32_t n_pauli_operator_arrays,
- basis_bits_array,
- n_basis_bits_array,
Calculate expectation values for a batch of (multi-qubit) Pauli operators.
- Parameters:
handle (intptr_t) – the handle to the cuStateVec library.
sv (intptr_t) – state vector.
sv_data_type (int) – data type of the state vector.
n_index_bits (uint32_t) – the number of index bits of the state vector.
expectation_values (intptr_t) – pointer to a host array to store expectation values.
pauli_operators_array (object) –
pointer to a host array of Pauli operator arrays. It can be:
n_pauli_operator_arrays (uint32_t) – the number of Pauli operator arrays.
basis_bits_array (object) –
host array of basis bit arrays. It can be:
n_basis_bits_array (object) –
host array of the number of basis bits. It can be:
an
int
as the pointer address to the array, ora Python sequence of
uint32_t
.