Problem with exp and sparse matrices

Change

siteinds("Electron", 4, conserve_qns = true);

to

siteinds("Electron", 4, conserve_nf = true);

With conserve_qns=true, the electron site conserves both number and spin. See SiteTypes Included with ITensor · ITensorMPS.jl

Also, as demonstrated by the following post you can easily run into issues with constructing fermionic operators directly from op. Problem with TEBD on Fermi-Hubbard model with Electron indices

2 Likes