Numerical solution of the Lindblad master equation using the Runge-Kutta method implemented in Python
DOI:
https://doi.org/10.31349/RevMexFisE.23.010214Keywords:
Lindblad master equation; numerical methods; Runge-Kutta; PythonAbstract
The dynamics of open quantum systems is governed by the Lindblad master equation, which provides a consistent framework for incorporating environmental effects into the evolution of the system. Since exact solutions are rarely available, numerical methods become essential tools for analyzing such systems. This article presents a step-by-step implementation of the fourth-order Runge-Kutta method in Python to solve the Lindblad equation for a single quantized field mode subject to decay. A coherent state is used as the initial condition, and the time evolution of the average photon number is investigated. The proposed methodology enables transparent and customizable simulations of dissipative quantum dynamics, emphasizing a pedagogical approach that helps readers understand the numerical structure without relying on external libraries such as QuTiP. This standalone implementation offers full control over each integration step, making it particularly suitable for educational contexts and for exploring non-standard dynamics or introducing custom modifications to the Liouvillian.
References
H.-P. Breuer and F. Petruccione, The theory of open quantum systems (Oxford University Press on Demand, 2002)
H. J. Carmichael, An open systems approach to quantum optics (Springer-Verlag, 1993). https://doi.org/10.1007/978-3-540-47620-7
C. Gerry and P. Knight, Introductory Quantum Optics (Cambridge University Press, 2004), https://doi.org/10.1017/CBO9780511791239
L. M. Arévalo-Aguilar and H. Moya-Cessa, Cavidad con pérdidas: una descripción usando superoperadores, Rev. Mex. Fis. 42 (1995) 675
D. Manzano, A Short Introduction to the Lindblad Master Equation, AIP Advances 10 (2020) 025106, https://doi.org/10.1063/1.5115323
L. Hernández-Sánchez et al., Exact solution for the interaction of two decaying quantized fields, Opt. Lett. 48 (2023) 5435, https://doi.org/10.1364/OL.503837
L. Hernández-Sánchez et al., Exact solution of the master equation for interacting quantized fields at finite temperature decay (2024), https://arxiv.org/abs/2410.08428
L. Hernández-Sánchez et al., Dynamics of the Interaction Between Two Coherent States in a Cavity with Finite Temperature Decay, Dynamics 5 (2025) 4, https://doi.org/10.3390/dynamics5010004
J. C. Butcher, Numerical Methods for Ordinary Differential Equations (John Wiley & Sons, Ltd, 2016), https://onlinelibrary.wiley.com/doi/book/10.1002/9781119121534
W. H. Press, B. P. Flannery, and S. A. Teukolsky, Numerical Recipes: The Art of Scientific Computing 1st ed. (Cambridge University Press, 1986)
L. Hernández-Sánchez et al., Formas de Línea Atómicas en Modelos de Tipo Jaynes-Cummings (Editorial Académica Española, 2023), p. 150
W. H. Louisell, Quantum Statistical Properties of Radiation (John Wiley & Sons, Inc., New York, 1990), https://ui.adsabs.harvard.edu/abs/1990qspr.book
H. M. Moya-Cessa and F. Soto-Eguibar, Introduction To Quantum Optics (Rinton Press, 2011), https://www.researchgate.net/publication/259582579_INTRODUCTION_TO_QUANTUM_OPTICS
E. Fehlberg, Low-order classical Runge-Kutta formulas with step size control and their application to some heat transfer problems, NASA Technical Report NASA-TR-R-315, NASA Marshall Space Flight Center, Huntsville, AL, United States (1969), https://ntrs.nasa.gov/citations/19690021375, Work of the US Gov. Public Use Permitted
P. Hammachukiattikul, et al., Runge-Kutta Fehlberg Method for Solving Linear and Nonlinear Fuzzy Fredholm Integro- Differential Equations, Appl. Math. Inf. Sci. 15 (2021) 43, https://doi.org/10.18576/amis/150106
C. Nwankwo and W. Dai, An adaptive and explicit fourth order Runge-Kutta-Fehlberg method coupled with compact finite differencing for pricing American put options, Japan J. Indust. Appl. Math. 38 (2021) 921, https://doi.org/10.10.1007/s13160-021-00470-2
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 L. Hernández-Sánchez, I. A. Bocanegra-Garay, A. Flores-Rosas, I. Ramos-Prieto, F. Soto-Eguibar, H. M. Moya-Cessa

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Authors retain copyright and grant the Revista Mexicana de Física E right of first publication with the work simultaneously licensed under a CC BY-NC-ND 4.0 that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
