Examples#

In this section, we provide a glimpse into the diverse range of applications that can be implemented using Qrisp. With these, we display how Qrisp provides a powerful and flexible platform for implementing and exploring quantum computing applications. These examples are designed to help you understand the capabilities of our language and inspire you to develop your own quantum computing applications.

Title

Description

Abstract Parameters

This example showcases how parametrized circuits can be generated and processed by the Qrisp infrastructure.

Exact Grover’s Algorithm

Demonstrates how to utilize the exact keyword of grovers_alg.

Diagonal Hamiltonian Application

An example to demonstrate how to utilize the as_hamiltonian decorator.

Hello World

An example to demonstrate the use of QuantumStrings in the form of the well known “Hello world” script.

Simulating a QC on a QC

This example displays how to write a QC simulator that runs on a quantum computer itself.

In-Place Matrix Multiplication

Showcases the use of the qrisp.inplace_matrix_app() to apply an invertible classical matrix inplace to a quantum vector.

Loops

Illustrates loops with quantum bounds using the qrange iterator.

Matrix Multiplication

Exemplifies how to multiply quantum matrices using the qrisp.dot() function.

Quantum Mod Division

Exhibits how the qrisp.q_divmod() function can be utilize to perform division with remainder.

Efficient Solution for the TSP

A more efficient version of the solution of the traveling salesman problem, that was presented in the Tutorial

Exploring Shor’s algorithm

Showcases the cryptographic implications of implementating Shor’s algorithm and provides insight in how to easily use a custom adder.

Molecular Potential Energy Curves

Calculating molecular potential energy curves with Variational Quantum Eigensolver.

Ground State Energy with QPE

Calculating ground state energies with quantum phase estimation.

Transverse Field Ising Model

Hamiltonian simulation of a transverse field Ising model.