LibKet Learn

Learn Quantum-Accelerated Scientific Computation using LibKet

Welcome to LibKet, the Quantum Expression Template Library. LibKet is a lightweight C++14 expression template library that allows you to develop quantum algorithms as hardware-agnostic expressions and execute them on different quantum simulators and quantum computers in the cloud without changing your code. In this tutorial you will learn:

  1. The mathematics behind gate-based quantum computing
  2. The concepts of LibKet to implement hardware-agnostic quantum algorithms and quantum-accelerated applications
  3. The potential of quantum computing for accelerating the solution of engineering problems

About the Tutorial

This tutorial is derived from the famous Qiskit textbook which is an excellent source for learning the concepts of quantum computing. We want to thank the Qiskit community for their great effort and for making their work freely available under the Apache License 2.0. LibKet Learn is reusing many of the great examples from the Qiskit textbook with the necessary modifications to the text and/or the source code to make the implementation of quantum algorithms hardware agnostic. The Qiskit community is by no means responsible for the content of this tutorial.

Run the Code Inline

This tutorial is built on a jupyter notebook framework that allows for easy reading, but it also allows readers to edit and run the code right in the tutorial. As LibKet is a C++14 library, we use the xeus cling jupiter kernel to interpret C++ code. This might lead to longer startup times when running a notebook for the first time.

// Click 'try', then 'run' to see the output,
// you can change the code and run it again.
#include "LibKet.hpp"
using namespace LibKet;
using namespace LibKet::circuits;
using namespace LibKet::filters;
using namespace LibKet::gates;
auto expr = h(init());


If you have any questions or suggestions about the tutorial, please contact Matthias Möller (M(dot)Moller(at)tudelft(dot)nl).