|
1 |
| -TAMC: Tempering and Annealing Monte Carlo |
| 1 | +TAMC: "Tempering and Annealing" Monte Carlo |
2 | 2 |
|
3 | 3 | This library provides utilites for specifying and running
|
4 | 4 | Monte Carlo sampling algorithms. It is primarily aimed for sampling
|
5 |
| -and minimizing discrete binary/Ising problems. |
| 5 | +and minimizing discrete binary/Ising problems. |
| 6 | + |
| 7 | +*Usage*: |
| 8 | +``` |
| 9 | + tamc [FLAGS] [OPTIONS] <method-file> <instance-file> <output-file> |
| 10 | +
|
| 11 | +FLAGS: |
| 12 | + -h, --help Prints help information |
| 13 | + --qubo |
| 14 | + -V, --version Prints version information |
| 15 | +
|
| 16 | +OPTIONS: |
| 17 | + --sample-output <sample-output> |
| 18 | + --suscepts <suscepts>... |
| 19 | +
|
| 20 | +ARGS: |
| 21 | + <method-file> |
| 22 | + <instance-file> |
| 23 | + <output-file> |
| 24 | +``` |
| 25 | + |
| 26 | +`method-file` is a specification of the simulation and options, |
| 27 | +such as number of replicas and temperatures in YAML format. |
| 28 | +A good recommended starting point for Ising problems with J~1 is |
| 29 | +```yaml |
| 30 | +--- |
| 31 | +PT: |
| 32 | + num_sweeps: 2000 |
| 33 | + warmup_fraction: 0.5 |
| 34 | + beta: |
| 35 | + Geometric: |
| 36 | + beta_min: 0.2 |
| 37 | + beta_max: 5.0 |
| 38 | + num_beta: 32 |
| 39 | + lo_beta: 1.0 |
| 40 | + icm: true |
| 41 | + num_replica_chains: 2 |
| 42 | + threads: 1 |
| 43 | + sample: 32 |
| 44 | + sample_states: 32 |
| 45 | + sample_limiting: 2 |
| 46 | +``` |
| 47 | +
|
| 48 | +`instance-file` is the specification of the Ising problem to sample/solve. |
| 49 | +It should follow the informal standard `i j K` format, where `i` and `j` are zero-based |
| 50 | +integeres and `K` is a floating point value of the coupling strength. |
| 51 | +If `i==j`, then `K` is interpreted as a bias. |
| 52 | +```text |
| 53 | +0 1 -1.0 |
| 54 | +1 2 -1.0 |
| 55 | +2 3 -1.0 |
| 56 | +...... |
| 57 | +``` |
| 58 | + |
| 59 | +`--suscepts` is an option to provide one or more plain-text new-line delimited |
| 60 | +files of `N` floating point numbers, where `N` is the problem size. |
| 61 | +If provided, these numbers specify coefficients for weighed replica overlaps, |
| 62 | +which are required for susceptibility measurements. |
| 63 | +On a square lattice, these should simply be Fourier cofficients. |
| 64 | +For general graphs, one can pass eigenvectors of the graph laplacian. |
| 65 | + |
| 66 | +The main `output-file` saves ground state information in readable YAML format. |
| 67 | +If thermal sampling is on, `sample-output` saves thermal data in either binary (default) or |
| 68 | +Python pickle format (if the output file extension is `.pkl`). |
| 69 | +The thermal sampling output data structure is as follows: |
| 70 | +```rust |
| 71 | +pub struct PtIcmThermalSamples{ |
| 72 | + // number of variables in the problem (N) |
| 73 | + pub instance_size: u64, |
| 74 | + // simulation temperatures used |
| 75 | + pub beta_arr: Vec<f32>, |
| 76 | + // PT Chain x Temperature x Time: Thermal samples of replicas |
| 77 | + // in bit-packed format |
| 78 | + pub samples: Vec<Vec<Vec<u8>>>, |
| 79 | + // Temperature x Time: Thermal samples of replica energy |
| 80 | + pub e: Vec<Vec<f32>>, |
| 81 | + // Temperature x Time: Thermal samples of replica overlap |
| 82 | + pub q: Vec<Vec<i32>>, |
| 83 | + // (If specified) Temperature x Eigenvector x Time |
| 84 | + pub suscept: Vec<Vec<Vec<f32>>> |
| 85 | +} |
| 86 | +``` |
0 commit comments