2025-11-14T05:58:10.727117

ParaToric 1.0-beta: Continuous-time quantum Monte Carlo for the toric code in a parallel field

Linsel, Pollet
We introduce ParaToric, a C++ package for simulating the toric code in a parallel field (i.e., $X$- and $Z$-fields) at finite temperature. We implement and extend the continuous-time quantum Monte Carlo algorithm of Wu, Deng, and Prokof'ev on the square, triangular, honeycomb, and cubic lattices with open and periodic boundaries, respectively. The package is expandable to arbitrary lattice geometries and custom observables diagonal in either the $X$- or $Z$-basis. ParaToric also supports snapshot extraction in both bases, making it ideal for generating training/benchmarking data for other methods, such as lattice gauge theories, cold atom or other quantum simulators, quantum spin liquids, artificial intelligence, and quantum error correction. The software provides bindings to C/C++ and Python, and is thus almost universally integrable into other software projects.
academic

ParaToric 1.0-beta: Continuous-time quantum Monte Carlo for the toric code in a parallel field

Basic Information

  • Paper ID: 2510.14781
  • Title: ParaToric 1.0-beta: Continuous-time quantum Monte Carlo for the toric code in a parallel field
  • Authors: Simon M. Linsel, Lode Pollet (Ludwig-Maximilians-Universität München)
  • Classification: quant-ph (Quantum Physics)
  • Publication Date: October 16, 2025
  • Journal: SciPost Physics Codebases Submission
  • Paper Link: https://arxiv.org/abs/2510.14781

Abstract

This paper introduces ParaToric, a C++ software package for simulating the toric code in a parallel field at finite temperature. The package implements and extends the continuous-time quantum Monte Carlo algorithm of Wu, Deng, and Prokof'ev, supporting square, triangular, honeycomb, and cubic lattices with both open and periodic boundary conditions. ParaToric is extensible to arbitrary lattice geometries and custom observables diagonal in the X or Z basis, and supports snapshot extraction in both bases, making it an ideal tool for generating training and benchmark data for other methods.

Research Background and Motivation

Problem Background

The toric code is one of the most fundamental and extensively studied models in modern condensed matter physics, originally proposed by Kitaev. It is the simplest model hosting topological phases (gapped Z₂ quantum spin liquids) and anyonic excitations, serves as a foundational model for quantum error correction, and has deep connections to Ising gauge theory.

Research Motivation

  1. Algorithm Limitations: The existing Wu, Deng, and Prokof'ev algorithm suffers from ergodicity issues at high temperatures and zero off-diagonal fields
  2. Application Demands: Need for training and benchmark data for lattice gauge theories, cold atom quantum simulators, quantum spin liquids, artificial intelligence, and quantum error correction
  3. Interoperability: Lack of a general-purpose interface easily integrated into other software projects

Limitations of Existing Methods

The original algorithm cannot guarantee ergodicity in specific parameter regions (large temperature and zero off-diagonal field), limiting its application in certain important physical regimes.

Core Contributions

  1. Extended Algorithm: Implements and extends the continuous-time quantum Monte Carlo algorithm with two new update mechanisms to address ergodicity issues
  2. Multi-lattice Support: Supports square, triangular, honeycomb, and cubic lattices with both open and periodic boundary conditions
  3. Rich Observable Set: Implements 19 different physical observables, including energy, anyon density, Fredenhagen-Marcu operators, etc.
  4. Multi-language Interface: Provides C, C++, and Python interfaces, along with command-line tools
  5. Data Generation Capability: Supports snapshot extraction for generating training data for other methods
  6. Open Source Software: MIT licensed for easy integration and extension

Methodology Details

Problem Definition

Simulating the Hamiltonian of the toric code in a parallel field:

Ĥ = -μ∑ᵥÂᵥ - J∑ₚB̂ₚ - h∑ₗσ̂ˣₗ - λ∑ₗσ̂ᶻₗ

Where:

  • Âᵥ: Star operators (containing all links adjacent to lattice site v)
  • B̂ₚ: Plaquette operators (containing all links belonging to the same elementary plaquette p)
  • σ̂ˣₗ, σ̂ᶻₗ: Pauli matrices defined on links
  • μ, J, h, λ: Coupling parameters

Algorithm Architecture

Original Algorithm

Based on five Monte Carlo updates from Wu, Deng, and Prokof'ev:

  1. Single-link spin flip
  2. Star operator update
  3. Plaquette operator update
  4. Composite update
  5. Global update

Extended Updates

To address ergodicity issues, two new updates are introduced:

  1. Single-link Flip Along Entire Imaginary Time Axis: At high temperature or zero off-diagonal field, allows flipping a single link's spin along the entire imaginary time axis
  2. Plaquette/Star Operator Flip Along Imaginary Time Axis: Flips plaquette (star) operators along the entire imaginary time axis in the σ̂ˣ (σ̂ᶻ) basis

Technical Implementation Features

  • Uses 64-bit Mersenne-Twister pseudorandom number generator
  • Caches diagonal energy terms for improved efficiency
  • Employs binary search to optimize imaginary time operations with O(log n) complexity
  • Supports external seed setting to ensure reproducibility

Technical Innovations

  1. Ergodicity Improvement: New update mechanisms significantly improve ergodicity in regions of large temperature and zero off-diagonal field
  2. Performance Optimization: Achieves nearly temperature-independent performance through caching and binary search
  3. Modular Design: Supports extension to arbitrary lattice geometries and custom observables
  4. Multi-basis Support: Can choose between σ̂ˣ and σ̂ᶻ bases to optimize performance based on parameters

Experimental Setup

Supported Lattices

  • Square lattice (2D)
  • Triangular lattice (2D)
  • Honeycomb lattice (2D)
  • Cubic lattice (3D)

Boundary Conditions

  • Periodic boundary conditions
  • Open boundary conditions

Observables (19 types)

Including but not limited to:

  • Energy-related: Total energy, star operator energy, plaquette operator energy, electric field energy, gauge field energy
  • Topology-related: Anyon number, anyon density, Fredenhagen-Marcu operators
  • Phase transition-related: Percolation probability, percolation strength, staggered imaginary time operators
  • Correlation functions: σˣ and σᶻ static susceptibilities

Evaluation Metrics

  • Expectation values ⟨Ô⟩ and Binder ratio UO = ⟨Ô⁴⟩/⟨Ô²⟩²
  • Integrated autocorrelation time τᵢₙₜ
  • Monte Carlo acceptance rates
  • Bootstrap error estimation

Experimental Results

Performance Benchmarks

System Size Dependence

  • L=4: 3.1 seconds (no field) → 3.9 seconds (with field)
  • L=8: 21.3 seconds (no field) → 34.1 seconds (with field)
  • L=20: 379 seconds (no field) → 689 seconds (with field)
  • Complexity approximately O(L³ log β)

Temperature Dependence

As β varies from 4 to 20, runtime increases only from 14.9 seconds to 22.1 seconds, demonstrating excellent temperature-independent performance.

Autocorrelation Time Optimization

By adjusting the N_between_samples parameter:

  • N_between_samples=1: τᵢₙₜ=1895
  • N_between_samples=500: τᵢₙₜ=3.24
  • N_between_samples=1000: τᵢₙₜ=1.64

Physical Validation

Topological Phase Transition

Verified known topological phase transitions on square lattices, with critical field hc(λ=0.2)≈0.33:

  • Percolation probability jumps from 1 to 0 at the phase transition point
  • Fredenhagen-Marcu operators exhibit corresponding phase transition behavior
  • Staggered imaginary time operators confirm the phase transition location
  • Results are in complete agreement with literature

Thermalization Diagnostics

Provides comprehensive thermalization monitoring tools capable of:

  • Real-time monitoring of observable thermalization
  • Detection of insufficient thermalization
  • Visualization of thermalization curves

Foundational Theory

  • Kitaev Toric Code: Foundational model for topological quantum computation and quantum error correction
  • Ising Gauge Theory: Deep connections with the toric code
  • Z₂ Quantum Spin Liquid: Typical example of topological order

Numerical Methods

  • Wu-Deng-Prokof'ev Algorithm: The foundational algorithm for this work
  • Continuous-time Quantum Monte Carlo: Powerful tool for treating quantum many-body systems
  • Sign Problem: The toric code model is sign-problem-free, making QMC the preferred method

This work fills the gap for toric code-specific QMC software; existing general-purpose QMC packages are typically not optimized specifically for the toric code.

Conclusions and Discussion

Main Conclusions

  1. Algorithm Improvement: Successfully resolves ergodicity issues of the original algorithm in specific parameter regions
  2. Superior Performance: Achieves excellent nearly temperature-independent performance
  3. Comprehensive Functionality: Provides rich physical observables and support for multiple lattice types
  4. User-friendly: Multi-language interfaces and detailed documentation lower the barrier to use

Limitations

  1. Model Restrictions: Currently supports only diagonal interactions; off-diagonal interactions require major algorithmic modifications
  2. Temperature Limitations: The algorithm inherently requires finite temperature T>0
  3. Frustrated Systems: Frustration introduced by diagonal interactions may lead to sampling problems

Future Directions

Planned extensions by the authors include:

  1. New Lattices: Kagome and ruby lattices
  2. New Observables: Fidelity susceptibility, off-diagonal Fredenhagen-Marcu operators, Renyi entropy
  3. New Interactions: Long-range Ising interactions, emergent topological order models

In-depth Evaluation

Strengths

  1. High Practical Value: Addresses numerical simulation of an important physical model
  2. Excellent Technical Implementation: Both algorithm optimization and software engineering meet high standards
  3. Comprehensive Documentation: Provides detailed usage instructions and examples
  4. Open Source Friendly: MIT license facilitates academic and commercial use
  5. Cross-platform Compatibility: Supports multiple programming languages and operating systems

Weaknesses

  1. Limited Model Coverage: Focused solely on the toric code model with limited generality
  2. Insufficient Theoretical Analysis: Lacks rigorous theoretical analysis of the new update mechanisms
  3. Limited Large-scale Testing: Maximum system size L=80 may be insufficient for studying certain critical phenomena

Impact

  1. Academic Impact: Provides important tools for studying topological quantum states
  2. Educational Value: Can serve as a teaching tool for quantum Monte Carlo methods
  3. Application Prospects: Provides data support for quantum error correction, quantum simulation, and other fields
  4. Software Ecosystem: Enriches the software toolchain for quantum physics numerical computation

Applicable Scenarios

  1. Basic Research: Topological phase transitions, quantum spin liquids, anyonic physics
  2. Applied Research: Quantum error correction codes, quantum simulator benchmarking
  3. Method Development: Training data generation for machine learning methods
  4. Teaching Practice: Teaching quantum many-body physics and numerical methods

References

The paper cites 37 relevant references, spanning from Kitaev's original work to the latest developments in numerical methods, reflecting the authors' deep understanding of the field and rigorous academic approach.


Overall Assessment: This is a high-quality software paper that not only achieves technical innovations but, more importantly, provides the quantum physics research community with a practical, efficient, and user-friendly research tool. The open-source nature of the software and comprehensive documentation give it significant dissemination value and long-term impact potential.