An Insight into LibKet, the Quantum Framework from QuTech aimed at making quantum programming easier

Quantum Programming

QuTech presented its LibKet library at IEEE Quantum Week, which was held September 18-23, 2022, in Colorado, USA. Most of the tutorial was standard, as far as introductory quantum computing tutorials go. However, there were two key takeaways that made LibKet stand out from the crowd.

C++, The Programmer Classic

First of all, what makes LibKet different from all the other quantum computing frameworks out there? It’s not just written in the C++ programming language, much of what’s on screen resembles C++, as well. Therefore, if your programming background is C++ instead of Python, you might find LibKet appealing.

An Insight Into Libket, The Quantum Framework From Qutech Aimed At Making Quantum Programming Easier
An Insight into LibKet, the Quantum Framework from QuTech aimed at making quantum programming easier 3

Some of LibKet resembles the other major quantum computing frameworks, of course. But, again, if your programming background includes the C++ language, the screenshot above should look very familiar. If you are new to quantum computing, LibKet might offer less of a learning curve.

Linear Algebra at heart

Second, the tutorial was unique. It doesn’t seem to be available, unfortunately, but Linear Algebra enthusiasts probably would’ve appreciated it. Normally, you are introduced to the matrices of various quantum states and transformations, such as the Pauli-X, but then you just go ahead and write statements such as circuit.x(q[0]).

The tutorial’s approach was to define q0 as a matrix, specifically [1, 0] at initialization. In other words, you would’ve initialized the first qubit with something like q0 = [1, 0] as opposed to something like qreg q[1]; or qr = QuantumRegister(1, ‘q’). The Pauli-X was then defined programmatically as [[0, 1], [1, 0]], and Linear Algebra ensued. Again, the actual tutorial does not seem to be publicly available, but it looked something like this:

q0 = [1,0]

x = [[0,1],[1,0]]

q0 =,x)

Measurement, in the form of print(q0), would show that q0 appropriately bit-flipped from [1,0] to [0,1], something that was explained in detail during the session.

Disclaimer: the code above is not actual LibKet. With the actual tutorial not available, this example defaulted to Python.

While this Linear Algebra approach to learning quantum computing would not be useful for running circuits on quantum computers, it’s an interesting way of teaching the subject. After all, some people enter the field with strong Linear Algebra backgrounds and might find this approach more intuitive. Later on, when actually initializing qubits and transforming quantum states, that intuition should serve them well.

Quantum Programming

We have covered a range of tutorials and Quantum Frameworks over the years. Everything from the Canonical Qiskit from IBM to the easy syntax of Xanadu’s frameworks (Strawberry Fields and Penny Lane). Be sure to check out our programming section. If you are unsure of which language to go for, check out our article on which quantum computing language you learn. If you want to see the popularity of different quantum languages from a study from last year you can see what the community thinks about the plethora of languages out there.