create_state_mps#

cuquantum.bindings.cudensitymat.create_state_mps(
intptr_t handle,
int purity,
int32_t num_space_modes,
space_mode_extents,
int boundary_condition,
bond_extents,
int data_type,
int64_t batch_size,
) intptr_t[source]#

Defines an empty quantum state of a given purity and shape in the Matrix Product State (MPS) factorized form, or a batch of such MPS factorized quantum states.

Parameters:
  • handle (intptr_t) – Library handle.

  • purity (StatePurity) – Desired quantum state purity.

  • num_space_modes (int32_t) – Number of space modes (number of quantum degrees of freedom).

  • space_mode_extents (object) –

    Extents of the space modes (dimensions of the quantum degrees of freedom). It can be:

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

    • a Python sequence of int64_t.

  • boundary_condition (BoundaryCondition) – Boundary condition.

  • bond_extents (object) –

    Extents of the bond modes. For open boundary condition, the length of the array must be equal to the number of space modes minus one, where bond_extents[i] is the bond dimension between site i and site i+1. For periodic boundary condition, the length of the array must be equal to the number of space modes. It can be:

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

    • a Python sequence of int64_t.

  • data_type (int) – Quantum state data type.

  • batch_size (int64_t) – Batch size (number of equally-shaped quantum states in the batch).

Returns:

Empty quantum state (or a batch of quantum states) in the MPS factorized form.

Return type:

intptr_t