seemps.state.CanonicalMPS.extend#
method
- CanonicalMPS.extend(L, sites=None, dimensions=2, state=None)#
Enlarge an MPS so that it lives in a Hilbert space with L sites.
- Parameters:
- L
int
The new size of the MPS. Must be strictly larger than self.size.
- sites
Iterable
[int
],optional
Sequence of integers describing the sites that occupied by the tensors in this state.
- dimensions
Union
[int
,list
[int
]],default
= 2 Dimension of the added sites. It can be the same integer or a list of integers with the same length as sites.
- L
- Returns:
MPS
The extended MPS.
Examples
>>> import seemps.state >>> mps = seemps.state.random(2, 10) >>> mps.physical_dimensions() [2, 2, 2, 2, 2, 2, 2, 2, 2, 2] >>> mps = mps.extend(12, [0, 2, 4, 5, 6, 7, 8, 9, 10, 11], 3) >>> mps.physical_dimensions() [2, 3, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2]