Download Simulating a simple Quantum Computer

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Quantum fiction wikipedia , lookup

Quantum entanglement wikipedia , lookup

Quantum field theory wikipedia , lookup

Propagator wikipedia , lookup

Perturbation theory (quantum mechanics) wikipedia , lookup

Orchestrated objective reduction wikipedia , lookup

Quantum decoherence wikipedia , lookup

Scalar field theory wikipedia , lookup

Quantum dot cellular automaton wikipedia , lookup

Many-worlds interpretation wikipedia , lookup

Theoretical and experimental justification for the Schrödinger equation wikipedia , lookup

Measurement in quantum mechanics wikipedia , lookup

Hydrogen atom wikipedia , lookup

EPR paradox wikipedia , lookup

Interpretations of quantum mechanics wikipedia , lookup

Coherent states wikipedia , lookup

History of quantum field theory wikipedia , lookup

Relativistic quantum mechanics wikipedia , lookup

Quantum group wikipedia , lookup

Probability amplitude wikipedia , lookup

Hidden variable theory wikipedia , lookup

Molecular Hamiltonian wikipedia , lookup

Path integral formulation wikipedia , lookup

Quantum machine learning wikipedia , lookup

Quantum key distribution wikipedia , lookup

Density matrix wikipedia , lookup

Quantum state wikipedia , lookup

Quantum teleportation wikipedia , lookup

Quantum computing wikipedia , lookup

Quantum electrodynamics wikipedia , lookup

Symmetry in quantum mechanics wikipedia , lookup

T-symmetry wikipedia , lookup

Canonical quantization wikipedia , lookup

Transcript
Simulating a simple Quantum
Computer
Composed of quantum circuits, they
describe the computation
 The overall unitary transformation
achieved by the circuits can be written as
 AkAk-1....A1 where Ai is the operator
describing the ith gate

1

What is the time independent Hamiltonian ˆ
#iHt / h
operator H such, when inserted in Uˆ (t) " e
It mimics the action of our desired circuit

Problem is mathematically!difficult



Each unitary mapping can be represented as eiT,
where T is a self-adjoint operator
Spectral Representation of Unitary Operators

Alternative easier way?

Feynman found a “general” answer
If the circuit consists of m inputs and m outputs and
composed of k gates
Add to m input output bits additional k+1 cursor bits
Cursor bits are used to track the progress of the
computation, they indicate how many gates thus so far
had been applied





Serves as a program step counter
If the cursor bit is at k+1, the memory register of m qubits is
guaranteed to contain a valid answer
2

Can be accomplished by writing the Hamiltonian as
k"1
(
H = # Fk + Fk



!
i= 0
T
)
Fk = c i+1 $ ai $ M i+1
Mk gate operator Ak embedded with cursor bits
Where c and a are creation and annihilation operators
FkT undoes the action of Fk, H acting only o small
collection of local gates when used in evolution
equation
Steps required to build a
Feynman’s QC

Chose the computation




Represent the computation by a circuit of quantum gates
Compute the Hamiltonian H
Compute the evolution operator for H
Determine the size of memory
• Cursor + answer bits

Initialize memory register



Evaluate the computer for some time
Test whether the computation is done (read cursor bits)
If so extract the answer (answer bits), otherwise further
evolution
3
What Computation are we
simulating?

Chose the computation
We are going to simulate the logical NOT of
a single bit
 We use two square rot NOT gates
 We simulate following computation

M¬ " M¬ = M¬
!
#1+ i
%
M¬ = % 2
1" i
%
$ 2
!

1+ i
1" i
0 +
1
2
2
1" i
1+ i
M¬ 1 =
0 +
1
2
2
1" i &
2 (
1+ i (
(
2 '
M¬ 0 =
0 and 1 with !a probability 1/2, because
2
2
1+ i
1" i
1
=
=
2
2
2

Is called square root of the not-gate
!
M¬ " M¬ = M¬
!
4
What makes this computation “quantum”
is the fact that it is impossible to have a
single-input/single-output classical binary
logical gate that works this way
M¬ gate is going to
 Any classical
have output either 0 or 1
 There is no way to define a classical M¬
!
gate

!

Suppose we define
M¬ Classical (0) = 1

M¬ Classical (1) = 1
Then two consecutive applications of
such gate could invert a 0 but not a 1
!
M¬ Classical (0) = 1

M¬ Classical (1) = 0
Would not invert at all
!
5
Computing NOT is a simple computation
 The manner in which we do it illustrates
several aspects of quantum computations

Superposition
 Nature of quantum gates
 Feynman’s method for converting a static,
circuit-level description of a computation to a
dynamical Schrödinger equation

Representing a Computation
as a Circuit
The transformation of inputs to outputs of
such a circuit must be unitary
 To be realizable quantum mechanically,
the circuit must cause the quantum state
to evolve in accordance with Schrödinger
equation
 Schrödinger equation, an isolated
quantum system always undergoes a
unitary evolution

6

Unitary:
M¬ "

(
M¬
)
*
$1+ i
&
=& 2
1# i
&
% 2
1# i ' $ 1# i
2 )"& 2
1+ i ) &1+ i
) &
2 ( % 2
1+ i '
$
'
2 ) = &1 0)
)
1# i %0 1(
)
2 (
Not:
$1+ i
&
M¬ " M¬ = & 2
1# i
&
% 2
!
1# i ' $1+ i
2 )"& 2
1+ i ) & 1# i
) &
2 ( % 2
1# i '
$
'
2 ) = &0 1)
)
1+ i %1 0(
)
2 (
!
Determining the Size of the
Memory Register

How many qubits are needed to simulate the
operation of this circuit on a Feynman-like
quantum computer?

The circuit consists of m inputs and m outputs and
composed of k gates
Add to m input output bits additional k+1 cursor bits
Cursor bits are used to track the progress of the
computation, they indicate how many gates thus so far
had been applied




Serves as a program step counter
If the cursor bit is at k+1, the memory register of m qubits is
guaranteed to contain a valid answer
7





For our circuit we would require 4 qubits
One single input qubit and our circuit is
composed of two gates
We represent it as a 24 dimensional vector in
H16
Our evolution operator is going to have to
evolve the state of all four qubits simultaneously
M¬ works only on one qubit
We have to embed sqrt(M¬) in an
operator that works on four bits
 We want that M¬acts on the fourth bit

I2 " I2 " I2 " M¬
!
8
I2 " I2 " I2 " M¬
!
I2 " M¬ " I2 " I2
!
9
I2 " M¬ " I2
!
What is the time independent Hamiltonian ˆ
#iHt / h
operator H such, when inserted in Uˆ (t) " e
It mimics the action of our desired circuit



Can be accomplished by writing the
Hamiltonian as (Feynman’s
idea)
!
1
(
H = " Fk + Fk
i= 0
T
)
Fk = c i+1 # ai # M i+1
M1 = I2 " I2 " I2 " M¬
!
M 2 = I2 " I2 " I2 " M¬
!
10

Generally, it can be accomplished by
writing the Hamiltonian as
k"1
(
H = # Fk + Fk
i= 0
*
)
Fk = c i+1 $ ai $ M i+1
Mk gate operator Ak embedded with
cursor bits
 Where c and a are creation and
annihilation operators

!

In our case, k=2
Creation operator
Creation operator c is acting on a single
bit
 It converts a zero bit into a one bit


Is not unitary
"1%
"0%
0 = $ ', 1 = $ '
#0&
#1&
"0 0%
c =$
'
#1 0&
!
11
Annihilation operator
Creation operator c is acting on a single
bit
 It converts a zero bit into a one bit


Is not unitary
"1%
"0%
0 = $ ', 1 = $ '
#0&
#1&
"0 1%
a =$
'
#0 0&
!


Version of creation and annihilation operator can be
created that act on the ith of four qubits
Use direct product with identity matrices at the “dead”
*
positions H = c1a0 M1 + c 2 a1 M 2 + (c1a0 M1 + c 2 a1 M 2 )
!
"0
a0 = $
#0
"1
a1 = $
#0
1% "1 0% "1
' ($
' ($
0& #0 1& #0
0% "0 1% "1
' ($
' ($
1& #0 0& #0
"1
c1 = $
#0
"1
c2 = $
#0
0% "0 0% "1
' ($
' ($
1& #1 0& #0
0% "1 0% "0
' ($
' ($
1& #0 1& #1
0% "1 0%
' ($
'
1& #0 1&
0% "1 0%
' ($
'
1& #0 1&
0% "1 0%
' ($
'
1& #0 1&
0% "1 0%
' ($
'
0& #0 1&
!
12
k"1
(
H = # Fk + Fk
i= 0
*
)
Fk = c i+1 $ ai $ M i+1
H = c1a0 M1 + c 2 a1 M 2 + (c1a0 M1 + c 2 a1 M 2 )* =
!
!
k"1
(
H = # Fk + Fk
i= 0

!
*
)
Fk = c i+1 $ ai $ M i+1
The corresponding time independent
Hamiltionian is unitary


In Feynman's quantum computer, the Hamiltonian is
time independent and consists of a sum of terms
describing the advance and retreat of the
computation
The net effect of the Hamiltonian is to place the
memory register of the Feynman quantum computer
in a superposition of states representing the same
computation at various stages of completion
13
Unitary evolution Operator
(
)
t
ˆ
ˆ
Uˆ (t) " e#iHt / h = e#iH / h =
t
!
Expansion
k"1
(
H = # Fk + Fk
i= 0

!
*
)
Fk = c i+1 $ ai $ M i+1
FkT undoes the action of Fk, H acting only
on small collection of local gates when
used in evolution equation
U(t) = e"iHt
H 2t 2 H 3t 3
U(t) = 1" iHt "
+
+L
2
3
(F + F * ) 2 t 2
U(t) = 1" i(F + F * )t "
+L
2
!
14
Running the Quantum
Computer
Once the unitary time evolution operator
U(t) has been determined
 The particular state of the memory
register has been selected
 One can calculate the state of the
memory register by the equation

x(t) = U(t) " x(0)
!

The initial state:
m answer/input bit (m=1) can be set as any
superposition of m qubits
 The first cursor bit is 1, the other two ones 0


Input 1
1 " 0 " 0 " 0 = 1000

Input 0
1 " 0 " 0 " 1 = 1001
!
!
15

In this simulation
No internal errors
 No external errors


In reality this errors occur
We set h=1
 In our simulation the probabilities of finding
the memory register (three cursor bits and
one program bit) in each possible
configuration are given probability function




In a Feynman-like quantum computer, the
position of the cursor keeps track of the logical
progress of the computation
If the computation can be accomplished in k+1
(logic gate) operations, the cursor will consist
of a chain of k+1 atoms, only one of which can
ever be in the |1> state
The cursor keeps track of how many, logical
operations have been applied to the program
bits thus far
16
Thus if you measure the cursor position
and find it at the third site, say, then you
know that the memory register will, at
that moment, contain the result of
applying the first three gate operations to
the input state
 This does not mean that only three such
operations have been applied...




In the Feynman computer the computation
proceeds forwards and backwards
simultaneously
As time progresses, the probability of finding
the cursor at the (k+1)-th site rises and fall
If you are lucky, and happen to measure the
cursor position when the probability of the
cursor being at the (k+1)-th site is high, then
you have a good chance of finding it there
17


Operationally, you periodically measure the
cursor position
This collapses the superposition of states that
represent the cursor position but leaves the
superposition of states in the program bits
unscathed




If the cursor is not at the (k+1)-th site then you allow
the computer to evolve again from the new,
(partially) collapsed state
However, as soon as the cursor is found at the (k+1)th site, the computation is halted and the complete
state of the memory register (cursor bits and
program bits) is measured
Whenever the cursor is at the (k+1)-th site, a
measurement of the state of the program bits
at that moment is guaranteed to return a valid
answer to the computation the quantum
computer was working on
So in the Feynman model of a quantum
computer, there is no doubt at to the
correctness of the answer, merely the time at
which the answer is available
18
To run the quantum computer until
completion, you must periodically check
the cursor position to see if all the gate
operations have been applied
 As soon as you find the cursor in its
extreme position, you can be sure that, at
that moment, a correct answer is
obtainable from reading the program
qubits

Note that we say "a" correct answer and
not "the" correct answer because, if a
problem admits more than one
acceptable solution, then the final state
of the Feynman's quantum computer will
contain a superposition of all the valid
answers
 Upon measurement only one of these
answers will be obtained however

19
If two identically prepared quantum
computers are allowed to evolve for
identical times, then, as the Schrodinger
equation is deterministic, the two
memory registers will evolve into
identical superpositions (ignoring errors
of course)
 Hence state1 will always be identical to
state2


However, when you measure the cursor
positions, you cause each of the superpositions
to "collapse" in a random way independent of
one another


In one case you may find, say, 2 gate operations
have been applied, and in the other you may find
say 1 gate operation has been applied. Thus
cursor1 is not, in general, the same as cursor2
Consequently, the relative states of the program
qubits of each computer will then also be different
after the measurements of the cursor. Hence
projected1 is different from projected2, in general
20

Probability (i.e. | amplitude |2) of each
eigenstate of the memory register at the times
when the cursor is observed
• For compactness of notation we label the eigenstates of the
(in this case 4-bit) memory register, |i>, in base 10
notation. For example, |5> corresponds to the eigenstate
of the memory register that is really |0101> and |15>
corresponds to the eigenstate of the memory register that is
really |1111>

The vertical axis shows that probability of obtaining
that eigenstate if the memory register were to be
measured at the given time
• Notice that there is a zero probability of ever obtaining
certain eigenstates showing that certain configurations of
the memory register are forbidden
21
Probabilities of finding the computer in
the various eigenstates at times t1, t2, t3
etc before the cursor position is observed.
 Second plot, probability of finding the
computer in the various eigenstates both
before and after the cursor position is
observed

22
The projective effect of the cursor
observation is quite noticeable
 If one measures the cursor position too
frequently, then one can prevent the
system from evolving at all
 The computation only evolves during the
time not being observed

23


An imperfection, such as an atom being slightly
misaligned, will cause the actual Hamiltonian of
the quantum computer to differ slightly from the
intended Hamiltonian, H
This in turn will induce an error in the unitary
evolution operator, U


The unitary evolution operator is really the
"program" that the quantum computer is following
This means that the quantum computer will
perform a computation other than the one
intended
24
However, if the errors in the Hamiltonian are
not too great then it is possible that the
quantum computer will still perform the
correct computation accidentally
 The question is how bad can the errors be
before the output from the quantum
computer is essentially useless?


We regard the computation as correct if both
the answer bit is "correct" and the cursor is
"uncorrupted“


By a "correct" answer bit we mean, if the input to the
computer was the binary digit x then, when the
cursor bit was found to be in its terminal (i.e. third)
position, the output memory register bit was NOT(x)
By an "uncorrupted" cursor we mean at those prior
times when the cursor was measured and found not
to be at its terminal position, there was at most one
1 amongst the three cursor bits
25
The Hamiltonian of a quantum computer
is described mathematically by a
hermitian matrix
 Even the "buggy" Hamiltonian
representing a faulty computation must
be described by some hermitian matrix



Here we explore runs of the NOT computation
implemented as two square root of NOT gates
connected back to back
The input state is |1001>



(i.e. a starting cursor 100 and an input bit 1)
The correct output state is |0,0,1,0> (i.e. an ending
cursor 001 and an output bit NOT(1) = 0)
We sweep out values of the error in the
Hamiltonian ranging from 0 to 0.2 in intervals
0.03

There are 15 samples per data point
26
Can a quantum computer do something
more impressive?
 Some vital computation
 Question troubled many scientists

27