Tutorials#

Welcome to the tutorial of Qrisp! This page will help you get started by providing step-by-step instructions and examples. Whether you’re a beginner or an experienced quantum programmer, these tutorials provide a helping hand exploring the fundamentals of the framework and make you familiar with its syntax and features.

Getting familiar with Qrisp

../../_images/hello_world.png

Description

You will, well, get familiar with Qrisp. After being stimulated to replace thinking with quantum cirtuits with thinking with QuantumVariables, you’ll learn to solve a quadratic equation using Grover’s algorithm and get acquainted with Quantum Phase Estimation.

Simulate the dynamics of the $H_2$ molecule

../../_images/hydrogen.png

Description

This tutorial will show you how to leverage Qrisp’s advanced capabilities to perform molecular simulations on quantum computers.

Hybrid real-time algorithm conrol with Jasp

../../_images/hybrid_realtime.png

Description

You will learn how this new compilation pipeline accelerates quantum algorithm compilation, and allows for hybrid real-time computations.

Factoring integers using Shor's algorithm

../../_images/period_finding.svg

Description

This tutorial will guide you through our state-of-the-art implementation of Shor’s algorithm, allowing you to factor numbers and fiddle around encrypting and decrypting hidden messages.

Solving systems of linear equations via HHL

../../_images/HHL.png

Description

The Harrow-Hassidim-Lloyd (HHL) quantum algorithm offers an exponential speed-up over classical methods for solving linear system problems \(Ax=b\) for certain sparse matrices \(A\). The tutorial demonstrates hybrid quantum-classical workflows using the Catalyst framework and highlights how Qrisp and Catalyst work together for implementing and compiling advanced quantum algorithms.

Fault-Tolerant compilation

../../_images/torus.png

Description

This tutorial delves into the realm of compiling for fault-tolerant quantum devices, exploring the specialized techniques and considerations that set this stage apart from the compilation challenges encountered in NISQ environments. At the end you will also optimize the implementation of Shor’s from the tutorial above.

Solving the Traveling Salesman Problem

../../_images/tsp.svg

Description

You will set up a superposition of all routes, evaluate route distance, and create a Grover’s oracle to eventually evaluate it.

Solving Sudoku using Quantum Backtracking

../../_images/backtracking.svg

Description

You will learn how to efficiently implement the Sudoku problem specific quantum oracles, and how to use the general Quantum Backtracking implementation within Qrisp.

Solving combinatorial optimization problems with QAOA

../../_images/maxcut_tutorial.png

Description

This tutorial will break down the theory behind this promising algorithm before implementing it for the MaxCut problem, the graph coloring problem, as well as providing a new constrained mixer type letting you reduce the search space! We also include tutorials on how to solve QUBO problems and portfolio rebalancing with QAOA. Disclaimer: the tutorial might or might not involve crayons.

Building a QAOA implementation in Jasp

../../_images/maxcut_jasp.png

Description

This tutorial details how to build an efficient custom QAOA implementation in Jasp using a Jasp-traceable objective function for the example of the MaxCut problem.

Quantum-Informed Recursive Optimization

../../_images/maxIndepSet.png

Description

Learn about a variational algorithm, that aims to adjust the given problem after each round of optimization. This tutorial will show you how to apply the theory to implement the algorithm and solve a Maximal Independent Set problem with it!

Quantum Monte Carlo Integration

../../_images/qmci.svg

Description

This tutorial will show you how to numerically calculate integrals with Quantum Monte Carlo Integration using Iterative Quantum Amplitude Estimation.

Along the way, we’ll introduce you to important concepts and techniques that you’ll need to know in order to write highly efficient algorithms in Qrisp. We encourage you to follow along with the examples and try out the code for yourself. Don’t worry if you make mistakes or don’t understand something right away - programming is a process of learning and experimentation, and it takes time to become proficient.

By the end of this tutorial, you’ll have a solid foundation of our high-level framork and be ready to tackle more complex projects. So let’s get started!