Skip to content
/ gpt Public
forked from lehner/gpt

A python measurement interface for Grid

License

Notifications You must be signed in to change notification settings

daknuett/gpt

This branch is 1 commit ahead of, 238 commits behind lehner/gpt:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Daniel KnuettelDaniel Knuettel
Daniel Knuettel
and
Daniel Knuettel
Feb 20, 2024
37e734e · Feb 20, 2024
Feb 9, 2023
Oct 6, 2023
Oct 26, 2023
Jul 26, 2021
Apr 26, 2023
Feb 20, 2024
Oct 17, 2023
Dec 11, 2023
Jun 28, 2021
Aug 28, 2020
Mar 26, 2020
Jan 21, 2023
Dec 19, 2020
Dec 26, 2022
Jul 22, 2020

Repository files navigation

Build/Test codecov

GPT Logo

GPT - Grid Python Toolkit

GPT is a Python measurement toolkit built on Grid data parallelism (MPI, OpenMP, SIMD, and SIMT). It provides a physics library for lattice QCD and related theories, a QIS module including a digital quantum computing simulator, and a machine learning module.

Quick Start

The fastest way to try GPT is to install Docker, start a Jupyter notebook server with the latest GPT version by running

docker run --rm -p 8888:8888 gptdev/notebook

and then open the shown link http://127.0.0.1:8888/?token=<token> in a browser. You should see the tutorials folder pre-installed.

Note that this session does not retain data after termination. Run

docker run --rm -p 8888:8888 -v $(pwd):/notebooks gptdev/notebook

to instead mount the current working directory on your machine.

Please consult the GPT Docker documentation for additional options.

Installation

A detailed description on how to install GPT locally can be found here.

Tutorials

You may also visit a static version of the tutorials here.

Usage

import gpt as g

# Double-precision 8^4 grid
grid = g.grid([8,8,8,8], g.double)

# Parallel random number generator
rng = g.random("seed text")

# Random gauge field
U = g.qcd.gauge.random(grid, rng)

# Mobius domain-wall fermion
fermion = g.qcd.fermion.mobius(U, mass=0.1, M5=1.8, b=1.0, c=0.0, Ls=24,
                               boundary_phases=[1,1,1,-1])

# Short-cuts
inv = g.algorithms.inverter
pc = g.qcd.fermion.preconditioner

# Even-odd-preconditioned CG solver
slv_5d = inv.preconditioned(pc.eo2_ne(), inv.cg(eps = 1e-4, maxiter = 1000))

# Abstract fermion propagator using this solver
fermion_propagator = fermion.propagator(slv_5d)

# Create point source
src = g.mspincolor(U[0].grid)
g.create.point(src, [0, 0, 0, 0])

# Solve propagator on 12 spin-color components
prop = g( fermion_propagator * src )

# Pion correlator
g.message(g.slice(g.trace(prop * g.adj(prop)), 3))

About

A python measurement interface for Grid

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 60.8%
  • C++ 34.5%
  • OpenEdge ABL 2.4%
  • Shell 1.1%
  • C 1.0%
  • TeX 0.1%
  • Dockerfile 0.1%