← Quantum Store · Guides · Lessons · Glossary · Packages · About · Türkçe
Fraunhofer FOKUS and Eclipse Qrisp
High-level quantum programming with Qrisp
Official source: eclipse-qrisp/Qrisp
Download ZIP (free)Quantum arithmetic without fiddling with gates, using Qrisp developed at Fraunhofer FOKUS: a tested example that adds 3 to 8 numbers in superposition in a single circuit.
What is Qrisp?
Qrisp is a quantum programming language (as a Python library) developed at
Fraunhofer FOKUS in Berlin and maintained today under the Eclipse Foundation.
Instead of gates you write programs with quantum variables (QuantumFloat,
QuantumBool …) and familiar operators (+, *, ==); Qrisp builds the
required circuit and cleans up the helper qubits itself.
When to use it
- When you want to write an algorithm in readable code without going down to the gate level.
- In algorithms that need quantum arithmetic, comparisons and conditional operations (Grover oracles, Shor's modular arithmetic).
- When you want to reduce the qubit count of large circuits with automatic management.
The example in this package
kuantum_toplama.py puts a 3-bit number into an equal superposition of 0–7,
adds it together with 3 into a second 4-bit variable, and measures both
together. All eight additions are done in one circuit and every line gives
the correct a+3.
In our first attempt we also kept the result in 3 bits; sums such as 5+3
overflowed and came out as 0. The bit width of quantum variables is fixed,
as with classical integers, so you have to leave room for the result to fit.
Version note
The example was run on Linux with the current Qrisp 0.9.9. If you get a "DLL
initialisation" error while jaxlib loads on Windows, first install
Microsoft's current "Visual C++ Redistributable" package
(https://aka.ms/vs/17/release/vc_redist.x64.exe); an old runtime causes this
error. If you cannot update, the same example ran without problems on our
Windows test machine with pip install "qrisp==0.6.3".
Next steps
- Try
c = a * ainstead ofb += a; Qrisp builds the multiplication circuit itself. - Move on to the Grover and QAOA tutorials in the documentation.
Installation and running
pip install qrisp
python kuantum_toplama.py
Tested with: qrisp 0.6.3 (Windows, Python 3.12) and qrisp 0.9.9 (Linux, Python 3.12).
Official source
- Repository: eclipse-qrisp/Qrisp
- Latest release: 0.9 — 22 June 2026
- Licence: EPL-2.0
- Stars: 302
- Default branch commit when the catalogue was built:
963b559e3c1c(10 October 2026)
Links
Package contents
kuantum_toplama.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 (EPL-2.0).
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.
kuantum_toplama.py
"""Qrisp ile kuantum aritmetiği: süperpozisyondaki bir sayıya 3 ekle.
Çalıştırma:
pip install qrisp
python kuantum_toplama.py
"""
from qrisp import QuantumFloat, h, multi_measurement
a = QuantumFloat(3) # 0..7 arası tamsayı tutan kuantum değişkeni
h(a) # a artık 0..7'nin hepsinin eşit süperpozisyonu
# Sonuç 10'a kadar çıkabilir; 3 bit yetmez (taşar), bu yüzden 4 bitlik yer aç.
b = QuantumFloat(4)
b[:] = 3
b += a # Qrisp toplama devresini kendisi kurar
sonuc = multi_measurement([a, b])
for (x, y), p in sorted(sonuc.items()):
print(f"a={x:>3} a+3={y:>4} olasılık={p:.3f}")
assert len(sonuc) == 8
assert all(y == x + 3 for (x, y) in sonuc)
print("Tamam: tek devreyle 8 toplama aynı anda yapıldı; her sonuç doğru.")
Related concepts
- Grover’s algorithm · Grover’s algorithm finds a marked item among N unsorted items in about √N steps, a quadratic speed-up over classical search.