cuquantum.bindings.cutensornet.state_finalize_mps¶
- cuquantum.bindings.cutensornet.state_finalize_mps(intptr_t handle, intptr_t tensor_network_state, int boundary_condition, extents_out, strides_out)[source]¶
Imposes a user-defined MPS (Matrix Product State) factorization on the final tensor network state with the given shape.
- Parameters
handle (intptr_t) – cuTensorNet library handle.
tensor_network_state (intptr_t) – Tensor network state.
boundary_condition (BoundaryCondition) – The boundary condition of the target MPS representation.
extents_out (object) –
Array of size
nStateModesspecifying the maximal extents of all tensors defining the target MPS representation.extents_out[i]is expected to be consistent with the mode order (shared mode between (i-1)th and i-th MPS tensor, state mode of the i-th MPS tensor, shared mode between i-th and (i+1)th MPS tensor). For the open boundary condition, the modes for the first tensor get reduced to (state mode, shared mode with the second site) while the modes for the last tensor become (shared mode with the second last site, state mode). It can be:strides_out (object) –
Array of size
nStateModesspecifying the strides of all tensors defining the target MPS representation. Similar toextents_out,strides_outis also expected to be consistent with the mode order of each MPS tensor. If NULL, the default generalized column-major strides will be assumed. It can be:
See also