Source-linked AI summary

QuantumOptics.jl: A Julia framework for simulating open quantum systems

Sebastian Krämer, David Plankensteiner, Laurin Ostermann, Helmut Ritsch

arXiv:1707.01060v2quant-ph

TL;DR

Open quantum-system simulations are often analytically limited and experimentally elaborate, motivating accessible numerical tools. The paper presents QuantumOptics.jl, an entirely Julia-based framework combining readable syntax with efficient simulation, and demonstrates its capabilities through quantum models and observed collapse-and-revival dynamics. Its scope is moderate-size systems, with feature breadth and compilation time remaining practical limitations.

  • Problem

    Open quantum systems have limited analytic solutions, while experimental studies can be elaborate, motivating accessible numerical calculations.

  • Method

    QuantumOptics.jl is an open-source Julia framework that numerically solves Schrödinger and master equations and supports Monte Carlo wave-function simulations.

  • Results

    The framework demonstrates efficient numerical investigation of open quantum systems while retaining intuitive and accessible source code, including collapse and revival dynamics in a Jaynes-Cummings model.

  • Takeaways & Limitations

    QuantumOptics.jl provides a readable framework for simulating open quantum systems and showcases performance and capabilities across generic quantum models.

  • Takeaways & Limitations

    The framework is less feature-rich than established frameworks, and Julia’s compilation time disadvantages short-running calculations compared with Cython.

Abstract

from arXiv · show

We present an open source computational framework geared towards the efficient numerical investigation of open quantum systems written in the Julia programming language. Built exclusively in Julia and based on standard quantum optics notation, the toolbox offers speed comparable to low-level statically typed languages, without compromising on the accessibility and code readability found in dynamic languages. After introducing the framework, we highlight its features and showcase implementations of generic quantum models. Finally, we compare its usability and performance to two well-established and widely used numerical quantum libraries.

PROGRAM SUMMARY

QuantumOptics.jl addresses the numerical dynamics of open quantum systems using Schrödinger, master-equation, and Monte Carlo wave-function methods. It targets efficient, accessible simulations of moderate-size systems under the conditions required by these descriptions.

  • QuantumOptics.jl numerically investigates the dynamics of open quantum systems.
  • The framework solves Schrödinger equations, master equations, or uses a Monte Carlo wave-function approach.
  • The framework targets efficient and easy simulations of moderate-size systems rather than maximum numerical scale.

1. Introduction

QuantumOptics.jl is introduced as an open-source Julia framework intended to make open-system simulations both efficient and accessible. The paper motivates it through the limited analytic solvability of these systems, demonstrates a Jaynes-Cummings implementation, and reports collapse and revival dynamics.

  • Numerical simulations become important because analytically solvable open quantum systems are limited and experiments can be elaborate.
  • Earlier toolboxes balanced accessibility and efficiency imperfectly, with low-level approaches often sacrificing accessibility and QuTiP requiring Cython or external low-level code for time-critical calculations.
  • QuantumOptics.jl is an open-source framework written entirely in Julia for efficient, easy numerical simulation while retaining intuitive source code.
  • The Jaynes-Cummings example defines bases, operators, an initial state, and Schrödinger evolution before calculating atomic excitation.
  • The resulting dynamics show collapse and revival of coherent energy oscillations between atom and cavity, a numerically nontrivial phenomenon without a simple analytic solution.

2. Framework Design

QuantumOptics.jl organizes quantum systems around basis-aware quantum objects and abstract operator interfaces. This design supports compatibility checks, readable construction, specialized numerical representations, and downstream time-evolution operations.

  • QuantumOptics.jl explicitly tracks the basis associated with every quantum object, unlike representations that primarily equate objects with numerical coefficients.
  • States use one basis, operators use domain and co-domain bases, and superoperators generalize this to four bases.
  • Basis information enables compatibility checks during operations and improves code readability by making physical bases explicit.
  • An abstract operator interface supports specialized numerical types, including dense and sparse matrices, rather than one fixed data structure.
  • Quantum systems construct states, operators, and superoperators that serve as inputs to time evolutions and other operations.

3. Development Philosophy

The project emphasizes open, reviewable, tested, documented, and benchmarked development. These practices are intended to support code quality, usability, reliability, and performance tracking.

  • Open source: The framework is open source under the MIT license, allowing access to and modification of its code.
  • Open development model: Development occurs transparently through GitHub, with patches reviewed by at least one person besides their author.
  • Extensive testing: Every public-interface function is unit-tested, changes run through the test suite, and high-level tests compare results with analytical solutions.
  • Documentation: Public functions are documented with docstrings, while website documentation provides examples covering many quantum systems.
  • Benchmarking: Benchmarking detects speed regressions and compares QuantumOptics.jl with QuTiP and the QO Toolbox.

4. Examples

QuantumOptics.jl demonstrates a simple workflow for simulating increasingly complex quantum models, including dissipative, time-dependent, state-dependent, and semiclassical dynamics. The examples show how the framework represents physical systems and obtains results through standard evolution and expectation-value operations.

  • The examples follow a workflow of defining parameters, specifying Hilbert-space bases, constructing operators and states, then applying evolution and expectation-value operations.
  • Lossy Jaynes-Cummings model: Small damping rates κ, γ ≪ g suppress atomic-excitation revivals in the lossy Jaynes-Cummings model.
  • Lossy Jaynes-Cummings model: Single MCWF trajectories retain an atomic-excitation revival but differ from the master-equation average in phase and timing.
  • Time-dependent Jaynes-Cummings model: Time-dependent Hamiltonians can be solved by updating the Hamiltonian at every time step, and the demonstrated implementation reproduces the master-equation results.
  • Gross-Pitaevskii equation: State-dependent effective Hamiltonians enable Gross-Pitaevskii simulations, including collisions of counter-propagating condensate wave-packets.
  • Gross-Pitaevskii equation: Lazy operators delay operator evaluation, while FFT-based transformations allow switching efficiently between position and momentum representations.
  • Semiclassical cavity cooling: Semiclassical functions model systems with large quantum state spaces by treating atomic motion classically while retaining quantum field and internal dynamics.

5. Performance

QuantumOptics.jl targets efficient open-system simulations through problem-adapted operator representations and Julia’s compiled-language speed. Benchmarks assess time evolution for stationary and time-dependent master equations against QuTiP and the QO Toolbox.

  • An extensive benchmark suite detects speed regressions and identifies optimization opportunities by testing QuantumOptics.jl alongside QuTiP and the QO Toolbox.
  • QuantumOptics.jl selects dense, sparse, or specialized operator types according to the investigated problem, unlike the purely sparse representations used by QuTiP and the QO Toolbox.Current time-evolution methods require density operators to use dense representations, while sparse-density evolution is planned.
  • Julia provides speed comparable to C or Fortran while retaining dynamic-language flexibility for time- and state-dependent problems.The time-dependent benchmarks are described as demonstrating this advantage successfully, though with an accessibility trade-off.
  • Figure 6 benchmarks master-equation evolution for cavity, Jaynes-Cummings, and trapped-particle systems spanning sparse and dense Hamiltonian and density-operator structures.The caption states that flexible operator types can yield considerable speed-ups depending on system sparseness.
  • Figure 7 benchmarks time-dependent master-equation evolution using the same systems, comparing QuTiP’s Cython and pure-Python implementations.Julia and Cython compilation times are excluded, and GCC gives Cython an advantage in general.
  • The reported benchmark measurements focus on actual calculation speed, using a single CPU core with Julia compilation time neglected.Tests on other hardware and operating systems produced qualitatively similar results.

6. Disadvantages

The framework’s main disadvantages arise from its youth: Julia and QuantumOptics.jl remain unstable, less feature-rich than established alternatives, and resource-intensive in some settings. Julia’s compilation time can also disadvantage short-running comparisons with Cython.

  • Julia and QuantumOptics.jl are still developing, so code written for version v0.4.1 may require adaptation after future interface changes.
  • QuantumOptics.jl is currently less feature-rich than established frameworks such as QuTiP.
  • Julia’s compilation time is a disadvantage relative to Cython because Julia uses LLVM while Cython relies on GCC.The difference becomes a negligible constant offset for longer-running calculations.
  • Julia’s large memory footprint may especially burden users running many simultaneous framework instances on a cluster or server.

7. Conclusions & Outlook

QuantumOptics.jl introduces an open-source framework for efficient numerical investigation of open quantum systems and demonstrates its capabilities and performance. The young project remains under active development, with planned extensions and community contributions encouraged.

  • QuantumOptics.jl provides a new computational framework for efficiently investigating open quantum systems.
  • The framework’s capabilities and numerical performance are demonstrated in the paper.
  • QuantumOptics.jl is young, remains under active development, and invites community contributions and extensions.Examples include the Correlation Expansion Package and CollectiveSpins library.
  • Planned improvements include adding stochastic Schrödinger and master equations and adopting DifferentialEquations.jl for time evolution.
Loading 1707.01060v2…