def calculate_and_save():
    quant = state_quantifier(number_of_spins)
    ground_states = []
    for i,B in enumerate(B_list):
        print i
        calc = ising_calculator_FM(number_of_spins, alpha, B)
        H = calc.get_H()
        energy,groundstate = H.groundstate()
        ground_states.append(groundstate)
    sx,sy,sz = quant.get_reduced_dms(ground_states, spin = 0)
    np.save('magnetization_array_one_spin_{}'.format(number_of_spins), (B_list,sx,sy,sz))
Beispiel #2
0
def calculate_and_save():
    magnetization_array = np.empty_like(B_list)
    quant = state_quantifier(number_of_spins)
    for i,B in enumerate(B_list):
        print i
        calc = ising_calculator_FM(number_of_spins, alpha, B)
        H = calc.get_H()
        energy,groundstate = H.groundstate()
        m = quant.absolute_magnetization_x(groundstate)
        magnetization_array[i] = m
    np.save('magnetization_array_{}'.format(number_of_spins), magnetization_array)
def calculate_and_save():
    quant = state_quantifier(number_of_spins)
    ground_states = []
    for i, B in enumerate(B_list):
        print i
        calc = ising_calculator_FM(number_of_spins, alpha, B)
        H = calc.get_H()
        energy, groundstate = H.groundstate()
        ground_states.append(groundstate)
    sx, sy, sz = quant.get_reduced_dms(ground_states, spin=0)
    np.save('magnetization_array_one_spin_{}'.format(number_of_spins),
            (B_list, sx, sy, sz))