cuquantum.custatevec.collapse_by_bitstring_batched_get_workspace_size

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

Computes the required workspace size for collapse_by_bitstring_batched().

Parameters
  • handle (intptr_t) – The library handle.

  • n_svs (uint32_t) – The number of batched statevectors.

  • bit_strings

    An array of bit strings. It can be

    • an int as the pointer address to the array (on host or device)

    • a Python sequence of bits on host

  • norms

    An array of normalization factors for the statevectors after collapse. It can be

    • an int as the pointer address to the array (on host or device)

    • a Python sequence of normalization factors on host