# QuTiP

**QuTiP**（Quantum Toolbox in Python，Python 量子工具箱）是一个开源 Python 库，用于对开放量子系统的动力学进行数值模拟——所谓开放量子系统，即与环境发生相互作用的量子系统。<sup>[1](https://qutip.org/index.html)</sup> 它由 J. R. Johansson、P. D. Nation 和理化学研究所（RIKEN）物理学家 [Franco Nori](https://www.edgepedia.org/zh/franco-nori) 共同创建，最早在一篇 2011 年的 arXiv 论文中描述，该论文于 2012 年发表在《Computer Physics Communications》上。<sup>[2](https://arxiv.org/abs/1110.0573)</sup> 该库从算符和态对象出发构建哈密顿量（包括具有任意时间依赖性的哈密顿量），并将其传递给主方程或蒙特卡洛求解器；其声明的目标领域为量子光学、超导电路器件、纳米力学和囚禁离子，此外也用于课堂教学。<sup>[2](https://arxiv.org/abs/1110.0573)</sup><sup> • </sup><sup>[1](https://qutip.org/index.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 性质 | 用于模拟开放量子系统动力学的开源 Python 框架；在 Linux、macOS 和 Windows 上均免费使用，无许可费用。<sup>[1](https://qutip.org/index.html)</sup> |
| 依赖 | 数值计算依赖 NumPy、SciPy 和 Cython；图形输出依赖 Matplotlib。<sup>[1](https://qutip.org/index.html)</sup> |
| 核心求解器 | `sesolve`（薛定谔方程）、`mesolve`（林德布拉德主方程）、`mcsolve`（蒙特卡洛轨迹），以及 Bloch-Redfield、Floquet-Markov、随机、非马尔可夫蒙特卡洛和 HEOM 求解器。<sup>[3](https://qutip.readthedocs.io/en/stable/guide/dynamics/dynamics-intro.html)</sup> |
| 蒙特卡洛默认值 | `mcsolve` 默认运行 500 条随机轨迹（`ntraj=500`）。<sup>[4](https://qutip.org/docs/4.1/guide/dynamics/dynamics-monte.html)</sup> |
| 原始发表 | J. R. Johansson, P. D. Nation, F. Nori, *Comp. Phys. Comm.* 183, 1760 (2012)；arXiv:1110.0573，2011 年 10 月 4 日提交。<sup>[2](https://arxiv.org/abs/1110.0573)</sup> |
| 第 5 版 | 重新设计的数据层，支持稀疏或稠密存储，以及 JAX、CuPy 等后端；由 Neill Lambert 及 17 位合著者在《Physics Reports》1153, 1-62 (2026) 中描述。<sup>[5](https://arxiv.org/abs/2412.04705)</sup> |
| 采用情况 | 下载量达数百万次；项目的研究页面报告 QuTiP 论文被引用超过 5,000 次。<sup>[5](https://arxiv.org/abs/2412.04705)</sup><sup> • </sup><sup>[6](https://qutip.org/research)</sup> |

## 目的与设计

除最简单的哈密顿量外，量子动力学的解析描述通常不可得，而经典模拟又受限于[希尔伯特空间](https://www.edgepedia.org/zh/hilbert-space)随系统规模指数增长的问题。然而，量子光学、囚禁离子、超导电路和纳米力学中许多感兴趣的系统，可以用少量振荡子和自旋组分来建模，且仅需有限数目的量子激发，这使得它们适合在截断的希尔伯特空间中进行模拟；QuTiP 正是为这一类问题而设计的。<sup>[7](https://qutip.org/downloads/4.6.0/qutip-doc-4.6.pdf)</sup>

基本数据对象是 `Qobj` 类，这是一个面向对象的状态与算符容器，任意的哈密顿量（包括含时的）都由它组装而成。<sup>[2](https://arxiv.org/abs/1110.0573)</sup> 在 QuTiP 5 中，`Qobj` 可以以稀疏或稠密表示存储，两者可按需混用；核心格式为 `Dense`、`CSR` 和 `Dia`，扩展包可以添加其他格式，例如 `qutip-jax` 提供的 `Jax` 和 `JaxDia` 格式。<sup>[8](https://github.com/qutip/qutip/blob/master/doc/changelog.rst)</sup><sup> • </sup><sup>[9](https://qutip.readthedocs.io/en/qutip-5.1.x/guide/guide-basics.html)</sup>

## 求解器

QuTiP 提供了一系列用于动力学模拟的求解器，每个求解器返回一个包含期望值或状态的结果对象。<sup>[3](https://qutip.readthedocs.io/en/stable/guide/dynamics/dynamics-intro.html)</sup> 主要入口包括：

- `sesolve` 用于[薛定谔方程](https://www.edgepedia.org/zh/schrodinger-equation)下的幺正演化，`fsesolve` 用于周期系统，`krylovsolve` 用于 Krylov 子空间方法。<sup>[3](https://qutip.readthedocs.io/en/stable/guide/dynamics/dynamics-intro.html)</sup>
- `mesolve` 用于林德布拉德主方程或冯·诺依曼方程。当未提供坍缩算符时，`mesolve` 会自动回退到更快的薛定谔方程演化；坍缩算符（每个为速率平方根与相应耗散算符的乘积）会将其切换到主方程模式。<sup>[10](https://github.com/qutip/qutip/blob/master/doc/guide/dynamics/dynamics-master.rst)</sup>
- `mcsolve` 用于蒙特卡洛量子轨迹，`nm_mcsolve` 用于非马尔可夫热浴。<sup>[3](https://qutip.readthedocs.io/en/stable/guide/dynamics/dynamics-intro.html)</sup>
- `brmesolve`（Bloch-Redfield）、`fmmesolve`（Floquet-Markov）、`ssesolve` 和 `smesolve`（随机薛定谔方程和随机主方程），以及用于层级运动方程的 `HEOMSolver`。<sup>[3](https://qutip.readthedocs.io/en/stable/guide/dynamics/dynamics-intro.html)</sup><sup> • </sup><sup>[5](https://arxiv.org/abs/2412.04705)</sup>

`mesolve` 所实现的林德布拉德主方程建立在玻恩近似、马尔可夫近似和久期近似之上，这些近似要求环境弱耦合且远大于系统、环境关联时间远短于系统动力学时间尺度，以及衰减率小于系统哈密顿量的最小能级分裂。<sup>[10](https://github.com/qutip/qutip/blob/master/doc/guide/dynamics/dynamics-master.rst)</sup>

## 蒙特卡洛方法与主方程方法之比较

蒙特卡洛轨迹方法在非幺正有效哈密顿量下演化一组纯态系综，伴随随机量子跳跃，并对轨迹取平均以恢复开放系统动力学。相比主方程方法，其优势在于内存：只需在内存中保存一个态矢量，而非完整的密度矩阵。在 QuTiP 文档的示例中，在配备四个 CPU 的机器上模拟一个含 10 个自旋、参数随机的海森堡自旋链，主方程方法的耗时几乎是默认 500 条轨迹的 `mcsolve` 的 7 倍，内存占用也约为 7 倍。对于小系统——大致两百个希尔伯特空间态或更少——对大量轨迹取平均的开销会超过这一节省，主方程方法通常更为高效。<sup>[4](https://qutip.org/docs/4.1/guide/dynamics/dynamics-monte.html)</sup>

## 第 5 版与软件包家族

QuTiP 4.7 是第 4 版的最后一个发布系列；在主要开发工作转向 QuTiP 5 的同时，4.7.x 的补丁版本仍在继续发布。<sup>[11](https://qutip.readthedocs.io/en/stable/changelog.html)</sup> 第 5 版围绕灵活的数据层对核心组件（`Qobj`、`QobjEvo` 和求解器）进行了重新设计，使量子对象可以由 JAX、CuPy 等先进数组包作为后端，从而在 `qutip-jax` 后端中通过基于 Diffrax 的积分器实现 GPU 执行和自动微分。<sup>[5](https://arxiv.org/abs/2412.04705)</sup><sup> • </sup><sup>[12](https://qutip-jax.readthedocs.io/en/latest/solver.html)</sup> 求解器围绕新的求解器类和底层常微分方程的 `Integrator` 概念进行了重写。<sup>[8](https://github.com/qutip/qutip/blob/master/doc/changelog.rst)</sup>

从 QuTiP 5.0 开始，若干模块从核心包中拆分出来，成为独立托管的 QuTiP 家族包，以减少外部依赖。其中之一是 `qutip-qip`，即量子信息处理包，它提供两种电路模拟方法：`QubitCircuit` 通过矩阵乘积计算门下的幺正演化，`Processor` 则使用 QuTiP 的开放系统求解器来模拟含噪声的量子器件。它还支持以 OpenQASM 2.0 格式导入和导出电路。<sup>[13](https://qutip-qip.readthedocs.io/en/stable/introduction.html)</sup><sup> • </sup><sup>[14](https://qutip-qip.readthedocs.io/en/stable/qip-simulator.html)</sup> 第 5 版还新增了 QuTiP-QOC，一套量子最优控制工具。<sup>[5](https://arxiv.org/abs/2412.04705)</sup>

## 性能与基准测试

该项目在 [GitHub Actions](https://www.edgepedia.org/zh/github-actions) 上每晚运行基准测试，生成过去一个月的性能历史图和 `Qobj` 操作及求解器相对于数据规模的扩展图，并在可能的情况下与等效的原始 NumPy 和 SciPy 操作进行比较。<sup>[15](https://qutip.org/qutip-benchmark/)</sup> 早期文档将 QuTiP 的主方程和蒙特卡洛求解器与 MATLAB 量子光学工具箱（qotoolbox）进行了比较，发现随着系统规模增大，QuTiP 求解器以显著优势胜过其对应物，并且能在多 CPU 上实现多进程加速，而单处理器的 qotoolbox 无法匹敌。<sup>[16](https://qutip.org/docs/3.0.0/guide/dynamics/dynamics-performance.html)</sup>

如今的独立比较将 QuTiP 置于若干竞争框架之中。一项 2025 年针对 QuantumToolbox.jl 的基准研究——这是由包括 Franco Nori 在内的团队开发的 Julia 包，其语法对 QuTiP 用户来说很熟悉——报告称，在 [Intel Core](https://www.edgepedia.org/zh/intel-core) i9-13900KF 工作站和 NVIDIA GeForce RTX 4090 GPU 上，QuantumToolbox.jl 在主方程、蒙特卡洛和随机主方程基准测试中优于 QuTiP 5.2.1（GPU 运行时使用 JAX 后端）、QuantumOptics.jl 和 dynamiqs。<sup>[17](https://arxiv.org/abs/2504.21440)</sup> QuantumOptics.jl 项目本身也表示，其设计和接口与 QuTiP 的架构非常相似。<sup>[18](https://www.sciencedirect.com/science/article/pii/S0010465518300328)</sup>

## 采用情况

QuTiP 被用作研究、教学和工业工具，下载量已达数百万次；第 5 版论文称其在过去 13 年中一直处于开源量子软件的前沿。<sup>[5](https://arxiv.org/abs/2412.04705)</sup> 项目的研究页面报告了超过 5,000 次引用，并列出了示例应用，包括高保真超导门、[量子点单光子源](https://www.edgepedia.org/zh/quantum-dot-single-photon-sources)、波导 QED 散射和超强光-物质耦合研究。<sup>[6](https://qutip.org/research)</sup> 由于没有许可费用，该项目还推广其在课堂上用于探索量子力学。<sup>[1](https://qutip.org/index.html)</sup>

## References

1. [QuTiP - Quantum Toolbox in Python, qutip.org](https://qutip.org/index.html)
2. [J. R. Johansson, P. D. Nation, F. Nori (2011). QuTiP: An open-source Python framework for the dynamics of open quantum systems. arXiv:1110.0573; Comp. Phys. Comm. 183, 1760 (2012).](https://arxiv.org/abs/1110.0573)
3. [Introduction - QuTiP 5.3 Documentation, solver list](https://qutip.readthedocs.io/en/stable/guide/dynamics/dynamics-intro.html)
4. [Monte Carlo Solver - QuTiP 4.1 Documentation](https://qutip.org/docs/4.1/guide/dynamics/dynamics-monte.html)
5. [N. Lambert et al. QuTiP 5: The Quantum Toolbox in Python. arXiv:2412.04705; Physics Reports 1153, 1-62 (2026).](https://arxiv.org/abs/2412.04705)
6. [QuTiP in Research, qutip.org](https://qutip.org/research)
7. [QuTiP: Quantum Toolbox in Python, Release 4.6.0 documentation PDF](https://qutip.org/downloads/4.6.0/qutip-doc-4.6.pdf)
8. [qutip changelog.rst, GitHub](https://github.com/qutip/qutip/blob/master/doc/changelog.rst)
9. [Basic Operations on Quantum Objects - QuTiP 5.1 Documentation](https://qutip.readthedocs.io/en/qutip-5.1.x/guide/guide-basics.html)
10. [Lindblad Master Equation Solver, qutip documentation source (dynamics-master.rst)](https://github.com/qutip/qutip/blob/master/doc/guide/dynamics/dynamics-master.rst)
11. [Change Log - QuTiP 5.3 Documentation](https://qutip.readthedocs.io/en/stable/changelog.html)
12. [Jax Backend in QuTiP's Solver - qutip_jax documentation](https://qutip-jax.readthedocs.io/en/latest/solver.html)
13. [Introduction - qutip_qip 0.4.2 documentation](https://qutip-qip.readthedocs.io/en/stable/introduction.html)
14. [Gate-level circuit simulation - qutip_qip 0.4.2 documentation](https://qutip-qip.readthedocs.io/en/stable/qip-simulator.html)
15. [QuTiP Benchmarks, qutip.org](https://qutip.org/qutip-benchmark/)
16. [Performance (QuTiP vs. qotoolbox) - QuTiP 3.0 Documentation](https://qutip.org/docs/3.0.0/guide/dynamics/dynamics-performance.html)
17. [A. Mercurio et al. QuantumToolbox.jl: An efficient Julia framework for simulating open quantum systems. arXiv:2504.21440; Quantum 9, 1866 (2025).](https://arxiv.org/abs/2504.21440)
18. [QuantumOptics.jl: A Julia framework for simulating open quantum systems, Computer Physics Communications](https://www.sciencedirect.com/science/article/pii/S0010465518300328)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Free and open-source software

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/qutip

English original: https://www.edgepedia.org/qutip
