Qrisp
Eclipse Qrisp (also referred to as Qrisp) is an open-source high-level quantum programming framework designed to simplify the implementation and development of quantum algorithms.
≈ 4 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
Eclipse Qrisp (also referred to as Qrisp) is an open-source high-level quantum programming framework designed to simplify the implementation and development of quantum algorithms. Initially developed by Fraunhofer FOKUS (Quality Engineering unit, Berlin), Qrisp enables programmers to write complex quantum circuits using familiar constructs (variables, loops, etc.) while automating low-level tasks like gate assembly and qubit management.
Its design shifts the emphasis from hardware-specific gate manipulation to modern software paradigms, making quantum code more accessible to classical developers. The framework is written in Python and integrates with standard scientific libraries (e.g. NumPy, NetworkX, TensorFlow).
Qrisp is released as open-source software under an Eclipse Foundation project, and was publicly funded by the German Federal Ministry for Economic Affairs and Climate Action for its initial development. from qrisp import QuantumFloat Create Variables of type QuantumFloat n = 3 a = QuantumFloat(n) b = QuantumFloat(n) Assign Values a[:] = 3 b[:] = 4 Perform operations with QuantumVariables res = a * b Simulate quantum program print(res) Qrisp's core objectives are to bridge the gap between classical software engineering practices and quantum hardware requirements. The project aims to offer high-level abstractions so that developers can express quantum algorithms in familiar terms (data types, functions, control flow) without managing individual qubits and gates.
According to the original Qrisp paper, the design goals include providing “a programming interface which seamlessly connects multiple layers of abstraction” and enabling “hardware-specific compilation of hardware-agnostic code”. In practice, this means Qrisp should let a programmer write code that can be compiled efficiently for different quantum backends, while also serving as an educational tool for understanding quantum computation from first principles.
By automating bookkeeping (such as uncomputing temporary results) and by offering a resource manager for qubits, Qrisp seeks to reduce bugs and improve maintainability of quantum software. Qrisp introduces several key technical features and abstractions to support high-level quantum programming: Quantum Variables: The core abstraction is the QuantumVariable.
Each QuantumVariable represents a quantum state (e.g. a register of qubits) and hides the details of qubit allocation and management from the user. Specialized subclasses (built-in types) include QuantumFloat. QuantumModulus, QuantumBool, QuantumChar, and QuantumString, which support arithmetic and other operations in quantum circuits.
Sessions and Uncomputation: Each QuantumVariable is managed by a QuantumSession that tracks its lifecycle. When temporary quantum variables are no longer needed, Qrisp automatically “uncomputes” them to disentangle and free their qubits. This automatic uncomputation (e.g. via an @auto_uncompute decorator) ensures efficient reuse of qubits without manual intervention.
Quantum Data Structures: Qrisp supports compound data structures: QuantumArray allows multiple quantum variables of the same type to be treated like a NumPy array (with slicing, reshaping, etc.). QuantumDictionary enables using quantum variables as keys, integrating classical-like data relationships into quantum algorithms. Circuit Construction: A Circuit Construction module lets users build custom circuits.
Qrisp's interfaces mirror common frameworks (e.g. similar to Qiskit) for operations like Hadamard and CNOT gates, controlled operations, and modular arithmetic. For example, Qrisp provides built-in functions for the Quantum Fourier Transform (QFT) and other multi-qubit operations, facilitating algorithms like Shor's algorithm.
Control Flow and Environments: Qrisp implements classical control flow (conditionals, loops) using “quantum environments.” Conditional execution of code blocks can be specified similarly to classical programs, and Qrisp handles the necessary conditional quantum operations behind the scenes.
Simulator: The framework includes a high-performance statevector simulator using sparse matrix techniques. This simulator can run circuits on the order of 100 qubits, allowing developers to test algorithms offline. Hardware Compatibility: Qrisp compiles high-level code into quantum circuits in QASM format.
These circuits can be executed on any QASM-capable backend. In particular, Qrisp provides integration with hardware providers such as IBM, IQM, AQT, and others. The seamless embedding in Python means Qrisp code can be combined with other scientific tools, and arbitrary classical pre- or post-processing via Python libraries.
Text derived from https://en.wikipedia.org/w/index.php?oldid=1377984629 under CC BY-SA 4.0; modifications have been made.