## Question about the Hamiltonian MPO

General discussions on the ideas behind the algorithm.
Fabio_Mendez
Posts: 3
Joined: 01 Feb 2022, 01:50

### Question about the Hamiltonian MPO

Hi, thanks a lot for creating these libraries. I love the simplicity of constructing DMRG codes with them!

I have a question, why do the first Hamiltonian MPO sites always have two rows instead of one? I have worked with the TNT libraries, and we use 1 row and 1 column at the first and last sites in that software. Wouldn't having two rows or columns make the code inefficient for big Hilbert spaces?

Johannes
$W = \begin{pmatrix} 1 & C & D \\ 0 & A & B \\ 0 & 0 & 1 \end{pmatrix} = \text{e.g. for transverse field ising} \begin{pmatrix} 1 & X & - Z \\ 0 & 0 & X \\ 0 & 0 & 1 \end{pmatrix}$
That being said, if it really bothers you that much, you can easily disable this by setting the option insert_all_Ids=False of the function from_terms when constructing the MPO, presumably in the source code of calc_H_MPO.