A qua ntum -calculusprofs.sci.univr.it/~dipierro/InfQuant/Lezioni-extra/LezioneQuantum... · 1...
Transcript of A qua ntum -calculusprofs.sci.univr.it/~dipierro/InfQuant/Lezioni-extra/LezioneQuantum... · 1...
A quantum λ-calculus
(1/(31/2))|Margherita> + (1/(31/2)) |Zorzi>+
(1/(31/2))|Univr>
(Toward) Quantum programming languages
functional approach
imperative approach
very simple types systems
QRAM virtual hw model
linear + linear types systems
what kinds of virtual hw models?
Our computational approach
quantum data
classical control
+
qubits
(approach introduced by Selinger & valiron)
Quantum Bits
Quantum !–calculus and expressive completeness
Ugo Dal Lago Andrea Masini Margherita Zorzi
September 18, 2006
Abstract... bla bla bla Bleah....bb
1 Introduction
2 preliminari
C2
{|0!, |1!}
! = a|0! + b|1!
a, b " C
|a|2 + |b|2 = 1
3 The Q–calculus
Terms
The set of the term expressions, or terms for short, is defined by the followinggrammar:
x ::= v0, v1, . . . classical variablesr ::= r0, r1, . . . quantum variables" ::= x | #x1, . . . , xn! patternsB ::= 0 | 1 bitsU ::= U (n0)
0 , U (n1)1 , . . . unitary operators
C ::= B | U constantsM ::= x | r |!(M) | C | new(M) |
(M1)M2 | #M1, . . . , Mn! |#!x.M | #".M terms
1
Hilbert Space
Quantum !–calculus and expressive completeness
Ugo Dal Lago Andrea Masini Margherita Zorzi
September 18, 2006
Abstract
... bla bla bla Bleah....bb
1 Introduction
2 preliminari
! = a|0! + b|1!
a, b " C
|a|2 + |b|2 = 1
3 The Q–calculus
Terms
The set of the term expressions, or terms for short, is defined by the followinggrammar:
x ::= v0, v1, . . . classical variablesr ::= r0, r1, . . . quantum variables" ::= x | #x1, . . . , xn! patternsB ::= 0 | 1 bitsU ::= U (n0)
0 , U (n1)1 , . . . unitary operators
C ::= B | U constantsM ::= x | r |!(M) | C | new(M) |
(M1)M2 | #M1, . . . , Mn! |#!x.M | #".M terms
where n $ 2. We assume to work modulo variable renaming, i.e., terms areequivalence classes modulo $-conversion. Substitution up to $-equivalence isdefined in the usual way.
1
Quantum !–calculus and expressive completeness
Ugo Dal Lago Andrea Masini Margherita Zorzi
September 18, 2006
Abstract
... bla bla bla Bleah....bb
1 Introduction
2 preliminari
! = a|0! + b|1!
a, b " C
|a|2 + |b|2 = 1
3 The Q–calculus
Terms
The set of the term expressions, or terms for short, is defined by the followinggrammar:
x ::= v0, v1, . . . classical variablesr ::= r0, r1, . . . quantum variables" ::= x | #x1, . . . , xn! patternsB ::= 0 | 1 bitsU ::= U (n0)
0 , U (n1)1 , . . . unitary operators
C ::= B | U constantsM ::= x | r |!(M) | C | new(M) |
(M1)M2 | #M1, . . . , Mn! |#!x.M | #".M terms
where n $ 2. We assume to work modulo variable renaming, i.e., terms areequivalence classes modulo $-conversion. Substitution up to $-equivalence isdefined in the usual way.
1
Quantum !–calculus and expressive completeness
Ugo Dal Lago Andrea Masini Margherita Zorzi
September 18, 2006
Abstract
... bla bla bla Bleah....bb
1 Introduction
2 preliminari
! = a|0! + b|1!
a, b " C
|a|2 + |b|2 = 1
3 The Q–calculus
Terms
The set of the term expressions, or terms for short, is defined by the followinggrammar:
x ::= v0, v1, . . . classical variablesr ::= r0, r1, . . . quantum variables" ::= x | #x1, . . . , xn! patternsB ::= 0 | 1 bitsU ::= U (n0)
0 , U (n1)1 , . . . unitary operators
C ::= B | U constantsM ::= x | r |!(M) | C | new(M) |
(M1)M2 | #M1, . . . , Mn! |#!x.M | #".M terms
where n $ 2. We assume to work modulo variable renaming, i.e., terms areequivalence classes modulo $-conversion. Substitution up to $-equivalence isdefined in the usual way.
1
qbit
Quantum !–calculus and expressive completeness
Ugo Dal Lago Andrea Masini Margherita Zorzi
September 18, 2006
Abstract... bla bla bla Bleah....bb
1 Introduction
2 preliminari
C2
{|0!, |1!}
! = a|0! + b|1!
a, b " C
|a|2 + |b|2 = 1
3 The Q–calculus
Terms
The set of the term expressions, or terms for short, is defined by the followinggrammar:
x ::= v0, v1, . . . classical variablesr ::= r0, r1, . . . quantum variables" ::= x | #x1, . . . , xn! patternsB ::= 0 | 1 bitsU ::= U (n0)
0 , U (n1)1 , . . . unitary operators
C ::= B | U constantsM ::= x | r |!(M) | C | new(M) |
(M1)M2 | #M1, . . . , Mn! |#!x.M | #".M terms
1
orthonormal base
qbit 1qbit 0
Preservation of quantum world:
Reduction to classical world: measurement
Operations on Quantum Registers
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
3 The Q–calculus
Terms
The set of the term expressions, or terms for short, is defined by the followinggrammar:
x ::= v0, v1, . . . classical variablesr ::= r0, r1, . . . quantum variables! ::= x | $x1, . . . , xn! patternsB ::= 0 | 1 bitsU ::= U (n0)
0 , U (n1)1 , . . . unitary operators
C ::= B | U constantsM ::= x | r |!(M) | C | new(M) |
(M1)M2 | $M1, . . . , Mn! |"!x.M | "!.M terms
where n % 2. We assume to work modulo variable renaming, i.e., terms areequivalence classes modulo #-conversion. Substitution up to #-equivalence isdefined in the usual way.
2
Unitary Operator
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
2
collapsed state:
collapsed state:
output:
output:
From mathematics to computers:assigning names to qbits
Each qbit has a “location”, denoted by a name (quantum variable)
qbits are “stored” in a so called Quantum Register
r0
r1
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
3 The Q–calculus
Terms
The set of the term expressions, or terms for short, is defined by the followinggrammar:
x ::= v0, v1, . . . classical variablesr ::= r0, r1, . . . quantum variables! ::= x | #x1, . . . , xn! patternsB ::= 0 | 1 bitsU ::= U (n0)
0 , U (n1)1 , . . . unitary operators
C ::= B | U constantsM ::= x | r |!(M) | C | new(M) |
(M1)M2 | #M1, . . . , Mn! |"!x.M | "!.M terms
where n $ 2. We assume to work modulo variable renaming, i.e., terms areequivalence classes modulo #-conversion. Substitution up to #-equivalence isdefined in the usual way.
Judgements and Well Formed Terms
An environment ! is a (possibly empty) multiset " % # % $ where " is a(possibly empty) multiset !1, . . . ,!n of patterns and # is a (possibly empty)multiset !x1, . . . , !xn (where each xi is a classical variable), and $ is a (possibly
2
const! C
qp " varr ! r
classic " varx ! x
! ! Mweak
!, !x ! M
!, !x, !y ! Mcontr
!, !z ! M{z/x, z/y}
!! ! Mprom
!! !!M
!, x ! Mder
!, !x ! M
!, x1, . . . , xk ! MLtens
!, #x1, . . . , xk$ ! M
!1 ! M1 · · ·!k ! MkRtens
!1, . . . ,!k ! #M1, . . . , Mk$! ! M
new! ! new(M)
!,! ! M! I
! ! "!.M
!, !x ! M% I
! ! "!x.M
!1 ! M1 !2 ! M2app
!1,!2 ! (M1)M2
Well Formed Terms
Let us denote with Q(M1, . . . , Mk) the set of quantum variables occurring inM1, . . . , Mk. We say that a judgement ! ! M is well formed (notation: #! !M) if it is derivable by means of the well forming rules; with d # ! ! M wedenote that d is a derivation of the well formed judgement ! ! M .If ! ! M is well formed we say also that the term M is well formed with respectto the environment !. We say that a term M is well formed if the judgmentQ(M) ! M is well formed. Let us denote with WFT the set of well formedterms.
Proposition 1. If a term M is well formed then all the classical variables init are bounded.
3 Computations
A quantum variable set is a set of quantum variables. C is the space of com-plex numbers. Let V be a quantum variable set. By H(V) we denote the2n-dimensional Hilbert space generated by the set {0, 1}V , i.e.,
H(V) =!$ : {0, 1}V % C
"
equipped with the inner product
($,%) =#
X!{0,1}V
$(X)"%(X).
Q : ({r0, r1} % {0, 1}) % C
2
r0
r1
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
3 The Q–calculus
Terms
The set of the term expressions, or terms for short, is defined by the followinggrammar:
x ::= v0, v1, . . . classical variablesr ::= r0, r1, . . . quantum variables! ::= x | #x1, . . . , xn! patternsB ::= 0 | 1 bitsU ::= U (n0)
0 , U (n1)1 , . . . unitary operators
C ::= B | U constantsM ::= x | r |!(M) | C | new(M) |
(M1)M2 | #M1, . . . , Mn! |"!x.M | "!.M terms
where n $ 2. We assume to work modulo variable renaming, i.e., terms areequivalence classes modulo #-conversion. Substitution up to #-equivalence isdefined in the usual way.
Judgements and Well Formed Terms
An environment ! is a (possibly empty) multiset " % # % $ where " is a(possibly empty) multiset !1, . . . ,!n of patterns and # is a (possibly empty)multiset !x1, . . . , !xn (where each xi is a classical variable), and $ is a (possibly
2
!r0 !" 0r1 !" 0
"!" a
!r0 !" 0r1 !" 1
"!" b
!r0 !" 1r1 !" 0
"!" c
!r0 !" 1r1 !" 1
"!" d
U(r0)A standard basis for H(V) can be built as follows: for each X # {0, 1}V ,
define |X$ to be the a function from {0, 1}V to C defined as follows:
|X$(Y ) =!
1 if X=Y0 otherwise
The set #|X$ | X # {0, 1}V
$
is an orthonormal basis for H(V).
Configurations
A configuration is a triple [Q,QV,M ] where:• Q # H(QV);• QV is a quantum variable set such that Q(M) %fin QV;
Let C be the set of configurations.Let L = {Uq, new, l.!, q.!, c.!, l.cm, r.cm, ti}. The set L will be ranged over
by ", !, #. For each " # L , we can define a reduction relation "!% C & C byfollowing the rules in Figure 1 (it is immediate to verify that: (i) all the secondmembers of the pairs conclusion of rules are configurations; (ii) if [Q,QV,M ] # Cthen [Q,QV,$%.M ] # C). For any subset S of L , we can construct a relation"S by just taking the union over " # S of "!. In particular, " will denote"L . The usual notation for the transitive and reflexive closures will be used.In particular, !" will denote the transitive and reflexive closure of ".
Lemma 11. If ! ' M is well-formed and [Q,QV,M ] !" [Q",QV ",M "] thenQV % QV ".
Lemma 12 (Substitution Lemma (linear case)). For each derivation d1, d2, ifd1 & !1, x ' M and d2 & !2 ' N , then &!1,!2 ' M [N/x].
d1 & !1, x ' M and d2 & !2 ' N ( &!1,!2 ' M [N/x].
Proof. The proof is by induction on the height of d1 and by cases on the lastrule. Let r be the last rule of d1.
1. r is either const, or qp–var, or classical–var : trivial;
7
!r0 !" 0r1 !" 0
"!" a
!r0 !" 0r1 !" 1
"!" b
!r0 !" 1r1 !" 0
"!" c
!r0 !" 1r1 !" 1
"!" d
a|r0 !" 0, r1 !" 0# + b|r0 !" 0, r1 !" 1# + c|r0 !" 1, r1 !" 0# + d|r0 !" 1, r1 !" 1#
U(r0)A standard basis for H(V) can be built as follows: for each X $ {0, 1}V ,
define |X# to be the a function from {0, 1}V to C defined as follows:
|X#(Y ) =!
1 if X=Y0 otherwise
The set #|X# | X $ {0, 1}V
$
is an orthonormal basis for H(V).
Configurations
A configuration is a triple [Q,QV,M ] where:• Q $ H(QV);• QV is a quantum variable set such that Q(M) %fin QV;
Let C be the set of configurations.Let L = {Uq, new, l.!, q.!, c.!, l.cm, r.cm, ti}. The set L will be ranged over
by ", !, #. For each " $ L , we can define a reduction relation "!% C & C byfollowing the rules in Figure 1 (it is immediate to verify that: (i) all the secondmembers of the pairs conclusion of rules are configurations; (ii) if [Q,QV,M ] $ Cthen [Q,QV,$%.M ] $ C). For any subset S of L , we can construct a relation"S by just taking the union over " $ S of "!. In particular, " will denote"L . The usual notation for the transitive and reflexive closures will be used.In particular, !" will denote the transitive and reflexive closure of ".
Lemma 11. If ! ' M is well-formed and [Q,QV,M ] !" [Q",QV ",M "] thenQV % QV ".
Lemma 12 (Substitution Lemma (linear case)). For each derivation d1, d2, ifd1 & !1, x ' M and d2 & !2 ' N , then &!1,!2 ' M [N/x].
d1 & !1, x ' M and d2 & !2 ' N ( &!1,!2 ' M [N/x].
Proof. The proof is by induction on the height of d1 and by cases on the lastrule. Let r be the last rule of d1.
7
Quantum Register
quantum computeraction:apply U
!r0 !" 0r1 !" 0
"!" c0
!r0 !" 0r1 !" 1
"!" c1
!r0 !" 1r1 !" 0
"!" c2
!r0 !" 1r1 !" 1
"!" c3
U(r0)A standard basis for H(V) can be built as follows: for each X # {0, 1}V ,
define |X$ to be the a function from {0, 1}V to C defined as follows:
|X$(Y ) =#
1 if X=Y0 otherwise
The set $|X$ | X # {0, 1}V
%
is an orthonormal basis for H(V).
Configurations
A configuration is a triple [Q,QV,M ] where:• Q # H(QV);• QV is a quantum variable set such that Q(M) %fin QV;
Let C be the set of configurations.Let L = {Uq, new, l.!, q.!, c.!, l.cm, r.cm, ti}. The set L will be ranged over
by ", !, #. For each " # L , we can define a reduction relation "!% C & C byfollowing the rules in Figure 1 (it is immediate to verify that: (i) all the secondmembers of the pairs conclusion of rules are configurations; (ii) if [Q,QV,M ] # Cthen [Q,QV,$%.M ] # C). For any subset S of L , we can construct a relation"S by just taking the union over " # S of "!. In particular, " will denote"L . The usual notation for the transitive and reflexive closures will be used.In particular, !" will denote the transitive and reflexive closure of ".
Lemma 2. If ! ' M is well-formed and [Q,QV,M ] !" [Q",QV ",M "] thenQV % QV ".
Lemma 3 (Substitution Lemma (linear case)). For each derivation d1, d2, ifd1 & !1, x ' M and d2 & !2 ' N , then &!1,!2 ' M [N/x].
d1 & !1, x ' M and d2 & !2 ' N ( &!1,!2 ' M [N/x].
Proof. The proof is by induction on the height of d1 and by cases on the lastrule. Let r be the last rule of d1.
1. r is either const, or qp–var, or classical–var : trivial;
3
programming languagestatement:
r0
r1Definition 10. Given H(V) V ! = {xi0 , . . . , xik} ! V, and a unitary operatorU : H(V !) " H(V !), with UV! we denote the unitary operator U # I of H(V !)#H(V $ V !).
|u% = a|00% + b|01% + c|10% + d|11%————————————A quantum variable set is a set of quantum variables. C is the space of
complex numbers.By H(V) we denote the 2n-dimensional Hilbert space generated by {0, 1}V
equipped with the inner product
(!,") =!
X"{0,1}V
!(X)#"(X).
The orhonormal base of H(V) is given by the set {|f% : f & {0, 1}V} ' H(V)where|f%(g) =
"1 if f = g0 if f (= g
Let V ! ) V !! = *, the tensor product of H(V !),H(V !!) is defined as
H(V !) #H(V !!) = {! # " : ! & H(V !)," & H(V !!)}
where
#
$%f1 +" c1
...f2n$1 +" c2n$1
&
'(#
#
$%g1 +" d1
...g2m$1 +" d2m$1
&
'( =
#
$$$$$$$$%
f1 # g1 +" c1d1...f1 # g2m$1 +" c1d2m$1
f2 # g1 +" c2d1...f2n$1 # g2m$1 +" c2nd2m$1
&
''''''''(
and
fi # gj(x) ="
fi(x) if x & V !
gj(x) if x & V !!
The # operator (for spaces and vectors) has the usual properties of Hilbertspaces tensor.
We write |f1, . . . , fs% and |f1% . . . |fs% for |f1% # . . . # |fs%.A quantum variable set is a set of quantum variables. C is the space of
complex numbers. Let V be a quantum variable set. By H(V) we denote the2n-dimensional Hilbert space generated by the orthonormal base {0, 1}V , i.e.,
H(V) =)! : {0, 1}V " C
*
equipped with the inner product
(!,") =!
X"{0,1}V
!(X)#"(X).
5
!r0 !" 0r1 !" 0
"!" a
!r0 !" 0r1 !" 1
"!" b
!r0 !" 1r1 !" 0
"!" c
!r0 !" 1r1 !" 1
"!" d
U(r0)A standard basis for H(V) can be built as follows: for each X # {0, 1}V ,
define |X$ to be the a function from {0, 1}V to C defined as follows:
|X$(Y ) =!
1 if X=Y0 otherwise
The set #|X$ | X # {0, 1}V
$
is an orthonormal basis for H(V).
Configurations
A configuration is a triple [Q,QV,M ] where:• Q # H(QV);• QV is a quantum variable set such that Q(M) %fin QV;
Let C be the set of configurations.Let L = {Uq, new, l.!, q.!, c.!, l.cm, r.cm, ti}. The set L will be ranged over
by ", !, #. For each " # L , we can define a reduction relation "!% C & C byfollowing the rules in Figure 1 (it is immediate to verify that: (i) all the secondmembers of the pairs conclusion of rules are configurations; (ii) if [Q,QV,M ] # Cthen [Q,QV,$%.M ] # C). For any subset S of L , we can construct a relation"S by just taking the union over " # S of "!. In particular, " will denote"L . The usual notation for the transitive and reflexive closures will be used.In particular, !" will denote the transitive and reflexive closure of ".
Lemma 11. If ! ' M is well-formed and [Q,QV,M ] !" [Q",QV ",M "] thenQV % QV ".
Lemma 12 (Substitution Lemma (linear case)). For each derivation d1, d2, ifd1 & !1, x ' M and d2 & !2 ' N , then &!1,!2 ' M [N/x].
d1 & !1, x ' M and d2 & !2 ' N ( &!1,!2 ' M [N/x].
Proof. The proof is by induction on the height of d1 and by cases on the lastrule. Let r be the last rule of d1.
1. r is either const, or qp–var, or classical–var : trivial;
7
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
x0 x1 xn!1
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
x0 x1 xn!1
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
x0 x1 xn!1
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
x0 x1 xn!1
2
Quantum Circuits
UNITARYOPERATOR
U
n-qbits quantum register
n-qbits quantum register
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
3 The Q–calculus
Terms
The set of the term expressions, or terms for short, is defined by the followinggrammar:
x ::= v0, v1, . . . classical variablesr ::= r0, r1, . . . quantum variables! ::= x | $x1, . . . , xn! patternsB ::= 0 | 1 bitsU ::= U (n0)
0 , U (n1)1 , . . . unitary operators
C ::= B | U constantsM ::= x | r |!(M) | C | new(M) |
(M1)M2 | $M1, . . . , Mn! |"!x.M | "!.M terms
where n % 2. We assume to work modulo variable renaming, i.e., terms areequivalence classes modulo #-conversion. Substitution up to #-equivalence isdefined in the usual way.
Judgements and Well Formed Terms
An environment ! is a (possibly empty) multiset " & # & $ where " is a(possibly empty) multiset !1, . . . ,!n of patterns and # is a (possibly empty)
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
2
|000! =
!
"""""#
100...0
$
%%%%%&|001! =
!
"""""#
010...0
$
%%%%%&. . . |111! =
!
"""""#
000...1
$
%%%%%&
u = a|00! + b|01! + c|10! + d|11!
(W " P )(u " v) = (Wu) " (Pv)
(U " I)(a|00! + b|01! + c|10! + d|11!) =a(U |0!) " |0! + b(U |0!) " |1! + c(U |1!) " |0! + d(U |1!) " |1!
U : H({x0, . . . , xn!1}) # H({x0, . . . , xn!1})
Q U(Q)
U : C2n
# C2n
u = a|00! + b|01! + c|10! + d|11!
meas(u)
0
|a|2 + |b|2
a|00! + b|01!(|a|2 + |b|2)1/2
1
|c|2 + |d|2
c|10! + d|11!(|c|2 + |d|2)1/2
2
x0 x1 xn!1
...
3 The Q–calculus
Terms
The set of the term expressions, or terms for short, is defined by the followinggrammar:
x ::= v0, v1, . . . classical variablesr ::= r0, r1, . . . quantum variables! ::= x | !x1, . . . , xn" patternsB ::= 0 | 1 bitsU ::= U (n0)
0 , U (n1)1 , . . . unitary operators
C ::= B | U constantsM ::= x | r |!(M) | C | new(M) |
(M1)M2 | !M1, . . . , Mn" |"!x.M | "!.M terms
where n # 2. We assume to work modulo variable renaming, i.e., terms areequivalence classes modulo #-conversion. Substitution up to #-equivalence isdefined in the usual way.
Judgements and Well Formed Terms
An environment ! is a (possibly empty) multiset " $ # $ $ where " is a(possibly empty) multiset !1, . . . ,!n of patterns and # is a (possibly empty)multiset !x1, . . . , !xn (where each xi is a classical variable), and $ is a (possiblyempty) multiset of quantum variables such that if ri, rj % $ then i &= j. Werequire that each variable name occurs at most once in !.
A judgment is an expression ! ' M , where ! is an environment and M isa term. With !! we denote either an empty environment or an environment ofthe shape !x1, . . . , !xn
Well Formed Terms
Let us denote with Q(M1, . . . , Mk) the set of quantum variables occurring inM1, . . . , Mk. We say that a judgement ! ' M is well formed (notation: $! 'M) if it is derivable by means of the well forming rules; with d $ ! ' M wedenote that d is a derivation of the well formed judgement ! ' M .If ! ' M is well formed we say also that the term M is well formed with respectto the environment !. We say that a term M is well formed if the judgment
3
x0 x1 xn!1
...
3 The Q–calculus
Terms
The set of the term expressions, or terms for short, is defined by the followinggrammar:
x ::= v0, v1, . . . classical variablesr ::= r0, r1, . . . quantum variables! ::= x | !x1, . . . , xn" patternsB ::= 0 | 1 bitsU ::= U (n0)
0 , U (n1)1 , . . . unitary operators
C ::= B | U constantsM ::= x | r |!(M) | C | new(M) |
(M1)M2 | !M1, . . . , Mn" |"!x.M | "!.M terms
where n # 2. We assume to work modulo variable renaming, i.e., terms areequivalence classes modulo #-conversion. Substitution up to #-equivalence isdefined in the usual way.
Judgements and Well Formed Terms
An environment ! is a (possibly empty) multiset " $ # $ $ where " is a(possibly empty) multiset !1, . . . ,!n of patterns and # is a (possibly empty)multiset !x1, . . . , !xn (where each xi is a classical variable), and $ is a (possiblyempty) multiset of quantum variables such that if ri, rj % $ then i &= j. Werequire that each variable name occurs at most once in !.
A judgment is an expression ! ' M , where ! is an environment and M isa term. With !! we denote either an empty environment or an environment ofthe shape !x1, . . . , !xn
Well Formed Terms
Let us denote with Q(M1, . . . , Mk) the set of quantum variables occurring inM1, . . . , Mk. We say that a judgement ! ' M is well formed (notation: $! 'M) if it is derivable by means of the well forming rules; with d $ ! ' M wedenote that d is a derivation of the well formed judgement ! ' M .If ! ' M is well formed we say also that the term M is well formed with respectto the environment !. We say that a term M is well formed if the judgment
3
The Lambda Calculus
Definition
All computable (partial recursive) functions can be represented in the lambda calculus
The Lambda Calculus
Beta-reduction
formal parameter
body of the function
substitution
quantum register
(λ!x.M)!N
unitary operators
The Architecture
Directives
Classical λ evaluator+
directives sender
Quantum “Server”
Evaluation of new(c) and U<r1,...,rk> causes the dispatch of a directive Directives:
- add a qbit to the quantum register- apply an unitary operator U to the quantum register
Q: a quantum lambda calculus
Terms
x0 x1 xn!1
...
3 The Q–calculus
Terms
The set of the term expressions, or terms for short, is defined by the followinggrammar:
x ::= v0, v1, . . . classical variables
r ::= r0, r1, . . . quantum variables
! ::= x | !x1, . . . , xn" patterns
B ::= 0 | 1 bits
U ::= U (n0)0 , U (n1)
1 , . . . unitary operators
C ::= B | U constants
M ::= x | r |!(M) | C | new(M) |
(M1)M2 | !M1, . . . , Mn" |
"!x.M | "!.M terms
where n # 2. We assume to work modulo variable renaming, i.e., terms areequivalence classes modulo #-conversion. Substitution up to #-equivalence isdefined in the usual way.
Judgements and Well Formed Terms
An environment ! is a (possibly empty) multiset " $ # $ $ where " is a(possibly empty) multiset !1, . . . ,!n of patterns and # is a (possibly empty)multiset !x1, . . . , !xn (where each xi is a classical variable), and $ is a (possiblyempty) multiset of quantum variables such that if ri, rj % $ then i &= j. Werequire that each variable name occurs at most once in !.
A judgment is an expression ! ' M , where ! is an environment and M isa term. With !! we denote either an empty environment or an environment ofthe shape !x1, . . . , !xn
3
Quantum Lambda Calculi with Classical Control: Syntax and Expressive Power 11
• The term constructor new(·) creates a new qubit when applied to a boolean constant.The rest of the calculus is a standard linear lambda calculus, similar to the one intro-duced in (?). Patterns (and, consequently, lambda abstractions) can only refer to classicalvariables.
There is not any measurement operator in the language. We will comment on that inSection 8.
3.4. Judgements and Well–Formed Terms
Judgements are built on the basis of the notion of environment that take of the way thevariables are used.
A classic environment is a (possibly empty) set (denoted by !, eventually indexed) ofclassical variables.With !! we denote the environment !x1, . . . , !xn whenever ! is x1, . . . , xn; if ! is empty!! is empty.
A quantum environment is a (possibly empty) set (denoted by ", eventually indexed)of quantum variables.
A linear environment is (possibly empty) set (denoted by #, eventually indexed) !,"of classic and quantum variables.
An environment (denoted by $, eventually indexed) is a (possibly empty) set #, !!where each variable name occurs at most once.
A judgment is an expression $ ! M , where $ is an environment and M is a term.
const!! ! C
q–var!!, r ! r
classic-var!!, x ! x
der!!, !x ! x
!! ! Mprom
!! !!M
"1, !! ! M1 "2, !! ! M2app
"1, "2, !! ! (M1)M2
"1, !! ! M1 · · · "k, !! ! Mktens
"1, . . . , "k, !! ! "M1, . . . , Mk## ! M
new# ! new(M)
#, x1, . . . , xn ! M!1
# ! !"x1, . . . , xn#.M
#, x ! M!2
# ! !x.M
#, !x ! M$
# ! !!x.M
Fig. 1. Well Forming Rules
We say that a judgement $ ! M is well formed (notation: ! $ ! M) if it is derivableby means of the well forming rules in Figure 1. The rules app and tens are subject tothe constraint that for each i "= j #i # #j = $. With d ! $ ! M we denote that d is aderivation of the well formed judgement $ ! M . If $ ! M is well formed we say also thatthe term M is well formed with respect to the environment $. We say that a term M iswell formed if the judgment Q(M) ! M is well formed.
Proposition 1. If a term M is well formed then all the classical variables in it arebounded.
axioms
Quantum Lambda Calculi with Classical Control: Syntax and Expressive Power 11
• The term constructor new(·) creates a new qubit when applied to a boolean constant.The rest of the calculus is a standard linear lambda calculus, similar to the one intro-duced in (?). Patterns (and, consequently, lambda abstractions) can only refer to classicalvariables.
There is not any measurement operator in the language. We will comment on that inSection 8.
3.4. Judgements and Well–Formed Terms
Judgements are built on the basis of the notion of environment that take of the way thevariables are used.
A classic environment is a (possibly empty) set (denoted by !, eventually indexed) ofclassical variables.With !! we denote the environment !x1, . . . , !xn whenever ! is x1, . . . , xn; if ! is empty!! is empty.
A quantum environment is a (possibly empty) set (denoted by ", eventually indexed)of quantum variables.
A linear environment is (possibly empty) set (denoted by #, eventually indexed) !,"of classic and quantum variables.
An environment (denoted by $, eventually indexed) is a (possibly empty) set #, !!where each variable name occurs at most once.
A judgment is an expression $ ! M , where $ is an environment and M is a term.
const!! ! C
q–var!!, r ! r
classic-var!!, x ! x
der!!, !x ! x
!! ! Mprom
!! !!M
"1, !! ! M1 "2, !! ! M2app
"1, "2, !! ! (M1)M2
"1, !! ! M1 · · · "k, !! ! Mktens
"1, . . . , "k, !! ! "M1, . . . , Mk## ! M
new# ! new(M)
#, x1, . . . , xn ! M!1
# ! !"x1, . . . , xn#.M
#, x ! M!2
# ! !x.M
#, !x ! M$
# ! !!x.M
Fig. 1. Well Forming Rules
We say that a judgement $ ! M is well formed (notation: ! $ ! M) if it is derivableby means of the well forming rules in Figure 1. The rules app and tens are subject tothe constraint that for each i "= j #i # #j = $. With d ! $ ! M we denote that d is aderivation of the well formed judgement $ ! M . If $ ! M is well formed we say also thatthe term M is well formed with respect to the environment $. We say that a term M iswell formed if the judgment Q(M) ! M is well formed.
Proposition 1. If a term M is well formed then all the classical variables in it arebounded.
news
Quantum Lambda Calculi with Classical Control: Syntax and Expressive Power 11
• The term constructor new(·) creates a new qubit when applied to a boolean constant.The rest of the calculus is a standard linear lambda calculus, similar to the one intro-duced in (?). Patterns (and, consequently, lambda abstractions) can only refer to classicalvariables.
There is not any measurement operator in the language. We will comment on that inSection 8.
3.4. Judgements and Well–Formed Terms
Judgements are built on the basis of the notion of environment that take of the way thevariables are used.
A classic environment is a (possibly empty) set (denoted by !, eventually indexed) ofclassical variables.With !! we denote the environment !x1, . . . , !xn whenever ! is x1, . . . , xn; if ! is empty!! is empty.
A quantum environment is a (possibly empty) set (denoted by ", eventually indexed)of quantum variables.
A linear environment is (possibly empty) set (denoted by #, eventually indexed) !,"of classic and quantum variables.
An environment (denoted by $, eventually indexed) is a (possibly empty) set #, !!where each variable name occurs at most once.
A judgment is an expression $ ! M , where $ is an environment and M is a term.
const!! ! C
q–var!!, r ! r
classic-var!!, x ! x
der!!, !x ! x
!! ! Mprom
!! !!M
"1, !! ! M1 "2, !! ! M2app
"1, "2, !! ! (M1)M2
"1, !! ! M1 · · · "k, !! ! Mktens
"1, . . . , "k, !! ! "M1, . . . , Mk## ! M
new# ! new(M)
#, x1, . . . , xn ! M!1
# ! !"x1, . . . , xn#.M
#, x ! M!2
# ! !x.M
#, !x ! M$
# ! !!x.M
Fig. 1. Well Forming Rules
We say that a judgement $ ! M is well formed (notation: ! $ ! M) if it is derivableby means of the well forming rules in Figure 1. The rules app and tens are subject tothe constraint that for each i "= j #i # #j = $. With d ! $ ! M we denote that d is aderivation of the well formed judgement $ ! M . If $ ! M is well formed we say also thatthe term M is well formed with respect to the environment $. We say that a term M iswell formed if the judgment Q(M) ! M is well formed.
Proposition 1. If a term M is well formed then all the classical variables in it arebounded.
abstractions
Quantum Lambda Calculi with Classical Control: Syntax and Expressive Power 11
• The term constructor new(·) creates a new qubit when applied to a boolean constant.The rest of the calculus is a standard linear lambda calculus, similar to the one intro-duced in (?). Patterns (and, consequently, lambda abstractions) can only refer to classicalvariables.
There is not any measurement operator in the language. We will comment on that inSection 8.
3.4. Judgements and Well–Formed Terms
Judgements are built on the basis of the notion of environment that take of the way thevariables are used.
A classic environment is a (possibly empty) set (denoted by !, eventually indexed) ofclassical variables.With !! we denote the environment !x1, . . . , !xn whenever ! is x1, . . . , xn; if ! is empty!! is empty.
A quantum environment is a (possibly empty) set (denoted by ", eventually indexed)of quantum variables.
A linear environment is (possibly empty) set (denoted by #, eventually indexed) !,"of classic and quantum variables.
An environment (denoted by $, eventually indexed) is a (possibly empty) set #, !!where each variable name occurs at most once.
A judgment is an expression $ ! M , where $ is an environment and M is a term.
const!! ! C
q–var!!, r ! r
classic-var!!, x ! x
der!!, !x ! x
!! ! Mprom
!! !!M
"1, !! ! M1 "2, !! ! M2app
"1, "2, !! ! (M1)M2
"1, !! ! M1 · · · "k, !! ! Mktens
"1, . . . , "k, !! ! "M1, . . . , Mk## ! M
new# ! new(M)
#, x1, . . . , xn ! M!1
# ! !"x1, . . . , xn#.M
#, x ! M!2
# ! !x.M
#, !x ! M$
# ! !!x.M
Fig. 1. Well Forming Rules
We say that a judgement $ ! M is well formed (notation: ! $ ! M) if it is derivableby means of the well forming rules in Figure 1. The rules app and tens are subject tothe constraint that for each i "= j #i # #j = $. With d ! $ ! M we denote that d is aderivation of the well formed judgement $ ! M . If $ ! M is well formed we say also thatthe term M is well formed with respect to the environment $. We say that a term M iswell formed if the judgment Q(M) ! M is well formed.
Proposition 1. If a term M is well formed then all the classical variables in it arebounded.
application
promotiontensor
Quantum Lambda Calculi with Classical Control: Syntax and Expressive Power 11
• The term constructor new(·) creates a new qubit when applied to a boolean constant.The rest of the calculus is a standard linear lambda calculus, similar to the one intro-duced in (?). Patterns (and, consequently, lambda abstractions) can only refer to classicalvariables.
There is not any measurement operator in the language. We will comment on that inSection 8.
3.4. Judgements and Well–Formed Terms
Judgements are built on the basis of the notion of environment that take of the way thevariables are used.
A classic environment is a (possibly empty) set (denoted by !, eventually indexed) ofclassical variables.With !! we denote the environment !x1, . . . , !xn whenever ! is x1, . . . , xn; if ! is empty!! is empty.
A quantum environment is a (possibly empty) set (denoted by ", eventually indexed)of quantum variables.
A linear environment is (possibly empty) set (denoted by #, eventually indexed) !,"of classic and quantum variables.
An environment (denoted by $, eventually indexed) is a (possibly empty) set #, !!where each variable name occurs at most once.
A judgment is an expression $ ! M , where $ is an environment and M is a term.
const!! ! C
q–var!!, r ! r
classic-var!!, x ! x
der!!, !x ! x
!! ! Mprom
!! !!M
"1, !! ! M1 "2, !! ! M2app
"1, "2, !! ! (M1)M2
"1, !! ! M1 · · · "k, !! ! Mktens
"1, . . . , "k, !! ! "M1, . . . , Mk## ! M
new# ! new(M)
#, x1, . . . , xn ! M!1
# ! !"x1, . . . , xn#.M
#, x ! M!2
# ! !x.M
#, !x ! M$
# ! !!x.M
Fig. 1. Well Forming Rules
We say that a judgement $ ! M is well formed (notation: ! $ ! M) if it is derivableby means of the well forming rules in Figure 1. The rules app and tens are subject tothe constraint that for each i "= j #i # #j = $. With d ! $ ! M we denote that d is aderivation of the well formed judgement $ ! M . If $ ! M is well formed we say also thatthe term M is well formed with respect to the environment $. We say that a term M iswell formed if the judgment Q(M) ! M is well formed.
Proposition 1. If a term M is well formed then all the classical variables in it arebounded.
Quantum Lambda Calculi with Classical Control: Syntax and Expressive Power 11
• The term constructor new(·) creates a new qubit when applied to a boolean constant.The rest of the calculus is a standard linear lambda calculus, similar to the one intro-duced in (?). Patterns (and, consequently, lambda abstractions) can only refer to classicalvariables.
There is not any measurement operator in the language. We will comment on that inSection 8.
3.4. Judgements and Well–Formed Terms
Judgements are built on the basis of the notion of environment that take of the way thevariables are used.
A classic environment is a (possibly empty) set (denoted by !, eventually indexed) ofclassical variables.With !! we denote the environment !x1, . . . , !xn whenever ! is x1, . . . , xn; if ! is empty!! is empty.
A quantum environment is a (possibly empty) set (denoted by ", eventually indexed)of quantum variables.
A linear environment is (possibly empty) set (denoted by #, eventually indexed) !,"of classic and quantum variables.
An environment (denoted by $, eventually indexed) is a (possibly empty) set #, !!where each variable name occurs at most once.
A judgment is an expression $ ! M , where $ is an environment and M is a term.
const!! ! C
q–var!!, r ! r
classic-var!!, x ! x
der!!, !x ! x
!! ! Mprom
!! !!M
"1, !! ! M1 "2, !! ! M2app
"1, "2, !! ! (M1)M2
"1, !! ! M1 · · · "k, !! ! Mktens
"1, . . . , "k, !! ! "M1, . . . , Mk## ! M
new# ! new(M)
#, x1, . . . , xn ! M!1
# ! !"x1, . . . , xn#.M
#, x ! M!2
# ! !x.M
#, !x ! M$
# ! !!x.M
Fig. 1. Well Forming Rules
We say that a judgement $ ! M is well formed (notation: ! $ ! M) if it is derivableby means of the well forming rules in Figure 1. The rules app and tens are subject tothe constraint that for each i "= j #i # #j = $. With d ! $ ! M we denote that d is aderivation of the well formed judgement $ ! M . If $ ! M is well formed we say also thatthe term M is well formed with respect to the environment $. We say that a term M iswell formed if the judgment Q(M) ! M is well formed.
Proposition 1. If a term M is well formed then all the classical variables in it arebounded.
Well Forming Rules
A standard basis for H(V) can be built as follows: for each X ! {0, 1}V , define|X" to be the a function from {0, 1}V to C defined as follows:
|X"(Y ) =!
1 if X=Y0 otherwise
The set "|X" | X ! {0, 1}V
#
is an orthonormal basis for H(V).
Configurations
A configuration is a triple [Q,QV,M ] where:• Q ! H(QV);• QV is a quantum variable set such that Q(M) #fin QV;
Let C be the set of configurations.Let L = {Uq, new, l.!, q.!, c.!, l.cm, r.cm, ti}. The set L will be ranged over
by ", !, #. For each " ! L , we can define a reduction relation $!# C % C byfollowing the rules in Figure 1 (it is immediate to verify that: (i) all the secondmembers of the pairs conclusion of rules are configurations; (ii) if [Q,QV,M ] ! Cthen [Q,QV,$%.M ] ! C). For any subset S of L , we can construct a relation$S by just taking the union over " ! S of $!. In particular, $ will denote$L . The usual notation for the transitive and reflexive closures will be used.In particular, !$ will denote the transitive and reflexive closure of $.
Lemma 2. If ! & M is well-formed and [Q,QV,M ] !$ [Q",QV ",M "] thenQV # QV ".
Lemma 3 (Substitution Lemma (linear case)). For each derivation d1, d2, ifd1 & !1, x & M and d2 & !2 & N , then & !1,!2 & M [N/x].
Proof. The proof is by induction on the height of d1 and by cases on the lastrule. Let r be the last rule of d1.
1. r is either const, or qp–var, or classical–var : trivial;
2. r is!1, x & M
weak!1, !y, x & M
. By IH we have: & !1,!2 & M [N/x], and by means
of weak, & !1,!2, !y & M [N/x]
3. r is!1, x, y & M
der!1, x, !y & M
. By IH we have: & !1,!2, y & M [N/x], and by means
der : & !1,!2, !y & M [N/x]
4. r is!1, x, !u, !y & M
contr!1, x, !z & M [z/u, z/y]
. By IH we have: & !1,!2, !u, !y & M [N/x]
and by means of contr : & !1,!2, !z & M [N/x][z/u, z/y]
3
Configuration
quantum register
set of quantum variables
λ-term
!r0 !" 0r1 !" 0
"!" a
!r0 !" 0r1 !" 1
"!" b
!r0 !" 1r1 !" 0
"!" c
!r0 !" 1r1 !" 1
"!" d
a|r0 !" 0, r1 !" 0# + b|r0 !" 0, r1 !" 1# + c|r0 !" 1, r1 !" 0# + d|r0 !" 1, r1 !" 1#
U(r0)A standard basis for H(V) can be built as follows: for each X $ {0, 1}V ,
define |X# to be the a function from {0, 1}V to C defined as follows:
|X#(Y ) =!
1 if X=Y0 otherwise
The set #|X# | X $ {0, 1}V
$
is an orthonormal basis for H(V).
Configurations
A configuration is a triple [Q,QV,M ] where:• Q $ H(QV);• QV is a quantum variable set such that Q(M) %fin QV;
Let C be the set of configurations.Let L = {Uq, new, l.!, q.!, c.!, l.cm, r.cm, ti}. The set L will be ranged over
by ", !, #. For each " $ L , we can define a reduction relation "!% C & C byfollowing the rules in Figure 1 (it is immediate to verify that: (i) all the secondmembers of the pairs conclusion of rules are configurations; (ii) if [Q,QV,M ] $ Cthen [Q,QV,$%.M ] $ C). For any subset S of L , we can construct a relation"S by just taking the union over " $ S of "!. In particular, " will denote"L . The usual notation for the transitive and reflexive closures will be used.In particular, !" will denote the transitive and reflexive closure of ".
9
do not evaluate under the scope of a bang !
ß reductions:
Evaluation
[Q,QV,Mi] !! [Q!,QV !,M !i ] [Q,QV, "M1, . . . , Mi, . . . ,Mk#] $ C
[Q,QV, , "M1, . . . ,Mi, . . . , Mk#] !! [Q!,QV !, , "M1, . . . ,M!i , . . . , Mk#]
[Q,QV, N ] !! [Q!,QV !, N !] [Q,QV, MN ] $ C
[Q,QV,MN ] !! [Q!,QV !,MN !]
[Q,QV,M ] !! [Q!,QV !,M !] [Q,QV, MN ] $ C
[Q,QV,MN ] !! [Q!,QV !,M !N ]
[Q,QV,M ] !! [Q!,QV !,M !]
[Q,QV, (!".M)] !! [Q!,QV !, (!".M !)]
[Q,QV, Un"ri1 , ..., rin#] $ C[Q,QV, Un"ri1 , ..., rin#] !Uq [Uri1 ,...,rin
Q,QV, "ri1 , ..., rin#]
[Q,QV,L, new(c)] $ C p is fresh
[Q,QV, new(c)] !new [Q% |p & c#,QV ' {p}, p]
[Q,QV, (!x.M)N ] $ C[Q,QV, (!x.M)N ] !l." [Q,QV,M{N/x}]
[Q,QV, (!"x1, . . . , xn#.M)"r1, . . . , rn#] $ C[Q,QV, (!"x1, . . . , xn#.M)"r1, . . . , rn#] !q." [Q,QV,M{r1/x1, . . . , rn/xn}]
[Q,QV, (!!x.M)!N ] $ C[Q,QV, (!!x.M)!N ] !c." [Q,QV,M{N/x}]
[Q,QV, L((!p.M)N)] $ C[Q,QV, L((!".M)N)] !l.cm [Q,QV, (!".LM)N ]
[Q,QV, ((!p.M)N)L] $ C
[Q,QV, ((!".M)N)L] !r.cm [Q,QV, (!".ML)N ]
Figure 1: Reduction rules.
10
contextual closure
commutative rules
directives:
[Q,QV,Mi] !! [Q!,QV !,M !i ] [Q,QV, "M1, . . . , Mi, . . . ,Mk#] $ C
[Q,QV, , "M1, . . . ,Mi, . . . , Mk#] !! [Q!,QV !, , "M1, . . . ,M!i , . . . , Mk#]
[Q,QV, N ] !! [Q!,QV !, N !] [Q,QV, MN ] $ C
[Q,QV,MN ] !! [Q!,QV !,MN !]
[Q,QV,M ] !! [Q!,QV !,M !] [Q,QV, MN ] $ C
[Q,QV,MN ] !! [Q!,QV !,M !N ]
[Q,QV,M ] !! [Q!,QV !,M !]
[Q,QV, (!".M)] !! [Q!,QV !, (!".M !)]
[Q,QV, Un"ri1 , ..., rin#] $ C[Q,QV, Un"ri1 , ..., rin#] !Uq [Uri1 ,...,rin
Q,QV, "ri1 , ..., rin#]
[Q,QV, new(c)] $ C p is fresh
[Q,QV, new(c)] !new [Q% |p &! c#,QV ' {p}, p]
[Q,QV, (!x.M)N ] $ C[Q,QV, (!x.M)N ] !l." [Q,QV,M{N/x}]
[Q,QV, (!"x1, . . . , xn#.M)"r1, . . . , rn#] $ C[Q,QV, (!"x1, . . . , xn#.M)"r1, . . . , rn#] !q." [Q,QV,M{r1/x1, . . . , rn/xn}]
[Q,QV, (!!x.M)!N ] $ C[Q,QV, (!!x.M)!N ] !c." [Q,QV,M{N/x}]
[Q,QV, L((!p.M)N)] $ C[Q,QV, L((!".M)N)] !l.cm [Q,QV, (!".LM)N ]
[Q,QV, ((!p.M)N)L] $ C
[Q,QV, ((!".M)N)L] !r.cm [Q,QV, (!".ML)N ]
Figure 1: Reduction rules.
10
[1, !, (!!x.Cnot"x, x#)!(new(1))]$[1, !, Cnot"new(1), new(1)#]$[|p %$ 1#, {p}, Cnot"p, new(1)#]$[|p %$ 1# & |q %$ 1#, {p, q}, Cnot"p, q#]$[|p %$ 1# & |q %$ 0#, {p, q}, "p, q#]
Lemma 11. If ! ' M is well-formed and [Q,QV,M ] !$ [Q",QV ",M "] thenQV ( QV ".
Lemma 12 (Substitution Lemma (linear case)). For each derivation d1, d2, ifd1 " !1, x ' M and d2 " !2 ' N , then "!1,!2 ' M [N/x].
d1 " !1, x ' M and d2 " !2 ' N ) "!1,!2 ' M [N/x].
Proof. The proof is by induction on the height of d1 and by cases on the lastrule. Let r be the last rule of d1.
1. r is either const, or qp–var, or classical–var : trivial;
2. r is!1, x ' M
weak!1, !y, x ' M
. By IH we have: "!1,!2 ' M [N/x], and by means
of weak, "!1,!2, !y ' M [N/x]
3. r is!1, x, y ' M
der!1, x, !y ' M
. By IH we have: " !1,!2, y ' M [N/x], and by means
der : "!1,!2, !y ' M [N/x]
4. r is!1, x, !u, !y ' M
contr!1, x, !z ' M [z/u, z/y]
. By IH we have: "!1,!2, !u, !y ' M [N/x]
and by means of contr : "!1,!2, !z ' M [N/x][z/u, z/y]
5. r is!1, x, y1, . . . , yk ' M
Ltens!1, x, "y1, . . . , yk# ' M
. By IH we have: " !1,!2, y1, . . . , yk '
M [N/x], and by means of Ltens: "!1,!2, "y1, . . . , yk# ' M [N/x]
6. r is!1, x ' M1 !2 ' M2
app!11,!12, x ' M1M2
. By IH we have: "!1,!2 ' M1[N/x], and
by means of app: "!1,!2 ' M1[N/x]
7. r is!1 ' M1 !2, x ' M2
app!11,!12, x ' M1M2
. As for the previous case.
8. r is!1, x, !y ' M
$ I!1, x ' !!y.M
. By IH we have: "!1,!2, !y ' M [N/x], and by
means of $ I: " !1,!2 ' !!y.M [N/x]
11
A correct computation
[1, !, (!!x.Cnot"x, x#)!(new(1))]$ not allowed!!![|p %$ 1#, {p}, (!!x.Cnot"x, x#)!(p)]$[|p %$ 1#, {p}, Cnot"p, p#]$???
[1, !, (!!x.Cnot"x, x#)!(new(1))]$[1, !, Cnot"new(1), new(1)#]$[|p %$ 1#, {p}, Cnot"p, new(1)#]$[|p %$ 1# & |q %$ 1#, {p, q}, Cnot"p, q#]$[|p %$ 1# & |q %$ 0#, {p, q}, "p, q#]
Lemma 11. If ! ' M is well-formed and [Q,QV,M ] !$ [Q",QV ",M "] thenQV ( QV ".
Lemma 12 (Substitution Lemma (linear case)). For each derivation d1, d2, ifd1 " !1, x ' M and d2 " !2 ' N , then "!1,!2 ' M [N/x].
d1 " !1, x ' M and d2 " !2 ' N ) "!1,!2 ' M [N/x].
Proof. The proof is by induction on the height of d1 and by cases on the lastrule. Let r be the last rule of d1.
1. r is either const, or qp–var, or classical–var : trivial;
2. r is!1, x ' M
weak!1, !y, x ' M
. By IH we have: "!1,!2 ' M [N/x], and by means
of weak, "!1,!2, !y ' M [N/x]
3. r is!1, x, y ' M
der!1, x, !y ' M
. By IH we have: " !1,!2, y ' M [N/x], and by means
der : "!1,!2, !y ' M [N/x]
4. r is!1, x, !u, !y ' M
contr!1, x, !z ' M [z/u, z/y]
. By IH we have: "!1,!2, !u, !y ' M [N/x]
and by means of contr : "!1,!2, !z ' M [N/x][z/u, z/y]
5. r is!1, x, y1, . . . , yk ' M
Ltens!1, x, "y1, . . . , yk# ' M
. By IH we have: " !1,!2, y1, . . . , yk '
M [N/x], and by means of Ltens: "!1,!2, "y1, . . . , yk# ' M [N/x]
11
a reduction underthe scope of a bang
It is possible to restrict computations in order to perform computational steps in the following order:
Standardization Theorem (informally...)
Di!erently from classical !–calculus, we needto define a kind of ”status” for !-terms. Thisnecessity comes from the existence of quantumdata that are ”external” to !-terms (that are”classical”). To this aim we give the notion ofconfiguration:
A configuration is a triple [Q,QV,M ]where:• Q ! H(QV) is a quantum register;• QV is a finite quantum variable set such that
Q(M) " QV;The usual set of transition rule is enlarged
with unitary operator application, new operation,and quantum "-reduction:
[Q,QV, Un#ri1 , ..., rin$] %Uq
[Uri1 ,...,rinQ,QV, #ri1 , ..., rin$];
[Q,QV, new(c)] %new
[Q& |p ' c$,QV ( {p}, p];
[Q,QV, (!#x1, . . . , xn$.M)#r1, . . . , rn$] %q.!
[Q,QV,M{r1/x1, . . . , rn/xn}].
In order to satisfy the quantum ”no cloningproperty”, we must forbid the reduction underthe scope of a ”!” (in fact ! terms are duplica-ble/erasable).
We expect that the proposed calculus enjoysthe following properties:
a) It is possible to restrict computations in or-der to perform computation steps in thefollowing order:
1. classical reductions: in this phase thecalculus built in an abstract way aquantum circuit;
2. new reductions: the construction ofthe quantum register;
3. quantum reductions: application ofunitary operators to the quantum reg-ister.
b) There is a ”quantum” correspondence be-tween terminating !-terms operating onnatural numbers and uniform circuits fam-ilies.
Regard to property (a), we propose a Stan-dardization Theorem (preceded by some neces-sary definitions).
Definition 14. Let L be the set of transitionrules. We distinguish three particular subsets ofL , namely Q = {Uq, q."}, nC = Q ( {new},and C = L ) nC .Let C %" C ! and let M be the relevant redex inC; if # ! Q the redex M is called quantum, if# ! C the redex M is called classical.
Definition 15. A configuration C is called nonclassical if # ! nC whenever C %" C !. Let NCLbe the set of non classical configurations.A configuration C is called essentially quantumif # ! Q whenever C %" C !. Let EQT be theset of essentially quantum configurations.
In order to introduce Standardization theo-rem, we give the definition of CnQ computation:
Definition 16. A CnQ computation startingwith a configuration C is a computation {Ci}i<l
such that C0 = C and
1. for every 0 < i < l ) 1, if Ci"1 %nC Ci
then Ci %nC Ci+1;2. for every 0 < i < l)1, if Ci"1 %Q Ci then
Ci %Q Ci+1.
Finally, the following holds:
Theorem 17 (Standardization). If {Ci}i<l isa computation then there is a CnQ computation{C !
i}i<m s.t. C0 = C !0 and Cl"1 * C !
m"1 when-ever l ! N.
Regards to the property (b), let us start withsome definition.
Definition 18. A standard computation iscalled left–in if the classical reductions are ex-ecuted following a left most inner most strat-egy, new reductions are executed following a leftmost inner most strategy and finally quantum re-ductions are executed following a left most innermost strategy.
Let nQ = L ) {Uq, q."} be the set of nonquantum rules.
Definition 19. Let R one of the setL ,C , {new},Q, nQ:
• [Q,M ] +R [Q!,M !] means that [Q!,M !]belong to the left–in computation startingwith [Q,M ] and [Q!,M !] is in normal formw.r.t. R (when R is omitted, we mean thatR is L );
• [Q,M ] + means that there is [Q!,M !] s.t.[Q,M ] + [Q!,M !].
9
Di!erently from classical !–calculus, we needto define a kind of ”status” for !-terms. Thisnecessity comes from the existence of quantumdata that are ”external” to !-terms (that are”classical”). To this aim we give the notion ofconfiguration:
A configuration is a triple [Q,QV,M ]where:• Q ! H(QV) is a quantum register;• QV is a finite quantum variable set such that
Q(M) " QV;The usual set of transition rule is enlarged
with unitary operator application, new operation,and quantum "-reduction:
[Q,QV, Un#ri1 , ..., rin$] %Uq
[Uri1 ,...,rinQ,QV, #ri1 , ..., rin$];
[Q,QV, new(c)] %new
[Q& |p ' c$,QV ( {p}, p];
[Q,QV, (!#x1, . . . , xn$.M)#r1, . . . , rn$] %q.!
[Q,QV,M{r1/x1, . . . , rn/xn}].
In order to satisfy the quantum ”no cloningproperty”, we must forbid the reduction underthe scope of a ”!” (in fact ! terms are duplica-ble/erasable).
We expect that the proposed calculus enjoysthe following properties:
a) It is possible to restrict computations in or-der to perform computation steps in thefollowing order:
1. classical reductions: in this phase thecalculus built in an abstract way aquantum circuit;
2. new reductions: the construction ofthe quantum register;
3. quantum reductions: application ofunitary operators to the quantum reg-ister.
b) There is a ”quantum” correspondence be-tween terminating !-terms operating onnatural numbers and uniform circuits fam-ilies.
Regard to property (a), we propose a Stan-dardization Theorem (preceded by some neces-sary definitions).
Definition 14. Let L be the set of transitionrules. We distinguish three particular subsets ofL , namely Q = {Uq, q."}, nC = Q ( {new},and C = L ) nC .Let C %" C ! and let M be the relevant redex inC; if # ! Q the redex M is called quantum, if# ! C the redex M is called classical.
Definition 15. A configuration C is called nonclassical if # ! nC whenever C %" C !. Let NCLbe the set of non classical configurations.A configuration C is called essentially quantumif # ! Q whenever C %" C !. Let EQT be theset of essentially quantum configurations.
In order to introduce Standardization theo-rem, we give the definition of CnQ computation:
Definition 16. A CnQ computation startingwith a configuration C is a computation {Ci}i<l
such that C0 = C and
1. for every 0 < i < l ) 1, if Ci"1 %nC Ci
then Ci %nC Ci+1;2. for every 0 < i < l)1, if Ci"1 %Q Ci then
Ci %Q Ci+1.
Finally, the following holds:
Theorem 17 (Standardization). If {Ci}i<l isa computation then there is a CnQ computation{C !
i}i<m s.t. C0 = C !0 and Cl"1 * C !
m"1 when-ever l ! N.
Regards to the property (b), let us start withsome definition.
Definition 18. A standard computation iscalled left–in if the classical reductions are ex-ecuted following a left most inner most strat-egy, new reductions are executed following a leftmost inner most strategy and finally quantum re-ductions are executed following a left most innermost strategy.
Let nQ = L ) {Uq, q."} be the set of nonquantum rules.
Definition 19. Let R one of the setL ,C , {new},Q, nQ:
• [Q,M ] +R [Q!,M !] means that [Q!,M !]belong to the left–in computation startingwith [Q,M ] and [Q!,M !] is in normal formw.r.t. R (when R is omitted, we mean thatR is L );
• [Q,M ] + means that there is [Q!,M !] s.t.[Q,M ] + [Q!,M !].
9
Di!erently from classical !–calculus, we needto define a kind of ”status” for !-terms. Thisnecessity comes from the existence of quantumdata that are ”external” to !-terms (that are”classical”). To this aim we give the notion ofconfiguration:
A configuration is a triple [Q,QV,M ]where:• Q ! H(QV) is a quantum register;• QV is a finite quantum variable set such that
Q(M) " QV;The usual set of transition rule is enlarged
with unitary operator application, new operation,and quantum "-reduction:
[Q,QV, Un#ri1 , ..., rin$] %Uq
[Uri1 ,...,rinQ,QV, #ri1 , ..., rin$];
[Q,QV, new(c)] %new
[Q& |p ' c$,QV ( {p}, p];
[Q,QV, (!#x1, . . . , xn$.M)#r1, . . . , rn$] %q.!
[Q,QV,M{r1/x1, . . . , rn/xn}].
In order to satisfy the quantum ”no cloningproperty”, we must forbid the reduction underthe scope of a ”!” (in fact ! terms are duplica-ble/erasable).
We expect that the proposed calculus enjoysthe following properties:
a) It is possible to restrict computations in or-der to perform computation steps in thefollowing order:
1. classical reductions: in this phase thecalculus built in an abstract way aquantum circuit;
2. new reductions: the construction ofthe quantum register;
3. quantum reductions: application ofunitary operators to the quantum reg-ister.
b) There is a ”quantum” correspondence be-tween terminating !-terms operating onnatural numbers and uniform circuits fam-ilies.
Regard to property (a), we propose a Stan-dardization Theorem (preceded by some neces-sary definitions).
Definition 14. Let L be the set of transitionrules. We distinguish three particular subsets ofL , namely Q = {Uq, q."}, nC = Q ( {new},and C = L ) nC .Let C %" C ! and let M be the relevant redex inC; if # ! Q the redex M is called quantum, if# ! C the redex M is called classical.
Definition 15. A configuration C is called nonclassical if # ! nC whenever C %" C !. Let NCLbe the set of non classical configurations.A configuration C is called essentially quantumif # ! Q whenever C %" C !. Let EQT be theset of essentially quantum configurations.
In order to introduce Standardization theo-rem, we give the definition of CnQ computation:
Definition 16. A CnQ computation startingwith a configuration C is a computation {Ci}i<l
such that C0 = C and
1. for every 0 < i < l ) 1, if Ci"1 %nC Ci
then Ci %nC Ci+1;2. for every 0 < i < l)1, if Ci"1 %Q Ci then
Ci %Q Ci+1.
Finally, the following holds:
Theorem 17 (Standardization). If {Ci}i<l isa computation then there is a CnQ computation{C !
i}i<m s.t. C0 = C !0 and Cl"1 * C !
m"1 when-ever l ! N.
Regards to the property (b), let us start withsome definition.
Definition 18. A standard computation iscalled left–in if the classical reductions are ex-ecuted following a left most inner most strat-egy, new reductions are executed following a leftmost inner most strategy and finally quantum re-ductions are executed following a left most innermost strategy.
Let nQ = L ) {Uq, q."} be the set of nonquantum rules.
Definition 19. Let R one of the setL ,C , {new},Q, nQ:
• [Q,M ] +R [Q!,M !] means that [Q!,M !]belong to the left–in computation startingwith [Q,M ] and [Q!,M !] is in normal formw.r.t. R (when R is omitted, we mean thatR is L );
• [Q,M ] + means that there is [Q!,M !] s.t.[Q,M ] + [Q!,M !].
9
Some useful definitions:
Quantum Circuits Family
respectively of H(V !) and H(V !!), each ! inH(V !)!H(V !!) may be expressed as
2n"1!
i=0
2m"1!
j=0
bij |fi" ! |gj"
We write |f1, . . . , fs" and |f1" . . . |fs" for |f1"!. . .! |fs".Definition 11 (Quantum Register). Let V bea qvs, a quantum register is a normalized vectorin H(V).
Definition 12. Given H(V), V ! ={xi0 , . . . , xik} # V, an unitary operatorU : H(V !) $ H(V !), and the identity operator Ion H(V % V !), with UV! we denote
I(V!,V"V!) & (U ! I) & I"1(V!,V"V!) : H(V) $ H(V).
It is easy to prove that:
Proposition 13. The operator I(V!,V"V!) & (U!I) & I"1
(V!,V"V!) : H(V) $ H(V) above defined isunitary.
An important property of quantum registersof n qbits is the fact that it is not always permitto decompose it into the state of the single qbits(mathematically, this means that we are no ableto describe the global state as the tensor productof the single states).These particular states are called entangled andenjoy of properties that we can’t find in any ob-ject of classical physic.If (the state of) n qbits are entangled, they be-have as connected, independently from the realphysical distance.An example of an entangled state generated bytwo qbits is1/'
2 ( (|r )$ 0, p )$ 0"+ |r )$ 1, p )$ 1").The quantum computation power is based on thephysical existence of entangled states.
2.3.2 Quantum Turing Machine
Up to now, the most accepted definition ofQuantum Turing Machine is these proposed byBernstein and Vazirani [19, 27, 55, 57].
Let C be the set consisting of " * C such thatthere is a deterministic algorithm that computesthe real and the imaginary parts of " to within2"n in time polynomial in n.A QTM M is defined by a triplet (!, Q, #), where! is a finite alphabet with an identified blank
symbol $, Q is a finite set of states, with an iden-tified initial state q0 and final state qf += q0, and#, the quantum transition function, is a function
# : Q , ! $ C!#Q#{L,R}
The QTM has two way infinite tape of cells in-dexed by Z and a single read/write tape headthat moves along the tape. We define configu-rations, initial configurations, and final configu-rations exactly as for deterministic TMs. Let Sbe the inner-product space of finite complex lin-ear combinations of configurations of M with theEuclidean norm. We call each element ! * S asuperposition of M .The QTM M defines a linear operator UM : S $S, called the time evolution operator of M , asfollows: if M starts in configuration c with cur-rent state p and scanned symbol %, then afterone step M will be in superposition of configu-rations & =
"i "ici, where each nonzero "i cor-
responds to a transition #(p, %, ', q, d), and ci isthe new configuration that results from applyingthis transition to c. Extending this map to theentire space S through linearity gives the lineartime evolution operator UM .
The time evolution operator UM may berepresented by the (countable dimensional)”square” matrix with columns and rows indexedby configurations where the matrix element fromcolumn c and row c! gives the amplitude withwhich configuration c leads to configuration c! insingle step of M .
2.3.3 Quantum Circuits
Quantum circuits are an alternative modelfor total quantum algorithms, introduced byD. Deutsch [25] and developed by Yao, whichdemonstrated the equivalence with QuantumTuring Machine on terminating computations[83].In analogy with the classical case, quantum cir-cuits are made by composition of quantum gates,that implement unitary operators on qbits.We will introduce the notion of quantum circuitfamily [57], used in the proposal .
Let be K the set of circuits descriptions. Aquantum circuit family is a functionK : N$ K , usually denoted by (Ki)i<! .
The quantum circuitKn has n input bits. Theoutput of the quantum circuit Kn, upon input ofa number ‘x of at most a number n of length, isdenoted Kn(x). We need an algorithm to build
6
Let be the set of circuits descriptions. A quantum circuits family is a function
respectively of H(V !) and H(V !!), each ! inH(V !)!H(V !!) may be expressed as
2n"1!
i=0
2m"1!
j=0
bij |fi" ! |gj"
We write |f1, . . . , fs" and |f1" . . . |fs" for |f1"!. . .! |fs".Definition 11 (Quantum Register). Let V bea qvs, a quantum register is a normalized vectorin H(V).
Definition 12. Given H(V), V ! ={xi0 , . . . , xik} # V, an unitary operatorU : H(V !) $ H(V !), and the identity operator Ion H(V % V !), with UV! we denote
I(V!,V"V!) & (U ! I) & I"1(V!,V"V!) : H(V) $ H(V).
It is easy to prove that:
Proposition 13. The operator I(V!,V"V!) & (U!I) & I"1
(V!,V"V!) : H(V) $ H(V) above defined isunitary.
An important property of quantum registersof n qbits is the fact that it is not always permitto decompose it into the state of the single qbits(mathematically, this means that we are no ableto describe the global state as the tensor productof the single states).These particular states are called entangled andenjoy of properties that we can’t find in any ob-ject of classical physic.If (the state of) n qbits are entangled, they be-have as connected, independently from the realphysical distance.An example of an entangled state generated bytwo qbits is1/'
2 ( (|r )$ 0, p )$ 0"+ |r )$ 1, p )$ 1").The quantum computation power is based on thephysical existence of entangled states.
2.3.2 Quantum Turing Machine
Up to now, the most accepted definition ofQuantum Turing Machine is these proposed byBernstein and Vazirani [19, 27, 55, 57].
Let C be the set consisting of " * C such thatthere is a deterministic algorithm that computesthe real and the imaginary parts of " to within2"n in time polynomial in n.A QTM M is defined by a triplet (!, Q, #), where! is a finite alphabet with an identified blank
symbol $, Q is a finite set of states, with an iden-tified initial state q0 and final state qf += q0, and#, the quantum transition function, is a function
# : Q , ! $ C!#Q#{L,R}
The QTM has two way infinite tape of cells in-dexed by Z and a single read/write tape headthat moves along the tape. We define configu-rations, initial configurations, and final configu-rations exactly as for deterministic TMs. Let Sbe the inner-product space of finite complex lin-ear combinations of configurations of M with theEuclidean norm. We call each element ! * S asuperposition of M .The QTM M defines a linear operator UM : S $S, called the time evolution operator of M , asfollows: if M starts in configuration c with cur-rent state p and scanned symbol %, then afterone step M will be in superposition of configu-rations & =
"i "ici, where each nonzero "i cor-
responds to a transition #(p, %, ', q, d), and ci isthe new configuration that results from applyingthis transition to c. Extending this map to theentire space S through linearity gives the lineartime evolution operator UM .
The time evolution operator UM may berepresented by the (countable dimensional)”square” matrix with columns and rows indexedby configurations where the matrix element fromcolumn c and row c! gives the amplitude withwhich configuration c leads to configuration c! insingle step of M .
2.3.3 Quantum Circuits
Quantum circuits are an alternative modelfor total quantum algorithms, introduced byD. Deutsch [25] and developed by Yao, whichdemonstrated the equivalence with QuantumTuring Machine on terminating computations[83].In analogy with the classical case, quantum cir-cuits are made by composition of quantum gates,that implement unitary operators on qbits.We will introduce the notion of quantum circuitfamily [57], used in the proposal .
Let be K the set of circuits descriptions. Aquantum circuit family is a functionK : N$ K , usually denoted by (Ki)i<! .
The quantum circuitKn has n input bits. Theoutput of the quantum circuit Kn, upon input ofa number ‘x of at most a number n of length, isdenoted Kn(x). We need an algorithm to build
6
usually denoted by
respectively of H(V !) and H(V !!), each ! inH(V !)!H(V !!) may be expressed as
2n"1!
i=0
2m"1!
j=0
bij |fi" ! |gj"
We write |f1, . . . , fs" and |f1" . . . |fs" for |f1"!. . .! |fs".Definition 11 (Quantum Register). Let V bea qvs, a quantum register is a normalized vectorin H(V).
Definition 12. Given H(V), V ! ={xi0 , . . . , xik} # V, an unitary operatorU : H(V !) $ H(V !), and the identity operator Ion H(V % V !), with UV! we denote
I(V!,V"V!) & (U ! I) & I"1(V!,V"V!) : H(V) $ H(V).
It is easy to prove that:
Proposition 13. The operator I(V!,V"V!) & (U!I) & I"1
(V!,V"V!) : H(V) $ H(V) above defined isunitary.
An important property of quantum registersof n qbits is the fact that it is not always permitto decompose it into the state of the single qbits(mathematically, this means that we are no ableto describe the global state as the tensor productof the single states).These particular states are called entangled andenjoy of properties that we can’t find in any ob-ject of classical physic.If (the state of) n qbits are entangled, they be-have as connected, independently from the realphysical distance.An example of an entangled state generated bytwo qbits is1/'
2 ( (|r )$ 0, p )$ 0"+ |r )$ 1, p )$ 1").The quantum computation power is based on thephysical existence of entangled states.
2.3.2 Quantum Turing Machine
Up to now, the most accepted definition ofQuantum Turing Machine is these proposed byBernstein and Vazirani [19, 27, 55, 57].
Let C be the set consisting of " * C such thatthere is a deterministic algorithm that computesthe real and the imaginary parts of " to within2"n in time polynomial in n.A QTM M is defined by a triplet (!, Q, #), where! is a finite alphabet with an identified blank
symbol $, Q is a finite set of states, with an iden-tified initial state q0 and final state qf += q0, and#, the quantum transition function, is a function
# : Q , ! $ C!#Q#{L,R}
The QTM has two way infinite tape of cells in-dexed by Z and a single read/write tape headthat moves along the tape. We define configu-rations, initial configurations, and final configu-rations exactly as for deterministic TMs. Let Sbe the inner-product space of finite complex lin-ear combinations of configurations of M with theEuclidean norm. We call each element ! * S asuperposition of M .The QTM M defines a linear operator UM : S $S, called the time evolution operator of M , asfollows: if M starts in configuration c with cur-rent state p and scanned symbol %, then afterone step M will be in superposition of configu-rations & =
"i "ici, where each nonzero "i cor-
responds to a transition #(p, %, ', q, d), and ci isthe new configuration that results from applyingthis transition to c. Extending this map to theentire space S through linearity gives the lineartime evolution operator UM .
The time evolution operator UM may berepresented by the (countable dimensional)”square” matrix with columns and rows indexedby configurations where the matrix element fromcolumn c and row c! gives the amplitude withwhich configuration c leads to configuration c! insingle step of M .
2.3.3 Quantum Circuits
Quantum circuits are an alternative modelfor total quantum algorithms, introduced byD. Deutsch [25] and developed by Yao, whichdemonstrated the equivalence with QuantumTuring Machine on terminating computations[83].In analogy with the classical case, quantum cir-cuits are made by composition of quantum gates,that implement unitary operators on qbits.We will introduce the notion of quantum circuitfamily [57], used in the proposal .
Let be K the set of circuits descriptions. Aquantum circuit family is a functionK : N$ K , usually denoted by (Ki)i<! .
The quantum circuitKn has n input bits. Theoutput of the quantum circuit Kn, upon input ofa number ‘x of at most a number n of length, isdenoted Kn(x). We need an algorithm to build
6
The quantum circuits has n inputs bits.
respectively of H(V !) and H(V !!), each ! inH(V !)!H(V !!) may be expressed as
2n"1!
i=0
2m"1!
j=0
bij |fi" ! |gj"
We write |f1, . . . , fs" and |f1" . . . |fs" for |f1"!. . .! |fs".Definition 11 (Quantum Register). Let V bea qvs, a quantum register is a normalized vectorin H(V).
Definition 12. Given H(V), V ! ={xi0 , . . . , xik} # V, an unitary operatorU : H(V !) $ H(V !), and the identity operator Ion H(V % V !), with UV! we denote
I(V!,V"V!) & (U ! I) & I"1(V!,V"V!) : H(V) $ H(V).
It is easy to prove that:
Proposition 13. The operator I(V!,V"V!) & (U!I) & I"1
(V!,V"V!) : H(V) $ H(V) above defined isunitary.
An important property of quantum registersof n qbits is the fact that it is not always permitto decompose it into the state of the single qbits(mathematically, this means that we are no ableto describe the global state as the tensor productof the single states).These particular states are called entangled andenjoy of properties that we can’t find in any ob-ject of classical physic.If (the state of) n qbits are entangled, they be-have as connected, independently from the realphysical distance.An example of an entangled state generated bytwo qbits is1/'
2 ( (|r )$ 0, p )$ 0"+ |r )$ 1, p )$ 1").The quantum computation power is based on thephysical existence of entangled states.
2.3.2 Quantum Turing Machine
Up to now, the most accepted definition ofQuantum Turing Machine is these proposed byBernstein and Vazirani [19, 27, 55, 57].
Let C be the set consisting of " * C such thatthere is a deterministic algorithm that computesthe real and the imaginary parts of " to within2"n in time polynomial in n.A QTM M is defined by a triplet (!, Q, #), where! is a finite alphabet with an identified blank
symbol $, Q is a finite set of states, with an iden-tified initial state q0 and final state qf += q0, and#, the quantum transition function, is a function
# : Q , ! $ C!#Q#{L,R}
The QTM has two way infinite tape of cells in-dexed by Z and a single read/write tape headthat moves along the tape. We define configu-rations, initial configurations, and final configu-rations exactly as for deterministic TMs. Let Sbe the inner-product space of finite complex lin-ear combinations of configurations of M with theEuclidean norm. We call each element ! * S asuperposition of M .The QTM M defines a linear operator UM : S $S, called the time evolution operator of M , asfollows: if M starts in configuration c with cur-rent state p and scanned symbol %, then afterone step M will be in superposition of configu-rations & =
"i "ici, where each nonzero "i cor-
responds to a transition #(p, %, ', q, d), and ci isthe new configuration that results from applyingthis transition to c. Extending this map to theentire space S through linearity gives the lineartime evolution operator UM .
The time evolution operator UM may berepresented by the (countable dimensional)”square” matrix with columns and rows indexedby configurations where the matrix element fromcolumn c and row c! gives the amplitude withwhich configuration c leads to configuration c! insingle step of M .
2.3.3 Quantum Circuits
Quantum circuits are an alternative modelfor total quantum algorithms, introduced byD. Deutsch [25] and developed by Yao, whichdemonstrated the equivalence with QuantumTuring Machine on terminating computations[83].In analogy with the classical case, quantum cir-cuits are made by composition of quantum gates,that implement unitary operators on qbits.We will introduce the notion of quantum circuitfamily [57], used in the proposal .
Let be K the set of circuits descriptions. Aquantum circuit family is a functionK : N$ K , usually denoted by (Ki)i<! .
The quantum circuitKn has n input bits. Theoutput of the quantum circuit Kn, upon input ofa number ‘x of at most a number n of length, isdenoted Kn(x). We need an algorithm to build
6Quantum Uniform Circuits Family
A family is said to be uniform if the function is total computable.
respectively of H(V !) and H(V !!), each ! inH(V !)!H(V !!) may be expressed as
2n"1!
i=0
2m"1!
j=0
bij |fi" ! |gj"
We write |f1, . . . , fs" and |f1" . . . |fs" for |f1"!. . .! |fs".Definition 11 (Quantum Register). Let V bea qvs, a quantum register is a normalized vectorin H(V).
Definition 12. Given H(V), V ! ={xi0 , . . . , xik} # V, an unitary operatorU : H(V !) $ H(V !), and the identity operator Ion H(V % V !), with UV! we denote
I(V!,V"V!) & (U ! I) & I"1(V!,V"V!) : H(V) $ H(V).
It is easy to prove that:
Proposition 13. The operator I(V!,V"V!) & (U!I) & I"1
(V!,V"V!) : H(V) $ H(V) above defined isunitary.
An important property of quantum registersof n qbits is the fact that it is not always permitto decompose it into the state of the single qbits(mathematically, this means that we are no ableto describe the global state as the tensor productof the single states).These particular states are called entangled andenjoy of properties that we can’t find in any ob-ject of classical physic.If (the state of) n qbits are entangled, they be-have as connected, independently from the realphysical distance.An example of an entangled state generated bytwo qbits is1/'
2 ( (|r )$ 0, p )$ 0"+ |r )$ 1, p )$ 1").The quantum computation power is based on thephysical existence of entangled states.
2.3.2 Quantum Turing Machine
Up to now, the most accepted definition ofQuantum Turing Machine is these proposed byBernstein and Vazirani [19, 27, 55, 57].
Let C be the set consisting of " * C such thatthere is a deterministic algorithm that computesthe real and the imaginary parts of " to within2"n in time polynomial in n.A QTM M is defined by a triplet (!, Q, #), where! is a finite alphabet with an identified blank
symbol $, Q is a finite set of states, with an iden-tified initial state q0 and final state qf += q0, and#, the quantum transition function, is a function
# : Q , ! $ C!#Q#{L,R}
The QTM has two way infinite tape of cells in-dexed by Z and a single read/write tape headthat moves along the tape. We define configu-rations, initial configurations, and final configu-rations exactly as for deterministic TMs. Let Sbe the inner-product space of finite complex lin-ear combinations of configurations of M with theEuclidean norm. We call each element ! * S asuperposition of M .The QTM M defines a linear operator UM : S $S, called the time evolution operator of M , asfollows: if M starts in configuration c with cur-rent state p and scanned symbol %, then afterone step M will be in superposition of configu-rations & =
"i "ici, where each nonzero "i cor-
responds to a transition #(p, %, ', q, d), and ci isthe new configuration that results from applyingthis transition to c. Extending this map to theentire space S through linearity gives the lineartime evolution operator UM .
The time evolution operator UM may berepresented by the (countable dimensional)”square” matrix with columns and rows indexedby configurations where the matrix element fromcolumn c and row c! gives the amplitude withwhich configuration c leads to configuration c! insingle step of M .
2.3.3 Quantum Circuits
Quantum circuits are an alternative modelfor total quantum algorithms, introduced byD. Deutsch [25] and developed by Yao, whichdemonstrated the equivalence with QuantumTuring Machine on terminating computations[83].In analogy with the classical case, quantum cir-cuits are made by composition of quantum gates,that implement unitary operators on qbits.We will introduce the notion of quantum circuitfamily [57], used in the proposal .
Let be K the set of circuits descriptions. Aquantum circuit family is a functionK : N$ K , usually denoted by (Ki)i<! .
The quantum circuitKn has n input bits. Theoutput of the quantum circuit Kn, upon input ofa number ‘x of at most a number n of length, isdenoted Kn(x). We need an algorithm to build
6
respectively of H(V !) and H(V !!), each ! inH(V !)!H(V !!) may be expressed as
2n"1!
i=0
2m"1!
j=0
bij |fi" ! |gj"
We write |f1, . . . , fs" and |f1" . . . |fs" for |f1"!. . .! |fs".Definition 11 (Quantum Register). Let V bea qvs, a quantum register is a normalized vectorin H(V).
Definition 12. Given H(V), V ! ={xi0 , . . . , xik} # V, an unitary operatorU : H(V !) $ H(V !), and the identity operator Ion H(V % V !), with UV! we denote
I(V!,V"V!) & (U ! I) & I"1(V!,V"V!) : H(V) $ H(V).
It is easy to prove that:
Proposition 13. The operator I(V!,V"V!) & (U!I) & I"1
(V!,V"V!) : H(V) $ H(V) above defined isunitary.
An important property of quantum registersof n qbits is the fact that it is not always permitto decompose it into the state of the single qbits(mathematically, this means that we are no ableto describe the global state as the tensor productof the single states).These particular states are called entangled andenjoy of properties that we can’t find in any ob-ject of classical physic.If (the state of) n qbits are entangled, they be-have as connected, independently from the realphysical distance.An example of an entangled state generated bytwo qbits is1/'
2 ( (|r )$ 0, p )$ 0"+ |r )$ 1, p )$ 1").The quantum computation power is based on thephysical existence of entangled states.
2.3.2 Quantum Turing Machine
Up to now, the most accepted definition ofQuantum Turing Machine is these proposed byBernstein and Vazirani [19, 27, 55, 57].
Let C be the set consisting of " * C such thatthere is a deterministic algorithm that computesthe real and the imaginary parts of " to within2"n in time polynomial in n.A QTM M is defined by a triplet (!, Q, #), where! is a finite alphabet with an identified blank
symbol $, Q is a finite set of states, with an iden-tified initial state q0 and final state qf += q0, and#, the quantum transition function, is a function
# : Q , ! $ C!#Q#{L,R}
The QTM has two way infinite tape of cells in-dexed by Z and a single read/write tape headthat moves along the tape. We define configu-rations, initial configurations, and final configu-rations exactly as for deterministic TMs. Let Sbe the inner-product space of finite complex lin-ear combinations of configurations of M with theEuclidean norm. We call each element ! * S asuperposition of M .The QTM M defines a linear operator UM : S $S, called the time evolution operator of M , asfollows: if M starts in configuration c with cur-rent state p and scanned symbol %, then afterone step M will be in superposition of configu-rations & =
"i "ici, where each nonzero "i cor-
responds to a transition #(p, %, ', q, d), and ci isthe new configuration that results from applyingthis transition to c. Extending this map to theentire space S through linearity gives the lineartime evolution operator UM .
The time evolution operator UM may berepresented by the (countable dimensional)”square” matrix with columns and rows indexedby configurations where the matrix element fromcolumn c and row c! gives the amplitude withwhich configuration c leads to configuration c! insingle step of M .
2.3.3 Quantum Circuits
Quantum circuits are an alternative modelfor total quantum algorithms, introduced byD. Deutsch [25] and developed by Yao, whichdemonstrated the equivalence with QuantumTuring Machine on terminating computations[83].In analogy with the classical case, quantum cir-cuits are made by composition of quantum gates,that implement unitary operators on qbits.We will introduce the notion of quantum circuitfamily [57], used in the proposal .
Let be K the set of circuits descriptions. Aquantum circuit family is a functionK : N$ K , usually denoted by (Ki)i<! .
The quantum circuitKn has n input bits. Theoutput of the quantum circuit Kn, upon input ofa number ‘x of at most a number n of length, isdenoted Kn(x). We need an algorithm to build
6
Correspondence with Quantum Circuits Families (1)
Seminario 27 giugno 2007
June 21, 2007
(K)i<!
Let be K the set of circuits descriptions. A quantum circuit family is afunctionK : N! K , usually denoted by (Ki)i<! .
Kh(n)(n) = Q
[",M ]
[",Mn] !! [Q,!r ]
1
Correspondence with Quantum Circuits Families (2)
There is a “quantum” correspondence between terminatinglambda terms operating on naturals numbers and uniform circuits families
Seminario 27 giugno 2007
June 21, 2007
(K)i<!
Let be K the set of circuits descriptions. A quantum circuit family is afunctionK : N! K , usually denoted by (Ki)i<! .
Kh(n)(n) = Q
[",M ]
[",Mn] !! [Q,!r ]
1
Seminario 27 giugno 2007
June 21, 2007
(K)i<!
Let be K the set of circuits descriptions. A quantum circuit family is afunctionK : N! K , usually denoted by (Ki)i<! .
Kh(n)(n) = Q
[",M ]
[",Mn] !! [Q,!r ]
1
Seminario 27 giugno 2007
June 21, 2007
(K)i<!
Let be K the set of circuits descriptions. A quantum circuit family is afunctionK : N! K , usually denoted by (Ki)i<! .
Kh(n)(n) = Q
[",M ]
[",Mn] !! [Q,!r ]
1
• an easy extention of the syntax
• we lost the correspondence with the QCF
• ??? a lot of open questions...???
Adding measurement operator
a
a
au u, a: two generic
unitary operators
deu: a circuit schema
• Km is built up by composing Gm with Jm. Gm does nothing but switchingthe inputs corresponding to each si from 1 to 2 and vice-versa.
• Jm can be itself decomposed into k ! 3 instances of a single circuit H with! + 3(" + 2) inputs, acting on di!erent qubits as shown in Figure 2.
Circuits Gm can be uniformly generated by a term MG such that MGm " MmG
and MmG encodes Gm:
MG = "x."y.extract!("z."w1. . . . ."w!.append!w1 . . . w!(NGxz))yNG = "x.iterx!("y."z.extract"+2(LGy)z)!("y.y)LG = "x."y."z1. . . . ."z"+2.("#w, q$.append"+2z1 . . . z"wq(xy))(UN #z"+1, z"+2$)
Circuits Jm can be uniformly generated by a term MJ such that MJm " MmJ
and MmJ encodes Jm:
MJ = "x.iterx!(NJ)!(RJ)NJ = "x."y.extract!+"+2(LJx)zLJ = "x."y."z1. . . . ."z!."w1. . . . ."w"+2.
extract!+3("+2)(PJw1 . . . w"+2)(x(append!z1 . . . w!y))PJ = "x1. . . . "x"+2."y1. . . . ."y!."z1. . . . "z3("+2)."w.("q1. . . . ."q!+3("+2).
(append!+4(" + 2)q1 . . . q!+3("+2)z2("+2)+1 . . . z3("+2))(UH#z1, . . . , z2("+2)$)
7 esempi finali
deu = "u."!a."#x, y$.(("#x!, y!$.#ax!, y!$)(u#ax, ay$))
8 Conclusions
32
H
H
Hcnot
• Km is built up by composing Gm with Jm. Gm does nothing but switchingthe inputs corresponding to each si from 1 to 2 and vice-versa.
• Jm can be itself decomposed into k ! 3 instances of a single circuit H with! + 3(" + 2) inputs, acting on di!erent qubits as shown in Figure 2.
Circuits Gm can be uniformly generated by a term MG such that MGm " MmG
and MmG encodes Gm:
MG = "x."y.extract!("z."w1. . . . ."w!.append!w1 . . . w!(NGxz))yNG = "x.iterx!("y."z.extract"+2(LGy)z)!("y.y)LG = "x."y."z1. . . . ."z"+2.("#w, q$.append"+2z1 . . . z"wq(xy))(UN #z"+1, z"+2$)
Circuits Jm can be uniformly generated by a term MJ such that MJm " MmJ
and MmJ encodes Jm:
MJ = "x.iterx!(NJ)!(RJ)NJ = "x."y.extract!+"+2(LJx)zLJ = "x."y."z1. . . . ."z!."w1. . . . ."w"+2.
extract!+3("+2)(PJw1 . . . w"+2)(x(append!z1 . . . w!y))PJ = "x1. . . . "x"+2."y1. . . . ."y!."z1. . . . "z3("+2)."w.("q1. . . . ."q!+3("+2).
(append!+4(" + 2)q1 . . . q!+3("+2)z2("+2)+1 . . . z3("+2))(UH#z1, . . . , z2("+2)$)
7 esempi finali
deu = "u."!a."#x, y$.(("#x!, y!$.#ax!, y!$)(u#ax, ay$))
[1, ((deu)cnot)H]2"
[1,"#x, y$.(("#x!, y!$.#Hx!, y!$)(cnot#Hx,Hy$))
[1, (((deu)cnot)H)#new(0), new(1)$]2"
[1, ("#x, y$.(("#x!, y!$.#Hx!, y!$)(cnot#Hx,Hy$)))#new(0), new(1)$2"
[|p %" 0, q %" 1$, (("#x!, y!$.#Hx!, y!$)(cnot#Hp,Hq$))]
8 Conclusions
32
• Km is built up by composing Gm with Jm. Gm does nothing but switchingthe inputs corresponding to each si from 1 to 2 and vice-versa.
• Jm can be itself decomposed into k ! 3 instances of a single circuit H with! + 3(" + 2) inputs, acting on di!erent qubits as shown in Figure 2.
Circuits Gm can be uniformly generated by a term MG such that MGm " MmG
and MmG encodes Gm:
MG = "x."y.extract!("z."w1. . . . ."w!.append!w1 . . . w!(NGxz))yNG = "x.iterx!("y."z.extract"+2(LGy)z)!("y.y)LG = "x."y."z1. . . . ."z"+2.("#w, q$.append"+2z1 . . . z"wq(xy))(UN #z"+1, z"+2$)
Circuits Jm can be uniformly generated by a term MJ such that MJm " MmJ
and MmJ encodes Jm:
MJ = "x.iterx!(NJ)!(RJ)NJ = "x."y.extract!+"+2(LJx)zLJ = "x."y."z1. . . . ."z!."w1. . . . ."w"+2.
extract!+3("+2)(PJw1 . . . w"+2)(x(append!z1 . . . w!y))PJ = "x1. . . . "x"+2."y1. . . . ."y!."z1. . . . "z3("+2)."w.("q1. . . . ."q!+3("+2).
(append!+4(" + 2)q1 . . . q!+3("+2)z2("+2)+1 . . . z3("+2))(UH#z1, . . . , z2("+2)$)
7 esempi finali
deu = "u."!a."#x, y$.(("#x!, y!$.#ax!, y!$)(u#ax, ay$))
[1, ((deu)cnot)H]2"
[1,"#x, y$.(("#x!, y!$.#Hx!, y!$)(cnot#Hx,Hy$))
[1, (((deu)cnot)H)#new(0), new(1)$]2"
[1, ("#x, y$.(("#x!, y!$.#Hx!, y!$)(cnot#Hx,Hy$)))#new(0), new(1)$2"
[|p %" 0, q %" 1$, (("#x!, y!$.#Hx!, y!$)(cnot#Hp,Hq$))]
8 Conclusions
32
[1, (((deu)cnot)H)!new(0), new(1)"]
2# (two classical reductions)
[1, (!!x, y".((!!x!, y!".!Hx!, y!")(cnot!Hx,Hy")))!new(0), new(1)"
2# (construction of the quantum register)
[|p $# 0" % |q $# 1", (!!x!, y!".!Hx!, y!")(cnot!Hp, Hq")]
# (Hp)!|p "#0$+|p "#1$%
2% |q $# 1", ((!!x!, y!".!Hx!, y!")(cnot!p,Hq"))
"
# (Hq)!|p "#0$+|p "#1$%
2% |q "#0$&|q "#1$%
2, ((!!x!, y!".!Hx!, y!")(cnot!p, q"))
"
= (simple algebraic manipulations)#
$$$%
|p "#0,q "#0$2 &
|p "#0,q "#1$2 +
|p "#1,q "#0$2 +
|p"#1,q "#1$2
, ((!!x!, y!".!Hx!, y!")(cnot!p, q"))
&
'''(
# (cnot)#
$$$%
|p "#0,q "#0$2 &
|p "#0,q "#1$2 +
|p "#1,q "#1$2 +
|p"#1,q "#0$2
, ((!!x!, y!".!Hx!, y!")!p, q")
&
'''(
# (quantum ")#
$$$%
|p "#0,q "#0$2 &
|p "#0,q "#1$2 +
|p "#1,q "#1$2 +
|p"#1,q "#0$2
, !Hp, q"
&
'''(
# (Hp)) |p "#1,q "#0$%
2&
|p"#1,q "#1$%2
, !p, q"*
|p $# 1, q $# 0"'2
& |p $# 1, q $# 1"'2
33
[1, (((deu)cnot)H)!new(0), new(1)"]
2# (two classical reductions)
[1, (!!x, y".((!!x!, y!".!Hx!, y!")(cnot!Hx,Hy")))!new(0), new(1)"
2# (construction of the quantum register)
[|p $# 0" % |q $# 1", (!!x!, y!".!Hx!, y!")(cnot!Hp, Hq")]
# (Hp)!|p "#0$+|p "#1$%
2% |q $# 1", ((!!x!, y!".!Hx!, y!")(cnot!p,Hq"))
"
# (Hq)!|p "#0$+|p "#1$%
2% |q "#0$&|q "#1$%
2, ((!!x!, y!".!Hx!, y!")(cnot!p, q"))
"
= (simple algebraic manipulations)#
$$$%
|p "#0,q "#0$2 &
|p "#0,q "#1$2 +
|p "#1,q "#0$2 +
|p"#1,q "#1$2
, ((!!x!, y!".!Hx!, y!")(cnot!p, q"))
&
'''(
# (cnot)#
$$$%
|p "#0,q "#0$2 &
|p "#0,q "#1$2 +
|p "#1,q "#1$2 +
|p"#1,q "#0$2
, ((!!x!, y!".!Hx!, y!")!p, q")
&
'''(
# (quantum ")#
$$$%
|p "#0,q "#0$2 &
|p "#0,q "#1$2 +
|p "#1,q "#1$2 +
|p"#1,q "#0$2
, !Hp, q"
&
'''(
# (Hp)) |p "#1,q "#0$%
2&
|p"#1,q "#1$%2
, !p, q"*
|p $# 1, q $# 0"'2
& |p $# 1, q $# 1"'2
33
H
H
Hcnot
|0! " |1!
8 Conclusions
34
|0! " |1!
8 Conclusions
34
|0! " |1!
8 Conclusions
34
[1, (((deu)cnot)H)!new(0), new(1)"]
2# (two classical reductions)
[1, (!!x, y".((!!x!, y!".!Hx!, y!")(cnot!Hx,Hy")))!new(0), new(1)"
2# (construction of the quantum register)
[|p $# 0" % |q $# 1", (!!x!, y!".!Hx!, y!")(cnot!Hp, Hq")]
# (Hp)!|p "#0$+|p "#1$%
2% |q $# 1", ((!!x!, y!".!Hx!, y!")(cnot!p,Hq"))
"
# (Hq)!|p "#0$+|p "#1$%
2% |q "#0$&|q "#1$%
2, ((!!x!, y!".!Hx!, y!")(cnot!p, q"))
"
= (simple algebraic manipulations)#
$$$%
|p "#0,q "#0$2 &
|p "#0,q "#1$2 +
|p "#1,q "#0$2 +
|p"#1,q "#1$2
, ((!!x!, y!".!Hx!, y!")(cnot!p, q"))
&
'''(
# (cnot)#
$$$%
|p "#0,q "#0$2 &
|p "#0,q "#1$2 +
|p "#1,q "#1$2 +
|p"#1,q "#0$2
, ((!!x!, y!".!Hx!, y!")!p, q")
&
'''(
# (quantum ")#
$$$%
|p "#0,q "#0$2 &
|p "#0,q "#1$2 +
|p "#1,q "#1$2 +
|p"#1,q "#0$2
, !Hp, q"
&
'''(
# (Hp)) |p "#1,q "#0$%
2&
|p"#1,q "#1$%2
, !p, q"*
w =|p $# 1, q $# 0"'
2& |p $# 1, q $# 1"'
2
33
[1, (((deu)cnot)H)!new(0), new(1)"]
2# (two classical reductions)
[1, (!!x, y".((!!x!, y!".!Hx!, y!")(cnot!Hx,Hy")))!new(0), new(1)"
2# (construction of the quantum register)
[|p $# 0" % |q $# 1", (!!x!, y!".!Hx!, y!")(cnot!Hp, Hq")]
# (Hp)!|p "#0$+|p "#1$%
2% |q $# 1", ((!!x!, y!".!Hx!, y!")(cnot!p,Hq"))
"
# (Hq)!|p "#0$+|p "#1$%
2% |q "#0$&|q "#1$%
2, ((!!x!, y!".!Hx!, y!")(cnot!p, q"))
"
= (simple algebraic manipulations)#
$$$%
|p "#0,q "#0$2 &
|p "#0,q "#1$2 +
|p "#1,q "#0$2 +
|p"#1,q "#1$2
, ((!!x!, y!".!Hx!, y!")(cnot!p, q"))
&
'''(
# (cnot)#
$$$%
|p "#0,q "#0$2 &
|p "#0,q "#1$2 +
|p "#1,q "#1$2 +
|p"#1,q "#0$2
, ((!!x!, y!".!Hx!, y!")!p, q")
&
'''(
# (quantum ")#
$$$%
|p "#0,q "#0$2 &
|p "#0,q "#1$2 +
|p "#1,q "#1$2 +
|p"#1,q "#0$2
, !Hp, q"
&
'''(
# (Hp)) |p "#1,q "#0$%
2&
|p"#1,q "#1$%2
, !p, q"*
w =|p $# 1, q $# 0"'
2& |p $# 1, q $# 1"'
2
33
Essential Bibliography
Quindi complessivamente l’algoritmo di Grover ha un costo computazionale
di O
!
"
NM log N
#
.
References
[1] A. Bernasconi and B. Codenotti. Introduzione alla Complessita Com-putazionale. Springer-Verlag, Milano, Italy, 1998.
[2] A.Yu. Kitaev, A.H. Shen, and M.N. Vyalyi. Classical and QuantumComputation. Cambridge University Press, Cambridge, UK, 2000.
[3] M.A. Nielsen and I.L. Chuang. Quantum Computation and QuantumInformation. Cambridge University Press, Cambridge, UK, 2000.
[4] C. H. Papadimitriou. Computational Complexity. Addison-Wesley, 1994.
[5] A. Yao. Quantum circuit complexity. In Proceedings of the 34th AnnualSymposium on Foundations of Computer Science, pages 352–361, LosAlamitos, CA, 1993. IEEE Computer Society Press.
85
Quindi complessivamente l’algoritmo di Grover ha un costo computazionale
di O
!
"
NM log N
#
.
References
[1] A. Bernasconi and B. Codenotti. Introduzione alla Complessita Com-putazionale. Springer-Verlag, Milano, Italy, 1998.
[2] A.Yu. Kitaev, A.H. Shen, and M.N. Vyalyi. Classical and QuantumComputation. Cambridge University Press, Cambridge, UK, 2000.
[3] M.A. Nielsen and I.L. Chuang. Quantum Computation and QuantumInformation. Cambridge University Press, Cambridge, UK, 2000.
[4] C. H. Papadimitriou. Computational Complexity. Addison-Wesley, 1994.
[5] A. Yao. Quantum circuit complexity. In Proceedings of the 34th AnnualSymposium on Foundations of Computer Science, pages 352–361, LosAlamitos, CA, 1993. IEEE Computer Society Press.
85
[3] P. Benioff. The computer as a physical system: A microscopic quantum mechani-
cal Hamiltonian model of computers as represented by Turing machines. Journal
of Statistical Physics, 22:563–591, 1980.
[4] S. Bettelli, T. Calarco, and L. Serafini. Toward an architecture for quantum pro-
gramming. The European Physical Journal D, 25(2):181–200, August 2003.
[5] V. Danos, J.-B. Joinet, and H. Schellinx. On the linear decoration of intuitionistic
derivations. Archive for Mathematical Logic, 33:387–412, 1995.
[6] D. Deutsch. Quantum theory, the Church-Turing principle and the universal quan-
tum computer. Proceedings of the Royal Society of London. Series A, Mathemat-
ical and Physical Sciences, 400(1818):97–117, July 1985.
[7] J.-Y. Girard. Linear logic. Theoretical Computer Science, 50(1):1–101, 1987.
[8] E. Knill. Conventions for quantum pseudocode. Technical Report LAUR-96-
2724, Los Alamos National Laboratory, 1996.
[9] M. A. Nielsen and I. L. Chuang. Quantum Computation and Quantum Informa-
tion. Cambridge University Press, 2002.
[10] J. Preskill. Lecture notes for Physics 229, quantum computation. Available from
http://www.theory.caltech.edu/people/preskill/ph229/#lecture, 1999.
[11] J. W. Sanders and P. Zuliani. Quantum programming. In R. Backhouse and
J. N. Oliveira, editors, Mathematics of Program Construction: 5th International
Conference, volume 1837 of Lecture Notes in Computer Science, pages 80–99,
Ponte de Lima, Portugal, July 2000. Springer-Verlag.
[12] P. Selinger. Towards a quantum programming language. Mathematical Structures
in Computer Science, 14(4):527–586, 2004.
[13] Benoıt Valiron. A functional programming language for quantum computation
with classical control. Master’s thesis, University of Ottawa, September 2004.
[14] A. van Tonder. Quantum computation, categorical semantics and linear logic. On
arXiv: quant-ph/0312174, 2003.
[15] A. van Tonder. A lambda calculus for quantum computation. SIAM Journal of
Computing, 33(5):1109–1135, 2004. Available from arXiv:quant-ph/0307150.
26
[3] P. Benioff. The computer as a physical system: A microscopic quantum mechani-
cal Hamiltonian model of computers as represented by Turing machines. Journal
of Statistical Physics, 22:563–591, 1980.
[4] S. Bettelli, T. Calarco, and L. Serafini. Toward an architecture for quantum pro-
gramming. The European Physical Journal D, 25(2):181–200, August 2003.
[5] V. Danos, J.-B. Joinet, and H. Schellinx. On the linear decoration of intuitionistic
derivations. Archive for Mathematical Logic, 33:387–412, 1995.
[6] D. Deutsch. Quantum theory, the Church-Turing principle and the universal quan-
tum computer. Proceedings of the Royal Society of London. Series A, Mathemat-
ical and Physical Sciences, 400(1818):97–117, July 1985.
[7] J.-Y. Girard. Linear logic. Theoretical Computer Science, 50(1):1–101, 1987.
[8] E. Knill. Conventions for quantum pseudocode. Technical Report LAUR-96-
2724, Los Alamos National Laboratory, 1996.
[9] M. A. Nielsen and I. L. Chuang. Quantum Computation and Quantum Informa-
tion. Cambridge University Press, 2002.
[10] J. Preskill. Lecture notes for Physics 229, quantum computation. Available from
http://www.theory.caltech.edu/people/preskill/ph229/#lecture, 1999.
[11] J. W. Sanders and P. Zuliani. Quantum programming. In R. Backhouse and
J. N. Oliveira, editors, Mathematics of Program Construction: 5th International
Conference, volume 1837 of Lecture Notes in Computer Science, pages 80–99,
Ponte de Lima, Portugal, July 2000. Springer-Verlag.
[12] P. Selinger. Towards a quantum programming language. Mathematical Structures
in Computer Science, 14(4):527–586, 2004.
[13] Benoıt Valiron. A functional programming language for quantum computation
with classical control. Master’s thesis, University of Ottawa, September 2004.
[14] A. van Tonder. Quantum computation, categorical semantics and linear logic. On
arXiv: quant-ph/0312174, 2003.
[15] A. van Tonder. A lambda calculus for quantum computation. SIAM Journal of
Computing, 33(5):1109–1135, 2004. Available from arXiv:quant-ph/0307150.
26
[3] P. Benioff. The computer as a physical system: A microscopic quantum mechani-
cal Hamiltonian model of computers as represented by Turing machines. Journal
of Statistical Physics, 22:563–591, 1980.
[4] S. Bettelli, T. Calarco, and L. Serafini. Toward an architecture for quantum pro-
gramming. The European Physical Journal D, 25(2):181–200, August 2003.
[5] V. Danos, J.-B. Joinet, and H. Schellinx. On the linear decoration of intuitionistic
derivations. Archive for Mathematical Logic, 33:387–412, 1995.
[6] D. Deutsch. Quantum theory, the Church-Turing principle and the universal quan-
tum computer. Proceedings of the Royal Society of London. Series A, Mathemat-
ical and Physical Sciences, 400(1818):97–117, July 1985.
[7] J.-Y. Girard. Linear logic. Theoretical Computer Science, 50(1):1–101, 1987.
[8] E. Knill. Conventions for quantum pseudocode. Technical Report LAUR-96-
2724, Los Alamos National Laboratory, 1996.
[9] M. A. Nielsen and I. L. Chuang. Quantum Computation and Quantum Informa-
tion. Cambridge University Press, 2002.
[10] J. Preskill. Lecture notes for Physics 229, quantum computation. Available from
http://www.theory.caltech.edu/people/preskill/ph229/#lecture, 1999.
[11] J. W. Sanders and P. Zuliani. Quantum programming. In R. Backhouse and
J. N. Oliveira, editors, Mathematics of Program Construction: 5th International
Conference, volume 1837 of Lecture Notes in Computer Science, pages 80–99,
Ponte de Lima, Portugal, July 2000. Springer-Verlag.
[12] P. Selinger. Towards a quantum programming language. Mathematical Structures
in Computer Science, 14(4):527–586, 2004.
[13] Benoıt Valiron. A functional programming language for quantum computation
with classical control. Master’s thesis, University of Ottawa, September 2004.
[14] A. van Tonder. Quantum computation, categorical semantics and linear logic. On
arXiv: quant-ph/0312174, 2003.
[15] A. van Tonder. A lambda calculus for quantum computation. SIAM Journal of
Computing, 33(5):1109–1135, 2004. Available from arXiv:quant-ph/0307150.
26
232 BIBLIOGRAPHY
[288] F. Schmidt-Kaler, H. Haffner, M. Riebe, S. Gulde, G. P. T. Lancaster,
T. Deuschle, C. Becher, C. F. Roos, J. Eschner, and R. Blatt. Realization of
the Cirac-Zoller controlled-NOT quantum gate. Nature, 422:408, 2003.
[289] B. Schneier. Applied Cryptography. J. Wiley, 2nd edition, 1996.
[290] N. Schuch and J. Siewert. Programmable networks for quantum algorithms.
Physical Review Letters, 91:027902, 2003.
[291] L. J. Schulman and U. V. Vazirani. Molecular scale heat engines and scalable
quantum computers. In Proc. 31st ACM Symposium on the Theory of Computing,
page p. 322, 1999.
[292] T. Sekiguchi, S. Yoshida, and K. M. Itoh. Self-assembly of parallel atomic wires
and periodic clusters of silicon on a vicinal Si(111) surface. Physical Review
Letters, 95:106101, 2005.
[293] K. Semba. private communication, Nov. 2005.
[294] M. S. Shahriar, P. R. Hemmer, S. Lloyd, P. S. Bhatia, and A. E. Craig. Solid-state
quantum computing using spectral holes. Physical Review A, 66:032301, 2002.
[295] A. Shnirman, G. Schon, and Z. Hermon. Quantum manipulations of small
josephson junctions. Physical Review Letters, 79:2371–2374, 1997.
[296] P. W. Shor. Algorithms for quantum computation: Discrete logarithms and fac-
toring. In Proc. 35th Symposium on Foundations of Computer Science, pages
124–134, Los Alamitos, CA, 1994. IEEE Computer Society Press.
[297] P. W. Shor. Fault-tolerant quantum computation. In Proc. 37th Symposium on
Foundations of Computer Science, pages 56–65, Los Alamitos, CA, 1996. IEEE
Computer Society Press.
[298] P. W. Shor. Polynomial time algorithms for prime factorization and discrete
logarithms on a quantum computer. SIAM J. Comp., 26(5):1484–1509, 1997.
http://arXiv.org/quant-ph/9508027.
[299] D. R. Simon. On the power of quantum computation. In Proc. 35th Annual
Symposium on Foundations of Computer Science, pages 116–124. ACM, 1994.
232 BIBLIOGRAPHY
[288] F. Schmidt-Kaler, H. Haffner, M. Riebe, S. Gulde, G. P. T. Lancaster,
T. Deuschle, C. Becher, C. F. Roos, J. Eschner, and R. Blatt. Realization of
the Cirac-Zoller controlled-NOT quantum gate. Nature, 422:408, 2003.
[289] B. Schneier. Applied Cryptography. J. Wiley, 2nd edition, 1996.
[290] N. Schuch and J. Siewert. Programmable networks for quantum algorithms.
Physical Review Letters, 91:027902, 2003.
[291] L. J. Schulman and U. V. Vazirani. Molecular scale heat engines and scalable
quantum computers. In Proc. 31st ACM Symposium on the Theory of Computing,
page p. 322, 1999.
[292] T. Sekiguchi, S. Yoshida, and K. M. Itoh. Self-assembly of parallel atomic wires
and periodic clusters of silicon on a vicinal Si(111) surface. Physical Review
Letters, 95:106101, 2005.
[293] K. Semba. private communication, Nov. 2005.
[294] M. S. Shahriar, P. R. Hemmer, S. Lloyd, P. S. Bhatia, and A. E. Craig. Solid-state
quantum computing using spectral holes. Physical Review A, 66:032301, 2002.
[295] A. Shnirman, G. Schon, and Z. Hermon. Quantum manipulations of small
josephson junctions. Physical Review Letters, 79:2371–2374, 1997.
[296] P. W. Shor. Algorithms for quantum computation: Discrete logarithms and fac-
toring. In Proc. 35th Symposium on Foundations of Computer Science, pages
124–134, Los Alamitos, CA, 1994. IEEE Computer Society Press.
[297] P. W. Shor. Fault-tolerant quantum computation. In Proc. 37th Symposium on
Foundations of Computer Science, pages 56–65, Los Alamitos, CA, 1996. IEEE
Computer Society Press.
[298] P. W. Shor. Polynomial time algorithms for prime factorization and discrete
logarithms on a quantum computer. SIAM J. Comp., 26(5):1484–1509, 1997.
http://arXiv.org/quant-ph/9508027.
[299] D. R. Simon. On the power of quantum computation. In Proc. 35th Annual
Symposium on Foundations of Computer Science, pages 116–124. ACM, 1994.
Selinger and Valiron
Lemma 6.11 Given any type A and any hermitian positive v ! V[[A]], there existsa closed term M : A and ! > 0 such that [[M ]](1) = !v.
Proof. By Corollary 4.5 and Lemma 6.9. "#
6.3 Proof of the full abstraction theorem
If [[! ! M : A]] = [[! ! M ! : A]], take any valid context C[! ! $ : A] : bit forthose two terms. Then from Lemma 6.6, [[! C[M ] : bit ]] = [[! C[M !] : bit ]]. FromLemma 6.5, C[M ] % b = C[M !] % b, for b ! {0, 1}. Since this holds for arbitrarycontexts, M and M ! are operationally equivalent.
The opposite implication follows from Lemma 6.10 and Lemma 6.11. Considertwo typing judgments ! ! M,M !:A with denotations F=[[! ! M : A]] and G =[[! ! M ! : A]], such that F &= G.. Since the vector space V[[!]] is spanned by hermitianpositive elements, there exists a hermitian positive v ! V[[!]] such that F (v) &= G(v).
If ! = x1:A1, . . . , xn:An, let B = A1 ' . . . ' An. By Lemma 6.11, there exists aclosed term R : B such that [[R : B]](1) = !v, for some ! > 0. By Lemma 6.10, thereexists a term x : A ! S : bit such that [[x : A ! S : bit ]](Fv) &= [[x : A ! S : bit ]](Gv).Now consider C[! ! $ : A] : bit defined by
let (x1, . . . xn) = R in let x = [$] in S.
Then [[C[M ]]](1) &= [[C[M !]]](1), hence by Lemma 6.5, C[M ]%b &= C[M !]%b, for someb ! {0, 1}. It follows that M &!opM !, which completes the proof of full abstraction.
"#
7 Conclusion
In this paper we have restricted our study to the linear fragment of the program-ming language of [4]. We gave a syntactic notion of equivalence of terms and anoperational one, together with a fully abstract model for the latter.
Several questions remain open. First, the exact image of the denotational se-mantics is still to be characterized as a subset of the completely positive maps. Thenit would be interesting to explore the categorical semantics of the linear language.Finally, we may want to add weakening and duplication and find a denotationalsemantics for the full quantum lambda calculus.
References
[1] Barendregt, H. P., “The Lambda-Calculus, its Syntax and Semantics,” Studies in Logic and theFoundation of Mathematics 103, North Holland, 1984, second edition.
[2] Danos, V. and R. S. Harmer, Probabilistic game semantics, ACM Transactional on Computational Logic3 (2002), pp. 359–382.
[3] Selinger, P., Towards a quantum programming language, Mathematical Structures in Computer Science14 (2004), pp. 527–586.
[4] Selinger, P. and B. Valiron, A lambda calculus for quantum computation with classical control, in:P. Urzyczyn, editor, Proceedings of the Seventh International Conference on Typed Lambda Calculi andApplications (TLCA 2005), Lecture Notes in Computer Science 3461 (2005), pp. 354–368.
115
Selinger and Valiron
Lemma 6.11 Given any type A and any hermitian positive v ! V[[A]], there existsa closed term M : A and ! > 0 such that [[M ]](1) = !v.
Proof. By Corollary 4.5 and Lemma 6.9. "#
6.3 Proof of the full abstraction theorem
If [[! ! M : A]] = [[! ! M ! : A]], take any valid context C[! ! $ : A] : bit forthose two terms. Then from Lemma 6.6, [[! C[M ] : bit ]] = [[! C[M !] : bit ]]. FromLemma 6.5, C[M ] % b = C[M !] % b, for b ! {0, 1}. Since this holds for arbitrarycontexts, M and M ! are operationally equivalent.
The opposite implication follows from Lemma 6.10 and Lemma 6.11. Considertwo typing judgments ! ! M,M !:A with denotations F=[[! ! M : A]] and G =[[! ! M ! : A]], such that F &= G.. Since the vector space V[[!]] is spanned by hermitianpositive elements, there exists a hermitian positive v ! V[[!]] such that F (v) &= G(v).
If ! = x1:A1, . . . , xn:An, let B = A1 ' . . . ' An. By Lemma 6.11, there exists aclosed term R : B such that [[R : B]](1) = !v, for some ! > 0. By Lemma 6.10, thereexists a term x : A ! S : bit such that [[x : A ! S : bit ]](Fv) &= [[x : A ! S : bit ]](Gv).Now consider C[! ! $ : A] : bit defined by
let (x1, . . . xn) = R in let x = [$] in S.
Then [[C[M ]]](1) &= [[C[M !]]](1), hence by Lemma 6.5, C[M ]%b &= C[M !]%b, for someb ! {0, 1}. It follows that M &!opM !, which completes the proof of full abstraction.
"#
7 Conclusion
In this paper we have restricted our study to the linear fragment of the program-ming language of [4]. We gave a syntactic notion of equivalence of terms and anoperational one, together with a fully abstract model for the latter.
Several questions remain open. First, the exact image of the denotational se-mantics is still to be characterized as a subset of the completely positive maps. Thenit would be interesting to explore the categorical semantics of the linear language.Finally, we may want to add weakening and duplication and find a denotationalsemantics for the full quantum lambda calculus.
References
[1] Barendregt, H. P., “The Lambda-Calculus, its Syntax and Semantics,” Studies in Logic and theFoundation of Mathematics 103, North Holland, 1984, second edition.
[2] Danos, V. and R. S. Harmer, Probabilistic game semantics, ACM Transactional on Computational Logic3 (2002), pp. 359–382.
[3] Selinger, P., Towards a quantum programming language, Mathematical Structures in Computer Science14 (2004), pp. 527–586.
[4] Selinger, P. and B. Valiron, A lambda calculus for quantum computation with classical control, in:P. Urzyczyn, editor, Proceedings of the Seventh International Conference on Typed Lambda Calculi andApplications (TLCA 2005), Lecture Notes in Computer Science 3461 (2005), pp. 354–368.
115
Selinger and Valiron
Lemma 6.11 Given any type A and any hermitian positive v ! V[[A]], there existsa closed term M : A and ! > 0 such that [[M ]](1) = !v.
Proof. By Corollary 4.5 and Lemma 6.9. "#
6.3 Proof of the full abstraction theorem
If [[! ! M : A]] = [[! ! M ! : A]], take any valid context C[! ! $ : A] : bit forthose two terms. Then from Lemma 6.6, [[! C[M ] : bit ]] = [[! C[M !] : bit ]]. FromLemma 6.5, C[M ] % b = C[M !] % b, for b ! {0, 1}. Since this holds for arbitrarycontexts, M and M ! are operationally equivalent.
The opposite implication follows from Lemma 6.10 and Lemma 6.11. Considertwo typing judgments ! ! M,M !:A with denotations F=[[! ! M : A]] and G =[[! ! M ! : A]], such that F &= G.. Since the vector space V[[!]] is spanned by hermitianpositive elements, there exists a hermitian positive v ! V[[!]] such that F (v) &= G(v).
If ! = x1:A1, . . . , xn:An, let B = A1 ' . . . ' An. By Lemma 6.11, there exists aclosed term R : B such that [[R : B]](1) = !v, for some ! > 0. By Lemma 6.10, thereexists a term x : A ! S : bit such that [[x : A ! S : bit ]](Fv) &= [[x : A ! S : bit ]](Gv).Now consider C[! ! $ : A] : bit defined by
let (x1, . . . xn) = R in let x = [$] in S.
Then [[C[M ]]](1) &= [[C[M !]]](1), hence by Lemma 6.5, C[M ]%b &= C[M !]%b, for someb ! {0, 1}. It follows that M &!opM !, which completes the proof of full abstraction.
"#
7 Conclusion
In this paper we have restricted our study to the linear fragment of the program-ming language of [4]. We gave a syntactic notion of equivalence of terms and anoperational one, together with a fully abstract model for the latter.
Several questions remain open. First, the exact image of the denotational se-mantics is still to be characterized as a subset of the completely positive maps. Thenit would be interesting to explore the categorical semantics of the linear language.Finally, we may want to add weakening and duplication and find a denotationalsemantics for the full quantum lambda calculus.
References
[1] Barendregt, H. P., “The Lambda-Calculus, its Syntax and Semantics,” Studies in Logic and theFoundation of Mathematics 103, North Holland, 1984, second edition.
[2] Danos, V. and R. S. Harmer, Probabilistic game semantics, ACM Transactional on Computational Logic3 (2002), pp. 359–382.
[3] Selinger, P., Towards a quantum programming language, Mathematical Structures in Computer Science14 (2004), pp. 527–586.
[4] Selinger, P. and B. Valiron, A lambda calculus for quantum computation with classical control, in:P. Urzyczyn, editor, Proceedings of the Seventh International Conference on Typed Lambda Calculi andApplications (TLCA 2005), Lecture Notes in Computer Science 3461 (2005), pp. 354–368.
115
Selinger and Valiron
Lemma 6.11 Given any type A and any hermitian positive v ! V[[A]], there existsa closed term M : A and ! > 0 such that [[M ]](1) = !v.
Proof. By Corollary 4.5 and Lemma 6.9. "#
6.3 Proof of the full abstraction theorem
If [[! ! M : A]] = [[! ! M ! : A]], take any valid context C[! ! $ : A] : bit forthose two terms. Then from Lemma 6.6, [[! C[M ] : bit ]] = [[! C[M !] : bit ]]. FromLemma 6.5, C[M ] % b = C[M !] % b, for b ! {0, 1}. Since this holds for arbitrarycontexts, M and M ! are operationally equivalent.
The opposite implication follows from Lemma 6.10 and Lemma 6.11. Considertwo typing judgments ! ! M,M !:A with denotations F=[[! ! M : A]] and G =[[! ! M ! : A]], such that F &= G.. Since the vector space V[[!]] is spanned by hermitianpositive elements, there exists a hermitian positive v ! V[[!]] such that F (v) &= G(v).
If ! = x1:A1, . . . , xn:An, let B = A1 ' . . . ' An. By Lemma 6.11, there exists aclosed term R : B such that [[R : B]](1) = !v, for some ! > 0. By Lemma 6.10, thereexists a term x : A ! S : bit such that [[x : A ! S : bit ]](Fv) &= [[x : A ! S : bit ]](Gv).Now consider C[! ! $ : A] : bit defined by
let (x1, . . . xn) = R in let x = [$] in S.
Then [[C[M ]]](1) &= [[C[M !]]](1), hence by Lemma 6.5, C[M ]%b &= C[M !]%b, for someb ! {0, 1}. It follows that M &!opM !, which completes the proof of full abstraction.
"#
7 Conclusion
In this paper we have restricted our study to the linear fragment of the program-ming language of [4]. We gave a syntactic notion of equivalence of terms and anoperational one, together with a fully abstract model for the latter.
Several questions remain open. First, the exact image of the denotational se-mantics is still to be characterized as a subset of the completely positive maps. Thenit would be interesting to explore the categorical semantics of the linear language.Finally, we may want to add weakening and duplication and find a denotationalsemantics for the full quantum lambda calculus.
References
[1] Barendregt, H. P., “The Lambda-Calculus, its Syntax and Semantics,” Studies in Logic and theFoundation of Mathematics 103, North Holland, 1984, second edition.
[2] Danos, V. and R. S. Harmer, Probabilistic game semantics, ACM Transactional on Computational Logic3 (2002), pp. 359–382.
[3] Selinger, P., Towards a quantum programming language, Mathematical Structures in Computer Science14 (2004), pp. 527–586.
[4] Selinger, P. and B. Valiron, A lambda calculus for quantum computation with classical control, in:P. Urzyczyn, editor, Proceedings of the Seventh International Conference on Typed Lambda Calculi andApplications (TLCA 2005), Lecture Notes in Computer Science 3461 (2005), pp. 354–368.
115
Selinger and Valiron
Lemma 6.11 Given any type A and any hermitian positive v ! V[[A]], there existsa closed term M : A and ! > 0 such that [[M ]](1) = !v.
Proof. By Corollary 4.5 and Lemma 6.9. "#
6.3 Proof of the full abstraction theorem
If [[! ! M : A]] = [[! ! M ! : A]], take any valid context C[! ! $ : A] : bit forthose two terms. Then from Lemma 6.6, [[! C[M ] : bit ]] = [[! C[M !] : bit ]]. FromLemma 6.5, C[M ] % b = C[M !] % b, for b ! {0, 1}. Since this holds for arbitrarycontexts, M and M ! are operationally equivalent.
The opposite implication follows from Lemma 6.10 and Lemma 6.11. Considertwo typing judgments ! ! M,M !:A with denotations F=[[! ! M : A]] and G =[[! ! M ! : A]], such that F &= G.. Since the vector space V[[!]] is spanned by hermitianpositive elements, there exists a hermitian positive v ! V[[!]] such that F (v) &= G(v).
If ! = x1:A1, . . . , xn:An, let B = A1 ' . . . ' An. By Lemma 6.11, there exists aclosed term R : B such that [[R : B]](1) = !v, for some ! > 0. By Lemma 6.10, thereexists a term x : A ! S : bit such that [[x : A ! S : bit ]](Fv) &= [[x : A ! S : bit ]](Gv).Now consider C[! ! $ : A] : bit defined by
let (x1, . . . xn) = R in let x = [$] in S.
Then [[C[M ]]](1) &= [[C[M !]]](1), hence by Lemma 6.5, C[M ]%b &= C[M !]%b, for someb ! {0, 1}. It follows that M &!opM !, which completes the proof of full abstraction.
"#
7 Conclusion
In this paper we have restricted our study to the linear fragment of the program-ming language of [4]. We gave a syntactic notion of equivalence of terms and anoperational one, together with a fully abstract model for the latter.
Several questions remain open. First, the exact image of the denotational se-mantics is still to be characterized as a subset of the completely positive maps. Thenit would be interesting to explore the categorical semantics of the linear language.Finally, we may want to add weakening and duplication and find a denotationalsemantics for the full quantum lambda calculus.
References
[1] Barendregt, H. P., “The Lambda-Calculus, its Syntax and Semantics,” Studies in Logic and theFoundation of Mathematics 103, North Holland, 1984, second edition.
[2] Danos, V. and R. S. Harmer, Probabilistic game semantics, ACM Transactional on Computational Logic3 (2002), pp. 359–382.
[3] Selinger, P., Towards a quantum programming language, Mathematical Structures in Computer Science14 (2004), pp. 527–586.
[4] Selinger, P. and B. Valiron, A lambda calculus for quantum computation with classical control, in:P. Urzyczyn, editor, Proceedings of the Seventh International Conference on Typed Lambda Calculi andApplications (TLCA 2005), Lecture Notes in Computer Science 3461 (2005), pp. 354–368.
115