I’m happy to announce the 0.3 release of Ket.jl. This is a library to do quantum information and optimization in Julia; it is the second project I alluded to in my Julia post. The goal is to free the new generations from the tyranny of MATLAB by providing the means of production in a completely open-source ecosystem.
You might have noticed that this is version 0.3, and correctly assumed that this is not the first release. It has been publicly accessible, yet unannounced for 6 months already, due to a fundamental problem: it still needed MATLAB to do the crucial task of upperbounding Tsirelson bounds. This has now been solved by replacing the dependence Moment with Erik Woodhead’s package QuantumNPA. Another problem that has been solved is that the entire package is designed to be capable of handling arbitrary precision when desired. This was not possible with Moment due to MATLAB being an antediluvian abomination, but was rather easy with QuantumNPA.
With these problems solved, Ket is still far from ready, but it is in a good state to be built upon. Therefore I think this is a good moment to announce it publicly, to attract users and collaborators. I want to emphasize that this is a collaborative effort; I haven’t programmed even half of the library. It wouldn’t have happened without the invaluable help of Sébastien Designolle, Carlos de Gois, Lucas Porto, and Peter Brown.
We have written Ket to use it for our own research, but we’d like it to be useful for the wider community. Just not so wide that we don’t understand the code anymore. Also, we’d like to keep our focus on quantum information and optimization; we’re intentionally not including anything to do quantum simulation, since this job is already well taken care of by QuantumOptics.jl and QuantumToolbox.jl. We’re also not going to do quantum computing, that’s Yao.jl‘s job.
Now it’s time to hear from you: found a bug? Want a feature? Please open an issue in Github. Want to contribute some code? Also please open an issue to discuss it before doing a pull request.
Hi Mateus,
This is super cool! I’ve been following the development since the early days and am happy to see an official release of Ket.jl!
Indeed, when I was putting together [toqito](https://github.com/vprusso/toqito), I seriously considered using Julia. At the time though (5 years ago now) I had some reservations against the state of the language, the convex optimization solvers that were available, etc. I think many of those concerns have since been resolved, and it’s great to see many of the items on my wish list working in Ket.jl!
I’d personally be interested to see some other extensions of the NPA hierarchy. For instance, a variation of the hierarchy could be used to calculate quantum bounds for the so-called [“extended nonlocal games”](https://toqito.readthedocs.io/en/latest/tutorials.extended_nonlocal_games.html).
Having not played extensively with QuantumNPA (or indeed, even too much with Julia), I’m not sure how much of a lift-and-shift this would be, but I’d be interested in discussing this further if there is any interest in including something like this in Ket.jl
Congratulations again on your release, and I am looking forward to using and contributing to Ket.jl!
Thanks a lot for your kind words!
That’s quite a coincidence, 5 years ago is when I first heard about Julia. I didn’t consider using it for serious research because JuMP didn’t support complex numbers back then. This only changed in 2023.
QuantumNPA might already be capable of doing what you want, it’s rather flexible, it doesn’t do only NPA. Let’s discuss it via email.
Cool project! I might start using it too!
Have you considered using SparseArrays for things such as ket vector, clock and shift matrices, Pauli matrices, etc? It could speed up things in large dimensions.
BTW, the recently published major effort in proving Zauner’s conjecture https://arxiv.org/pdf/2501.03970 is also using Julia, see https://sflammia.github.io/Zauner.jl/. It’s quite sophisticated though, since it requires understanding the number theory and their approach of finding SICs.
For what it worth, I like to use `⊗= kron` in my code. It improves readability. I think it could be a standard in QM packages.
I’ll look more into Ket.jl. Perhaps, I could add something useful too.
Thanks! Your help would be most appreciated.
We do already use SparseArrays, albeit sparsely. It does appear in n_body_basis, where it makes a large difference, and in the projector onto the symmetric subspace. It’s definitely in our roadmap to do it more systematically, we mostly need to need it for our own research, in order to come up with a sensible design. It wouldn’t help to use it in the clock matrix, though, since that is produced as a Diagonal.
Thanks for letting me know about the Zauner package (and paper), I had totally missed it! I’d be delighted to use that instead of our pedestrian lookup table.
As for ⊗= kron, it’s indeed much more readable, and one of the things I love about Julia is the ability to use unicode math symbols in the source code to make it more legible. We do avoid as much as possible using nonstandard symbols, in order to make our source easier for others to read. Perhaps you might want to open an issue in LinearAlgebra for them to define this symbol as kron everywhere? I’d support that.