Skip to content

DMRG2 + MPO_ham_ising(..., cyclic=True) gives ~0 energy and almost-zero state norm #341

@TianHao-Yang-tim

Description

@TianHao-Yang-tim

What happened?

Summary

When using quimb.tensor.DMRG2 with a periodic Ising Hamiltonian constructed via MPO_ham_ising(..., cyclic=True), the DMRG2 energy is extremely close to zero, while the same Hamiltonian converted to a dense matrix and diagonalized gives a reasonable negative ground state energy. The returned DMRG state also has (almost) zero norm.

This suggests that, at least in this combination (Ising + PBC + DMRG2), the resulting MPS/state and/or energy are not consistent with <psi|H|psi>.


Minimal reproducible example

import quimb as qu
import quimb.tensor as qtn
import numpy as np

L = 6
J = -1.0
h = 0.5

# Target Pauli model:
#   H = J sum σ^z_i σ^z_{i+1} + h sum σ^x_i, with PBC
#
# In terms of spin operators S^α with S^z = σ^z / 2, S^x = σ^x / 2,
# this corresponds to:
#   H = 4 J sum S^z_i S^z_{i+1} - 2 h sum S^x_i
#
# So we use:
#   j  = 4 * J
#   bx = -2 * h

H = qtn.MPO_ham_ising(
    L,
    j=4 * J,
    bx=-2 * h,
    S=1/2,
    cyclic=True,
)

# 1) Dense Hamiltonian ground state energy (works as expected)
H_dense = H.to_dense()
evals = np.linalg.eigvalsh(H_dense)
E_exact = float(evals[0])
print("Exact GS from dense diag =", E_exact)

# 2) DMRG2 on the same MPO
dmrg = qtn.DMRG2(
    H,
    bond_dims=[10, 20, 100, 100, 200],
    cutoffs=1e-10,
    which='SA',
)

dmrg.solve(tol=1e-6, verbosity=0)
print("E_quimb =", float(dmrg.energy))

gs0 = dmrg.state
print("state norm <psi|psi> =", float((gs0.H @ gs0)))
print("state.norm()=", gs0.norm())

### What did you expect to happen?

Exact GS from dense diag = -6.384694563603669
E_quimb = -1.6783801434103012e-09
state norm <psi|psi> = 2.947477296255865e-10
state.norm()=1.7168218592084225e-05

### Minimal Complete Verifiable Example

```Python

Relevant log output

Anything else we need to know?

I found that using MPS+DMRG can not solve PBC TFIM even for very small system. Hope can fix it. Ty!

Environment

quimb 1.11.2
python 3.12.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions