
First Large-Scale Quantum Simulation of Topological State of Matter - jonbaer
https://www.dwavesys.com/press-releases/d-wave-breakthrough-demonstrates-first-large-scale-quantum-simulation-topological
======
ahelwer
I'll try to give here a crash course on how simulating quantum systems on a
quantum computer works - not for the actual computer type in the article
(D-Wave's quantum annealer) but on a traditional gate-based quantum computer.

So, we have this thing called the Schrodinger equation. For our purposes, all
you need to know is that it's an equation which can perfectly describe the
behavior of a quantum system as it evolves in time. Examples of quantum
systems include a single electron sitting in a magnetic field, photons going
through closely-placed slits, or entire biomolecules doing biomolecule things.

Simulating things on computers is great because of how darn easy & cheap it is
compared to running the same scenario in the real world. We want to simulate
quantum systems on computers. We simulate quantum systems by trying to mimic
the action of the Schrodinger equation on the quantum system. However, (as
Feynman famously pointed out in _Simulating Physics with Computers_ [0]),
classical computers are very bad at this. They take exponential resources to
simulate a quantum system. Now, if you have a computer that obeys the same
physical laws as the quantum system it's simulating - a quantum computer - we
might be able to simulate the system with only linear resources.

Let's take a very simple quantum system. Consider a single electron, sitting
in a magnetic field. Electrons have a property called _spin_ which is affected
by magnetic fields. Electrons can have their spin be up, down, or some
superposition thereof. We want to know how the spin of the electron changes
over time as it sits inside the field.

There are three steps involved in simulating this quantum system:

1\. Encode the system's _start state_ in a form understood by a quantum
computer - a qbit, which is a 2-vector [a, b] of complex numbers where |a|^2 +
|b|^2 = 1. We'll say the qbit [1, 0] represents spin up, and [0, 1] represents
spin down. Other states [a, b] where both a and b are nonzero mean the
electron spin is in superposition of up & down. Here, let's say we start in
spin up - so [1, 0].

2\. _Compile_ the Schrodinger equation into a series of quantum logic gates
for execution on a quantum computer. This is the real meat of the problem,
more on that later.

3\. Decode the _end state_ back into the physical world. After the start state
has been put through all the logic gates, we want to decode the result to the
same spin state we would've had if we'd set up a real electron in a real
magnetic field and let it actually evolve over time (within some acceptable
error).

Pretty simple so far, right? All the magic happens in step 2 - how do we
compile the Schrodinger equation into logic gates? It revolves around
something called the Hamiltonian. The Hamiltonian is a component of the
Schrodinger equation, and is a matrix which represents the energy of the
system. That brings up a lot of questions around how exactly a matrix
corresponds to the energy of a system, but it's a (fascinating!) rabbit hole
we'll sadly have to avoid. Let's just look at an example.

Consider again our plucky electron in a magnetic field. Suppose the magnetic
field points upward along the Z axis. This means the Schrodinger equation for
our system is e^(-i H t), where e is Euler's constant, i is the square root of
-1, t is a scalar variable representing time, and H is the Hamiltonian matrix
- here, the 2x2 Pauli-Z matrix in column form Z = [[1, 0],[0,-1]]. How can we
compile this equation into a quantum logic gate?

Turns out you can do it through basic algebraic manipulation. There are some
tricky intermediate steps involving expanding e^x into the Taylor series[1]
and back into trig functions[2] but at the end of the day you have:

e^(-i Z t) = cos(t) 1 - i sin(t) Z

where 1 is the 2x2 identity matrix and Z is the 2x2 Pauli-Z matrix from above.
This just so happens to be a common primitive gate on a quantum computer,
called the Rz(t) operator[3] which performs a rotation of the quantum state
vector about the Z axis (actually what we use is Rz(2t)). So, we can apply
this single quantum gate to our encoded start state, end up with our end
state, and decode it back to a real physical spin state!

Now, of course this is a very simple example with a single qbit, but you can
build up from there. I'll be writing a much longer guide on this which I hope
to release at the end of next week. If you're interested in quantum
computation in general and not just quantum simulation, I have a 1.5 hour talk
on the topic aimed at computer scientists here[4]!

[0]
[https://people.eecs.berkeley.edu/~christos/classics/Feynman....](https://people.eecs.berkeley.edu/~christos/classics/Feynman.pdf)

[1]
[https://en.wikipedia.org/wiki/Taylor_series#Exponential_func...](https://en.wikipedia.org/wiki/Taylor_series#Exponential_function)

[2]
[https://en.wikipedia.org/wiki/Taylor_series#Trigonometric_fu...](https://en.wikipedia.org/wiki/Taylor_series#Trigonometric_functions)

[3] [https://docs.microsoft.com/en-
us/qsharp/api/prelude/microsof...](https://docs.microsoft.com/en-
us/qsharp/api/prelude/microsoft.quantum.primitive.rz?view=qsharp-preview)

[4]
[https://www.youtube.com/watch?v=F_Riqjdh2oM](https://www.youtube.com/watch?v=F_Riqjdh2oM)

------
some_guy_there
A preprint of the paper can be found on ArXiv here
[https://arxiv.org/abs/1803.02047](https://arxiv.org/abs/1803.02047)

