A tutorial quantum interpreter in 150 lines of Lisp
21–30 of 46 posts
Re: A tutorial quantum interpreter in 150 lines of Lisp
#22Re: A tutorial quantum interpreter in 150 lines of Lisp
#23Any recommendations on a textbook to understand this kind of math?
Moreover, if you feel more comfortable by running examples there are qiskit, pennylane and other libraries which shares a lot of tutorials and notebook (and some can be run on a true quantum computer if you have the money or the time to wait in queue!)
Re: A tutorial quantum interpreter in 150 lines of Lisp
#24Recently, I have been working on some things that sometimes overlap with quantum computation and I have realized that the way all the quantum languages approach this wrong. If you are programming explicitly with CNOT gates, you are doing it wrong. A Python programmer doesn't care about logical gates, and neither should a quantum programmer. To that end, I'm convinced that the interplay between coinduction and inducti…
Re: A tutorial quantum interpreter in 150 lines of Lisp
#25The hardest part of implementing a quantum state vector simulation is understanding how the tensor product expands an n-qubit gate to apply to an m-qubit system. (A third of the linked post is dedicated to it; appropriately.) If you use a language or framework that's based on tensors to start with, things can be quite succinct (though you still need to understand the concepts). For example, in numpy, if you store the…
This feels like it could be the "git gets easier once you understand branches are homeomorphic endofunctors mapping submanifolds of a Hilbert space" of physics.
Re: A tutorial quantum interpreter in 150 lines of Lisp
#26You had me until Lisp.
Re: A tutorial quantum interpreter in 150 lines of Lisp
#27"Thanks for interviewing with us today at xyz... please click on that link I just sent you in the chat. Today we will be doing a little quantum coding question. Try to speak out loud so I know what your thinking and your thought process."
Re: A tutorial quantum interpreter in 150 lines of Lisp
#28I'm deciding between Common Lisp and Mojo, so maybe I will try to implement this in Mojo and compare. Anybody have any thoughts on this, since I am a mediocre Lisper and a beginning Mojo person. I am familiar with Numpy and I also program in APL and J.
Re: A tutorial quantum interpreter in 150 lines of Lisp
#29I wrote something similar a couple of years ago - https://github.com/adamisntdead/QuSimPy Happy to answer any questions people have, including on other simulation methods other than state vector!
One of the aspects emphasized in TFA is being able to simulate gates of any dimension/number of qubits (like a 3-qubit Toffoli or a 5-qubit Molmer-Sorensen), instead of just 1- and 2-qubit gates. Have you thought about extending your simulator to support gates of greater than two qubits?
Re: A tutorial quantum interpreter in 150 lines of Lisp
#30You had me until Lisp.
Not everyone is using PHP, sorry. I promise that once you get past the syntax shock, Lisp is not that difficult to grok. It looks like some people here took your comment the wrong way but please don't be discouraged by that. There is a genuine lack of good Lisp outreach, compounded by trolls and bombastic essays that are high on platitudes and low on actual insight, and I'm slowly working on correcting that in my spa…
HN discourages low-effort snark. If someone is going to complain about Lisp, they should explain why.