Measurement (quantum) mechanics for the clojure-aware.
If you want to be able to solve, simulate and visualise quantum phenomena without leaving your computer, this is the library for you.
Nothing has been implemented at all!
Modelling Feature | Realised |
---|---|
normal vector state (kets and bras) | ✗ |
inner product | ✗ |
outer product | ✗ |
Tensor product | ✗ |
Hermitian operator | ✗ |
coherent state | ✗ |
number state | ✗ |
state solving (e.g. Lindblad equations) | ✗ |
shortcuts for common field and atomic calculations | ✗ |
abstract Dirac manipulation | ✗ |
Implementation Feature | Realised |
---|---|
free | ✓ |
open-source | ✓ |
extensible | ✓ |
runs on JVM | ✓ |
runs in browser | ✗ |
parallelisable equation solver | ✗ |
exports to LaTeX | ✗ |
exports to MathJax | ✗ |
better than Mathematica! | ✗ |
It should be a frustration in physics that there is so much friction between symbolic manipulation, computation, and the crystalization of ideas.
This problem expresses itself in many ways but at it's most basic can be seen in how it is still common practise to wade through algebra with pen and paper before then re-writing exactly the same thing programmatically to explore the consequences. Even this is an idealization, with the practice more likely to be a constant dance between the two or, even worse, for symbolic manipulation and numerical calculation to be joined with an exclusive OR.
Another practical example of this problem is how there still(!) doesn't seem to be a standard language for representing mathematics computationally. And by computationally here, I mean a way in which the concepts and relationships can be written independently from typography and programming language. LaTeX has beeen a powerful tool in the technical sciences but even aside from showing its age, it is a typesetting system, not a mathematics DSL.
I do not pretend that these problems are not difficult, particularly the second one, but I find it strange that so little priority has been given to these tasks. Have no fear though, there is hope! Although the problem is old, the solution might be too. It's time to consider a formulation of mathematics just as foundational as sets. It's name is lambda calculus but its friends call it LISP :).
An invaluable framework for working with quantum systems is the Dirac formalism for describing quantum states. To be competitive with pen and paper (if not pencil…), a symbolic quantum algebra system should be able to approach this elegance.
To illustrate the basic operations we need, let's consider some examples. This is not an introduction to quantum mechanics, but by summarizing the basics we can discover the range of symbolic operations needed to be able to do useful work.
Working in a lab, useful means experiment, experiment means measurement and measurement means something to measure. The something to measure is called the state. The state of a quantum system is represented by a ket,
Mathematically, the ket is an infinite-dimensional vector space, known as a Hilbert space. Naturally, this makes it interesting (in the British sense) to represent in software. For many practical situations it is enough to treat a ket as simply a finite-length column vector. I think however, that there is value in holding-on to the abstraction as long as possible.
At some point however, we will need to make predictions and this means numbers. To get numbers from kets, we can combine the ket with its dual. The dual represents the conjugate transpose of the ket and is drawn similarly:
To query the system, we apply an operator,
Operators and kets generally operate within their own Hilbert space. To consider bigger systems however we need to be able to extend our space and we do this with tensor products. This can be represented with the product of kets. And so, the different products that we need, to begin with, can be summarized as below.
I only put a few minutes thought into it but my impression is that quantum mechanics is a misleading name. Although there are rational reasons for the word quantum, particularly historically, the framework applies to continuous fields as well. Also, I don't think the discreteness or smallness of the natural lengthscales are really the main thing. The two most interesting (read incredible) things about quantum mechanics are the effects of measurement and non-locality (entanglement).
I particularly like the idea of how quantum mechanics suggests that the underlying reality (wavefunction) is not something that we can ever fully experience (measure) but rather that when considering the great cathedrals of the natural world, we only stand at the door and peek through the keyhole.
It also seems to be the case that every great result in physics these days can be reduced to a peak.
Fully quantum and semiclassical systems, with an emphasis on light-matter interaction.
-
Wolfram Language (Mathematica)
Specifically, the atomic density matrix package for working with semiclassical light-matter interaction.
-
Pros
- Probably the most advanced computer algebra system in the world. Certainly far more (30 years commercial) development than this little library.
- free access to the Wolfram engine
- Tries to be comprehensive across many aspects of computing
-
Cons
- Expensively proprietary
- all the usual problems from this. Including (but not limited to) restricted access to hobbyists, vendor lock-in and inflexibility.
- Mathematica tries to emulate pencil and paper-style maths rather than trying to out-do it.
- doesn't feel like a real language for general production. Though some people have proved me wrong.
- Not particularly well suited to quantum operations.
- Expensively proprietary
-