cuquantum.custatevec.accessor_create_view

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

Create accessor for the constant state vector.

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 of state vector.

  • bit_ordering (object) –

    pointer to a host array to specify the basis bits of the external buffer. 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 to specify the mask values to limit access. 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.

Returns

  • intptr_t: pointer to an accessor descriptor.

  • size_t: the required size of extra workspace.

Return type

A 2-tuple containing