MonteCarloAlgorithm.Metropolis
- class MonteCarloAlgorithm.Metropolis[source]
runs the monte carlo alg to find average energy levels of a hamiltonian
- __init__()
Methods
__init__()metropolis_montecarlo(hamiltonian, config[, ...])runs a full metropolis sweep on a hamiltonian :Parameters: * config bit string * temperature temperature * calc_sweep how many iterations it should run for * pre_calc_sweep how many iterations it should run before calculations begin
metropolis_to_end_values(...[, temperature])converts full metropolis sweep results into useful values :Parameters: * average_energy_samples average energy array * average_energy_samples_squared average energy squared array * average_magnetization_samples average magnetization array * average_magnetization_samples_squared average magnetization squared array * temperature temperature of system