End-to-end simulation of OTOCs in solid-state NMR spin systems from protein structures.
Paper – Features – Installation – Quick start – Documentation – Help – License – Citation – Contact
NMR-OTOC is a collection of Python libraries and command-line tools (with a C++-accelerated simulation backend) built for researchers in quantum computing, quantum simulation, and solid-state nuclear magnetic resonance (NMR) spectroscopy. It implements an end-to-end pipeline from macromolecular structures in Protein Data Bank (PDB/mmCIF) format to effective spin Hamiltonians and out-of-time-ordered correlators (OTOCs) — quantities that, much like a physical interferometer, measure how quantum information scrambles and spreads across complex many-body correlations over time. This repository accompanies the paper Modeling quantum information scrambling in realistic protein NMR experiments (arXiv:2611.23213).
-
PDB-to-spin-Hamiltonian pipeline (
nmr-otocandnmr-otoc-tools): parse PDB and mmCIF structures with Biopython, average coordinates across structural conformers, select carbon-13 or fluorine-19 system spin pairs, order and truncate surrounding proton spins, and build static dipolar or Magic Angle Spinning (MAS) recoupling Hamiltonians over Lebedev and SO(3) powder-averaging grids. -
Exact Trotterized OTOC simulation (
nmr-otocandnmr-otoc-tools): construct first- and second-order Trotter circuits — either dense all-to-all circuits or 1D linear swap networks — in Cirq, compute infinite-temperature OTOCs via Haar-random state averaging inqsimcirq, and verify atom mappings and distances (nmr-map-atoms,nmr-compute-distances).
-
Python 3.12 or later is required
-
nmr-otoc/setup.pydoes not declare runtime dependencies ininstall_requires; modules undernmrotoc/importnumpy,scipy,cirq,qsimcirq,openfermion,biopython,matplotlib,tqdm, andrequests(plusopenmmandpdbfixerinnmrotoc/chem/clean_pdb.py).
-
Clone the repository and create a Python virtual environment:
git clone https://github.com/google-research/nmr-otoc.git cd nmr-otoc python3 -m venv .venv source .venv/bin/activate
-
Install the core pipeline packages (
nmrotocandnmr-otoc-tools):pip install openfermion pip install -e ./nmr-otoc pip install -e ./nmr-otoc-tools
If you plan to run the tutorial notebooks or PDB cleaning utilities, also install
matplotlib tqdm requests(andopenmm pdbfixerforclean_pdb.py). -
Verify an installation by running a package test suite (for example,
nmr-otoc-tools):pip install -e "./nmr-otoc-tools[testing]" (cd nmr-otoc-tools && pytest)
Run an immediate 4-spin OTOC simulation using the bundled configuration file in
nmr-otoc-tools (no external PDB download required):
mkdir -p /tmp/otoc-out
nmr-run-from-config \
--config nmr-otoc-tools/integration_tests/artificial/random/sim_config_N4.json \
--output_dir /tmp/otoc-outThis writes /tmp/otoc-out/otoc_N4_t80_h50.json with the computed OTOC values
at each time step.
To run the full pipeline on a protein structure, place a file at
protein_files/<PDB_ID>/<pdb_id>_out.cif (lowercase ID, or pass --filename),
generate dipolar coupling instances on a 26-point Lebedev grid, and simulate
system sizes from 4 to 8 spins:
nmr-generate-instances <PDB_ID> -26
nmr-run-otoc-simulation \
--pdb_id <PDB_ID>_L26 \
--subfolder d_5 \
--n_avg 26 \
--n_min 4 \
--n_max 8 \
--max_time 2.0 \
--n_time 8 \
--n_trotter 20 \
--n_haar 20 \
--circuit_type denseEach subpackage provides its own documentation, examples, or tutorials:
-
Core library (
nmrotoc) and Jupyter tutorials:nmr-otoc/README.md,trotter_tutorial.ipynb, andtoluene_data_generation.ipynb. -
Instance generation, Magic Angle Spinning physics, and CLI reference:
nmr-otoc-tools/README.md. -
Project governance, support, and BSD 3-Clause Clear license:
CONTRIBUTING.md,SUPPORT.md, andLICENSE.
If you encounter a bug or have a question about using this software, please
search existing issues or open a new issue on the
GitHub issue tracker.
Additional guidance is available in SUPPORT.md, or you can
reach the maintainers at quantum-oss-maintainers@google.com.
We are committed to providing a friendly, safe, and welcoming environment for all. Please read and respect our Code of Conduct.
NMR-OTOC is licensed under the terms of the BSD 3-Clause Clear License.
This repository accompanies the paper:
Alec F. White, Joseph Haslehurst, Daniel R. Moberg, Justin Provazza, Nicholas C. Rubin, Thomas E. O'Brien, and Christian Bengs, Modeling quantum information scrambling in realistic protein NMR experiments, arXiv:2611.23213 (2026).
If you use this code in your research, please cite the paper:
@misc{white2026modeling,
title = {Modeling quantum information scrambling in realistic protein {NMR} experiments},
author = {Alec F. White and Joseph Haslehurst and Daniel R. Moberg and Justin Provazza
and Nicholas C. Rubin and Thomas E. O'Brien and Christian Bengs},
year = {2026},
eprint = {2611.23213},
archivePrefix = {arXiv},
primaryClass = {quant-ph},
doi = {10.48550/arXiv.2611.23213},
url = {https://arxiv.org/abs/2611.23213},
}Companion datasets will be archived on Zenodo. If you use the Lebedev
quadrature grids via nmr-otoc-tools, please also cite the Lebedev and Laikov
reference listed in nmr-otoc-tools/README.md.
For any questions or concerns not addressed here, please email quantum-oss-maintainers@google.com.
This is not an officially supported Google product.
Copyright 2026 Google LLC.