seemps.state.MPS.from_tensor#
method
- classmethod MPS.from_tensor(state, strategy=<seemps.state.core.Strategy object>, normalize=True, **kwdargs)[source]#
Create a matrix-product state from a tensor that represents a composite quantum system.
The tensor state must have N>=1 indices, each of them associated to an individual quantum system, in left-to-right order. This function decomposes the tensor into a contraction of N three-legged tensors as expected from an MPS.
- Parameters:
- state
np.ndarray
Real or complex tensor with N legs.
- strategy
Strategy
,default
=DEFAULT_STRATEGY
Default truncation strategy for algorithms working on this state.
- normalizebool,
default
=True
Whether the state is normalized to compensate truncation errors.
- state
- Returns:
MPS
A valid matrix-product state approximating this state vector.