mps¶
full name: tenpy.networks.mps
parent module:
tenpy.networks
type: module
Classes

A Matrix Product State, finite (MPS) or infinite (iMPS). 

Stores partial contractions of \(<braOpket>\) for local operators Op. 

Transfer matrix of two MPS (bra & ket). 
Functions

Build an “initial state” list 
Module description
This module contains a base class for a Matrix Product State (MPS).
An MPS looks roughly like this:
  B[0]  B[1]  B[2]  ...
   
We use the following label convention for the B (where arrows indicate qconj):
 vL > B > vR
 
 ^
 p
We store one 3leg tensor _B[i] with labels 'vL', 'vR', 'p'
for each of the L sites
0 <= i < L
.
Additionally, we store L+1
singular value arrays _S[ib] on each bond 0 <= ib <= L
,
independent of the boundary conditions.
_S[ib]
gives the singlur values on the bond i1, i
.
However, be aware that e.g. chi
returns only the dimensions of the
nontrivial_bonds
depending on the boundary conditions.
The matrices and singular values always represent a normalized state
(i.e. np.linalg.norm(psi._S[ib]) == 1
up to roundoff errors),
but (for finite MPS) we keep track of the norm in norm
(which is respected by overlap()
, …).
Valid MPS boundary conditions (not to confuse with bc_coupling of
tenpy.models.model.CouplingModel
) are the following:
bc 
description 

‘finite’ 
Finite MPS, 
‘segment’ 
Generalization of ‘finite’, describes an MPS embedded in left and right
environments. The left environment is described by 
‘infinite’ 
infinite MPS (iMPS): we save a ‘MPS unit cell’ 
An MPS can be in different ‘canonical forms’ (see [Vidal2004], [Schollwoeck2011]).
To take care of the different canonical forms, algorithms should use functions like
get_theta()
, get_B()
and set_B()
instead of accessing them directly,
as they return the B in the desired form (which can be chosen as an argument).
The values of the tuples for the form correspond to the exponent of the singular values
on the left and right.
To keep track of a “mixed” canonical form A A A s B B
, we save the tuples for each
site of the MPS in MPS.form
.
form 
tuple 
description 


(0, 1) 
right canonical: 

(0.5, 0.5) 
symmetric form: 

(1, 0) 
left canonical: 

(0, 0) 
Save only 

(1, 1) 
Form of a local wave function theta with singular value on both sides.



General noncanoncial form.
Valid form for initialization, but you need to call
