mps-0.0.0
MatrixProductStatesinC++
 All Data Structures Namespaces Functions Variables Enumerations Enumerator Groups Pages
mps::ConstantHamiltonian Class Reference

1D Hamiltonian, constant but with no translational invariance More...

Inheritance diagram for mps::ConstantHamiltonian:
Collaboration diagram for mps::ConstantHamiltonian:

Public Member Functions

void add_interaction (index k, const CTensor &H1, const CTensor &H2)
 Add a nearest-neighbor interaction between sites 'k' and 'k+1'. More...
 
 ConstantHamiltonian (index N, bool periodic=false)
 Create the ConstantHamiltonian, reserving space for the local terms and interactions. More...
 
virtual index dimension (index k) const
 Dimension of the Hilbert space on the k-th site. More...
 
virtual const Hamiltonianduplicate () const
 Create a copy of this object. More...
 
virtual const CTensor interaction (index k, double t) const
 Nearest neighbor interaction between sites 'k' and 'k+1'.
 
virtual bool is_constant () const
 Does the Hamiltonian depend on time?
 
virtual bool is_periodic () const
 Is there interaction between the first and the last sites?
 
virtual const CTensor local_term (index k, double t) const
 Local term of the Hamiltonian on site 'k'. More...
 
void set_interaction (index k, const CTensor &H1, const CTensor &H2)
 Add a nearest-neighbor interaction between sites 'k' and 'k+1'. More...
 
void set_local_term (index k, const CTensor &H1)
 Add a local term on the k-th site. More...
 

Detailed Description

1D Hamiltonian, constant but with no translational invariance

Definition at line 93 of file hamiltonian.h.

Constructor & Destructor Documentation

mps::ConstantHamiltonian::ConstantHamiltonian ( index  N,
bool  periodic = false 
)

Create the ConstantHamiltonian, reserving space for the local terms and interactions.

Definition at line 30 of file hamiltonian_constant.cc.

Member Function Documentation

void mps::ConstantHamiltonian::add_interaction ( index  k,
const CTensor &  H1,
const CTensor &  H2 
)

Add a nearest-neighbor interaction between sites 'k' and 'k+1'.

Definition at line 125 of file hamiltonian_constant.cc.

index mps::ConstantHamiltonian::dimension ( index  k) const
virtual

Dimension of the Hilbert space on the k-th site.

Reimplemented from mps::Hamiltonian.

Definition at line 99 of file hamiltonian_constant.cc.

const Hamiltonian * mps::ConstantHamiltonian::duplicate ( ) const
virtual

Create a copy of this object.

Implements mps::Hamiltonian.

Definition at line 38 of file hamiltonian_constant.cc.

const CTensor mps::ConstantHamiltonian::local_term ( index  k,
double  t 
) const
virtual

Local term of the Hamiltonian on site 'k'.

Implements mps::Hamiltonian.

Definition at line 93 of file hamiltonian_constant.cc.

void mps::ConstantHamiltonian::set_interaction ( index  k,
const CTensor &  H1,
const CTensor &  H2 
)

Add a nearest-neighbor interaction between sites 'k' and 'k+1'.

Definition at line 115 of file hamiltonian_constant.cc.

void mps::ConstantHamiltonian::set_local_term ( index  k,
const CTensor &  H1 
)

Add a local term on the k-th site.

Definition at line 106 of file hamiltonian_constant.cc.