0 votes
asked by (160 points)

Hi Miles,
I am trying to get the ground state of a Hamiltonian, which depends on an external field strength, say 'h'. Now I want to vary h in a for loop and get the corresponding ground state. But I don't know how to treat the ITensor MPO or MPS as a function of a loop variable, something like psi(h), can this be done?

Thanking You,
Ipsita.

1 Answer

0 votes
answered by (29.7k points)
selected by
 
Best answer

Hi Ipsita,
The direct answer to your question is that, whichever procedure you are using to make your MPO necessarily includes "h" as a parameter. (Say using AutoMPO, where "h" appears as a coefficient.) So then to change h, you just re-create the MPO again from the beginning, using a different value for h.

However, the other answer I would give to your question is to say, I don't recommend doing a lot of different calculations (I assume DMRG?) in a loop. Instead, I think it's a much better practice to do each calculation separately, and carefully study each one. How well did it go? Were all indications that it converged? Is the system approaching a phase boundary where perhaps the initial state and number of sweeps needed for convergence might need to be changed?

Best regards,
Miles

commented by (160 points)
Hi, Thank you very much for your suggestion. Yes, it is DMRG that I was talking about.
Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.

Categories

...