state_projection_mps_insert_tensor#

cuquantum.bindings.cutensornet.state_projection_mps_insert_tensor(
intptr_t handle,
intptr_t tensor_network_projection,
intptr_t env_spec,
intptr_t ortho_spec,
strides,
intptr_t env_tensor_data,
intptr_t work_desc,
intptr_t cuda_stream,
)[source]#

Inserts the MPS representation tensor for the specified contiguous 0-, 1-, or 2-site subset of sites.

Parameters:
  • handle (intptr_t) – cuTensorNet library handle.

  • tensor_network_projection (intptr_t) – Tensor network state MPS projection.

  • env_spec (intptr_t) – Specification of environment.

  • ortho_spec (intptr_t) – Specification of the orthogonality condition of the MPS after insertion. For insertion of a 1-site environment, this argument is currently required to be identical to env_spec.

  • strides (object) –

    Strides of the externally provided MPS representation tensor for the specified environment. It can be:

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

    • a Python sequence of int64_t.

  • env_tensor_data (intptr_t) – Externally provided MPS representation tensor for the specified environment. If the projection MPS is configured with two-site environments, extents may have changed after insertion of tensors and need to be queried using state_projection_mps_get_tensor_info().

  • work_desc (intptr_t) – Allocated workspace descriptor.

  • cuda_stream (intptr_t) – CUDA stream.