--- layout: '@/layouts/Doc.astro' title: "π `l2hmc` Example: 2D $U(1)$" date: 2024-02-12 description: 'A Jupyter notebook walkthrough of the l2hmc framework for 2D U(1) gauge theory experiments.' --- Sam Foreman 2024-02-12 - [Imports / Setup](#imports--setup) - [Initialize and Build `Experiment` objects:](#initialize-and-build-experiment-objects) - [PyTorch](#pytorch) - [Training](#training) - [Inference](#inference) - [TensorFlow](#tensorflow) - [Train](#train) - [Inference](#inference-1) - [Model Performance](#model-performance) - [Comparisons](#comparisons) - [TensorFlow Results](#tensorflow-results) - [PyTorch Results](#pytorch-results) - [Comparisons](#comparisons-1) Sam Foreman [](https://orcid.org/0000-0002-9981-0876) 2023-12-14 [](https://github.com/saforem2/l2hmc-qcd/blob/main/reports/l2hmc-2dU1/README.md) This notebook will (attempt) to walk through the steps needed to successfully instantiate and run an experiment. For this example, we wish to train the L2HMC sampler for the 2D $U(1)$ lattice gauge model with Wilson action: $$S_{\beta}(n) = \beta \sum_{n}\sum_{\mu<\nu}\mathrm{Re}\left[1 - U_{\mu\nu}(n) \right]$$ This consists of the following steps: 1. Build an `Experiment` by parsing our configuration object 2. Train our model using the `Experiment.train()` method 3. Evaluate our trained model `Experiment.evaluate(job_type='eval')` 4. Compare our trained modelsβ performance against generic HMC `Experiment.evaluate(job_type='hmc')`
outputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutputoutput