communicating quantum processes simon gay department of computing science university of glasgow...
Post on 17-Jan-2018
219 Views
Preview:
DESCRIPTION
TRANSCRIPT
Communicating Quantum Processes
Simon GayDepartment of Computing Science
University of Glasgow
Rajagopal NagarajanDepartment of Computer Science
University of Warwick
This work was presented at the Second International Workshop on QuantumProgramming Languages, Turku, Finland, July 2004, and at the ACM Symposium on Principles of Programming Languages (POPL), Long Beach, California, January 2005.
Surrey Seminar: Communicating Quantum Processes 2
Overview
Quantum computing has the potential to solve some hardproblems efficiently.
Only a few algorithms are known and at present there are no techniquesfor generic improvement of algorithmic performance.
Physical implementations of quantum computers of useful size are along way in the future.
Shor’s algorithm (1994) can efficiently factorize large integers.
A practical implementation of Shor’s algorithm would kill much of ourpresent cryptographic technology.
)nloglognlogn(O 2
Surrey Seminar: Communicating Quantum Processes 3
Overview
Quantum cryptographic techniques are secure even in thepresence of quantum computers.
Quantum cryptography is much easier to implement thanquantum computing. City-scale demonstrations have takenplace, and components are commercially available.
Quantum cryptography (and other quantum communicationsystems) will definitely be an important practical technologyin the near future.
Surrey Seminar: Communicating Quantum Processes 4
Overview
Although quantum cryptographic protocols have been provedmathematically to be secure, we believe that there is a needfor verification of systems which combine quantumcommunication with classical computation and communication.
Computer science has a range of theories, techniques andtools which have been successfully used to verify classicalcommunication and cryptographic systems.
Formal modelling languages, specification logics, type theory,model-checking tools, automated theorem-proving, ...
Our research programme: to apply these techniques tocombined quantum/classical systems.
Surrey Seminar: Communicating Quantum Processes 5
Outline
Background on quantum computing.
Quantum communication: dense coding.
The language CQP (pi calculus + quantum operations).
illustration through the above examplesformal semantics and type system
Future work.
Surrey Seminar: Communicating Quantum Processes 6
Qubits
In classical computing the fundamental unit of information is thebit. The value of a bit is either 0 or 1.
In quantum computing the fundamental unit of information is thequantum bit or qubit.
A qubit has two basis states: |0 and |1 (physics notation).
A general state of a qubit is |0 + |1 where and arecomplex numbers, usually normalized so that 122
If both and are non-zero then the state is said to be asuperposition.
Surrey Seminar: Communicating Quantum Processes 7
Measurement
A qubit can be measured to produce a classical value.
If a qubit is in state |0 + |1 then the outcome of ameasurement is probabilistic.
With probability the result is 0 and the qubit enters state |0. 2
With probability the result is 1 and the qubit enters state |1. 2
Example: measure a qubit which is in state 12
102
1
with probability 0.5 the result is 0 and the qubit enters state |0
with probability 0.5 the result is 1 and the qubit enters state |1
Surrey Seminar: Communicating Quantum Processes 8
Systems of Multiple Qubits
For example, consider a system of 2 qubits.
A general state is a superposition of the basis states:where 12222
A measurement of both qubits has the following outcome:
With probability the result is 0 and the new state is |0|0. 2With probability the result is 1 and the new state is |0|1. 2With probability the result is 2 and the new state is |1|0. 2With probability the result is 3 and the new state is |1|1. 2
There are 4 basis states: |0|0 |0|1 |1|0 |1|1
11011000
Surrey Seminar: Communicating Quantum Processes 9
Systems of Multiple Qubits
For example, consider a system of 2 qubits.
There are 4 basis states: |0|0 |0|1 |1|0 |1|1
A general state is a superposition of the basis states:11011000 where 12222
A measurement of the first qubit has the following outcome:
With prob. result 0 and new state22 22
1000
With prob. result 1 and new state22
22
1101
Surrey Seminar: Communicating Quantum Processes 10
Quantum Parallelism
Suppose we have a function f : {0,1} {0,1} from which wecan derive a transformation F on qubits, such that
)1(f)0(f)10(F
For a function on n bits we can compute function applicationssimultaneously. Magic! This is quantum parallelism and is thebasis for the simplistic claim that quantum computing candeliver exponential efficiency gains for general problems.
n2
BUT the only way to extract information is to measure, so weget either f(0) or f(1) and we don’t even know which it is!
)0(f0F )1(f1F
Transformations extend linearly to superpositions, so
Surrey Seminar: Communicating Quantum Processes 11
Deutsch’s Problem
Suppose we have a black box which computes an unknownfunction f : {0,1} {0,1} , and we want to know whether or notf is a constant function.
Classically we can’t do better than calculating f(0) and f(1) andcomparing the results.
But suppose we can ask for a quantum version of the black box.It’s not reasonable to expect F such that
)0(f0F )1(f1F
in general, because quantum theory requires F to be invertibleand f might not be invertible.
Surrey Seminar: Communicating Quantum Processes 12
Deutsch’s Problem
It is reasonable to ask for a transformation F such that )x(fyxyxF
so let’s assume that this is the quantum version of the black box.
We will make use of the superposed qubit states
)10(2
1 )10(2
1
and apply F to the state )11011000(21
Surrey Seminar: Communicating Quantum Processes 13
Deutsch’s Problem
)10(2
1 )10(2
1 )x(fyxyxF
)x(fx0xF )x(f1x1xF
x)1()10(x2)1(xF )x(f
)x(f
If f(x)=0 then )10(x2
1xF
If f(x)=1 then )01(x2
1xF
Therefore
Surrey Seminar: Communicating Quantum Processes 14
Deutsch’s Problem
x)1(xF )x(f
)10(2
1 )10(2
1
Therefore F if f(0) = f(1)
F if f(0) f(1)
There is a transformation H such that 0H 1H
so applying H to the first qubit gives0 if f(0) = f(1)1 if f(0) f(1)
Surrey Seminar: Communicating Quantum Processes 15
Deutsch’s Problem
0 if f(0) = f(1)1 if f(0) f(1)
We end up with the following state:
and now measuring the first qubit gives us the desiredinformation about f , and we only used the quantumblack box once.
Quantum parallelism was used to calculate f(0) and f(1) ;a global property of f ended up being encoded in a single placeso that it could be extracted by a measurement.
Developing quantum algorithms for interesting problems seemsto be very difficult.
Surrey Seminar: Communicating Quantum Processes 16
Entanglement
A state of n qubits which is not of the form n21 is said to be entangled.
The simplest example: 2 qubits in state )1100(2
1
Suppose we measure the first qubit from this state:
With probability 0.5 the result is 0 and the new state is |0|0. With probability 0.5 the result is 1 and the new state is |1|1.
In both cases, the two qubits now have the same state.Measuring the second qubit is guaranteed to give the sameresult as the first measurement, even if the qubits arephysically separated by any distance.
Surrey Seminar: Communicating Quantum Processes 17
Transformation / Evolution
Evolution of a quantum system is described by a Hermitianoperator.
Concretely, for a system of n qubits, an operator is amatrix A such thatwhere A* is the conjugate transpose.
nn 22 *AA 1
Example:
The Hadamard operator H is defined by0H 1H
Represent 10 by
11
112
1Hthen
Surrey Seminar: Communicating Quantum Processes 18
Controlled Not
The controlled not operator applies to 2 qubits. x0x0CNot
x11x1CNot
Using H and CNot we can prepare an entangled state:
)0(CNot))00)(idH((CNot
01CNot2
100CNot2
1
112
1002
1
Surrey Seminar: Communicating Quantum Processes 19
Pauli Operators
The Pauli operators will be useful in a moment. They apply tosingle qubits.
000
110
1001
0
101
011
0110
1
1i03
0i13
0ii0
3
002
112
10
012
Surrey Seminar: Communicating Quantum Processes 20
The No Cloning Theorem
There is no unitary transformation U such that for all Ψ )s(U
( s is some standard initial state for the second qubit).
Proof: (Dieks; Wootters & Zurek; 1982) )s(U )s(U
Take inner product: 2)(
Therefore either 0 or 1
So φ and ψ are either orthogonal or identical.
Surrey Seminar: Communicating Quantum Processes 21
Dense Coding
A protocol allowing 2 classical bits of information to betransmitted by sending 1 qubit and making use of entanglement.
Alice and Bob share an entangled pair of qubits: x, y.
Alice wishes to send n (0 n 3) to Bob. There is a quantumchannel q linking them.
Alice Bob
x y)1100(
21y,x
(0 n 3)can transmit qubits
q
Surrey Seminar: Communicating Quantum Processes 22
Dense Coding
A protocol allowing 2 classical bits of information to betransmitted by sending 1 qubit and making use of entanglement.
Alice and Bob share an entangled pair of qubits: x, y.
Alice wishes to send n (0 n 3) to Bob. There is a quantumchannel q linking them.
Alice(x:Qbit, q:^[Qbit], n:0..3) = ...
Bob(y:Qbit, q:^[Qbit]) = ...
System(x:Qbit, y:Qbit, n:0..3) =(new q:^[Qbit])( Alice(x,q,n) | Bob(y,q) )
Surrey Seminar: Communicating Quantum Processes 23
Dense Coding
Alice selects a Pauli transformation corresponding to n,applies it to x, and sends x to Bob.
Alice Bob
x y)1100(
21y,x
n
xsend x to Bob
Alice(x:Qbit, q:^[Qbit], n:0..3) ={x *= n} . q![x] . Stop
Surrey Seminar: Communicating Quantum Processes 24
Dense Coding
Alice selects a Pauli transformation corresponding to n,applies it to x, and sends x to Bob.
Alice Bob
x y)1100(
21y,x
n
xsend x to Bob
Alice(x:Qbit, q:^[Qbit], n:0..3) ={x *= n} . q![x] . Stop
eg. n=1 )1001(2
1y,x
Surrey Seminar: Communicating Quantum Processes 25
Dense Coding
Bob receives x, applies CNot to x,y, applies H to x,then measures x,y. The result uniquely determines n.
Alice Bob
x y)1100(
21y,x
n
xsend x to Bob
CNotx, y
Hx, ymeasure x,yn
x, y
Surrey Seminar: Communicating Quantum Processes 26
Dense Coding
Bob receives x, applies CNot to x,y, applies H to x,then measures x,y. The result uniquely determines n.
Alice Bob
x y)1100(
21y,x
n
xsend x to Bob
CNotx, y
Hx, ymeasure x,yn
eg. n=1
)1001(2
1y,x
Surrey Seminar: Communicating Quantum Processes 27
Dense Coding
Bob receives x, applies CNot to x,y, applies H to x,then measures x,y. The result uniquely determines n.
Alice Bob
x y)1100(
21y,x
n
xsend x to Bob
CNot
Hx, ymeasure x,yn
eg. n=1
)1001(2
1y,x
)1011(2
1y,x
Surrey Seminar: Communicating Quantum Processes 28
Dense Coding
Bob receives x, applies CNot to x,y, applies H to x,then measures x,y. The result uniquely determines n.
Alice Bob
x y)1100(
21y,x
n
xsend x to Bob
CNot
Hmeasure x,yn
eg. n=1
)1001(2
1y,x
)1011(2
1y,x
10y,x
Surrey Seminar: Communicating Quantum Processes 29
Dense Coding
Bob receives x, applies CNot to x,y, applies H to x,then measures x,y. The result uniquely determines n.
Alice Bob
x y)1100(
21y,x
n
xsend x to Bob
CNot
Hmeasure x,y1
eg. n=1
)1001(2
1y,x
)1011(2
1y,x
10y,x
Surrey Seminar: Communicating Quantum Processes 30
Dense Coding
Bob receives x, applies CNot to x,y, applies H to x,then measures x,y. The result uniquely determines n.
Bob(y:Qbit, q:^[Qbit]) =q?[z:Qbit] . {z,y *= CNot} . {z *= H} . Use(measure z,y)
Surrey Seminar: Communicating Quantum Processes 31
Dense Coding
Alice(x:Qbit, q:^[Qbit], n:0..3) ={x *= n} . q![x] . Stop
Bob(y:Qbit, q:^[Qbit]) =q?[z:Qbit] . {z,y *= CNot} . {z *= H} . Use(measure z,y)
System(x:Qbit, y:Qbit, n:0..3) =(new q:^[Qbit])( Alice(x,q,n) | Bob(y,q) )
System is parameterized by x and y (and we must assume thatthey are entangled).
Surrey Seminar: Communicating Quantum Processes 32
Dense Coding with Entanglement Server
We can make the system more self-contained: Alice and Bobreceive their entangled qubits from a third process.(EPR source or entanglement server)
Alice’(s:^[Qbit], q:^[Qbit], n:0..3) =s?[x:Qbit] . Alice(x,q,n)
Bob’(t:^[Qbit], q:^[Qbit]) =t?[y:Qbit] . Bob(y,q)
Source(s:^[Qbit], t:^[Qbit]) =(qbit x,y)({x *= H} . {x,y *= CNot} . s![x] . t![y] . Stop)
System(n:0..3) =(new q, s, t:^[Qbit])( Alice’(s,q,n) | Bob’(t,q) | Source(s,t) )
Surrey Seminar: Communicating Quantum Processes 33
The Language CQP
This example has introduced our language CQP.
Defining a formal language for describing protocols is avaluable step.
We have also defined a formal operational semantics.It is based on the pi calculus, with the addition of global state(for the qubits) and probabilistic reductions (arising frommeasurements).
CQP has a static type system which, in addition to checkingcorrect use of values and channels, guarantees that qubits arenot syntactically copied (because of the No Cloning Theorem).
Surrey Seminar: Communicating Quantum Processes 34
Reduction in CQP
Communication
))z(Use].Qbit:z?[q|Stop].x[!q(;q;)1100(2
1y,x
))x(Use|Stop(;q;)1100(2
1y,x
Surrey Seminar: Communicating Quantum Processes 35
Reduction in CQP
Measurement
)y,xmeasure(Use;q;)1100(2
1y,x
))3(Use;q;11y,x(21))0(Use;q;00y,x(
21
)0(Use;q;00y,x )3(Use;q;11y,x
21
21
Surrey Seminar: Communicating Quantum Processes 36
Typechecking for No Cloning
Suppose that Alice continues with some behaviour, aftersending the qubit to Bob.
Alice(x:Qbit, q:^[Qbit], n:0..3) ={x *= n} . q![x] . Continue
The type system of CQP guarantees that Continue does notrefer to x.
Technically: the fact that x is sent along q means that Continueis typechecked in an environment which does not contain x.
The details are based on several pi calculus type systems,going back to Kobayashi, Pierce & Turner (1996).
Surrey Seminar: Communicating Quantum Processes 37
Teleportation
Alice and Bob share an entangled pair x,y of qubits.
Alice has a qubit z in an unknown state, and she wishes totransmit this state to Bob (perhaps the physical form of z is notsuitable for a direct transfer).
Alice applies CNot to z,x and then applies H to z.
Then she measures z,x to yield a two-bit classical value whichshe sends to Bob on a channel c.
Bob uses this value to select a Pauli transformation and appliesit to y. The result is that the final state of y is the same as theinitial state of z.
Surrey Seminar: Communicating Quantum Processes 38
Teleportation in CQP
Alice(x:Qbit, c:^[0..3], z:Qbit) ={z,x *= CNot} . {z *= H} . c![measure z,x] . Stop
Bob(y:Qbit, c:^[0..3]) =c?[r:0..3] . {y *= r} . Use(y)
System(x:Qbit, y:Qbit, z:Qbit) =(new c:^[0..3])( Alice(x,c,z) | Bob(y,c) )
Surrey Seminar: Communicating Quantum Processes 39
How Teleportation Works
x and y are entangled: )1100(2
1y,x
z has some general state: 10z
Overall state: )1100(2
1)10(y,x,z
)111100011000(2
1y,x,z
Surrey Seminar: Communicating Quantum Processes 40
How Teleportation Works
)111100011000(2
1y,x,z
z,x *= CNot
)101110011000(2
1y,x,z
z *= H
)111110101100011010001000(21y,x,z
Surrey Seminar: Communicating Quantum Processes 41
How Teleportation Works
)111110101100011010001000(21y,x,z
measure z,x001000y,x,z
011010y,x,z
111110y,x,z
101100y,x,z
result = 0
result = 1
result = 2
result = 3
y *= 0
y *= 1
y *= 2
y *= 3
)10(00y,x,z
)10(01y,x,z
)10(10y,x,z
)10(11y,x,z
In each case the final state of y is the same as the initial stateof z, (and there is no entanglement between z,x and y).
Surrey Seminar: Communicating Quantum Processes 42
Related Work
There are several papers on quantum programming languagesand our syntax has been influenced in particular by Selinger’sQPL (2003).
Jorrand & Lalire (2004) have defined a quantum processalgebra (QPA), which is quite similar to CQP in several ways(there has now been considerable influence in both directions).The type system is one of our distinctive features.
Surrey Seminar: Communicating Quantum Processes 43
Future Work
The purpose of defining CQP is to support formal reasoningabout quantum systems. There are several directions to explore.
Verification tools: we are now working with PRISM modelsconstructed in its (low-level) language. In the future we aimto construct PRISM models by translation from CQP.
Translation into non-probabilistic model-checking systems mayalso be useful, for exploration of possibilities before analysis ofprobabilities.
Translation into some existing simulation framework may alsobe worthwhile.
Surrey Seminar: Communicating Quantum Processes 44
Future Work
Type-theoretic methods: can we get more from a type system?For example: can we develop type systems for high-levelproperties such as secrecy? (This is known for classical securityprotocols.)
Logics for specification: for both automatic and non-automaticverification.
Example: a group at Technical University of Lisbon isdeveloping a Hoare-style logic for quantum systems, butthey have no formal syntax for describing systems.
{ pre } P { post }ad hoc description of a system
top related