create_pauli_expansion#

cuquantum.bindings.cupauliprop.create_pauli_expansion(
intptr_t handle,
int32_t num_qubits,
intptr_t xz_bits_buffer,
int64_t xz_bits_buffer_size,
intptr_t coef_buffer,
int64_t coef_buffer_size,
int data_type,
int64_t num_terms,
int sort_order,
int32_t has_duplicates,
) intptr_t[source]#

Creates a Pauli operator expansion.

Parameters:
  • handle (intptr_t) – Library handle.

  • num_qubits (int32_t) – Number of qubits.

  • xz_bits_buffer (intptr_t) – Pointer to a user-owned memory buffer to be used by the created Pauli operator expansion for storing the X and Z bits for each Pauli operator term. The first num_terms Pauli operator terms will define the current Pauli operator expansion.

  • xz_bits_buffer_size (int64_t) – Size (in bytes) of the provided memory buffer for storing the X and Z bits.

  • coef_buffer (intptr_t) – Pointer to a user-owned memory buffer to be used by the created Pauli operator expansion for storing the coefficients for all Pauli operator terms. The first num_terms Pauli operator terms will define the current Pauli operator expansion.

  • coef_buffer_size (int64_t) – Size (in bytes) of the provided memory buffer for storing the coefficients.

  • data_type (int) – Data type of the coefficients in the Pauli operator expansion.

  • num_terms (int64_t) – Number of the Pauli operator terms stored in the provided memory buffer (the first num_terms components define the current Pauli operator expansion).

  • sort_order (SortOrder) – Sort order of the expansion. Use CUPAULIPROP_SORT_ORDER_NONE for unsorted expansions.

  • has_duplicates (int32_t) – Whether or not there are duplicates in the expansion, i.e. several terms with identical X and Z bits.

Returns:

Pauli operator expansion.

Return type:

intptr_t