For the uninitiated - to simulate a basic quantum computer, all you need is the following:<p>* A product state vector, which is a vector of size 2^n filled with complex numbers where n is the number of qbits you're using. You derive the product state from a series of individual qbits by taking their tensor product; this exponential term is why simulating quantum computers takes exponential space.<p>* A set of common quantum logic gates, which are (2^n)x(2^n) matrices you multiply against the product state vector to derive the new product state vector; these matrices must be <i>unitary</i> (their conjugate-transpose is their inverse) (edited, see [0]) and therefore reversible (quantum computers are reversible computers). The full (2^n)x(2^n) matrices are derived by taking the tensor products of several 2x2 and 4x4 matrices.<p>* The measurement logic, where you calculate how the product state collapses by taking the square of the absolute value of each entry in the product state (these entries are called amplitudes).<p>This project is an implementation of those three things in Python. There is nothing special about the above mathematical constructs save that they match the observed semantics of a quantum system. This is good! Quantum computing is accessible to anyone who has taken a basic undergraduate course in linear algebra.<p>[0] I previously believed all quantum operators were their own inverses (Unitary and Hermitian) but apparently that is not the case; see comments below.
Cool! My April fools day joke this year was a quantum programming language made up entirely of "entanglement" and "superposition":
<a href="https://github.com/dabacon/qsel" rel="nofollow">https://github.com/dabacon/qsel</a>
The simulator takes about 150 lines of python as well.
There is this quote by Jürgen Schmidhuber, director at the Swiss AI Lab IDSIA , creator of LSTM Neural Nets that power many of our current machine learning applications.<p>" General purpose quantum computation won’t work (my prediction of 15 years ago is still standing). Related: The universe is deterministic, and the most efficient program that computes its entire history is short and fast, which means there is little room for true randomness, which is very expensive to compute. What looks random must be pseudorandom, like the decimal expansion of Pi, which is computable by a short program. Many physicists disagree, but Einstein was right: no dice. There is no physical evidence to the contrary randomness.html[<a href="http://people.idsia.ch/~juergen/randomness.html" rel="nofollow">http://people.idsia.ch/~juergen/randomness.html</a>].<p>For example, Bell’s theorem does not contradict this. And any efficient search in program space for the solution to a sufficiently complex problem will create many deterministic universes like ours as a by-product. Think about this. More here computeruniverse.html [<a href="http://people.idsia.ch/~juergen/computeruniverse.html" rel="nofollow">http://people.idsia.ch/~juergen/computeruniverse.html</a>] and here.<p>"<p>I am out of depth with regards to quantum theory and quantum computation. If anyone with better knowledge with regards to quantum computation can clarify it would be great.<p>Is there any rationale to support Schmidhuber's argument, and has any advance in making actual quantum computers disprove his theory?
If you’re interested in quantum tech, here is my newsletter <a href="https://medium.com/quantum-tech" rel="nofollow">https://medium.com/quantum-tech</a><p>You can subscribe here <a href="http://eepurl.com/c10FJz" rel="nofollow">http://eepurl.com/c10FJz</a>