mps-0.0.0
MatrixProductStatesinC++
 All Data Structures Namespaces Functions Variables Enumerations Enumerator Groups Pages
Quantum Mechanics

Functions

RTensor mps::coherent_state (double alpha, int nmax)
 Real coherent state truncated to a maximum of 'nmax' bosons. More...
 
CTensor mps::coherent_state (cdouble alpha, int nmax)
 Complex coherent state truncated to a maximum of 'nmax' bosons. More...
 
RSparse mps::creation_operator (int nmax)
 Fock creation operator truncated to a maximum of 'nmax' bosons. More...
 
void mps::decompose_operator (const RTensor &U, RTensor *O1, RTensor *O2)
 Schmidt decomposition of a real operator. More...
 
void mps::decompose_operator (const CTensor &U, CTensor *O1, CTensor *O2)
 Schmidt decomposition of a complex operator.
 
RSparse mps::destruction_operator (int nmax)
 Fock destruction operator truncated to a maximum of 'nmax' bosons. More...
 
RSparse mps::number_operator (int nmax)
 Fock number operator truncated to a maximum of 'nmax' bosons. More...
 
const CSparse mps::sparse_1d_hamiltonian (const CSparse &H12, const CSparse &H1, index N, bool periodic)
 Create the Hamiltonian of a translationary invariant model. More...
 
const RSparse mps::sparse_1d_hamiltonian (const RSparse &H12, const RSparse &H1, index N, bool periodic)
 Create the Hamiltonian of a translationary invariant model. More...
 
void mps::spin_operators (double s, CTensor *sx, CTensor *sy, CTensor *sz)
 Compute the angular momentum operators for a given total spin.
 

Detailed Description

Function Documentation

RTensor mps::coherent_state ( double  alpha,
int  nmax 
)

Real coherent state truncated to a maximum of 'nmax' bosons.

Return the wavefunction of a coherent state.

Definition at line 66 of file fock.cc.

CTensor mps::coherent_state ( cdouble  alpha,
int  nmax 
)

Complex coherent state truncated to a maximum of 'nmax' bosons.

Return the wavefunction of a coherent state.

Definition at line 80 of file fock.cc.

RSparse mps::creation_operator ( int  nmax)

Fock creation operator truncated to a maximum of 'nmax' bosons.

Return the Fock creation operator truncated for a space of up to 'nmax' bosons.

Definition at line 54 of file fock.cc.

void mps::decompose_operator ( const RTensor &  U,
RTensor *  O1,
RTensor *  O2 
)

Schmidt decomposition of a real operator.

This function assumes that the operator U acts on two physical systems of the same dimension D, and finds out the decomposition

\[U = \sum_{k=1}^n O^{(1)}_k \otimes O^{(2)}_k\]

In practice U is a matrix D^2xD^2, and then O1 and O2 are three-dimensional tensors with dimensions DxDxn, where n is the total number of operators required in the previous decomposition.

This decomposition is mostly useful for computing expected values using matrix product states.

Definition at line 40 of file decompose_operator_d.cc.

RSparse mps::destruction_operator ( int  nmax)

Fock destruction operator truncated to a maximum of 'nmax' bosons.

Return the Fock destruction operator truncated for a space of up to 'nmax' bosons.

Definition at line 42 of file fock.cc.

RSparse mps::number_operator ( int  nmax)

Fock number operator truncated to a maximum of 'nmax' bosons.

Return the Fock number operator truncated for a space of up to 'nmax' bosons.

Definition at line 31 of file fock.cc.

const CSparse mps::sparse_1d_hamiltonian ( const CSparse &  H12,
const CSparse &  H1,
index  N,
bool  periodic 
)

Create the Hamiltonian of a translationary invariant model.

Given a nearest neighbor interaction H12, and a local term H1, this function constructs a sparse matrix representing the Hamiltonian

\[ H = \sum_{i=1}^{n} \left[H^{(12)}_{i,i+1} + H^{(1)}_i\right]\]

Only if the flag periodic is true, the term for the interaction between the last and first particle will be included, $H^{(12)}_{1N}$.

If any of the matrices H12 or H1 is empty, it is not used.

Definition at line 37 of file sparse_1d_hamiltonian_z.cc.

const RSparse mps::sparse_1d_hamiltonian ( const RSparse &  H12,
const RSparse &  H1,
index  N,
bool  periodic 
)

Create the Hamiltonian of a translationary invariant model.

Given a nearest neighbor interaction H12, and a local term H1, this function constructs a sparse matrix representing the Hamiltonian

\[ H = \sum_{i=1}^{n} \left[H^{(12)}_{i,i+1} + H^{(1)}_i\right]\]

Only if the flag periodic is true, the term for the interaction between the last and first particle will be included, $H^{(12)}_{1N}$.

If any of the matrices H12 or H1 is empty, it is not used.

Definition at line 37 of file sparse_1d_hamiltonian_d.cc.