You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I used HPhi to calculate a two-dimensional Hubbard model. I have calculated its ground energy and eigenvector. Next, I want to claculate the dynamical Green’s functions, such as $<\psi |\frac{1}{H-E+i\eta}|\psi>$. And, I want to use a random phase initial state as $\psi$, such as 1/N{\exp(i\theta_1),\exp(i\theta_2),...}, where, \theta_1, \theta_2,... are random real number from 0 to 2\pi. And N is a normalization coefficient. How can I achieve this?
Thank you very much.
YD Shen.
`import subprocess
import math
import sys
import os
#Set path(command) to Hphi
if len(sys.argv) == 2:
path_to_HPhi = os.path.abspath(sys.argv[1])
else:
print("Error")
print("Usage: python do_all.py path_to_HPhi.")
print("path_to_HPhi: relative or absolute path to HPhi.")
exit(1)
Sorry for our late reply.
We do not implement the generator of such an initial vector.
If you want to generate random phase states using HPhi, please modify MakeIniVec.c.
Hi, dear developers,
Recently, I used HPhi to calculate a two-dimensional Hubbard model. I have calculated its ground energy and eigenvector. Next, I want to claculate the dynamical Green’s functions, such as$<\psi |\frac{1}{H-E+i\eta}|\psi>$ . And, I want to use a random phase initial state as $\psi$ , such as 1/N{\exp(i\theta_1),\exp(i\theta_2),...}, where, \theta_1, \theta_2,... are random real number from 0 to 2\pi. And N is a normalization coefficient. How can I achieve this?
Thank you very much.
YD Shen.
`import subprocess
import math
import sys
import os
#Set path(command) to Hphi
if len(sys.argv) == 2:
path_to_HPhi = os.path.abspath(sys.argv[1])
else:
print("Error")
print("Usage: python do_all.py path_to_HPhi.")
print("path_to_HPhi: relative or absolute path to HPhi.")
exit(1)
#################################
W=4###########################
L=4############################
nelectrons=4####################
################################
###########################################################
f = open('StdFace.def','w')
f.write('W = %i\n' % (W))
f.write('L = %i\n' % (L))
std_text = """model = "hubbard"
method = "CG"
lattice = "square"
t = 1.0
U = 0.5
2Sz = 0
EigenvecIO = "out"
"""
f.write(std_text)
f.write('nelec = %i' % (nelectrons))
f.close()
###########################################################
subprocess.call([path_to_HPhi,'-sdry','StdFace.def'])
subprocess.call([path_to_HPhi,'-e','namelist.def'])`
The text was updated successfully, but these errors were encountered: