state_projection_mps_extract_tensor#

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

Computes 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. The environment has to have been requested during the creation of the tensor network state MPS projection. Note that currently only single site environments are supported.

  • 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) – The computed tensor of the MPS representation for the specified environment will be written to this buffer with the provided strides. Extents of the provided buffer need to be queried using state_projection_mps_get_tensor_info().

  • work_desc (intptr_t) – Allocated workspace descriptor.

  • cuda_stream (intptr_t) – CUDA stream.