Code Monkey home page Code Monkey logo

continuous-flow-lft's Introduction

Lattice QFT with continuous normalizing flows

This repository contains an implementation of continuous normalizing flows for scalar quantum field theory using JAX and Haiku, as introduced in the paper Learning Lattice Quantum Field Theories with Equivariant Continuous Flows. Specifically, it focuses on ฯ•โด theory as an example.

ODE flow example

Installation and dependencies

The code can be installed as a package via pip install . from within the root directory of this project. However, to run the code with GPU support, JAX should be installed first following the instructions here.

To run the example scripts and the notebook below, the additional packages hydra and matplotlib are required (install for example with pip install hydra-core matplotlib).

Examples

Introduction

Open In Colab

A step-by-step jupyter notebook with further explanations can be found in notebooks/train-and-mcmc.ipynb. It contains an example of training the normalizing flow and using it to generate samples with a Metropolis-Hastings MCMC step.

Loading network parameters

DOI

The notebooks/load-parameters.ipynb notebook demonstrates how to load previously trained parameters for the examples discussed in the paper.

Scripts

Two scripts for training networks as used in the paper are provided: example_single and example_conditional. These can be configured by modifying or adding to the configuration files in the folder configs/.

Note that training can be slow when running on the CPU. Especially for a smaller lattice the batch size can be reduced while still yielding good results: python example_single.py ++live_plotting=true ++batch_size=64.

Reference

If you find our work useful, please cite

@article{gerdes2022,
    author = "Gerdes, Mathis and de Haan, Pim and Rainone, Corrado and Bondesan, Roberto and Cheng, Miranda C. N.",
    title = "{Learning Lattice Quantum Field Theories with Equivariant Continuous Flows}",
    eprint = "2207.00283",
    archivePrefix = "arXiv",
    primaryClass = "hep-lat",
    month = "7",
    year = "2022"
}

continuous-flow-lft's People

Contributors

mathisgerdes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

biweidai

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.