

Google Project Lets You Program a Simulated Quantum Computer - amaks
http://readwrite.com/2014/05/22/google-quantum-computer-project

======
Xcelerate
This is great! I think quantum computers are inevitable at some point as soon
as we figure out how to effectively isolate them from their environment (to
prevent decoherence).

In this case, the theory is way ahead of the practice, and it would seem wise
to go ahead and begin offering CS courses _now_ in quantum programming and
quantum algorithms so by the time these computers are built, we're all ready
to hit the ground running. Websites like this one Google has made are a good
start.

Quantum computing will revolution a lot of fields. In my field (molecular
dynamics and quantum chemistry), there's an issue known as the fermion sign
problem, which essentially puts a hard limit on what we can accomplish through
classical simulation. It basically says that the most accurate methods of
performing quantum simulation scale with 2^(3N) number of particles. There is
no classical computer that can handle this for any molecular system of
interest, and there will never be one either. However, a quantum computer can
solve this problem in non-exponential time (can't remember the exact
complexity off-hand). What does this mean? Quantum simulation will lead to
huge advances in materials science. Maybe we could even find a room-
temperature superconductor with this kind of approach.

~~~
ballstothewalls
How can you say that no classical computer will ever be able to handle a
simulation that big? Where is the bottleneck?

~~~
Xcelerate
Let's say you want to simulate three carbon atoms with near perfect accuracy
(not considering constituent quarks, radiative effects, or relativistic
effects). We'll remove the BO approximation though. So that's 2^(3 atoms * 3
coordinates * 3*12 particles) = 2^324. That's more than the number of
particles in the universe. A classical computer that can handle that is simply
not gonna happen. And that's just three atoms.

~~~
ScottBurson
Are you sure it shouldn't be 2^(3 + 3 + 3*12) = 2^42 ? That would still be a
pretty big number, but not yet astronomical.

------
dangirsh
For those that might prefer a more functional/strongly typed approach, see
Quipper (embedded in Haskell):

[http://www.mathstat.dal.ca/~selinger/quipper/](http://www.mathstat.dal.ca/~selinger/quipper/)

Unfortunately, the examples in the documentation aren't as well known as
Shor's or Grover's algorithm. For Shor's, I think this is due to the
difficulty of encoding the modular exponentiation within the framework.

------
drkevorkian
This is a cool demo, but I'm afraid this is the wrong pedagogical approach to
understanding quantum computing.

The representation of the quantum state as a bar chart is difficult to
interpret and provides little intuition. The fact is, visualizing vectors in
high-dimensional spaces is hard, much less vectors in high-dimensional
_complex_ spaces. Bra-ket notation is pretty much the best thing we have right
now.

But more generally, "Quantum programming" will almost certainly look nothing
like this. This is like programming a classical computer by describing a
boolean circuit. It's an extremely useful model for researchers working with
actual hardware, but there's a reason we currently program with lambda
calculi, not NAND gates. Understanding how to capture the possibilities of
quantum circuits in a higher-level language is an open problem. Many
interesting attempts have been made at solving it, but none convincingly in my
opinion.

------
jameshart
Damian Conway's Perl Quantum::Superpositions module
([http://search.cpan.org/~lembark/Quantum-
Superpositions/lib/Q...](http://search.cpan.org/~lembark/Quantum-
Superpositions/lib/Quantum/Superpositions.pm)) dates back to 2000 and lets you
play around with datatypes that act like they are in multiple superposed
states at once; Damian's presentation of the module was an entertaining
journey into language hacking as well as quantum physics - well worth looking
up on youtube.

~~~
jerf
Bear in mind that the resulting module is not real "Quantum Computing", but an
implementation of the conventional misunderstanding of quantum computing.
Damian Conway understands real QC just fine (at least well enough to know
this). It's a choice he made to implement this library for fun, as is his wont
[1]. However, be aware that playing with that module will do nothing
whatsoever to prepare you for real quantum computing.

[1]:
[http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata....](http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.html)

------
porsupah
Perhaps also germane to the discussion is the University of Bristol's "Quantum
in the Cloud" project, which similarly offers access to a simulator - but,
once you've refined your project, you can then submit it to a real quantum
computer:

[http://www.bristol.ac.uk/physics/research/quantum/qcloud](http://www.bristol.ac.uk/physics/research/quantum/qcloud)

------
S4M
Apology for the naive question, am I supposed to be able to see the difference
between a quantum computer and a standard computer from the simulator?

I ran some basic examples, and while it seems a neat scripting language to
play with the computer, I couldn't see anything unusual.

My vague knowledge about quantum computers is that they don't deal with binary
bits (that can be only 0 or 1), but their "bits" (qubits?) can be anything
from 0 to 1, which should accelerate massively some calculations.

~~~
j2kun
> but their "bits" (qubits?) can be anything from 0 to 1

This is not the interesting part, because there are models of computation that
allow for this, but are believed to be equivalent to classical computation.
What makes quantum computing different is that 1. the basic data are unit
vectors in a 2^n dimensional vector space (when you have n qubits) and 2. you
don't have direct access to the qubits during a computation, and "reading" a
qubit destroys all the information in any related qubits!

So imagine a classical computer program where reading a variable _destroyed_
the content of your other variables! That's closer to the quantum model. So
it's more of a semantic difference than a syntactic one.

------
habosa
This is a naive question, but how can we simulate a quantum computer on a
classical computer? Isn't the whole point of developing quantum computers that
they enable computations that are totally outside the capabilities of a
classical computer? I'm sure I'm missing something simple here.

~~~
Xcelerate
Every computation that can be performed on a quantum computer can be performed
on a classical computer, albeit sometimes with exponential slow-down.

~~~
ntoshev
Right, so the value of the simulation is somewhat questionable. Exponential
slowdown is enough to kill all intuition about what works and what doesn't.
You only get some correctness gurantee _and_ that would be for very small
problems / test cases.

~~~
kremlin
I see the value: you get to debug real, working algorithms based on a quantum
computer so that once they're available, you already know many of the
fundamentals and pitfalls of programming it.

I was thinking myself about the problem of 'slowdown' of this type of approach
-- I think it would be interesting if the simulated quantum computer could
also give you performance metrics that say, 'If this were run on a real
quantum computer, it could have been done in 100 cycles as opposed to 2000.'

So you could make an algorithm in normal computing, and one on a simulated
quantum computer, and compare the running time of the normal computation with
the projected running time of the simulated quantum algorithm (obviously the
actual running time of the simulation would be incomparable to the projected
running time). I think that would be quite useful.

------
tobyjsullivan
Simulator doesn't seem to work for me with Chrome. JS Console reports WebGL
issues...

~~~
theon144
While it does work perfectly for me in Firefox, against which it warned me.
Ha.

------
Oculus
Google also released a video[1] describing their joint investment in a D-Wave
"quantum computer" (given the debates I've left it in quotes) with NASA. It
talks about some cool potential applications and attempts to break down the
very basics.

What I'm wondering is if the investments into quantum computing by Google is
merely them sinking left over R&D cash or if they believe that powerful
quantum computers can be achieved relatively soon?

1 -
[https://www.youtube.com/watch?v=CMdHDHEuOUE](https://www.youtube.com/watch?v=CMdHDHEuOUE)

------
peterderivaz
I enjoyed this blog post and Javascript implementation of an interactive
Quantum circuit inspector.

[http://strilanc.com/quantum/2014/03/07/Building-your-own-
Qua...](http://strilanc.com/quantum/2014/03/07/Building-your-own-Quantum-
Fourier-Transform.html)

It is a lower level than the Google project and only suitable for 3 qbits
circuits, but I found it very useful for building up an intuition about the
basic logic gates.

------
kvb
MSR's LIQUi|> [1] looks like an interesting approach to this problem (although
I'm not sure there's a publicly available way to use it).

[1]
[http://research.microsoft.com/apps/video/default.aspx?id=194...](http://research.microsoft.com/apps/video/default.aspx?id=194277)

------
grdvnl
If any Pythonista's out there want to do some simulation,
[Sympy]([https://github.com/sympy/sympy](https://github.com/sympy/sympy))
offers some simple quantum gates to work on.

~~~
krastanov
Qutip is much better adapted at that (also in python).

[https://github.com/qutip/qutip/](https://github.com/qutip/qutip/)

------
fulafel
Anyone know details about the WebGL GPU acceleration? I assume "GPU-
accelerated quantum computer" means the computations are also GPU-accelerated.

------
ibrad
This is the new 60s . We will start by creating quantum punch cards. But
eventually it will get better and easier.

~~~
jesuslop
We are waiting for the would-be Shockley, Brattain and Bardeens.

------
higherpurpose
DJB will probably be quite excited about this.

------
hellbreakslose
Thats actually really cool, its about time for our generation to get more
familiar with the future!

