Causal Dynamical Triangulations for quantum gravity in Rust, built on fast Delaunay triangulation primitives and composable, adaptable Metropolis-Hastings sampling.
- Introduction
- Use this crate when
- API and model scope
- Features
- Quickstart
- Scientific Basis
- Documentation Map
- Ecosystem
- Benchmarking
- Roadmap
- Contributing
- Citation
- References
- AI Agents
- License
This library implements Causal Dynamical Triangulations (CDT) in Rust. CDT is a non-perturbative approach to quantum gravity defining the gravitational path integral over causally triangulated spacetimes and evaluating it using Markov Chain Monte Carlo. For an introduction to CDT, see AmbjΓΈrn and Loll (1998), βNon-perturbative Lorentzian quantum gravity, causality and topology changeβ. The library leverages high-performance Delaunay triangulation backends and provides a foundational toolkit for CDT research and exploration.
Use this crate for 1+1 CDT simulations on strips or tori, with resumable Metropolis-Hastings runs and finite-lattice diagnostics through Rust, the CLI, or notebooks.
See the CDT model for supported geometries, boundary conditions, and initial-size requirements.
| Need | API entry point |
|---|---|
| Configure a run | prelude::config and CdtConfig::into_validated |
| Construct and inspect CDT states | prelude::triangulation |
| Evaluate an action | prelude::action |
| Measure profiles and finite-graph observables | prelude::observables |
| Run or resume a simulation | prelude::simulation |
The API reference describes the latest published crate; just doc-check builds the reference for this checkout.
- Alexander/Pachner-style local move proposals with causal constraints
- Command-line interface, examples, Criterion benchmarks, and CI-aligned validation tooling
- Cross-platform compatibility: Linux, macOS, Windows
- Delaunay-built 1+1 CDT strip and periodic toroidal SΒΉΓSΒΉ constructors with foliation invariants
- Focused public preludes for simulation, triangulation, geometry, action, and observables
- Foliation-aware topology, causality, and simplex-classification validation
- Notebook-first quickstart for physicists, AI/ML users, and Rust contributors
- Proposal-before-mutation Metropolis-Hastings simulation with rollback on failed accepted moves
- Regge action calculation with configurable coupling constants
- Spatial-vertex input profiles, circular spatial-loop measurements, slab-triangle profiles, and finite-window effective dimensional observables
- Explicit quadratic triangle-volume fixing and upstream-backed dependence diagnostics; see chain analysis
- Trace CSV simulation output for external analysis workflows; JSON summary/metadata for CLI/config export
- Versioned JSON checkpoints for exact MCMC continuation, using Delaunay's Level 4 snapshot with checked geometry and CDT state restoration; see the checkpoint compatibility policy
See CHANGELOG.md for release history and docs/roadmap.md for current direction, near-term candidates, and
non-goals.
For Rust library use, add causal-triangulations = { version = "0.1.1", default-features = false } to Cargo dependencies. This retains simulation and analysis
APIs without Clap or the CLI logger. The default-enabled cli feature provides the cdt binary and CdtConfig::{from_args, try_from_args}; normal repository
commands below enable it automatically.
From a repository checkout, follow prerequisite setup, then run a small seeded simulation:
just run -- --vertices-per-slice 4 --timeslices 5 --steps 100 \
--thermalization-steps 10 --measurement-frequency 10 --seed 105 --simulate \
--output-csv target/quickstart/trace.csv --output-json target/quickstart/summary.json
just # Discover every public command, its arguments, and its purposeThis creates a 20-vertex open-boundary strip, attempts 100 Metropolis proposals, and writes one CSV trace row per step plus JSON measurements and final mesh. Parent directories are created automatically. Accepted volume-changing moves can change the final size.
For interactive exploration:
just notebook-setup
just notebookThe quickstart notebook runs the cdt engine and plots its CSV/JSON outputs. Rust 1.100.0 or newer is required; repository tooling and notebooks use the
declared uv environment. See CLI workflows for scriptable runs and cluster workflows for Slurm and Open
OnDemand.
The scientific basis owns action calibration, ensemble and volume behavior, validation limits, and downstream analysis responsibilities. Move semantics and detailed-balance notes live in the move guide and the sampler guide.
The documentation index maps user, scientific, and contributor guides.
- CDT Spacetime Visualization notebook β example 1+1 CDT mesh visualization generator
- CLI Examples β command-line usage and output workflows
- Code Organization β module layout, backend boundaries, and architecture notes
- Example Scripts β maintained shell workflows for simulations, sweeps, and timing checks
- Foliation β time labels, spacelike/timelike classification, causality validation, and toroidal time handling
- HPC Notebook Workflows β Slurm, Open OnDemand, and cluster cache setup
- Metropolis β proposal-before-mutation ordering, detailed balance, trace semantics, and sampler/backend boundaries
- Moves β CDT local move semantics, proposal ratios, rollback behavior, and action calibration
- Polars Analysis Caches notebook β local Parquet caches and diagnostic plots for debugging CDT CSV/JSON outputs
- Quickstart notebook β notebook-first local 1+1 CDT run, parameter meanings, output files, and troubleshooting
- References β physics, numerical, and computational-geometry citations
- Roadmap β near-term work, higher-dimensional topology tracks, and non-goals
- Scientific Basis β CDT scope, validated invariants, current ensemble, and interpretation boundaries
This crate is part of a broader Rust ecosystem for computational geometry and simulation:
delaunayβ geometric primitives and triangulationsla-stackβ linear algebra utilitiesmarkov-chain-monte-carloβ composable MCMC traits, including plan-before-commit proposals for CDT move ordering
See geometry and sampling responsibilities for the boundaries between these crates.
Performance validation uses Criterion workloads with shared measurement and reporting tools. Run just bench-ci for the CDT benchmark contract,
just bench-save-last for a fresh local baseline, and just bench-latest-vs-last for a comparison on the same host.
A fresh benchmark series starts with the September 2026 tooling update. No release comparison is published yet. Future tables will show absolute baseline/current median times, units, confidence bounds, and relative changes together.
See benches/README.md for benchmark details and docs/BENCHMARKING.md for comprehensive
performance testing workflow documentation.
The high-level roadmap, including 1+1 maturity work, future 2+1 and 3+1 CDT topology tracks, observables, dual/Voronoi geometry, visualization, and non-goals,
lives in docs/roadmap.md.
See CONTRIBUTING.md for the full contributor guide: project layout, development workflow, code style, testing, documentation layout, performance/benchmarking, and release support. Community expectations live in CODE_OF_CONDUCT.md. AI assistants should follow AGENTS.md.
The contributor guide owns setup, checks, fixes, tests, security scans, and PR preparation.
If you use this software in academic work or downstream research software, cite the Zenodo DOI and include the software metadata from CITATION.cff.
- DOI: https://doi.org/10.5281/zenodo.20513228
- Citation metadata: CITATION.cff
@software{getchell_causal_triangulations,
author = {Adam Getchell},
title = {causal-triangulations: A Causal Dynamical Triangulation library for quantum gravity research},
doi = {10.5281/zenodo.20513228},
url = {https://github.com/acgetchell/causal-triangulations}
}For release-specific fields such as version, release date, and ORCID, prefer CITATION.cff.
For a comprehensive list of academic references and bibliographic citations used throughout the library, see REFERENCES.md.
This includes foundational work on:
- Causal Dynamical Triangulations theory
- Monte Carlo methods in quantum gravity
- Computational geometry and Delaunay triangulations
- Discrete approaches to general relativity
AI coding assistants should read AGENTS.md before proposing or applying changes. See CONTRIBUTING.md for the repository's AI-assisted development note.
This project is licensed under the BSD 3-Clause License.