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:
- QuantumFloat: a datatype to represent and process numbers to arbitrary precision
- QuantumModulus: a datatype to model and process modular arithmetic
- QuantumBool: a datatype to represent boolean values
- QuantumChar: a datatype to represent characters
- 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.