Annealing Schedules¶
A collection of definitions for annealing schedules. Each function returns a 2-D numpy array that can be interpreted as a piecewise linear function inside of PottsPlayground.Anneal.
The piecewise linear function defines multiple aspects of an annealing run: the number of iterations/spin updates, a changing temperature as annealing progresses, and at what points annealing should be temporarily halted so that intermediate data can be recorded. The intermediate points are the discontinuities in the Piecewise linear function. Note that progress can also be recorded more frequently, on a set periodic frequency, using the nReports option of the PottsPlayground.Anneal function.
- PottsPlayground.Schedules.LinearTemp(niters, temp, temp2=0.0001)¶
Anneal a model at a linearly changing temperature, starting at temp and ending at temp2.
- Parameters:
niters (int) – The total number of updates/spin flips over the course of the annealing run.
temp (float) – Initial temperature.
temp2 (float) – Final temperature.
- PottsPlayground.Schedules.SawtoothTempLog2Space(niters, temp, MinTemp, nTeeth, FirstTooth=10)¶
Anneal a model according to a sawtooth temperature waveform. The duration of each sawtooth increases exponentially. Unless nReports is defined in the annealing run, a sample will be recorded at the end of each sawtooth when the model has been frozen into at least a local minima. Allows the “problem solving” capacity of an annealing setup to be observed more directly, especially for models that only mix at high temperatures but only settle into valid states at low temperatures.
- Parameters:
niters (int) – The total number of updates/spin flips over the course of the annealing run.
temp (float) – Initial, high temperature of the sawtooth temperature profile.
MinTemp (float) – The temperature at the end of each linearly changing sawtooth cycle.
nTeeth (int) – The number of sawtooth cycles over the course of the annealing run. The duration ratio between teeth is calculated to meet this spec.
FirstTooth (int) – How many iterations the first tooth should be, or equivalently.
- PottsPlayground.Schedules.constTemp(niters, temp)¶
Anneal a model at a constant temperature for the given number of iterations.
- Parameters:
niters (int) – The total number of updates/spin flips over the course of the annealing run.
temp (float) – Computational temperature at which the model operates.
- PottsPlayground.Schedules.constTempLog2Space(niters, temp, nReports)¶
Anneal a model at a constant temperature for the given number of iterations. Defines nReports breakpoints spaced logarithmically, so that both fast and slow dynamics of model evolution can be recorded.
- Parameters:
niters (int) – The total number of updates/spin flips over the course of the annealing run.
temp (float) – Constant temperature used during sampling.
nReports (int) – The number of times over the course of annealng that the model is stopped and measured. The duration ratio between samples is calculated to meet this spec.