← Quantum Store · Guides · Lessons · Glossary · Packages · About · Türkçe
Jens Koch's group (Northwestern University) and the scqubits community
Superconducting qubit (transmon) physics with scqubits
Official source: scqubits/scqubits
Download ZIP (free)A tested example that computes the energy levels, anharmonicity and charge-noise resilience of the transmon qubit used in IBM and Google processors.
What is scqubits?
scqubits is an open-source Python library that computes the energy levels and behaviour of superconducting qubits. It is developed by Jens Koch's group at Northwestern University; Koch is also the lead author of the 2007 paper that introduced the transmon qubit.
What is a transmon?
Most of the qubits in IBM's and Google's quantum processors are transmons: a small electrical circuit made of a Josephson junction and a capacitor, cooled close to absolute zero. The two lowest energy levels of this circuit are used as |0⟩ and |1⟩.
The example in this package
transmon_seviyeleri.py computes the following for a typical transmon
(EJ = 15 GHz, EC = 0.3 GHz):
- Qubit frequency (the 0→1 transition): 5.683 GHz. Within the 4–6 GHz range of real processors.
- Anharmonicity: −345 MHz. Because the levels are not evenly spaced, a microwave pulse can drive only the 0↔1 transition without leaking the qubit into the second level.
- Sensitivity to charge noise: with an EJ/EC ratio of 5 the qubit frequency wanders by about 322 MHz; at a ratio of 50 only by 0.012 MHz. This resilience is the key to the transmon's invention.
Next steps
- Plot the energy levels against the charge variable with
tmon.plot_evals_vs_paramvals("ng", ...). - Try a different kind of superconducting qubit with
scq.Fluxonium. - Combine two transmons with
scq.HilbertSpaceand study their interaction.
Installation and running
pip install scqubits
python transmon_seviyeleri.py
Tested with: scqubits 4.3.1, Python 3.12.
Official source
- Repository: scqubits/scqubits
- Latest release: v4.3.1 — 17 May 2025
- Licence: BSD-3-Clause
- Stars: 284
- Default branch commit when the catalogue was built:
0249193fcf1a(11 October 2026)
Links
Package contents
transmon_seviyeleri.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.
transmon_seviyeleri.py
"""scqubits ile transmon: IBM ve Google'ın kullandığı süperiletken kübitin enerji seviyeleri.
Çalıştırma:
pip install scqubits
python transmon_seviyeleri.py
"""
import scqubits as scq
scq.settings.PROGRESSBAR_DISABLED = True
# Enerjiler GHz cinsinden. EJ: Josephson enerjisi, EC: yük (kapasitans) enerjisi.
# Gerçek transmonlarda EJ/EC oranı 50 civarındadır.
tmon = scq.Transmon(EJ=15.0, EC=0.3, ng=0.0, ncut=31)
seviye = tmon.eigenvals(evals_count=4)
f01 = seviye[1] - seviye[0]
f12 = seviye[2] - seviye[1]
anharmonisite = f12 - f01
print(f"0→1 geçiş frekansı (kübit frekansı): {f01:.3f} GHz")
print(f"1→2 geçiş frekansı : {f12:.3f} GHz")
print(f"Anharmonisite (f12 - f01) : {anharmonisite * 1000:.0f} MHz")
print("Seviyeler eşit aralıklı olmadığı için 0↔1 geçişini, 2. seviyeye çıkmadan sürebiliriz.")
def yuk_hassasiyeti(ej_ec: float) -> float:
# Kübit frekansının çevredeki elektrik yüküne (ng) göre ne kadar oynadığı.
ec = 0.3
t = scq.Transmon(EJ=ej_ec * ec, EC=ec, ng=0.0, ncut=31)
a = t.eigenvals(evals_count=2)
t.ng = 0.5
b = t.eigenvals(evals_count=2)
return abs((a[1] - a[0]) - (b[1] - b[0]))
kucuk, buyuk = yuk_hassasiyeti(5), yuk_hassasiyeti(50)
print(f"Yük gürültüsüne hassasiyet, EJ/EC=5 : {kucuk * 1000:9.3f} MHz")
print(f"Yük gürültüsüne hassasiyet, EJ/EC=50: {buyuk * 1000:9.6f} MHz")
assert 5.3 < f01 < 6.0, f01
assert -0.4 < anharmonisite < -0.25, anharmonisite
assert buyuk < kucuk / 1000, (kucuk, buyuk)
print("Tamam: büyük EJ/EC oranı kübiti yük gürültüsüne karşı binlerce kat dayanıklı yapıyor.")
Related concepts
- Qubit · A qubit is the basic unit of information in a quantum computer: measured, it gives 0 or 1, but before measurement it can be in a superposition of both.
- Decoherence · Decoherence is a qubit gradually losing its superposition and entanglement, its quantum properties, through unwanted interaction with its environment.