cuquantum.custatevec.abs2sum_array

cuquantum.custatevec.abs2sum_array(intptr_t handle, intptr_t sv, int sv_data_type, uint32_t n_index_bits, intptr_t abs2sum, bit_ordering, uint32_t bit_ordering_len, mask_bit_string, mask_ordering, uint32_t mask_len)[source]

Calculate abs2sum array for a given set of index bits.

Parameters
  • handle (intptr_t) – the handle to the cuStateVec library.

  • sv (intptr_t) – state vector.

  • sv_data_type (int) – data type of state vector.

  • n_index_bits (uint32_t) – the number of index bits.

  • abs2sum (intptr_t) – pointer to a host or device array of sums of squared absolute values.

  • bit_ordering (object) –

    pointer to a host array of index bit ordering. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of int32_t.

  • bit_ordering_len (uint32_t) – the length of bit_ordering.

  • mask_bit_string (object) –

    pointer to a host array for a bit string to specify mask. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of int32_t.

  • mask_ordering (object) –

    pointer to a host array for the mask ordering. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of int32_t.

  • mask_len (uint32_t) – the length of mask.