← Quantum Store · Guides · Lessons · Glossary · Packages · About · Türkçe
The QuTiP community
QuTiP: simulating open quantum systems
Official source: qutip/qutip
Download ZIP (free)QuTiP for simulating quantum dynamics and noise (decoherence): a tested example that solves damped Rabi oscillations with the Lindblad master equation.
What is QuTiP?
QuTiP (Quantum Toolbox in Python) is an open-source library that simulates how quantum systems evolve over time. It is the standard tool for "open" quantum systems in particular, those that interact with their surroundings, losing energy and phase information (decoherence). Its first version was developed at RIKEN by J. R. Johansson, P. D. Nation and F. Nori (Comput. Phys. Commun. 183, 1760, 2012); today it is maintained by an international community.
When to use it
- When modelling how a qubit behaves under T1/T2 times.
- When computing the effect of laser or microwave pulses (Rabi and Ramsey experiments).
- In quantum optics and circuit QED problems.
The example in this package
rabi_salinimi.py follows a qubit driven on resonance for 3 seconds. At the
first π pulse (t = 0.5 s) the qubit reaches the excited state with 96%
probability; damping (γ = 0.2) reduces the amplitude of the oscillation over
time.
Next steps
- Add a collapse operator
np.sqrt(gamma_phi) * qt.sigmaz()for dephasing. - Try an off-resonant (detuned) drive:
H += 0.5 * delta * qt.sigmaz().
Installation and running
pip install qutip
python rabi_salinimi.py
Tested with: qutip 5.3.1, Python 3.12.
Official source
- Repository: qutip/qutip
- Latest release: v5.3.1 — 4 August 2026
- Licence: BSD-3-Clause
- Stars: 2,082
- Default branch commit when the catalogue was built:
52130d3ecd39(8 October 2026)
Links
Package contents
rabi_salinimi.pyREADME.en.md— this fileREADME.md— the same guide in TurkishLICENSE— the licence of the files in this packageKAYNAK.json— a machine-readable summary of the official sourceUPSTREAM-LICENSE.txt— the licence text of the official project
Licence
The example code and the guide in this package were written by the Quantum Store editors and are MIT licensed. The project it uses is subject to its own licence (BSD-3-Clause).
Quantum Store — https://hakanerdogan.com/en
Example code
The example shipped in the package, run and checked. Comments and printed messages are in Turkish; the code is the same in any language. Everything is in the ZIP.
rabi_salinimi.py
"""QuTiP ile sönümlü Rabi salınımı (açık kuantum sistemi).
Rezonanstaki sürücü, kübiti |0> durumundan |1> durumuna döndürür; enerji
sönümü (T1) salınımın genliğini zamanla azaltır. Lindblad ana denklemi
mesolve ile çözülür.
Çalıştırma:
pip install qutip
python rabi_salinimi.py
"""
import numpy as np
import qutip as qt
rabi_hz = 1.0
gamma = 0.2 # sönüm hızı (1/T1)
H = 0.5 * 2 * np.pi * rabi_hz * qt.sigmax()
psi0 = qt.basis(2, 0)
tlist = np.linspace(0, 3, 301)
result = qt.mesolve(
H,
psi0,
tlist,
c_ops=[np.sqrt(gamma) * qt.destroy(2)],
e_ops=[qt.num(2)],
)
excited = np.asarray(result.expect[0])
for t in (0.0, 0.5, 1.0, 1.5, 2.5):
i = int(round(t * 100))
print(f"t = {t:3.1f} s P(|1>) = {excited[i]:.3f}")
first_peak = excited[50]
later_peak = excited[250]
assert first_peak > 0.9 and later_peak < first_peak, (first_peak, later_peak)
print("Tamam: ilk π-darbesinde neredeyse tam geçiş, sönümle azalan genlik.")
Related concepts
- Decoherence · Decoherence is a qubit gradually losing its superposition and entanglement, its quantum properties, through unwanted interaction with its environment.
- Bloch sphere · The Bloch sphere is a geometric picture that shows every state of a single qubit as a point on the surface of a sphere: the north pole is |0⟩, the south pole |1⟩.