cuquantum.custatevec.collapse_by_bit_string_batched_get_workspace_size

cuquantum.custatevec.collapse_by_bit_string_batched_get_workspace_size(intptr_t handle, uint32_t n_svs, bit_strings, norms) size_t[source]

This function gets the required workspace size for collapse_by_bit_string_batched().

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

  • n_svs (uint32_t) – the number of batched state vectors.

  • bit_strings (object) –

    pointer to an array of bit strings, on either host or device. It can be:

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

    • a Python sequence of custatevecIndex_t.

  • norms (object) –

    pointer to an array of normalization constants, on either host or device. It can be:

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

    • a Python sequence of double.

Returns

workspace size.

Return type

size_t