iMPS
Tools for converting finite to infinite MPS.
Constructs an iMPS by comparing two finite MPS. |
|
Overlap or optimal basis rotation between two sets of Schmidt vectors. |
|
Overlap or optimal basis rotation between two sets of Schmidt vectors. |
|
Container of the approximation errors accrued by |
- temfpy.iMPS.MPS_to_iMPS(mps_short, mps_long, sites_per_cell, cut, unitary_tol=1e-06, schmidt_tol=1e-06, offset='auto', unit_cell_width=None)[source]
Constructs an iMPS by comparing two finite MPS.
The two MPS are expected to represent the ground states of a gapped, translation invariant Hamiltonian on two system sizes that differ by one repeating unit cell.
For sufficiently large systems, therefore, they are of the form
...(A...B)(A...B)... ...(A...B)(A...B)(A...B)...
up to gauge transformations. The repeating unit cell
(A...B)is extracted from the longer chain, and its gauge is fixed by comparing its left and right environments to the Schmidt vectors of the shorter chain.- Parameters:
mps_short (
MPS) – MPS of the shorter chain.mps_long (
MPS) – MPS of the longer chain.sites_per_cell (
int) – Size of the iMPS unit cell.cut (
int) – First site of the repeating unit cell inmps_long.unitary_tol (
float) – Maximum deviation of the gauge rotation matrices from unitarity before a warning is raised.schmidt_tol (
float) – Maximum mixing of unequal Schmidt values by the gauge rotation matrices before a warning is raised.offset (
Union[Iterable[Union[int,Literal['auto']]],int,Literal['auto']]) –Charge quantum numbers to be subtracted from virtual leg charges of the output iMPS.
The idea is to remove the total expected charge to the left of the iMPS unit cell, so that the virtual charges of the iMPS are closer to 0.
For each conserved charge, can be either an explicit charge or
"auto"(0 for \(\mathbb{Z}_N\) charges, rounded weighted average for U(1) charges). Default:"auto"for all charges.unit_cell_width (
int|None) –Physical length of the iMPS unit cell.
If
None(default), try to infer fromN_sites_per_hor_spacing(aka cylinder width) of the two input MPS:If they’re the same and
cutis also a multiple (i.e., it corresponds to whole cylinder rungs), keep the same cylinder width for the iMPS.Otherwise, discard both and default to
sites_per_cell(i.e., a chain).
If specified, it must divide
sites_per_celland the quotient (i.e., the cylinder width) must dividecut(i.e., the iMPS unit cell must correspond to whole rungs of the cylinder).
- Return type:
- Returns:
- temfpy.iMPS.overlap_schmidt(bra, ket, mode)[source]
Overlap or optimal basis rotation between two sets of Schmidt vectors.
- Parameters:
- Returns:
overlap – The overlaps \((C_0)_{\alpha\beta} = \langle L_\alpha'|L_\beta \rangle\) or \((D_0)_{\alpha\beta} = \langle R_\beta'|R_\alpha \rangle\), depending on
mode.Legs are labelled
"vL"(incoming) and"vR"(outgoing).- Return type:
- temfpy.iMPS.basis_rotation(overlap, Schmidt_bra, Schmidt_ket, mode, *, form='B', numerical_tol=1e-14, unitary_tol=1e-06, schmidt_tol=1e-06)[source]
Overlap or optimal basis rotation between two sets of Schmidt vectors.
- Parameters:
overlap (
Array) –The overlaps \((C_0)_{\alpha\beta} = \langle L_\alpha'|L_\beta \rangle\) or \((D_0)_{\alpha\beta} = \langle R_\beta'|R_\alpha \rangle\), depending on
mode.Legs should be labelled
"vL"(incoming) and"vR"(outgoing).Schmidt_bra (
ndarray) – Schmidt values corresponding to the bra Schmidt vectors \(\langle L'|\) or \(\langle R'|\).Schmidt_ket (
ndarray) – Schmidt values corresponding to the ket Schmidt vectors \(|L \rangle\) or \(|R \rangle\).mode (
str) – If the overlap is between “left” or “right” Schmidt vectors.form (
str) – Whether the basis rotation is to be used for a left (“A”) or a right (“B”, default) canonical MPS tensor.numerical_tol (
float) –Highest allowed negative value of the square of the unitary error.
Should be more than machine precision (\(\sim 10^{-16}\) for
float64) but less thanunitary_tolsquared.unitary_tol (
float) – Highest allowed deviation from unitarity (weighted with Schmidt values) in the overlaps before a warning is raised.schmidt_tol (
float) – Highest allowed mixing between unequal Schmidt value sectors before a warning is raised.
- Return type:
- Returns:
rotation_matrix (
Array) – IfTrue, the optimal unitary basis rotation matrix \(C\) that minimises the iMPS conversion error.Legs are labelled
"vL"(incoming) and"vR"(outgoing).unitary_error (float) – Deviation of the overlap matrix from unitarity, measured as the square root of the trace of \(S_{\rm ket} (C_0^\dagger C_0 - \mathbb{I}) S_{\rm ket}\).
schmidt_error (float) – Degree of mixing of Schmidt vectors with unequal Schmidt values, measured as the norm of either \(S_{\rm bra} C - C_0 S_{\rm ket}\) or \((C - C_0) S_{\rm ket}\), depending on
modeandform.