QuTiP


QuTiP, short for the Quantum Toolbox in Python, is an open-source computational physics software library for simulating quantum systems, particularly open quantum systems. QuTiP allows simulation of Hamiltonians with arbitrary time-dependence, allowing simulation of situations of interest in quantum optics, ion trapping, superconducting circuits and quantum nanomechanical resonators. The library includes extensive visualization facilities for content under simulations.
QuTiP's API provides a Python interface and uses Cython to allow run-time compilation and extensions via C and C++. QuTiP is built to work well with popular Python packages NumPy, SciPy, Matplotlib and IPython.

History

The idea for the QuTip project was conceived in 2010 by PhD student Paul Nation, who was using the quantum optics toolbox for MATLAB in his research. According to Paul Nation, he wanted to create a python package similar to qotoolbox because he "was not a big fan of MATLAB" and then decided to "just write it self". As a postdoctoral fellow, at the RIKEN Institute in Japan, he met Robert Johansson and the two worked together on the package.
In contrast to its predecessor qotoolbox, which relies on the proprietary MATLAB environment, it was published in 2012 under an open source license.
The Version created by Nation and Johansson already contained the most important features of the package, but QuTips scope and features are constantly being extended by a large community of contributors. It has grown in popularity amongst physicists, with over 250.000 downloads in the year 2021.

Examples

Creating quantum objects


>>> import qutip
>>> import numpy as np
>>> psi = qutip.Qobj # create quantum state from a list
>>> psi
Quantum object: dims = 2],
,
,
,
,
0.+1.j 0.+0.j

Basic operations


>>> A*qutip.sigmax+qutip.sigmay # we can add and multiply quantum objects of compatible shape and dimension
Quantum object: dims = 2
,
,,

,
,
dtype=object))
>>>.expm # matrix exponential of an operator
Quantum object: dims = 2],
,


0.+0.j 0.+0.j 0.-1.j 0.+0.j

Time evolution


>>> Hamiltonian = qutip.sigmay
>>> times = np.linspace
>>> result = qutip.sesolve, phi.proj
) # unitary time evolution of a system according to schroedinger equation
>>> expectpsi, expectphi = result.expect # expectation values of projectors onto psi and phi
>>> plt.figure
>>> plt.plot
>>> plt.plot
>>> plt.legend
>>> plt.show

Simulating a non-unitary time evolution according to the Lindblad Master Equation is possible with the qutip.mesolve function