parms.append({ 'LATTICE': "chain lattice", 'MODEL': "spin", 'local_S': 0.5, 'J': 1, 'L': l, 'CONSERVED_QUANTUMNUMBERS': 'Sz', 'Sz_total': sz }) #write the input file and run the simulation input_file = pyalps.writeInputFiles('parm2b', parms) res = pyalps.runApplication('sparsediag', input_file) #load all measurements for all states data = pyalps.loadSpectra(pyalps.getResultFiles(prefix='parm2b')) lengths = [] min_energies = {} # extract the ground state energies over all momenta for every simulation for sim in data: l = int(sim[0].props['L']) if l not in lengths: lengths.append(l) sz = int(sim[0].props['Sz_total']) all_energies = [] for sec in sim: all_energies += list(sec.y) min_energies[(l, sz)] = np.min(all_energies) # make a plot of the triplet gap as function of system size
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT # SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE # FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # # **************************************************************************** import pyalps import numpy as np import matplotlib.pyplot as plt import pyalps.plot data = pyalps.loadSpectra(pyalps.getResultFiles(prefix='ed02a')) data += pyalps.loadSpectra(pyalps.getResultFiles(prefix='ed02b')) lengths = [] min_energies = {} # extract the ground state energies over all momenta for every simulation for sim in data: l = int(sim[0].props['L']) if l not in lengths: lengths.append(l) sz = int(sim[0].props['Sz_total']) s = float(sim[0].props['local_S']) all_energies = [] for sec in sim: all_energies += list(sec.y) min_energies[(l, s, sz)] = np.min(all_energies)
'LATTICE': "ladder", 'MODEL': "spin", 'local_S': 0.5, 'J0': 0, 'J1': 1, 'L': l, 'CONSERVED_QUANTUMNUMBERS': 'Sz', 'Sz_total': 0 }) #write the input file and run the simulation input_file = pyalps.writeInputFiles('ed03c', parms) res = pyalps.runApplication('sparsediag', input_file) #load all measurements for all states data = pyalps.loadSpectra(pyalps.getResultFiles(prefix='ed03c')) # collect spectra over all momenta for every simulation spectra = {} for sim in data: l = int(sim[0].props['L']) all_energies = [] spectrum = pyalps.DataSet() for sec in sim: all_energies += list(sec.y) spectrum.x = np.concatenate( (spectrum.x, np.array([sec.props['TOTAL_MOMENTUM'] for i in range(len(sec.y))]))) spectrum.y = np.concatenate((spectrum.y, sec.y)) spectrum.y -= np.min(all_energies)