Obtainin expectation value of number operator in BH model

How do I use this algorithm? What does that parameter do?
Post Reply
mariocat
Posts: 12
Joined: 10 Mar 2025, 09:17

Obtainin expectation value of number operator in BH model

Post by mariocat »

Hello everyone,
I have a simple question (I guess). I'm trying to find the expectation value of the number operatore using the BH model but I'm really stuck. Does anyone know how to do it? Thanks!
Jakob
Posts: 19
Joined: 30 Jan 2023, 22:57

Re: Obtainin expectation value of number operator in BH model

Post by Jakob »

I assume you mean the Bose Hubbard model?
In what state do you want to take the expectation value?
If you want it in the groundstate, you can take an MPS psi resulting from DMRG and use
psi.expectation_value('N'), which gives you the particle number on every single site.
mariocat
Posts: 12
Joined: 10 Mar 2025, 09:17

Re: Obtainin expectation value of number operator in BH model

Post by mariocat »

Hello, thanks for your reply.
Yes, I meant in the ground state! What would be the complete code line?
Jakob
Posts: 19
Joined: 30 Jan 2023, 22:57

Re: Obtainin expectation value of number operator in BH model

Post by Jakob »

Have a look at these examples that simulate groundstate expectation values
https://tenpy.readthedocs.io/en/latest/ ... _dmrg.html
Post Reply