Skip to content

Instantly share code, notes, and snippets.

@wistaria
Last active June 16, 2018 04:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wistaria/ee4cf2d7b01bfa8d8a85 to your computer and use it in GitHub Desktop.
Save wistaria/ee4cf2d7b01bfa8d8a85 to your computer and use it in GitHub Desktop.
結果のプロットのための ALPS Python スクリプト例
import pyalps
import matplotlib.pyplot as plt
import pyalps.plot
#load the susceptibility and collect it as function of temperature T
data = pyalps.loadMeasurements(pyalps.getResultFiles(prefix='parm2c'),'Susceptibility')
susceptibility = pyalps.collectXY(data,x='T',y='Susceptibility')
#make plot
plt.figure()
pyalps.plot.plot(susceptibility)
plt.xlabel('Temperature $T/J$')
plt.ylabel('Susceptibility $\chi J$')
plt.ylim(0,0.22)
plt.title('Quantum Heisenberg chain')
plt.savefig('susceptibility.pdf')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment