Qrisp

High-level programming framework for quantum computers

SQC Technologie Qrisp, Grafik, Englisch, 16z9, 1200x675px
© Fraunhofer FOKUS

Qrisp is a high-level programming language for working with quantum computers. Qrisp is designed to enable programmers to write complex quantum algorithms with the ease of a modern day programming language while still compiling down to the circuit level.

By automating much of the low-level coding duties, such as gate-by-gate assembly or qubit management, we aim to open this field of research to a broad audience of developers. Qrisp is being developed at Fraunhofer FOKUS funded by the German ministry for economic affairs and climate action and the European Union.

Framework structure overview

The central data structure for abstract quantum programming is the QuantumVariable. The lifetime cycle of QuantumVariables and other aspects are managed by the QuantumSession class, which manages the interaction with a QPU at the backend. Due to a sophisticated system for managing QuantumSessions, typically the user does not have to think about

QuantumSession objects and can just use QuantumVariables.

In many cases raw QuantumVariables are not that helpful as they provide very few advanced data processing capabilities due to their generality. QuantumVariables can be thought of as the abstract base class of more specific datatypes.

Qrisp provides 5 advanced quantum data types:

  1. QuantumFloat: a datatype to represent and process numbers to arbitrary precision
  2. QuantumModulus: a datatype to model and process modular arithmetic
  3. QuantumBool: a datatype to represent boolean values
  4. QuantumChar: a datatype to represent characters
  5. QuantumString: a datatype to represent strings

QuantumVariables of the same type can be managed in a class called QuantumArray. This class provides many convenient and established features like slicing or reshaping.

Using the concept of Quantum Environments, it is possible to program using many of the established paradigms from classical computing such as conditional execution of blocks of code (described in ConditionEnvironment).

As most of today’s research on quantum algorithms has been formulated in terms of quantum circuits, we provide the Circuit Construction module, which allows the construction of QuantumCircuits. Constructing QuantumCircuits in Qrisp is very similar as in Qiskit since the structure and the naming of the classes and methods are held as close as possible.

To guarantee application-oriented algorithm development at every stage, Qrisp comes with a network interface for addressing remote backends. This interface has been successfully testet wit different backend providers like eleQtron, IQM, AQT and IBM.

Why should you use Qrisp over other quantum frameworks?

With Qrisp, you can concentrate on the crucial aspects of your code and reduce the burden of overseeing individual qubits and quantum gates. Due to a sophisticated qubit management system, recycled quantum resources are automatically reused across functions, implying Qrisp code can be modularized effectively. Combined with a typing system, which is smoothly integrated into the Python infrastructure, scalable algorithm development is a straightforward process. Qrisp is lightweight and fast yielding a convenient development workflow.

The Thinq Qrisp Community

In September 2024, the Thinq Qrisp Community was founded with the aim of working on new ideas for programming quantum computers. The aim is to bundle the activities of the Quantum Software Engineering Community and to network the individual players. The focus here is on the Qrisp programming language. The Think Qrisp community offers its members access to exclusive learning materials and the latest developments, as well as the opportunity for further training through webinars and joint events, such as networking events and hackathons.