Quantum Non-locality Games Framework
Quantum Non-locality Games Framework
Anya Tafliovich1 ,2
Computer Science
University of Toronto
Toronto, Canada
Eric C. R. Hehner3
Computer Science
University of Toronto
Toronto, Canada
Abstract
Quantum pseudo-telepathy is an intriguing phenomenon which results from the application of quantum
information theory to communication complexity. To demonstrate this phenomenon researchers in the field
of quantum communication complexity devised a number of quantum non-locality games. The setting of
these games is as follows: the players are separated so that no communication between them is possible
and are given a certain computational task. When the players have access to a quantum resource called
entanglement, they can accomplish the task: something that is impossible in a classical setting. To an
observer who is unfamiliar with the laws of quantum mechanics it seems that the players employ some sort
of telepathy; that is, they somehow exchange information without sharing a communication channel.
This paper provides a formal framework for specifying, implementing, and analysing quantum non-locality
games.
1 Introduction
The work develops a formal framework for specifying, implementing, and analysing
quantum pseudo-telepathy: an intriguing phenomenon which manifests itself when
quantum information theory is applied to communication complexity. To demon-
strate this phenomenon researchers in the field of quantum communication complex-
ity devised a number of quantum non-locality games. The setting of these games
is as follows: the players are separated so that no communication between them is
possible and are given a certain computational task. When the players have access
to a quantum resource called entanglement, they can accomplish the task: some-
thing that is impossible in a classical setting. To an observer who is unfamiliar with
the laws of quantum mechanics it seems that the players employ some sort of telepa-
thy; that is, they somehow exchange information without sharing a communication
channel.
Quantum pseudo-telepathy, and quantum non-locality in general, are perhaps
the most non-classical and the least understood aspects of quantum information
processing. Every effort is made to gain information about the power of these phe-
nomena. Quantum non-locality games in particular have been extensively used to
prove separations between quantum and classical communication complexity. The
need for a good framework for formal analysis of quantum non-locality is evident.
We look at quantum non-locality in the context of formal methods of program
development, or programming methodology. This is the field of computer science
concerned with applications of mathematics and logic to software engineering tasks.
In particular, the formal methods provide tools to formally express specifications,
prove correctness of implementations, and reason about various properties of spec-
ifications (e.g. implementability) and implementations (e.g. time and space com-
plexity).
In this work the analysis of quantum non-locality is based on quantum pred-
icative programming ([33,32]), a recent generalisation of the well-established pred-
icative programming ([23,24,25]). It supports the style of program development in
which each programming step is proved correct as it is made. We inherit the advan-
tages of the theory, such as its generality, simple treatment of recursive programs,
and time and space complexity. The theory of quantum programming provides tools
to write both classical and quantum specifications, develop quantum programs that
implement these specifications, and reason about their comparative time and space
complexity all in the same framework.
Presenting new non-locality paradigms or new pseudo-telepathy games is not
the subject of this work. Our goal is developing a formal framework that encom-
passes all aspects of quantum computation and information. Formal analysis of
quantum algorithms, including their time complexity, is presented in [33]. Analysis
of quantum communication appears in [34]. This paper focuses on formal analysis
of non-locality paradigms; we choose known pseudo-telepathy games as illustrative
examples of our formalism.
The rest of this work is organised as follows. Section 2 is a brief introduction to
quantum predicative programming. The contribution of this work is Section 3 which
introduces a formal framework for specifying, implementing, and analysing quan-
2
Tafliovich
R; S == ∃x′′ , y ′′ , . . . · R′′ ∧ S ′′
x := e; P == (for x substitute e in P )
Specification S is refined by specification P if and only if S is satisfied whenever
P is satisfied, that is ∀σ, σ ′ · S ⇐ P . Given a specification, we are allowed to
implement an equivalent specification or a stronger one.
A program is an implemented specification. A good basis for classical (non-
quantum) programming is provided by: ok, assignment, if then else, sequential
composition, booleans, numbers, bunches, and functions.
Given a specification S, we proceed as follows. If S is a program, there is no
work to be done. If it is not, we build a program P , such that P refines S, i.e.
S ⇐ P . The refinement can proceed in steps: S ⇐ . . . ⇐ R ⇐ Q ⇐ P .
In S ⇐ P it is possible for S to appear in P . No additional rules are required
to prove the refinement. For example, it is trivial to prove that
x ≥ 0 ⇒ x′ = 0 ⇐= if x = 0 then ok else (x := x − 1 ; x ≥ 0 ⇒ x′ = 0)
The specification says that if the initial value of x is non-negative, its final value
must be 0. The solution is: if the value of x is zero, do nothing, otherwise decrement
x and repeat.
if p then R else S == p × R + (1 − p) × S
Various laws can be proved about sequential composition. One of the most
important ones, the substitution law, introduced earlier, applies to probabilistic
specifications as well.
We use assignment, sequential composition, and if-then-else to reason about
probability distributions that result from (probabilistically) changing the state vari-
ables. To reason about probability distributions that result from learning some new
information, with no change to the state variables, we use the learn operator, in-
troduced in [25]. If P is the original probability distribution and b is a boolean
expression that describes the information we learn, then the resulting probability
distribution is defined by
P ! b == (P × b′ )/(P ; b)
If ψ and φ are two states of an n-qubit system, then their inner product, denoted
4 Readers familiar with ⊤ and ⊥ notation can notice that we take the liberty to equate ⊤ = 1 and ⊥ = 0.
5
Tafliovich
by hψ|φi, is defined by 5 :
X
hψ|φi = x : 0, ..2n · (ψx)∗ × (φx)
I n = λψ : 0, ..2n → C · ψ
5 We should point out that this kind of function operations is referred to as lifting.
6
Tafliovich
3 Quantum Non-locality
In predicative programming, to reason about distributed computation we (dis-
jointly) partition the variables between the processes involved in a computation.
Parallel composition is then simply boolean conjunction. For example, consider
two processes P and Q. P owns integer variables x and y and Q owns an integer
variable z. Suppose P == x := x + 1; y := x and Q == z := −z. Parallel
7
Tafliovich
P ||Q == P ∧ Q
== (x := x + 1 ; y := x) ∧ (z := −z)
== x′ = x + 1 ∧ y ′ = x + 1 ∧ z ′ = −z
are programs, if p and q are integer variables owned by P and Q, respectively. The
parties P and Q can access only their own qubits: they could in theory be light
years apart.
We define parallel composition of P and Q which share an n+m quantum system
in state ψ with the first n qubits belonging to P and the other m qubits belonging
to Q as follows. If
P ||ψ Q == ψ := (UP ⊗ UQ )ψ
Similarly, if
4 Pseudo-telepathy games
We formalise pseudo-telepathy games with n players as follows. For each player i,
0 ≤ i < n, we have a domain Di from which the inputs to player i are provided
and a range Ri of player i’s possible output results. In addition we may have a
promise P : a condition on the inputs to the players. If no promise is given, we
set P to 1. The winning condition W can involve inputs as well as outputs for
each player. The strategy S is a program, i.e. an implemented specification. The
strategy S is winning if, assuming the promise, the strategy yields a distribution
that corresponds to the winning condition:
S !P ≤ W !1
We begin by analysing the distribution that results from executing the solution
program (we omit domains of u, v, z for clarity and sum out the final quantum state,
since it does not appear in the winning condition)
X
ψ′ · S
X X √
== ψ ′ · ψ := z · |zzi/ 2k ; (SA ||ψ SB ) expand SA , SB
X X √
== ψ ′ · ψ := z · |zzi/ 2k ;
((ψA := UA⊗k ψA ; ψA := H ⊗k ψA ; measure ψA yA ) ||ψ
(ψB := UB⊗k ψB ; ψB := H ⊗k ψB ; measure ψB yB )) substitute
X X √
== ψ ′ · ψ := z · |zzi/ 2k ;
(measure H ⊗k (UA⊗k ψA ) yA ||ψ composition
measure H ⊗k (UB⊗k ψB ) yB ) on ψ
X X √
== ψ ′ · ψ := z · |zzi/ 2k ; substitute and
measure H ⊗2k
⊗ ((UA⊗k
yA yB UB⊗k )ψ) measure
X √ 2
== H ⊗2k (UA⊗k ⊗ UB⊗k ) z · |zzi/ 2k (yA yB )′ ×
(x′A = xA ) × (x′B = xB ) linearity
X √ 2
== H ⊗2k z · (UA⊗k |zi ⊗ UB⊗k |zi) / 2k (yA yB )′ ×
(x′A = xA ) × (x′B = xB ) apply Ui
10
Tafliovich
X √ 2
== H ⊗2k z · (−1)(xA )z ×|zi ⊗ (−1)(xB )z ×|zi) / 2k (yA yB )′ ×
(x′A = xA ) × (x′B = xB ) linearity
X √ 2
== z · (−1)(xA )z +(xB )z ×H ⊗k |zi ⊗ H ⊗k |zi / 2k (yA yB )′ ×
(x′A = xA ) × (x′B = xB ) apply H
X
== z· (−1)(xA )z +(xB )z×
X √
( u · (−1)z·u × |ui/ 2n ) ⊗
X √ √ 2
( v · (−1)z·v × |vi/ 2n ) ) / 2k (yA yB )′ ×
(x′A = xA ) × (x′B = xB ) collect terms
X √ 3 2
== u, v, z · (−1)(xA )z +(xB )z +u·z+v·z ×|uvi/ 2k (yA yB )′ ×
(x′A = xA ) × (x′B = xB )
X √ 3 2
== u, v, z · (−1)(xA )z ⊕(xB )z ⊕(u⊕v)·z ×|uvi/ 2k (yA yB )′ ×
(x′A = xA ) × (x′B = xB )
S × P0′ expand
X √ 3 2
== u, v, z · (−1)(xA )z ⊕(xB )z ⊕(u⊕v)·z ×|uvi/ 2k (yA yB )′ ×
(x′A
= xA ) × (x′B
= xB ) × (x′A
= x′B ) math
X √ 3 2
== u, v, z · (−1)(u⊕v)·z ×|uvi/ 2k (y A yB )
′
×
(x′A = x′B = xA = xB ) sum
X √ 2
== z · |zzi/ 2k (yA yB )′ × (x′A = x′B = xA = xB ) application
== (x′A = x′B = xA = xB ) × (yA
′ ′
= yB )/2k
′ ′
== P0 × (yA = yB )/2k × (x′A = xA ) × (x′B = xB )
S × P1′ expand
X √ 3 2
== u, v, z · (−1)(xA )z ⊕(xB )z ⊕(u⊕v)·z × |uvi/ 2k (yA yB )′ ×
X
(x′A = xA ) × (x′B = xB ) × ( i · ((x′A )i = (x′B )i ) == 2k−1 ) split sum
X √ 3
== u 6= v, z · (−1)(xA )z ⊕(xB )z ⊕(u⊕v)·z × |uvi/ 2k +
X √ 3 2
u, z · (−1)(xA )z ⊕(xB )z × |uui/ 2k (yA yB )′ ×
X
(x′A = xA ) × (x′B = xB ) × ( i · ((x′A )i = (x′B )i ) == 2k−1 ) second sum
11
Tafliovich
X √ 3
== u 6= v, z · (−1)(xA )z ⊕(xB )z ⊕(u⊕v)·z × |uvi/ 2k +
X √ 3 2
u · ((−1) × 2k−1 + 1 × 2k−1 ) × |uui/ 2k (yA yB )′ ×
X
(x′A = xA ) × (x′B = xB ) × ( i · ((x′A )i = (x′B )i ) == 2k−1 ) math
X √ 3 2
== u 6= v, z · (−1)(xA )z ⊕(xB )z ⊕(u⊕v)·z × |uvi/ 2k (yA yB )′ ×
X
(x′A = xA ) × (x′B = xB ) × ( i · ((xA )i = (xB )i ) == 2k−1 ) application
′ ′
== P1 × (yA 6= yB ) × /(2k × (2k − 1)) × (x′A = xA ) × (x′B = xB )
W !1 def of !
X
== W/ σ′ · W expand
′ ′ ′ ′
== (P0 × (yA = yB ) + P1 × (yA 6= yB ))/
X
′ ′ ′ ′ ′
yA , yB · P0 × (yA = yB ) + P1 × (yA 6= yB ) sum
′ ′ ′ ′
== (P0 × (yA = yB ) + P1 × (yA 6= yB ))/
(P0 × 2k + P1 × 2k × (2k − 1)) math
′ ′
== P0 × (yA = yB )/2k + P1 × (yA
′ ′
6= yB )/(2k × (2k − 1))
S !P def of !
== S × (P0 + P1 )/(S ; (P0 + P1 )) expand
X
== S × P0 + S × P1 / σ ′′ · (S ′′ × (P0′′ + P1′′ )) above proofs
′ ′
== P0 × (yA = yB )/2k × (x′A = xA ) × (x′B = xB )+
′ ′
P1 × (yA 6= yB ) × /(2k × (2k − 1)) × (x′A = xA ) × (x′B = xB )
== (W ! 1) × (x′A = xA ) × (x′B = xB )
≤ W !1
√
operation U defined by U |0i = |0i and U |1i = −1 × |1i to her qubit if the input
is 1. The player then applies a Hadamard transform. The qubit is measured in the
computational basis and the result of the measurement is the output.
The program is:
√ √
S == ψ := |000i/ 2 + |111i/ 2 ; S0 ||ψ S1 ||ψ S2
Si == if xi = 1 then ψi := U ψi else ok ; ψi := Hψi ; measure ψi yi
where i : 0, 1, 2.
To prove the solution is correct, we begin by analysing the resulting distributions
of the state variables. As before, we sum out the final quantum state, since it does
not appear in the winning condition.
X
ψ′ · S
X √ √
== ψ ′ · ψ := |000i/ 2 + |111i/ 2 ;
||ψ i : 0, 1, 2 · if xi = 1 then ψi := U ψi else ok ;
ψi := Hψi ; measure ψi yi conditional
X
′
√ √
== ψ · ψ := |000i/ 2 + |111i/ 2 ;
||ψ i : 0, 1, 2 · ψi := U xi ψi ; ψi := Hψi ; measure ψi yi substitute
X √ √
== ψ ′ · ψ := |000i/ 2 + |111i/ 2 ;
||ψ i : 0, 1, 2 · measure H(U xi ψi ) yi compose
X √ √
== ψ ′ · ψ := |000i/ 2 + |111i/ 2 ; substitute
measure H ⊗3 (U x0 ⊗ U x1 ⊗ U x2 ψ) y0 y1 y2 and measure
√ √ 2
== H ⊗3 (U x0 ⊗ U x0 ⊗ U x0 (|000i/ 2 + |111i/ 2)) (y0 y1 y3 )′ ×
((x0 x1 x2 )′ = x0 x1 x2 ) apply U
√ √ √ 2
== H ⊗3 (|000i/ 2 + ( −1)x0 +x1 +x2 × |111i/ 2) (y0 y1 y3 )′ ×
((x0 x1 x2 )′ = x0 x1 x2 )
S × P′ expand
√ √ √ 2
== H ⊗3 (|000i/ 2 + ( −1)x0 +x1 +x2 × |111i/ 2) (y0 y1 y3 )′ ×
((x0 x1 x2 )′ = x0 x1 x2 ) × (x′0 ⊕ x′1 ⊕ x′2 = 0) split into cases
√ √ 2
== H ⊗3 (|000i/ 2 + |111i/ 2) (y0 y1 y3 )′ ×
((x0 x1 x2 )′ = x0 x1 x2 ) × (x′0 + x′1 + x′2 = 0) +
√ √ 2
H ⊗3 (|000i/ 2 − |111i/ 2) (y0 y1 y3 )′ ×
((x0 x1 x2 )′ = x0 x1 x2 ) × (x′0 + x′1 + x′2 = 2) apply H
13
Tafliovich
2
== (|000i + |011i + |101i + |110i)/2 (y0 y1 y3 )′ ×
((x0 x1 x2 )′ = x0 x1 x2 ) × (x′0 + x′1 + x′2 = 0) +
2
(|001i + |010i + |100i + |111i)/2 (y0 y1 y3 )′ ×
((x0 x1 x2 )′ = x0 x1 x2 ) × (x′0 + x′1 + x′2 = 2) application
== (y0′ ⊕ y1′ ⊕ y2′ = (x′0 + x′1 + x′2 )/2) × ((x0 x1 x2 )′ = x0 x1 x2 ) × P/4
W !1 def of !
X
== W/ σ′ · W expand
== ((y0′ ⊕ y1′ ⊕ y2′ = (x0 + x1 + x2 )/2)/
X
y0′ , y1′ , y2′ · y0′ ⊕ y1′ ⊕ y2′ = (x0 + x1 + x2 )/2 sum
== ((y0′ ⊕ y1′ ⊕ y2′ = (x0 + x1 + x2 )/2)/4 × P
S !P def of !
′
== S × P /(S ; P ) above proofs
′ ′ ′ ′ ′ ′ ′
== (y0 ⊕ y1 ⊕ y2 = (x0 + x1 + x2 )/2) × ((x0 x1 x2 ) = x0 x1 x2 ) × P/4/
X √ √ √
σ ′′ · |H ⊗3 (|000i/ 2 + ( −1)x0 +x1 +x2 × |111i/ 2(y0 y1 y2 )′′ |2 × math
′′ ′′ ′′ ′′
((x0 x1 x2 ) = x0 x1 x2 ) × (x0 ⊕ x1 ⊕ x2 = 0)
== (y0′ ⊕ y1′ ⊕ y2′ = (x′0 + x′1 + x′2 )/2) × ((x0 x1 x2 )′ = x0 x1 x2 )/4 × P def of W
== (W !1) × ((x0 x1 x2 )′ = x0 x1 x2 )
≤ (W !1)
condition is that the sum of the outputs is half the sum of the inputs mod 2:
X
P == ( i : 0, ..n · αi ) mod 2l = 0
X X
W == ( i : 0, ..n · βi′ ) mod 2 = ( αi /2l ) mod 2
ψi := Ui ψi ; ψi := Hψi ; measure ψi βi
S × P′ expand
√ P
i·αi /2l
√ ′ 2
== H ⊗n (|0i⊗n + eπ× −1×
× |1i⊗n )/ 2 β0,..n ×
X
(α′0,..n = α0,..n ) × (( i : 0, ..n · α′i ) mod 2l = 0) split cases
X
== (( i : 0, ..n · α′i /2l ) mod 2 = 0) × (α′0,..n = α0,..n )×
√ ′ 2
H ⊗n (|0i⊗n + |1i⊗n )/ 2 β0,..n +
X
(( i : 0, ..n · α′i /2l ) mod 2 = 1) × (α′0,..n = α0,..n )×
√ ′ 2
H ⊗n (|0i⊗n − |1i⊗n )/ 2 β0,..n apply H
X
== (( i : 0, ..n · α′i /2l ) mod 2 = 0) × (α′0,..n = α0,..n )×
X √ 2
′
x · (px = 0) × |xi/ 2n−1 β0,..n +
X
(( i : 0, ..n · α′i /2l ) mod 2 = 1) × (α′0,..n = α0,..n )×
X √ 2
′
x · (px = 1) × |xi/ 2n−1 β0,..n application
X X
== ( i : 0, ..n · βi′ ) mod 2 = ( i : 0, ..n · αi /2l ) mod 2 × P ×
(α′0,..n = α0,..n )/2n−1
where px is defined by
X
if x = x0 x1 . . . xn−1 then px = ( i : 0, ..n · xi ) mod 2
15
Tafliovich
S !P def !
′
== S × P /(S ; P ) above proof
X X
== ( i : 0, ..n · βi′ ) mod 2 = ( i : 0, ..n · αi /2l ) mod 2 × P ×
(α′0,..n = α0,..n )/2n−1 /
X X
σ ′′ · ( i : 0, ..n · α′′i /2l ) mod 2 = 0 × (α′′0,..n = α0,..n )×
X √ 2
′′
x · (px = 0) × |xi/ 2n−1 β0,..n +
X
( i : 0, ..n · α′′i /2l ) mod 2 = 1 × (α′′0,..n = α0,..n )×
X √ 2 sum
′′
x · (px = 1) × |xi/ 2n−1 β0,..n
X X
== ( i : 0, ..n · βi′ ) mod 2 = ( i : 0, ..n · αi /2l ) mod 2 ×
(α′0,..n = α0,..n )/2n−1 × P def of W
== (W ! 1) × (α′0,..n = α0,..n )
≤ W !1
References
[1] Abramsky, S., High-level methods for quantum computation and information, in: Proceedings of the
19th Annual IEEE Symposium on Logic in Computer Science (2004), pp. 410–414.
[2] Abramsky, S. and B. Coecke, A categorical semantics of quantum protocols, in: Proceedings of the 19th
Annual IEEE Symposium on Logic in Computer Science (2004), pp. 415–425.
[3] Abramsky, S. and R. Duncan, A categorical quantum logic, Mathematical Structures in Computer
Science 16 (2006), pp. 469–489.
[4] Adão, P. and P. Mateus, A process algebra for reasoning about quantum security, in: Proceedings of
the 3rd International Workshop on Quantum Programming Languages (QPL 2005), Electronic Notes
in Theoretical Computer Science 170 (2007), pp. 3–21.
[5] Altenkirch, T. and J. Grattage, A functional quantum programming language, in: Proceedings of the
20th Annual IEEE Symposium on Logic in Computer Science (2005), pp. 249–258.
[6] Arrighi, P. and G. Dowek, Operational semantics for formal tensorial calculus, in: Proceedings of
the 2nd International Workshop on Quantum Programming Languages, number 33 in TUCS General
Publications (2004), pp. 21–38.
16
Tafliovich
[8] Bell, J. S., On the Einstein-Podolsky-Rosen paradox, Physics 1 (1964), pp. 195–200.
[9] Bennett, C. H. and G. Brassard, Quantum cryptography: Public-key distribution and coin tossing, in:
Proceedings of IEEE International Conference on Computers, Systems and Signal Processing (1984),
pp. 175–179.
[10] Brassard, G., A. Broadbent and A. Tapp, Multi-party pseudo-telepathy, in: Proceedings of the 8th
International Workshop on Algorithms and Data Structures, Lecture Notes in Computer Science 2748
(2003), pp. 1–11.
[11] Brassard, G., A. Broadbent and A. Tapp, Quantum pseudo-telepathy, Foundations of Physics 35 (2005),
pp. 1877–1907.
[12] Brassard, G., H. Buhrman, N. Linden, A. A. Méthot, A. Tapp and F. Unger, Limit on nonlocality
in any world in which communication complexity is not trivial, Physical Review Letters 96 (2006),
p. 250401.
[13] Brassard, G., R. Cleve and A. Tapp, Cost of exactly simulating quantum entanglement with classical
communication, Physical Review Letters 83 (1999), pp. 1874–1878.
[14] Brassard, G., A. A. Méthot and A. Tapp, Minimum entangled state dimension required for pseudo-
telepathy, arXiv:quant-ph/0412136 (2004).
[15] Buhrman, H., P. Hoyer, S. Massar and H. Roehrig, Combinatorics and quantum nonlocality, Physical
Review Letters 91 (2003), p. 047903.
[17] Danos, V. and E. Kashefi, Pauli measurements are universal, in: Proceedings of the 3rd International
Workshop on Quantum Programming Languages (QPL 2005), Electronic Notes in Theoretical
Computer Science 170 (2007), pp. 95–100.
[18] Deutsch, D. and R. Jozsa, Rapid solution of problems by quantum computation, Proceedings of the
Royal Society of London 439 (1992), pp. 553–558.
[19] D’Hondt, E. and P. Panangaden, Reasoning about quantum knowledge, in: Proceedings of the 25th
IARCS Annual International Conference on Foundations of Software Technology and Theoretical
Computer Science, Lecture Notes in Computer Science 3821 (2005), pp. 553–564.
[21] Galliard, V., S. Wolf and A. Tapp, The impossibility of pseudo-telepathy without quantum entanglement,
arXiv:quant-ph/0211011 (2002).
[22] Gay, S. J. and R. Nagarajan, Communicating quantum processes, in: Proceedings of the 32nd ACM
SIGACT-SIGPLAN Symposium on Principles of Programming Languages (2005), pp. 145–157.
[23] Hehner, E. C., “a Practical Theory of Programming,” Springer, New York, 1993, first edition, current
edn. (2009) Available free at [Link]/∼ hehner/aPToP.
[24] Hehner, E. C., Probabilistic predicative programming, in: Proceedings of the 7th International
Conference on Mathematics of Program Construction, Lecture Notes in Computer Science 3125 (2004),
pp. 169–185.
[25] Hehner, E. C., A probability perspective, Formal Aspects of Computing (2009), to appear.
[26] Jorrand, P. and M. Lalire, Toward a quantum process algebra, in: Proceedings of the 1st ACM
Conference on Computing Frontiers (2004), pp. 111–119.
[27] Lalire, M. and P. Jorrand, A process algebraic approach to concurrent and distributed computation:
operational semantics, in: Proceedings of the 2nd International Workshop on Quantum Programming
Languages, number 33 in TUCS General Publications (2004), pp. 109–126.
[28] Mermin, N. D., Quantum mysteries revisited, Americal Journal of Physics 58 (1990), pp. 731–734.
[29] Nielsen, M. A. and I. L. Chuang, “Quantum Computation and Quantum Information,” Cambridge
University Press, 2000.
[30] Sanders, J. W. and P. Zuliani, Quantum programming, in: Mathematics of Program Construction,
Lecture Notes in Computer Science 1837 (2000), pp. 80–99.
[31] Selinger, P., Towards a quantum programming language, Mathematical Structures in Computer Science
14 (2004), pp. 527–586.
17
Tafliovich
[32] Tafliovich, A., “Quantum Programming,” Master’s thesis, University of Toronto (2004).
[33] Tafliovich, A. and E. C. Hehner, Quantum predicative programming, in: Proceedings of the 8th
International Conference on Mathematics of Program Construction, Lecture Notes in Computer Science
4014 (2006), pp. 433–454.
[34] Tafliovich, A. and E. C. Hehner, Programming with quantum communication, in: Seventh Workshop on
Quantitative Aspects of Programming Languages, Electronic Notes in Theoretical Computer Science
(2009).
[35] Valiron, B., Quantum typing, in: Proceedings of the 2nd International Workshop on Quantum
Programming Languages, number 33 in TUCS General Publications (2004), pp. 163–178.
[36] van Tonder, A., A lambda calculus for quantum computation, SIAM Journal on Computing 33 (2004),
pp. 1109–1135.
[37] Yimsiriwattana, A. and S. J. L. Jr, Distributed quantum computing: A distributed Shor algorithm,
arXiv:quant-ph/0403146 (2004).
[38] Zuliani, P., Non-deterministic quantum programming, in: Proceedings of the 2nd International
Workshop on Quantum Programming Languages, number 33 in TUCS General Publications (2004),
pp. 179–195.
[39] Zuliani, P., Compiling quantum programs, Acta Informatica 41 (2005), pp. 435–474.
A Quantum Computation
In this section we introduce the basic concepts of quantum mechanics, as they
pertain to the quantum systems that we will consider for quantum computation.
The discussion of the underlying physical processes, spin- 21 -particles, etc. is not
our interest. We are concerned with the model for quantum computation only. A
reader not familiar with quantum computing can consult [29] for a comprehensive
introduction to the field.
The Dirac notation, invented by Paul Dirac, is often used in quantum mechanics.
In this notation a vector v (a column vector by convention) is written inside a ket:
|vi. The dual vector of |vi is hv|, written inside a bra. The inner products are
bra-kets hv|wi. For n-dimensional vectors |ui and |vi and m-dimensional vector
|wi, the value of the inner product hu|vi is a scalar and the outer product operator
|vihw| corresponds to an m by n matrix. The Dirac notation clearly distinguishes
vectors from operators and scalars, and makes it possible to write operators directly
as combinations of bras and kets.
In quantum mechanics, the vector spaces of interest are the Hilbert spaces of
dimension 2n for some n ∈ N. A convenient orthonormal basis is what is called a
computational basis, in which we label 2n basis vectors using binary strings of length
n as follows: if s is an n-bit string which corresponds to the number xs , then |si is
a 2n -bit (column) vector with 1 in position xs and 0 everywhere else. The tensor
product |ii ⊗ |ji can be written simply as |iji. An arbitrary vector in a Hilbert
space can be written as a weighted sum of the computational basis vectors.
Postulate 1 (state space) Associated to any isolated physical system is a Hilbert
space, known as the state space of the system. The system is completely described
by its state vector, which is a unit vector in the system’s state space.
Postulate 2 (evolution) The evolution of a closed quantum system is described
by a unitary transformation.
18
Tafliovich
19
Tafliovich
20