Source-linked AI summary
QuTiP 2: A Python framework for the dynamics of open quantum systems
J. R. Johansson, P. D. Nation, Franco Nori
TL;DR
QuTiP 2 extends a Python framework for simulating open and closed quantum-system dynamics with new features, performance enhancements, and API changes. It adds support for time-dependent operators, Floquet and microscopic master-equation approaches, random quantum objects, and expanded analysis and data-management capabilities. The release also documents examples and migration-relevant interface changes.
Problem
QuTiP requires a framework for numerical simulation and computation of open and closed quantum-system dynamics, while the new major release incorporates substantial additional functionality and performance work.
Method
QuTiP 2 uses an object-oriented Python framework with optimized scientific-library and Cython components, implementing time-dependent, Floquet-Markov, and Bloch-Redfield simulation capabilities.
Results
QuTiP 2 introduces arbitrary time-dependent collapse operators, random quantum-object generation, selectable operator norms, internal data saving and loading, and Floquet-Markov and Bloch-Redfield functionality.
Takeaways & Limitations
The release provides a Python environment for expressing quantum-mechanical problems close to their mathematical formulation while supporting the paper’s demonstrated numerical simulations and data workflows.
Abstract
from arXiv · showhide
We present version 2 of QuTiP, the Quantum Toolbox in Python. Compared to the preceding version [Comput. Phys. Comm. 183 (2012) 1760], we have introduced numerous new features, enhanced performance, made changes in the Application Programming Interface (API) for improved functionality and consistency within the package, as well as increased compatibility with existing conventions used in other scientific software packages for Python. The most significant new features include efficient solvers for arbitrary time-dependent Hamiltonians and collapse operators, support for the Floquet formalism, and new solvers for Bloch-Redfield and Floquet-Markov master equations. Here we introduce these new features, demonstrate their use, and give a summary of the important backward-incompatible API changes introduced in this version.
1. Introduction
QuTiP 2 follows substantial development of a Python framework for simulating open and closed quantum-system dynamics. The release introduces additional functionality, performance enhancements, and documented changes for users and application migration.
- Framework: QuTiP is an object-oriented Python framework for numerical simulation and computation of open and closed quantum-system dynamics.Its design follows the corresponding mathematical formulation.
- Release scope: The second major release followed active development that added new features and performance enhancements.The paper presents the significant changes and additional functionality in the release.
- Paper coverage: The paper documents backward-incompatible API changes, new features, numerical examples, and newly user-accessible functions.These topics are covered across Sections 2–4 and Appendix A.
2. API changes
QuTiP 2 changes solver outputs, solver naming, correlation interfaces, and data-handling conventions relative to QuTiP 1.1.4. These changes matter chiefly when porting existing applications and simulations.
- Solver outputs: All listed quantum-dynamics solvers now return an Odedata instance containing the solution information instead of data lists or Qobjs lists.The return object can also store additional information, such as Monte Carlo collapse times.
- Solver naming: The Lindblad master-equation solver is now named mesolve, while odesolve remains available but is officially deprecated.The legacy odesolve function does not return an Odedata object.
- Correlation functions: Transient and steady-state correlation calculations are consolidated under correlation and correlation_ss, with the underlying solver selected through the solve keyword.The solve option defaults to the Lindblad master equation solver, mesolve.
- Correlation functions: The solve keyword accepts the solver identifiers "me", "es", or "mc".This keyword specifies the underlying dynamics solver for the consolidated correlation functions.
3. New features
QuTiP 2.1 adds computational tools for time-dependent and open-system dynamics, data handling, performance, state generation, spectral calculations, information measures, and operator analysis.
- Dynamics: Arbitrary time-dependent collapse operators are supported through a more efficient and flexible operator-representation system.The system supports Lindblad master-equation and Monte Carlo solvers and can compile many problems into C code via Cython.
- Dynamics: Floquet tools transform periodic time-dependent problems into a time-independent Floquet-mode basis and support unitary and dissipative evolution.QuTiP 2.0 added a module for Floquet decompositions and corresponding equations of motion and master equations.
- Dynamics: A Bloch-Redfield solver handles time evolution when environments are specified by noise power spectra rather than phenomenological Lindblad rates.The solver is less efficient than the Lindblad solver but has significant advantages in this setting.
- Analysis and construction: QuTiP adds quantum process tomography, random quantum-object generation with controllable sparsity, and sparse eigensolvers for large Hilbert spaces.Random generators cover kets, density matrices, Hamiltonians, and unitary operators; sparse options apply to eigenstates, eigenenergies, and groundstate.
- Analysis and construction: Additional utilities calculate concurrence, mutual information, conditional entropy, and selectable trace, Frobius, one, and max operator norms.The trace norm is the default, while ket and bra vectors support only the L2-norm.
- Usability and performance: QuTiP 2.1 improves performance, supports internal saving and loading of quantum and array data, and includes installation-verification unit tests.Reported optimizations include quantum-object creation, ptrace, and the steadystate solver; array data can also be exported as formatted real or complex text.
4. Example scripts featuring new functionality
QuTiP 2.1 examples demonstrate the new Odedata API, Floquet and Floquet-Markov evolution, Bloch-Redfield dynamics, and exporting Wigner-function data.
- New Odedata API: The new Odedata class returned by QuTiP evolution solvers exposes states and expectation values, while allowing additional solver information to be stored.The example uses mesolve to obtain dissipative and ideal two-qubit trajectories, extracts states through the new API, and computes final-state fidelity.
- Floquet modes: Time-dependent Hamiltonians are represented in list-string form and passed to floquet_modes to calculate quasienergies across driving amplitudes.The example varies E over 100 amplitudes, constructs H = [H0, [H1, ’cos(w * t)’]], and records two quasienergies for each amplitude.
- Floquet Evolution: The Floquet-Markov master equation incorporates periodic driving through Floquet-basis dynamics and is implemented by the fmmesolve function.A sinusoidally driven qubit with an Ohmic environmental spectrum is evolved and its occupation probability is compared with Lindblad evolution.
- Bloch-Redfield master equation: Bloch-Redfield dynamics derives dissipation from microscopic system-bath coupling and is advantageous when the environment is specified by a noise power spectrum.The coupled-qubit example assumes Ohmic spectra and compares spin-operator expectation values with Lindblad evolution.
- Exporting QuTiP data: QuTiP can export computed Wigner-function data with file_data_store and file_data_read, then visualize it externally using Mayavi.The example plots a Wigner function for a superposition of coherent states with an additional random ket vector.
Appendix A. New functions in QuTiP 2.1
Appendix A catalogs the new user-accessible functions available in QuTiP 2.1 and directs users to help documentation for further details.
- Table A.1 lists the new user-accessible functions available in QuTiP 2.1.
- Users can obtain additional information about each function through the Python command line’s help function.
- The QuTiP website also provides additional information about the listed functions.