cuquantum.cutensornet.create_state

cuquantum.cutensornet.create_state(intptr_t handle, int purity, int32_t num_state_modes, state_mode_extents, int data_type) intptr_t[source]

Creates an empty tensor network state of a given shape defined by the number of primary tensor modes and their extents.

Parameters
  • handle (intptr_t) – cuTensorNet library handle.

  • purity (StatePurity) – Desired purity of the tensor network state (pure or mixed).

  • num_state_modes (int32_t) – Number of the defining state modes, irrespective of state purity. Note that both pure and mixed tensor network states are defined solely by the modes of the primary direct-product space.

  • state_mode_extents (object) –

    Pointer to the extents of the defining state modes (dimensions of the vector spaces constituting the primary direct-product space). It can be:

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

    • a Python sequence of int64_t.

  • data_type (int) – Data type of the state tensor.

Returns

Tensor network state (empty at this point, aka vacuum).

Return type

intptr_t