quantum logic as a dynamic logic

35
LQP: The Dynamic Logic of Quantum Information Alexandru Baltag * and Sonja Smets ā€  Abstract We present a dynamic logic for reasoning about information flow in quantum programs. In particular, we give a finitary syntax and a relational semantics for a Logic of Quantum Programs (LQP ), that is capable of dealing with quantum measurements, unitary evolutions and entanglements in compound quantum systems. We present a sound proof system for this logic, and we show how to characterize by logical means various forms of entanglement (e.g. the Bell states) and various quantum gates. As an example of applica- tion, we use our logic to give a formal proof for the correctness of the Tele- portation protocol (proof which can be easily adapted to check Logic-Gate Teleportation). 1 Introduction As a natural extension of Hoare Logic, Propositional Dynamic Logic (PDL) is an important tool for the logical study of programs, especially by providing a basis for program verification. In the context of recent advances in quantum program- ming, it is natural to look for a quantum version of PDL, which could play the same role in proving correctness for quantum programs that classical PDL (and Hoare logic) played for classical programs. The search for such a ā€œquantum dynamic logicā€ has been one of our main objectives, in the process of investigating the logic of quantum information flow in a series of presentations [4, 34] and papers [6, 5, 7]. Several logical systems have been proposed: in [6] we focused on single quantum systems and presented two equivalent complete axiomatizations for a Logic of Quantum Actions (LQA, * Oxford University Computing Laboratory, [email protected] ā€  Vrije Universiteit Brussel, Flandersā€™ Fund for Scientific Research Post-Doc, [email protected] 1

Upload: uva

Post on 20-Nov-2023

2 views

Category:

Documents


0 download

TRANSCRIPT

LQP: The Dynamic Logic of QuantumInformation

Alexandru Baltagāˆ— and Sonja Smetsā€ 

Abstract

We present a dynamic logic for reasoning about information flow in quantumprograms. In particular, we give a finitary syntax and a relational semanticsfor a Logic of Quantum Programs(LQP ), that is capable of dealing withquantum measurements, unitary evolutions and entanglements in compoundquantum systems. We present a sound proof system for this logic, and weshow how to characterize by logical means various forms of entanglement(e.g. the Bell states) and various quantum gates. As an example of applica-tion, we use our logic to give a formal proof for the correctness of the Tele-portation protocol (proof which can be easily adapted to check Logic-GateTeleportation).

1 Introduction

As a natural extension of Hoare Logic, Propositional Dynamic Logic (PDL) is animportant tool for the logical study of programs, especially by providing a basisfor program verification. In the context of recent advances in quantum program-ming, it is natural to look for aquantumversion ofPDL, which could play thesame role in proving correctness for quantum programs that classicalPDL (andHoare logic) played for classical programs.

The search for such a ā€œquantum dynamic logicā€ has been one of our mainobjectives, in the process of investigating the logic of quantum information flowin a series of presentations [4, 34] and papers [6, 5, 7]. Several logical systemshave been proposed: in [6] we focused on single quantum systems and presentedtwo equivalentcomplete axiomatizationsfor a Logic of Quantum Actions (LQA,

āˆ—Oxford University Computing Laboratory, [email protected]ā€ Vrije Universiteit Brussel, Flandersā€™ Fund for Scientific Research Post-Doc, [email protected]

1

allowing actions such as measurements and unitary evolutions, but no entangle-ments). The completeness result was obtained with respect to infinite-dimensionalclassical Hilbert spaces, as models forsingle quantum systems. The challenge ofproviding a similar axiomatization forcompound systemswas taken up in [5],where a first proposal for alogic of multi-partite quantum systemswas sketched.

In this paper we elaborate further, simplify and improve on the work out-lined in [5], developing a full-fledgedLogic of Quantum ProgramsLQP .1 Thisincludes: (1) a simplefinitary syntaxfor a modal language, based on a minorvariation of classicalPDL, with dynamic modalities corresponding to (weakestpreconditions of) quantum programs; (2) arelational semanticsfor this logic, interms ofquantum states and quantum actions over a finite-dimensional Hilbertspace; (3) a sound proof system, which includes axioms to handleseparation,locality andentanglement; (4) formal proofs (in our proof systemLQP ) of non-trivial computational properties of compound quantum systems; (5) an analysis(with a formal correctness proof) of the Teleportation Protocol.

The first fundamental idea underlying our logic is one that was first presentedin [4, 34] and developed in [6], but whose deep ā€œideologicalā€ roots come froma long tradition of previous work on dynamic interpretations of quantum logic(in [18, 19, 20, 3, 10, 14, 11, 13, 12, 35]): this is the idea of having aquantumreinterpretationof the language of classicalPDL, in which the ā€œtestā€ actionsĻ•? of PDL (used to capture conditional programs in dynamic logic) are to beread asā€œsuccessful measurementsā€ of a quantum propertyĻ• (i.e. projectors in aHilbert space over the subspace generated by the set of states satisfyingĻ•), whilethe other basic actions ofPDL are taken to bequantum gates(i.e. unitary oper-ators on a Hilbert space). As shown in [4, 34, 6], this immediately allows us tore-capture in our (Boolean) logic all the power of traditional (non-Boolean) Quan-tum Logic: the ā€œquantum disjunctionā€ (expressing superpositions), the ā€œquantumnegationā€ (the so-called ā€œorthocomplementā€āˆ¼ Ļ•, expressing necessary failureof a measurement) and the ā€œquantum implicationā€ (the so-called ā€œSasaki hookā€

Ļ†Sā†’ Ļˆ, capturing causality in quantum measurements) are all expressible us-

ing quantum-dynamic modalities[Ļ•?]Ļˆ (which captureweakest preconditions2

of quantum measurements).3 In other words: in our logic (unlike other logi-

1But note the difference between our logicLQP and the approach with a similar name in [9]: ourdynamic logic goes much further in capturing essential properties of quantum systems and quantumprograms, as well as in recovering the ideas of traditional quantum logic (see e.g. [16, 17, 22].

2See e.g. [25] for an introduction to dynamic modalities[Ļ€]Ļˆ describing weakest preconditionsensuring (the satisfaction of some given post-condition)Ļˆ after the execution of an actionĻ€.

3Indeed, it turns out that a quantum implicationĻ†Sā†’ Ļˆ is simply equivalent to the weakest pre-

2

cal approaches to quantum systems),all the non-classical ā€œquantumā€ effects arecaptured using a non-classical ā€œlogical dynamicsā€, while keeping the classical,Boolean structure of the underlying propositional logic of ā€œstaticā€ properties.

The second fundamental idea of our approach is the one first outlined in [5]:addingspatial featuresto dynamic logic, in order to capture relevant propertiesof multi-partite (i.e. compound) quantum systems(e.g. separation, locality, en-tanglement). For this, we use a finite setN of indicesto denote the most basicā€œpartsā€ (qubits) of the system, and usesets of indicesI āŠ† N to denote all the(possibly compound) subsystems; we have special propositional constants1, 0, +etc. to express the fact that qubits are in the state| 1怉, | 0怉 or | +怉 etc; we use abasic propositional formula>I to expressā€œseparationā€ 4 (the fact that qubits inthe subsystemI are separated from the rest); and we have a basic program>I ,denoting anon-determined (i.e. randomly chosen) local transformation(affectingonly the qubits in the subsystemI). These ingredients are enough to define all therelevant spatial features we need, and in particular to define the notion of(local)componentĻ•I of a (global) propertyĻ•, the notion of(I-)local propertyI(Ļ•) (i.e.Ļ• is a property of the separatedI-subsystem) and the notion of(I-)local programI(Ļ€) (i.e. Ļ€ is a program affecting only theI-subsystem).

The third fundamental idea that underlies our approach comes from [14] and[15] (and was further elaborated in a category-theoretical setting in [1]): this isa computational understanding of entanglement, in which an entangled state isseen as a ā€œstaticā€ encoding of a program. Mathematically, this comes from thesimple observation that a tensor productHi āŠ—Hj of two Hilbert spaces is canon-ically isomorphic to the spaceHi ā†’ Hj of all linear maps between the twospaces. But, as noted in [14, 15], this isomorphism has aphysical meaning: theentangled stateĻ€ij , that ā€œencodesā€ (via the above isomorphism) the linear mapĻ€ : Hi ā†’ Hj , has the property thatany successful measurement of itsi-th qubit(resulting in some local output-stateqi) induces a correlative collapse of thej-thqubit, whose local output-state(after the collapse)is computed by the mapĻ€ (i.e.it is given byĻ€(q)j). Sothe above isomorphism captures the correlations betweenpossible results of potential local measurements(on the two qubits). We use thisidea to define formulasĻ€ij that characterize such specifically entangled states (byusing weakest preconditions to express potential behavior under possible mea-surements). The fundamental correlation given by the above isomorphism is thenstated as ourā€œEntanglement Axiomā€, which plays a central role in our system.

condition[Ļ•?]Ļˆ. In quantum logic, this dynamic view can be traced back to the analysis of the Sasakihook as a Stalnaker conditional presented in [23, 24] and is reflected upon in e.g. [8, 33].

4This can be compared with theexogenous quantum logic approachin [30], that makes use ofgeneral modal operators to separate subsystems.

3

This combination of quantum-dynamic and spatial logicis what allows us togivea logical characterization of Bell statesand ofvarious quantum gates, andtoprove from our axioms highly non-trivial properties of quantum information flow(such as the ā€œTeleportation Propertyā€, the ā€œAgreement Propertyā€, the ā€œEntangle-ment Preparationā€ and ā€œEntanglement Compositionā€ lemmas etc.).

It is well-known thatPDL, and its fragment the Hoare Logic, are among themain logical formalisms used inprogram verificationof classical programs, i.e.in checking that a given (classical) program iscorrect(in the sense of meeting therequired specifications). It is thus natural to expect our quantum dynamic logicto play a significant role in the formalverification of quantum programs. In thispaper, we partially fulfil this expectation by giving afully axiomatic correctnessproof for the Teleportation protocol; the proof can be easily adapted to verifyLogic-Gate Teleportationand many other quantum programs.

Finally, we mention here some of thelimitations of our approach, which arisefrom ourpurely qualitative, logic-basedview of quantum information. The quan-titative aspects are thus neglected: in our presentation, we follow theoperationalquantum logictradition (for which see e.g. [26, 27]) in abstracting away fromcomplex numbers, ā€œphasesā€ and probabilities. As customary in quantum logic,we identify the ā€œstatesā€ of a physical system with ā€œraysā€ in a Hilbert space (i.e.one-dimensional closed linear subspaces), rather than with unitary vectors, andconsequently, our programs will beā€œphase-freeā€. This is a serious limitation,as phase aspects are important in quantum computation; there are ways to re-introduce (relative) phases in our approach, but this gives rise to a much morecomplicated logic, and so we leave this development for future work. Similarly,although our dynamic logiccannot express probabilities, but only ā€œpossibilitiesā€(via the dynamic modalities, which capture the systemā€™s potential behavior underpossible actions),there exist natural extensions of this setting to a probabilisticmodal logic. One of our projects is to work out the full details of this setting,developing a proof system for probabilisticLQP .

2 Preliminaries: Quantum Frames

In this section we organize Hilbert spaces as relational structures, calledquantumframes(also calledquantum transition systemsin [6]). We first study the quantumframes of asinglequantum system, then consider systems composed ofparts(sub-systems): these are calledcompound(or multi-partite) quantum systems. In thislater case we restrict our attention to systems composed of finitely many ā€œqubitsā€.

4

2.1 Single-System Quantum Frames

A modal frameis a set ofstates, together with a family ofbinary relationsbetween

states. A (generalized)PDL frame is a modal frame(Ī£, {S?ā†’}SāˆˆL, {aā†’}aāˆˆA),

in which the relations on the set of statesĪ£ are of two types: the first, calledtestsand denoted byS?, are labelled with subsetsS of Ī£, coming from a givenfamily L āŠ† P(Ī£) of sets, calledtestable properties; the others, calledactions, arelabelled with action labelsa from a given setA.

Given aPDL frame, there exists a standard way to give a semantics to theusual language ofPropositional Dynamic Logic. ClassicalPDL can be consid-ered as a special case of such a logic, in which tests are given byclassical tests:

sS?ā†’ t if and only if s = t āˆˆ S. Observe thatclassical tests, if executable, do not

change the current state.In the context of quantum systems, a natural idea is to replace classical tests

by ā€œquantum testsā€, given byquantum measurementsof a given property. Suchtests will obviously change the state of the system. To model them, we introducea special kind ofPDL frames:quantum frames. The ā€œtestsā€ are essentially givenby projectors in a Hilbert space. In [6], we consideredPDL with the above-mentioned standard semantics, having the same clauses in the classical case, butinterpreted in quantum frames. What we obtained was aquantum PDL, whosenegation-free part with dynamic modalities for quantum tests was equivalent towhat is traditionally called ā€œ(orthomodular) quantum logicā€ (see e.g. [16, 17, 22]).In this paper, we extend the syntax of this logic to deal with unitary evolutions,entanglements and some quantum protocols.

Recall that aHilbert spaceH is a complex vector space with an inner product怈āˆ’ | āˆ’怉, which is complete in the induced metric. Theadjoint (or Hermitianconjugate) of a linear mapF : H ā†’ H is the unique linear mapF ā€  : H ā†’ Hs.t. 怈x | F (y)怉 = 怈F ā€ (x) | y怉, for all x, y āˆˆ H. For any closed linear subspaceW āŠ† H, theprojectorPW : H ā†’ H ontoW is given by: PW (u + v) = u,for all u āˆˆ W, v āˆˆ WāŠ„. Projectors are linear, idempotent (P ā—¦ P = P ) andself-adjoint (P ā€  = P ). A unitary transformationis a linear mapU on H s.t.U ā—¦Uā€  = Uā€  ā—¦U = id, whereid is the identity onH. Unitary operators preserveinner products.

In Quantum Mechanics, projectors are used to represent(succesful) measure-ments. A measurement is in fact asetof projectors (over mutually orthogonalsubspaces); but, whenever a measurement is succesfully performed,only oneofthe projectors is ā€œactualizedā€: the outcome is given by that particular projector. InQuantum Mechanics, unitary transformations representreversible evolutionsof asystem. In Quantum Computation, they correspond toquantum-logical gates.

5

Quantum Frames. Given a Hilbert spaceH, the following steps construct aQuantum (PDL) Frame

Ī£(H) := (Ī£, {S?ā†’}SāˆˆL, {Uā†’}UāˆˆU )

1. LetĪ£ be the set ofone dimensional subspacesofH, called the set ofstates.We denote a states = x of H using any of the non-zero vectorsx āˆˆ Hthat generate it, as a subspace. Note that any two vectors that differ only inphase(i.e. x = Ī»y, with Ī» āˆˆ C with |Ī»| = 1) will generate the same statex = y āˆˆ Ī£.

2. Call two statess and t in Ī£ orthogonal, and writes āŠ„ t, if every twovectorsx āˆˆ s, y āˆˆ t are orthogonal, i.e. ifāˆ€x āˆˆ sāˆ€y āˆˆ t 怈x | y怉 = 0.Equivalently, we can state thats āŠ„ t iff āˆƒx āˆˆ s, y āˆˆ t with x 6= 0, y 6= 0and怈x | y怉 = 0. We putSāŠ„ := {t āˆˆ Ī£ | t āŠ„ s for all s āˆˆ S}; and wedenote byS = SāŠ„āŠ„ := (SāŠ„)āŠ„ the biorthogonal closure ofS. In particular,for a singleton{x}, we just writex for {x}, which agrees with the notationx used above to denote the state generated byx.

3. A set of statesS āŠ† Ī£ is called a(quantum) testable propertyiff it isbiorthogonally closed, i.e. if S = S. (Note thatS āŠ† S is always the case.)We denote byL āŠ† P (Ī£) the family of all quantum testable properties. AlltheothersetsS āˆˆ P (Ī£) \ L are callednon-testable properties.

4. There is a natural bijective correspondence between the familyL of alltestable properties and the familyW of all closed linear subspacesW ofH,bijection given byS 7ā†’ WS =:

ā‹ƒS. Observe that, under this correspon-

dence, the image of the biorthogonal closureS of any arbitrary setS āŠ† Ī£is the closed linear subspace

ā‹ƒS āŠ† H generated by the union

ā‹ƒS of all

states inS.

5. For each testable propertyS āˆˆ L, there exists a partial mapS? onĪ£, calleda quantum test. If W = WS =

ā‹ƒS is the corresponding subspace ofH,

then the quantum test is the map induced on states by theprojectorPW ontothe subspaceW . In other words, itā€™s given by:

S?(x) := PW (x) āˆˆ Ī£ , if x 6āˆˆ SāŠ„ ( i.e. if PW (x) 6= 0)S?(x) := undefined, otherwise.

We denote byS?ā†’āŠ† Ī£ Ɨ Ī£ the binary relation corresponding to the partial

mapS?, i.e. given by:sS?ā†’ t if and only if S?(s) = t. So we havea family

of binary relations indexed by the testable propertiesS āˆˆ L.

6

6. For each unitary transformationU onH, consider the corresponding binary

relationUā†’āŠ† Ī£ Ɨ Ī£, given by: s

Uā†’ t if and only if U(x) = y for somenon-zero vectorsx āˆˆ s, y āˆˆ t. So we obtaina family of binary relationsindexed by the unitary transformationsU āˆˆ U (whereU is the set of unitarytransformations onH).

So a quantum frame is just aPDL frame built on top of a given Hilbert spaceH, by taking one-dimensional subspaces as ā€œstatesā€, projectors as ā€œtestsā€ and uni-tary evolutions as ā€œactionsā€. Our notion of ā€œstateā€ in this paper is closely con-nected to the way quantum logicians approach quantum systems. As mentionedin the Introduction, this imposes some limits to our approach, mainly that we willnot be able to expressphase-related properties.

Operators on states, adjoints and generalized tests.To generalize our notationsintroduced earlier, observe that everylinear operatorF : H ā†’ H induces apartial mapF : Ī£ ā†’ Ī£ on states (i.e. subspaces), given byF (x) = F (x), ifF (x) 6= 0 (and undefined, in rest). (Note thatlinearity ensures that this map onstates is well-defined.) In particular, every mapF : Ī£ ā†’ Ī£ obtained in this wayhas anadjointF ā€  : Ī£ ā†’ Ī£, defined as the map on states induced by the adjointof the linear operatorF onH. Observe that, for unitary transformationsU , theadjoint is the inverse:Uā€  = Uāˆ’1 Also, one can naturally generalizequantumteststo arbitrary, possiblynon-testable properties, S āŠ† Ī£, by putting:S? := S?.So we identify a test of a ā€œnon-testableā€ propertyS with the quantum test of itsbiorthogonal closure. Observe thatS?ā€  = S? (since projectors are self-adjoint).

Measurement (Non-orthogonality) Relation. For all s, t āˆˆ Ī£, let s ā†’ t if and

only if sS?ā†’ t for some propertyS āˆˆ L. In other words,sā†’ t means that one can

reach statet by doingsome measurementon states. An important observation isthatthe measurement relation is the same as non-orthogonality5: sā†’ t iff s 6āŠ„ t.

Quantum Actions. A quantum actionis any relationR āŠ† Ī£ Ɨ Ī£ which can bewritten as an arbitrary6 unionR =

ā‹ƒi Fi of linear mapsFi : Ī£ ā†’ Ī£. The family

of quantum actions forms acomplete lattice(with inclusion), having set-theoreticunionRāˆŖRā€² as supremum. Notice also that this family is closed underrelationalcompositionR;Rā€² := {(s, t) āˆˆ Ī£ Ɨ Ī£ : āˆƒw āˆˆ Ī£(s, w) āˆˆ R, (w, t) āˆˆ Rā€²},and iterationRāˆ— :=

ā‹ƒkā‰„0R

n (whereRn = R;R; Ā· Ā· Ā·R is a composition ofnterms). Quantum actions are arelational (input-output) representation of quantumprograms. Indeed, in our dynamic logic we will interpret (the dynamic modalitiesfor) quantum programs as (weakest preconditions of) quantum actions.

5The non-orthogonality relation has indeed been used to introduce an accessibility relation in theorthoframe semantics within quantum logic [22, 21].

6i.e. possibly infinite.

7

Weakest Precondition, Image, Strongest Post-condition and MeasurementModalities. For any propertyT āŠ† Ī£ and any quantum actionR āŠ† Ī£ Ɨ Ī£, let[R]T := {s āˆˆ Ī£ : āˆ€t āˆˆ Ī£(sRt ā‡’ t āˆˆ T )} and怈R怉T := Ī£\([R](Ī£\T )). Simi-larly, putR(T ) := {s āˆˆ Ī£ : āˆƒt āˆˆ T such thattRs}. We also putR[T ] := R(T )for the biorthogonal closure of the image. Finally, put2T := {s āˆˆ Ī£ : āˆ€t(s ā†’tā‡’ t āˆˆ T )} and 3T := Ī£\(2(Ī£\T )).

Observe that[R]T expresses theweakest preconditionfor the ā€œprogramā€Rand post-conditionT . In particular,[S?]T expresses the weakest precondition en-suring the satisfaction of propertyT in any state after the system passes a quantumtest of propertyS. Similarly, 怈S?怉T means that one can perform a quantum testof propertyS on the current state, ending up in a state having propertyT . R(T )is theimageof T viaR, which is in fact thestrongest property (among all proper-ties inP(Ī£Ć— Ī£) ) ensured to hold after applying programR if a preconditionTholds at the input-state. This is the ā€strongest postconditionā€ in an absolute sense.However, thestrongest testable postcondition(ensured to hold after runningR ifpreconditionT holds at the input state) is given byR[T ]. 2T means that propertyT will hold afteranymeasurement (quantum test) performed on the current state.Finally, 3T means that propertyT is potentially satisfied, in the sense that onecan do some quantum test to reach a state with propertyT .

Lemma 1. For every propertyS āŠ† Ī£, we haveSāŠ„ = [S?]āˆ… = Ī£ \ 3S andS = 23S.

Proposition 1. For every propertyS āŠ† Ī£, if T āˆˆ L (i.e. is testable), then2S, SāŠ„, [S?]T āˆˆ L (are testable), and more generally[R]T āˆˆ L, for every quan-tum relationR. For every states āˆˆ Ī£, we have{s} āˆˆ L, i.e. ā€œstates are testableā€.

Proposition 2. A propertyS āŠ† Ī£ is testable if and only if any of the followingequivalent conditions hold:

ā€¢ S = S;

ā€¢ āˆƒT āˆˆ Ī£ such thatS = TāŠ„;

ā€¢ āˆƒT āˆˆ Ī£ such thatS = 2T .

Quantum Joins. The familyL of testable properties is acomplete latticewithrespect to inclusion, having as its meet set-intersectionS āˆ© T , and as its join thebiorthogonal closure of set-unionS t T := S āˆŖ T , called thequantum joinofS andT . For any arbitrary propertyS āŠ† Ī£, we haveS =

āŠ”{{s} : s āˆˆ S} =ā‹‚

{T āˆˆ L : S āŠ† T}, so the biorthogonal closure ofS is the strongest testableproperty implied by (the property)S.

8

Theorem 1. The following properties hold in every quantum frameĪ£ = Ī£(H):

1. Partial functionality: If sS?ā†’ t ands

S?ā†’ v thent = v.

2. Trivial tests:āˆ…?ā†’= āˆ… and

Ī£?ā†’= āˆ†Ī£, whereāˆ†Ī£ = {(s, s) : s āˆˆ Ī£} is theidentity relation onĪ£Ć— Ī£.

3. Atomicity. States are testable, i.e.{s} āˆˆ L.This is equivalent to requiring that ā€œstates can be distinguished by testsā€,i.e. if s 6= t thenāˆƒP āˆˆ L : s āŠ„ P, t 6āŠ„ P

4. Adequacy. Testing a true property does not change the state:

if s āˆˆ P thensP?ā†’ s

5. Repeatability. Any testable property holds after it has been successfully

tested: ifsP?ā†’ t thent āˆˆ P

6. Compatibility:If S, T āˆˆ L are testable andS?;T? = T?;S? thenS?;T? = (S āˆ© T )?.

7. Self-Adjointness: if sP?ā†’ wā†’t then there exists some elementv āˆˆ Ī£ such

thattP?ā†’ vā†’s

8. Proper Superposition. Every two states of a quantum system can be prop-erly superposed into a new state:āˆ€s, t āˆˆ Ī£āˆƒw āˆˆ Ī£ sā†’wā†’t

9. Unitary Reversibility and Totality. Basic unitary evolutions aretotal bijec-tive functions, having as adjoint their inverse:

U ;Uā€  = Uā€ ;U = id

whereid is the identity map

10. Orthogonality Preservation. Basic unitary evolutions preserve (non) or-

thogonality: Lets, t, sā€², tā€² āˆˆ Ī£ be such thatsUā†’ sā€²andt

Uā†’ tā€². Then:sā†’ t iff sā€² ā†’ tā€².

Proofs: Partial functionalityfollows from the fact that projectors correspondto partially defined maps inH. Trivial testsfollows from the fact that projectingon the empty space yields the empty space and that projecting on the total spacedoesnā€™t change anything.Atomicity follows from the fact that states are nothing

9

but one-dimensional closed linear subspaces, i.e. atoms of the lattice of all closedlinear subspaces.Adequacyfollows from the fact that for everyx āˆˆ W we havethatPW (x) = x. Repeatabilityfollows from the fact thatPW (x) āˆˆ W for everyx āˆˆ H. Compatibilityfollows from the fact that if two projectors commute, i.e.PW ā—¦ PV = PV ā—¦ PW , thenPW ā—¦ PV = PWāˆ©V . Self-Adjointnessfollows fromthe more general Adjointness theorem stated below, together with the fact thatprojectors are self-adjoint (i.e.S?ā€  = S?). Proper Superpositionscan be provedby cases: Ifs 6āŠ„ t, i.e. lets ā†’ t, thenw = s ā‡’ s ā†’ s ā†’ t. If s āŠ„ t, i.e. lets 6ā†’ t then lets = x, t = y with x, y āˆˆ H. Take the superpositionx+y āˆˆ H of xandy and note thatx+ y 6= 0 (since fromx+ y = 0 ā‡’ x = āˆ’y ā‡’ s = t whichcontradictss 6āŠ„ t). Next observe thatx 6āŠ„ (x+ y) (Indeed, supposex āŠ„ (x+ y)then怈x | x+y怉 = 0 and then怈x | x怉+怈x | y怉 = 0; butx āŠ„ y implies怈x | x怉 = 0.So from怈x | x怉 = 0 follows thatx = 0, which yields a contradiction). Similarly,we gety 6āŠ„ (x + y). The last two conditions are immediate consequences of thedefinition of a unitary operator.

Note that, as a consequence of the ā€œProper Superpositionsā€ property,the double-box modality22 coincides with the universal modality, i.e.: 22S 6= āˆ… iff S = Ī£.

Theorem 2. (Adjointness) LetF be a quantum map and lets, w, t āˆˆ Ī£ be states:

If sFā†’ wā†’t then there exists some statev āˆˆ Ī£ such thatt

F ā€ 

ā†’ vā†’s.

Proof: To prove this theorem we use the definition of adjointness in a Hilbertspace:怈Fx | y怉 = 怈x | F ā€ y怉. From this, we get the equivalence:怈Fx | y怉 = 0iff 怈x, F ā€ y怉 = 0; or, otherwise stated,Fx āŠ„ y iff x āŠ„ F ā€ y. Taking the negationof both sides and using the fact that the measurement relationsā†’t is the same

as non-orthogonalitys 6āŠ„ t, we obtain the equivalence:āˆƒw(x Fā†’ w ā†’ y) iff

āˆƒv(y F ā€ 

ā†’ v ā†’ x).This proves the adjointness property. As a consequence:

Corollary 1. For every propertyP āŠ† Ī£ and every linear mapF we have:P āŠ†[F ]2怈F ā€ ć€‰3P

Corollary 2. If F is a quantum map, then

F ā€ (s) =([F ]sāŠ„

)āŠ„Proof: Using the fact that the negation of the measurement accessibility

relationā†’ is the orthogonality relationāŠ„, we immediately obtain from the aboveTheorem that:

s āŠ„ F ā€ (t) iff t āŠ„ F (s),

10

i.e.s āˆˆ (F ā€ (t))āŠ„ iff F (s) āˆˆ tāŠ„.

From this, we obtain that(F ā€ (t))āŠ„ = [F ]tāŠ„. SinceF ā€  is a map, F ā€ (t) is a(single) state, so it is atestableproperty. Hence, we haveF ā€ (t) = (F ā€ (t))āŠ„āŠ„ =([F ]tāŠ„)āŠ„.

This result leads us to the following natural generalization of the notion ofadjoint to all quantum actions:

Adjoint of a Quantum Action . For every quantum actionR āŠ† Ī£Ć—Ī£, we definea relationRā€  āŠ† Ī£Ć— Ī£ by:

sRā€ t iff t āŠ„ [R]sāŠ„

or, in other words,Rā€ (s) =

([R]sāŠ„

)āŠ„Proposition 3. For all quantum actionsR,Z āŠ† Ī£ Ɨ Ī£, statess, t āˆˆ Ī£ andpropertiesS āŠ† Ī£, we have the following:

1. Rā€  is a quantum action;

2. if R = F is a (quantum, i.e. linear) map7 then the relational adjointRā€ 

coincides with the Hermitian adjointF ā€  (of F as linear map).

3. s āŠ„ Rā€ (t) iff t āŠ„ R(s) .

4. (R;Z)ā€  = Zā€ ;Rā€ .

5. (R āˆŖ Z)ā€  = Rā€  t Zā€ .

6. R[S] = ([Rā€ ]SāŠ„)āŠ„.

7We identify a mapF : Ī£ ā†’ Ī£ with its graphF āŠ† Ī£ Ɨ Ī£, i.e. quantum maps are special casesof quantum relations, which happen to be be partial functions. SoR = F means that the two sides areequal, as relations.

11

2.2 Compound-System Quantum Frames

In this subsection we like to extend the quantum frame presented above for singlesystems into a quantum frame for compound systems. LetH be a Hilbert space ofdimension2 with basis{| 0怉, | 1怉}. We fix a natural numbern ā‰„ 2 (although laterwe will restrict to the casen ā‰„ 4), and we putN = {1, 2, . . . , n}. A compound-system quantum framewill be the quantum frameĪ£(Hn) build on a Hilbert spaceHn = HāŠ—n = H āŠ—H āŠ— ...āŠ—H (n times) .

Notation. In fact, we consider all then copies ofH as distinct (although iso-morphic) and denote byH(i) the i-th component of the tensorHāŠ—n. Also, forany set of indicesI āŠ† N , we putHI = H

NI =

āŠ—iāˆˆI H

(i). (So, in partic-ular, HN = Hn = H.) We denote byĪµi : H ā†’ H(i) the canonical isomor-phism betweenH andH(i). This notation can be extended to setsI āŠ† N ofindices of length|I| = k, by puttingĪµI : HāŠ—k ā†’ HI to be the canonical iso-morphism between these spaces. Similarly, for each setI āŠ† N , we denote byĀµI : HI āŠ—HN\I ā†’ H the canonical isomorphism between these two spaces. Forany vector| x怉 āˆˆ H, we denote by| x怉

NI =

āŠ—iāˆˆI | x怉

NI the corresponding

vector inHI (obtained by tensoring|I| copies of| x怉 ). Given a setI āŠ† N , we saythat a states āˆˆ Ī£(H) has itsI-qubits in statesā€² āˆˆ Ī£(HI), and writesI = sā€², ifthere exist vectorsĻˆ āˆˆ s, Ļˆā€² āˆˆ HI andĻˆā€²ā€² āˆˆ HN\I such thatĻˆ = ĀµI(Ļˆā€² āŠ— Ļˆā€²ā€²).Note that the statesI , if it exists, then it is unique(having the above property).We say that the states is I-separatediff sI exists. In thus case,sI is called the(I-)local component(or local state) of s. In particular, whenI = {i}, the localcomponentsi āˆˆ H{i} = H(i) is calledthei-th coordinateof the states.

We will further denote the vector| 0怉+ | 1怉 by | +怉, and similarly denote| 0怉āˆ’ | 1怉 by | āˆ’怉. For the states generated by the vectors in a two dimensionalHilbert space we introduce the following abbreviations:+ := | +怉, āˆ’ := | āˆ’怉 ,0 := | 0怉 , 1 := | 1怉. In order to refer to the state corresponding to a pair of qubits,we similarly delete the Dirac notation, e.g.00 := | 00怉 = | 0怉āŠ— | 0怉. The Bellstates will be abbreviated as follows:Ī²00 := | 00怉+ | 11怉 , Ī²01 := | 01怉+ | 10怉,Ī²10 := | 00怉āˆ’ | 11怉 , Ī²11 = | 01怉āˆ’ | 10怉 andĪ³ := | 00怉+ | 01怉+ | 11怉+ | 10怉.

The following two results are well-known:

Proposition 4. Let H(i) andH(j) be two Hilbert spaces. There exists a bijec-tive correspondenceĻˆ between the linear mapsF : H(i) ā†’ H(j) and the statesof H(i) āŠ— H(j). Given the bases{Īµ(i)Ī± }Ī± and{Īµ(j)Ī² }Ī² of these spaces, the corre-

spondenceĻˆ is given by the mappingF = Ī£Ī±Ī² mĪ±Ī² 怈Īµ(i)Ī± | āˆ’怉.Īµ(j)Ī² into the state

Ļˆ(F ) = Ī£Ī±Ī² mĪ±Ī² .Īµ(i)Ī± āŠ— Īµ

(j)Ī² .

12

Proposition 5. Let H = HāŠ—n and letW = {xāŠ— | 0怉āŠ—(nāˆ’1) : x āˆˆ H} begiven. Any linear mapF : H ā†’ H induces a linear mapF(1) : H ā†’ H in acanonical manner: it is defined as the unique map onH satisfyingF(1)(x) =PW ā—¦ F (xāŠ— | 0怉āŠ—(nāˆ’1)). Conversely, any linear mapG : H ā†’ H can be repre-sented asG = F(1) for some linear mapF : H ā†’ H.

Notation. The above results allow us to specify a compound state inH(i) āŠ—H(j)

via some linear mapF onH. Indeed, ifF : H ā†’ H is any such linear map, letF(1) : H ā†’ H be the map in the above proposition; this induces a corresponding

mapF (ij)(1) : H(i) ā†’ H(j), by puttingF (ij)

(1) := Īµj ā—¦ F(1) ā—¦ Īµāˆ’1i , whereĪµi is

the canonical isomorphism introduced above (betweenH and thei-th componentH(i) of HāŠ—n ). Then we denote byF (ij) the state

F (ij) := Ļˆ(F (ij)(1) )

given by the above mentioned bijective correspondenceĻˆ betweenH(i) ā†’ H(j)

andH(i) āŠ—H(j). The following result is also known from the literature:

Proposition 6. Let F : H ā†’ H be a linear map. Then the stateF (ij) is ā€œentan-gled according toF ā€; i.e. if F(1)(| x怉) =| y怉 and if the state of a 2-qubit systemis F (ij) āˆˆ H(i) āŠ— H(j), then any measurement of qubiti resulting in a statexi

collapses the qubitj to stateyj .

In our axiomatic proof system, we will take (a syntactic counterpart of) thisresult as our central axiom, the ā€œEntanglement Axiomā€.

Notation. The notationF (ij) can be further extended to define a property (setof states)F ij āŠ† Ī£ = Ī£(H), by defining it asthe set of all states having the{i, j}-qubits in the stateF (ij) :

F ij = {s āˆˆ Ī£ : s{i,j} = F (ij)}= {Āµ{i,j}(Ļˆ āŠ— Ļˆā€²) : Ļˆ āˆˆ F (ij), Ļˆ

ā€² āˆˆ HN\{i,j}} āŠ† Ī£

whereĀµ{i,j} is as above the canonical isomorphism betweenH{i,j} āŠ—HN\{i,j}.In other words,F ij is simply the property of ann-qubit compound state of havingits i-th andj-th qubits (separated from the others, and) in a state that is ā€œentangledaccording toF ā€ .

13

Local properties and separation. Given a setI āŠ† N , a propertyS āŠ† Ī£ is localin I if it corresponds to a property of the subsystem formed by the qubits inI; inother words, if there exists some propertySā€² āŠ† Ī£(HI) such that:

Sā€² = {s āˆˆ Ī£ : sI āˆˆ Sā€²}

or, more explicitly: Sā€² = {ĀµI(Ļˆ āŠ— Ļˆā€²) : Ļˆ āˆˆ Sā€², Ļˆā€² āˆˆ HN\I}. An exampleis the propertyF ij , which is{i, j}-local. The family of local properties forms acomplete lattice(with inclusion) in which the join is given byunionS āˆŖ T , theatomscorrespond tolocal states, and thegreatest elementis the property

>Ī£I := {s āˆˆ Ī£ : s is I āˆ’ separated} =

ā‹ƒ{S āŠ† Ī£ : S is I āˆ’ local}

that definesseparation: a states is I-separated iffs āˆˆ >Ī£I . The family of local

properties is closed under union, intersection butnot under complementation.

Local Maps. GivenI āŠ† N , a linear mapF : H ā†’ H is I-local if it ā€œaffects onlythe qubits inI ā€œ; in other words, if there exists a mapG : HI ā†’ HI such that:

F ā—¦ ĀµI (Ļˆ āŠ— Ļˆā€²) = ĀµI (G(Ļˆ)āŠ— Ļˆā€²)

A mapF : Ī£ ā†’ Ī£ is I-local if it is the map induced onĪ£ by anI-local linear maponH. Examplesare: all the testsSI? of I-local properties; logic gates that affectonly the qubits inI, i.e. (maps onĪ£ induced by) unitary transformationsUI :H ā†’ H such that for allĻˆ,Ļˆā€² āˆˆ HI , we haveUI ā—¦ĀµI(ĻˆāŠ—Ļˆā€²) = ĀµI(U(Ļˆ)āŠ—Ļˆā€²),for someU : HI ā†’ HI . The family of local maps is closed under composition.

Local actions. A local action is a quantum actionR āŠ† Ī£ Ɨ Ī£ that that can bewritten as an arbitrary8 union of local maps. The family of local actions forms acomplete lattice(with inclusion), in which the join is given byunionR āˆŖRā€², andthegreatest elementis the action

>Ī£Ć—Ī£I :=

ā‹ƒ{F : Ī£ ā†’ Ī£ : F is anI āˆ’ local map}

Lemma 2. (ā€œTeleportation Propertyā€) If s is ani-separated state having itsi-thqubitsi in the statex āˆˆ H, then after doing two successive bipartite measurementsGjk? followed byFij?, thek-th qubit (k-th component of) the output-state is:(

Fij? ā—¦Gjk?(s))k

= G(1) ā—¦ F(1)(x)

8i.e. possibly infinite

14

Lemma 3. (ā€œEntanglement Composition Lemmaā€)The main lemma in [15]states (in our notation) that, given a quadruple ofdistinct indices i, j, k, l, letF,G,H,U, V : H ā†’ H be single-qubit linear maps (i.e.1-local transforma-tions), then we have:

Gjk? ā—¦ Vk ā—¦ Uj (F ij āˆ©Hkl) āŠ† (H ā—¦ Uā€  ā—¦G ā—¦ V ā—¦ F )il

[15] and [1] use these last two lemmas as the main tool in explaining teleportation,quantum gate teleportation and many other quantum protocols. We will use thiswork in our logical treatment of such protocols, by formally proving (syntacticcorrespondents of) these lemmas in our axiomatic proof system, and then usingthem to analyze teleportation.

Observe that in the above Lemma, the order in which the operationsUj andVk

are applied is in factirrelevant. This is a consequence of the following importantproperty of local transformations:

Proposition 7. (Compatibility of local transformations affecting different sets ofqubits)If I āˆ© J = āˆ…, FI is anI-local map andGJ is aJ-local map, then we have:

FI ā—¦GJ = GJ ā—¦ FI

Another important property of local maps (onstates) is:

Proposition 8. ( ā€œAgreement Propertyā€)Let FI , GI : Ī£ ā†’ Ī£ be twoI-localmaps on states, having the same domain9: dom(F ) = dom(G). Then theiroutput-states agree on all non-I qubits, i.e. for alls āˆˆ Ī£:

F (s)N\I = G(s)N\I

whenever both sides of the identityexist(i.e. whenever bothF (s) andG(s) areI-separated.)

Dynamic Characterizations of Main Unitary Transformations.

It is well-known that a linear operator on a vector space in a given Hilbert spaceis uniquely determinedby the values it takes on the vectors of an (orthonormal)basis. An important observation is that this fact is no longer ā€œliterally trueā€ when

9The domain of a map is defined bydom(F ) = {s āˆˆ Ī£ : F (s) is defined}. If F ā€² is thecorresponding linear map onH, this means thatdom(F ) = {Ļˆ : F ā€²(Ļˆ) 6= 0}.

15

we move to ā€œstatesā€ as one-dimensional subspaces instead of vectors. The reasonis that ā€œphaseā€-aspects (or, in particular, the signs ā€œ+ā€ and ā€œāˆ’ā€) are not ā€œstateā€properties in our setting. In other words, two vectors that differ only in phase,i.e x = Ī»y whereĪ» is a complex number with| Ī» |= 1, belong to the samesubspaces, so they correspond to the same statex = y.

Example 1. (Counterexample) Consider a 2 dimensional Hilbert space inwhich we denote the basis vectors by| 0怉 and | 1怉, a transformationI is givenby I(Ī±| 0怉 + Ī²| 1怉) = Ī± | 0怉 + Ī² | 1怉; and a transformationJ is given byJ(Ī±| 0怉+ Ī²| 1怉) = Ī± | 0怉 āˆ’ Ī² | 1怉. AlthoughI andJ induce different operatorson states , these operators map the basis states to the same images:I(0) = I(| 0怉) = 0 = J(| 0怉) = J(0), I(1) = I(| 1怉) = 1 = āˆ’ | 1怉 = J(| 1怉) =J(1). But of course we do distinguish the subspaces generated by different super-positions:I(+) = | 0怉+ | 1怉 = + 6= āˆ’ = | 0怉āˆ’ | 1怉 = J(+).

Proposition 9. A linear operator on the state spaceĪ£(H1) of a 2 dimensionalHilbert space is uniquely determined by its images on the states:| 0怉, | 1怉, | +怉.

Corollary 3. A linear operator on the state spaceĪ£(Hn) of the spaceHn isuniquely determined by its images on the states:

{| x怉1 āŠ— ...āŠ— | x怉n :| x怉i āˆˆ {| 1怉i, | 0怉i, | +怉i}}

In the definition of a quantum frame given above, we introduced the setU asthe set of unitary transformations for single systems. For compound systemsthe setU will be extended with the kind of operators that are active on com-pound systems. Following the quantum computation literature, we takeU ={X,Z,H,CNOT, ...} whereX,Z andH are defined by the following table:

0 1 +

X 1 0 +Z 0 1 -H + - 0

The transformationCNOT is given by the table:

00 01 0+ 11 10 1+ +0 +1 ++CNOT 00 01 0+ 10 11 1+ Ī²00 Ī²01 Ī³

16

3 The LogicLQP

Syntax ofLQP

To build up the language ofLQP , we are given a natural numbern, and weputN = {1, 2, . . . , n}. We start from a setQ of propositional variables, a setC of propositional constants; and a setU of program constants, denotingbasicprograms, to be interpreted asquantum gates(i.e. unitary transformations); eachprogram constantU āˆˆ U comes together with an indexI, which is a sequence ofdistinct indices inN ; the index gives us the set of qubits on which the quantumgateU is active; when we want to make explicit the index, we write e.g.UI foran I-local quantum gates. In particular, for everyi, j ā‰¤ n, we are given somespecial program constantsCNOTij , Xi,Hi, Zi, . . . āˆˆ U . Similarly, we are giventwo special propositional constants1,+ āˆˆ C, the first denoting the separated state| 1怉āŠ—n =| 1怉āŠ— | 1怉 Ā· Ā· Ā· āŠ— | 1怉 and the second denoting the state| +怉āŠ—n =| +怉āŠ— | +怉 Ā· Ā· Ā· āŠ— | +怉. The syntax ofLQP is an extension of the classical syntaxfor PDL, with a set of propositionalformulasand a set ofprograms, defined bymutual induction:

Ļ• ::= >I | p | c | Ā¬Ļ• | Ļ• āˆ§ Ļ• | [Ļ€]Ļ•Ļ€ ::= >I | Ļ•? | U | Ļ€ā€  | Ļ€ āˆŖ Ļ€ | Ļ€;Ļ€

Here, we takeI to denote sequences of distinct indices inN = {1, 2, . . . , n}. Thesentence>I expressesI-separation: it is true iff the qubits inI form a separatedsubsystem. So>I denotes the greatest element>Ī£

I of the lattice ofI-local prop-erties. In particular, the sentence> := >N denotes the ā€œalways trueā€ proposition(verum), i.e. the ā€œtopā€ of the lattice of all properties.10 The constructsĀ¬Ļ• andĻ•āˆ§Ļ• denote classical negation and conjunction, while the construct given by dy-namic modalities[Ļ€]Ļ• denotesthe weakest precondition that ensures that propertyĻ• will hold after running programĻ€.

On the program side:>I denotes thetrivial I-local action>Ī£Ć—Ī£I , which acts

on any givenI-separated state by keeping unchanged theN \ I subsystem, whilechanging theI subsystem to any randomly pickedI system. In other words,>I

is the union of allI-local actions. The meaning of quantum testĻ•?, adjointĻ€ā€ ,union Ļ€ āˆŖ Ļ€ and compositionĻ€;Ļ€ is given by the corresponding operations onquantum actions.

Notice that we did not includeiteration (Kleene star) among our programconstructs: this is only because we do not need it for any of the applications in

10Notice also the distinction between the constant1i (characterizing the qubit| 1怉I ) and the con-stant>i (denoting the property of beingi-separated).

17

this paper. Indeed, most quantum programming does not involvewhile-loops;but (as pointed in our Section 6) one can of course add iteration to our logic, ifneeded.

Extending the Basic Language ofLQP . We extend our language by definingthe operations for aclassical disjunctionand aclassical implicationin the usualway, i.e.Ļ•āˆØĻˆ := Ā¬(Ā¬Ļ•āˆ§Ā¬Ļˆ),Ļ•ā†’ Ļˆ := Ā¬Ļ•āˆØĻˆ. We introduce constantsverum> := >N , andfalsumāŠ„ := Ā¬>. We define theclassical dualof [Ļ€]Ļ• in the usualway as怈Ļ€ć€‰Ļ• := Ā¬[Ļ€]Ā¬Ļ• ; themeasurement modalities2 and3 that are known inthe quantum logic literature can be defined inLQP by putting3Ļ• := 怈Ļ•?怉> and2Ļ• := Ā¬3Ā¬Ļ•. Theorthocomplementis defined asāˆ¼ Ļ• := 2Ā¬Ļ•, or equivalentlyasāˆ¼ Ļ• := [Ļ•?]āŠ„. By means of the orthocomplement we define a binary operationfor quantum joinĻ• t Ļˆ :=āˆ¼ (āˆ¼ Ļ•āˆ§ āˆ¼ Ļˆ). This expressessuperpositions: Ļ• t Ļˆis true at any state which is a superposition of states satisfyingĻ• orĻˆ.

We also introduce some notions and notations for programs: we call a programĻ€ deterministicif Ļ€ is constructed without the use of non-deterministic choiceāˆŖor of the non-deterministic program>I . Also, we put

flipij := CNOTij ;CNOTji;CNOTij

for the program which (given any{i, j}-separated input state) permutes theith

and thejth components. Finally, we put

id := >?

for the identitymap.

Order, Equivalence, Orthogonality, I-equivalence, testability, locality, sepa-ration . We can internalize the relations oflogical equivalence, being weaker than,andI-equivalencebetween formulas, the properties oflocality andtestability, andthe notion ofI-componentby defining the following formulas:

Ļ• ā‰¤ Ļˆ := 22(Ļ•ā†’ Ļˆ)Ļ• = Ļˆ := 22(Ļ•ā†” Ļˆ)Ļ• āŠ„ Ļˆ := Ļ• ā‰¤āˆ¼ ĻˆT (Ļ•) := āˆ¼āˆ¼ Ļ• ā‰¤ Ļ•Ļ•I := >I āˆ§ 怈>N\I怉Ļ•Ļ• =I Ļˆ := Ļ• ā‰¤ >I āˆ§ Ļˆ ā‰¤ >I āˆ§ Ļ•I = ĻˆI

I(Ļ•) := Ļ• = Ļ•I

Recall from Section 2.1 that the double-box modality coincides with the universalmodality: so indeedĻ• ā‰¤ Ļˆ means thatĻ• is logically weakerthanĻˆ, whileĻ• = Ļˆ

18

means the formulas areequivalent. We readT (Ļ•) as saying that ā€œĻ• is testableā€,and I(Ļ•) as ā€œĻ• is I-localā€. We readĻ•I as ā€œtheI-component ofĻ• ā€: a statesatisfies this sentence iff (it isI-separated and) itsI-subsystem is (a subsystem ofsome state) satisfyingĻ•. For I = {i}, we writeĻ•i := Ļ•I . We readĻ• =I Ļˆ asā€œ Ļ• is I-equivalent toĻˆā€: the meaning is thatbothĻ• andĻˆ are I-separated andhave the sameI-component. Finally, we say thatĻ• is I-separatediff Ļ• ā‰¤ >I .

Notice that it obviously follows from these definitions thateveryI-componentĻ•I is I-local.

Special Local States. We can introduce some more propositional constants (whichwill denote special local stateS), by putting:0i :=āˆ¼ 1i andāˆ’i :=āˆ¼ +i.

Image and Strongest Post-condition. We define thestrongest testable post-conditionĻ€[Ļ•] ensured by (applying a program)Ļ€ on (any state satisfying a givenprecondition)Ļ•, by putting

Ļ€[Ļ•] := āˆ¼ [Ļ€ā€ ] āˆ¼ Ļ•

In the case thatĻ• is assumed to betestableandĻ€ is deterministic, the strongestpostconditionĻ€[Ļ•] coincides with theimageĻ€(Ļ•) of Ļ• via Ļ€. The definition ofimage of a testable property via a programĻ€(Ļ•) can be extended toall programswhich are finite unions of deterministic programs, by putting, for alltestablefor-mulasĻ†: Ļ€(Ļ†) = Ļ€[Ļ†] if Ļ€ is deterministic, and(Ļ€ āˆŖ Ļ€ā€²)(Ļ†) = Ļ€(Ļ†) āˆØ Ļ€ā€²(Ļ†) inrest.

Notice thecontrast with classicalPDL: unlike the classical version, ourquantumPDL (as considered above, i.e.without program converse11) has enoughexpressive power todefine strongest post-conditions (and, in a restrict contexts,images) using weakest preconditions! The reason is that, in some context, the no-tion of adjoint can replace the notion of converse. But notice that converse itselfis not expressible in our logic. This is for the best: the converse of a quantum ac-tion has no physical meaning (except in the case of reversible, unitary evolutions),while the adjoint is physically meaningful.Notation: For any sequenceI āŠ† N of indices and any vector~c = (c(i))iāˆˆI āˆˆ{0, 1,+}|I|, we set

~cI :=āˆ§iāˆˆI

c(i)i

11There also exists a version ofPDL with a program converse operatorĻ€^, such that the acces-sibility relation for the converseĻ€^ is defined as the converse of the accessibility relation forĻ€. Thatstronger logic can obviously express strongest post-condition of a programĻ€, using the existentialdynamic modalities, sinceĻ€(Ļ•) = 怈Ļ€^怉Ļ•.

19

The unary maps induced by a program: We want to capture in our syntaxthe constructionF(1), by which a linear mapF onHāŠ—n was used to describe aunary mapF(1) on H. For this, we put:0i! := 0i? āˆŖ (1i?;Xi), and0I ! :=0i1 !; 0i2 !; Ā· Ā· Ā· ; 0ik

!, whereI = (i1, i2, . . . , ik). This maps any qubit inI to 0.Similarly, we put;0I? := (0i1 āˆ§ 0i2 āˆ§ Ā· Ā· Ā· āˆ§ 0ik

)?. Finally we define:

Ļ€(i) := 0N\{i}!;Ļ€; 0N\{i}?

This is the map we need (which encodes a single qubit transformation). In fact,we shall only useĻ€(1) in the rest of this paper. We also want to consider theHi ā†’ Hj-version of the transformationĻ€(1), so we put:

Ļ€ij := flip1i;Ļ€(1); flip1j

Local programs. We would like to isolatelocal programs, i.e. the ones thatā€œaffect only the qubits in a given setI āŠ† N ā€. For this, we define a formulaI(Ļ€)meaning ā€œprogramĻ€ is I-localā€:

I(Ļ€) :=āˆ§

~c,~d,~dā€²

(~dN\I =N\I Ļ€(~cI āˆ§ ~dN\I) =I Ļ€(~cI āˆ§ ~dā€²N\I)

)

where the conjunction is taken over all~c āˆˆ {0, 1,+}|I| and all~d, ~dā€² āˆˆ {0, 1,+}nāˆ’|I|.Note that this definition is a simple formal translation of the semantic clauses

that express the fact that programĻ€ ā€œacts only locallyā€ (affecting only theI-subsystem, and in a way that depends only on theI-subsystem of the input state)on the states of the form~c (with c āˆˆ {0, 1,+}). As we will see, one of ouraxioms below (ā€œDeterminacy of deterministic programsā€) ensures that this clauseis enough to ensure that programĻ€ acts locallyon all (I-separated) states.

Entanglement according toĻ€. To describe states that are ā€œentangled accordingto Ļ€ ā€, we introduce the following formula:

Ļ€ij := >ij āˆ§āˆ§

cāˆˆ{0,1,+}

([ci?](Ļ€ij(ci))j āˆ§ (āˆ¼ ci ā†’ Ļ€ij(ci) = āŠ„))

Then, as a consequence, we will have the following obvious validity:

ci?(Ļ€ij) =j Ļ€ij(ci)

for everyci āˆˆ {0i, 1i.+i}.Again, note that the identity in this definition is a formal translation of the

semantic clause defining ā€œentanglement according to an actionā€,but only for the

20

particular case of local states of the formci (with c āˆˆ {1, 0,+}). And again, oneof our axioms below (the ā€œEntanglement Axiomā€) ensures that the above identityholds (not only for the elementsci, but) for all i-local states(i.e. all testablei-local properties).

Semantics ofLQPAn LQP -modelis amulti-partite quantum frameĪ£ = Ī£(H) based on ann-

dimensional Hilbert spaceH, together with avaluation function, mapping eachpropositional variablep into a set of states|| p ||āŠ† Ī£ . We will use the valuationmap to give an interpretation|| Ļ• || āŠ† Ī£ to all our formulas, in terms of quantumproperties of our multi-partite frame, i.e. sets of states inĪ£. In the same time, wegive an interpretation|| Ļ€ || āŠ† Ī£ Ɨ Ī£ to all our programs, in terms ofquantumactions. The two interpretations are defined bymutual recursion.

Interpretation of Programs.

|| >I || := >Ī£Ć—Ī£I , || Ļ•? || := || Ļ• ||?

|| U || := U , || Ļ€ā€  || := || Ļ€ ||ā€ || Ļ€1 āˆŖ Ļ€2 || := || Ļ€1 || āˆŖ || Ļ€2 || , || Ļ€1;Ļ€2 || := || Ļ€2 ||; || Ļ€1 ||

The interpretation|| Ļ€ || allows us to extend the notationĻ€ā†’ to all programs, by

putting: sĻ€ā†’ t iff (s, t) āˆˆ || Ļ€ ||.

Interpretation of Formulas. We extend the valuation|| p || from propositionalvariables to all formulas, by putting for the others:

|| 1 || = | 1怉āŠ—n , || + || = | +怉āŠ—n

|| Ļ• āˆ§ Ļˆ || = || Ļ• || āˆ© || Ļˆ || , || Ā¬Ļ• || = Ī£\ || Ļ• |||| [Ļ€]Ļ• || = [ || Ļ€ || ] || Ļ• || , || >I || = >Ī£

I

Proposition 10. The interpretation of any testable formula is a testable property.The interpretation of anI-local formula (orI-local deterministic program) is anI-local property (orI-local linear map on states).

Lemma 4. ||āˆ¼ Ļ• ||=|| Ļ• ||āŠ„, || [Ļ•?]Ļˆ ||= [|| Ļ• ||?] || Ļˆ ||, || 2Ļ• ||= 2 || Ļ• ||,|| Ļ• || =||āˆ¼āˆ¼ Ļ• ||

Proposition 11. The following are equivalent, for every formulaĻ•:1. || Ļ• || is testable (i.e.T (Ļ•) is valid)2. Ļ• is semantically equivalent toāˆ¼āˆ¼ Ļ•3. Ļ• is semantically equivalent to some formula2Ļˆ4. Ļ• is equivalent to some formulaāˆ¼ Ļˆ

21

4 Proof Theory for LQP

4.1 Axioms for single systems

First, we admitall the axioms and rulesof classicalPDL, except for the onesconcerning testsĻ•? and Kleene star12 Ļ€āˆ—. In particular, we have the

Substitution Rule. From ` Ī˜ infer ` Ī˜[p/Ļ•]and the ā€œnormalityā€ conditions for the dynamic modalities[Ļ€]:

Kripke Axiom. ` [Ļ€](pā†’ q) ā†’ ([Ļ€]pā†’ [Ļ€]q)Necessitation Rule. From ` p infer ` [Ļ€]pConsidering2p, we introduce the following axioms:Test Generalization Rule. If p does not occur inĻ• orĻˆ, then:from ` Ļ•ā†’ [q?]Ļˆ infer ` Ļ•ā†’ 2ĻˆTestability Axiom. ` 2pā†’ [q?]pTestability can be stated in its dual form by means of怈q?怉p ā†’ 3p or equiva-lently as怈q?怉pā†’ 怈p?怉>. This dual formulation of Testability allows us to give astraightforward interpretation: if the property associated top can be actualized bya measurement (yielding an output state satisfyingp), then we can directly test thepropertyp (by doing a measurement forp). The Test Generalization Rule encodesthe fact that2 is a universal quantifier over all possible measurements.

OtherLQP -axioms are:

Partial Functionality. ` Ā¬[p?]q ā†’ [p?]Ā¬qAdequacy. ` p āˆ§ q ā†’ 怈p?怉qRepeatability. ` T (p) ā†’ [p?]pProper Superpositions. ` 怈Ļ€ć€‰22pā†’ [Ļ€ā€²]pUnitary Functionality. ` Ā¬[U ]q ā†” [U ]Ā¬qUnitary Bijectivity 1. ` pā†” [U ;Uā€ ]pUnitary Bijectivity 2. ` pā†” [Uā€ ;U ]pAdjointness. ` pā†’ [Ļ€]2怈Ļ€ā€ ć€‰3p

Proposition 12. Testability is closed under conjunctions, weakest preconditions;2-sentences, orthocomplements and strongest postconditions are testable:

ā€¢ ` T (p) āˆ§ T (q) ā†’ T (p āˆ§ q)12We skip the axioms for iterationĻ€āˆ— only because we chose not to include this construct in our

logic. But if one addsĻ€āˆ— to our syntax, the usualPDL axioms for iteration are still sound, so theycan be added to the proof system.

22

ā€¢ ` T (p) ā†’ T ([Ļ€]p)

ā€¢ ` T (2p)

ā€¢ ` T (āˆ¼ p)

ā€¢ ` T (Ļ€[p])

A formulaĻ• is calledtestableif the theorem

` T (Ļ•)

is provable in our system. Observe that this notion is proof-theoretic. However,the above Proposition gives us a purely syntactical way to check testability:

Corollary : Any formula of the formula of the form2Ļ•, āˆ¼ Ļ• or >, or whichcan be obtained from these formulas using only conjunctionsĻ† āˆ§ Ļˆ and weakestpreconditions[Ļ€]Ļ•, is testable.

Proposition 13. (Quantum Logic, Weak Modularity or Quantum Modus Ponens)All the axioms and rules of traditional Quantum Logic are satisfied by ourtestableformulas. In particular, from our axioms one can prove ā€œQuantum Modus Po-nensā€13 Ļ• āˆ§ [Ļ•?]Ļˆ ā‰¤ Ļˆ. In its turn, this rule is equivalent to the condition knownin quantum logic as Weak Modularity, stated as follows:Ļ•āˆ§(āˆ¼ Ļ•t(Ļ•āˆ§Ļˆ)) ā‰¤ Ļˆ.

Theorem 3. (Soundness and Completeness)All the other axioms above aresound. Moreover,if we eliminate from the syntax of our logic all the specialconstants(both propositional constants>I , 1 and+, and program constants>I ,CNOT ,X,H, Z etc.),then there exists a complete proof system, which includesthe above axioms.14

The proof of this theorem is given in our paper [6], and it is based on anextension of (Mayetā€™s version [28] of) Solerā€™s Theorem [36], itself an extensionof Pironā€™s Representation Theorem for Piron lattices [31, 32, 2].

13This explains why the weakest precondition[Ļ•?]Ļˆ has been taken as the basic implicational con-

nective in traditional Quantum Logic, under the name of ā€œSasaki hookā€, denoted byĻ•Sā†’ Ļˆ.

14In addition, the system includes two more axioms of a rather technical nature, namely Pironā€™sā€œCovering Lawā€ (due to C. Piron in [32]) and ā€œMayetā€™s Conditionā€ (due to Mayet in [28]). See [6] fordetails.

23

Proposition 14. The formulaĻ€[Ļ•] expresses thestrongest testable postconditionensured by executing programĻ€ on any state satisfying (precondition)Ļ•. In otherwords: for everytestableĻˆ, we have

Ļ€[Ļ•] ā‰¤ Ļˆ iff Ļ• ā‰¤ [Ļ€]Ļˆ

Proposition 15. (Adjointness Theorem)For all testableformulasĻ•,Ļˆ, we have:

Ļ• āŠ„ Ļ€[Ļˆ] iff Ļ€ā€ [Ļ•] āŠ„ Ļˆ

4.2 Axioms for compound systems

Axioms for the trivial I-local program. The program>I is the weakestI-localprogram; i.e.:

` I(Ļ€) ā†’ 怈Ļ€ć€‰p ā‰¤ 怈>I怉p

and` I(>I).

As an immediate consequence, we obtain that

āˆ¼ >I = āŠ„

(since it is easy to see that the identity programid is I-local for every, so applyingthe first axiom above to the programĻ€ = id, we obtain that> = 怈id怉> ā‰¤ 怈>I怉>,i.e.> = 怈>I怉>, and soāˆ¼ >I = [>I?]āŠ„ = Ā¬ć€ˆ>I怉> = Ā¬> = āŠ„).

Another immediate consequence is thatthe formula>I is the weakestI-localproperty, i.e. we have:

` I(>I)

and` I(p) ā†’ p ā‰¤ >I .

Syntactically, we define anā€œ I-local stateā€ to be any sentenceĻ• such that

` I(Ļ•) āˆ§ Ļ• 6= āŠ„ āˆ§ (I(p) āˆ§ āŠ„ 6= p ā‰¤ Ļ• ā†’ p = Ļ•)

for somep not occurring inĻ•. In other words, these are propositions that can beproved to be atoms of the lattice of (consistent)I-local properties.

24

Local States Axiom. Testable local properties are ā€œlocal statesā€(in the abovesense, i.e. atomic local properties): ifI 6= N then

` T (p) āˆ§ I(p) āˆ§ I(q) āˆ§ āŠ„ 6= q ā‰¤ p ā†’ q = p

Basic-State Testability Axiom. Our basic local statesci, Ļ€ij are testable: Ifi, j āˆˆ N , c āˆˆ {0, 1,+,āˆ’} andĻ€ is a deterministic program, then we have

` T (ci) āˆ§ T (Ļ€ij)

As an immediate consequence of the last two axioms, we have that all con-stants of the form~cI (with ~c āˆˆ {0, 1,+,āˆ’}|I|)) are (testable)I-local states; simi-larly, if Ļ€ is deterministic thenĻ€ij is a (testable){i, j}-local state.

The following inference rule says that the lattice of local properties isatom-istic:

Local Atomicity Rule . Local properties are unions of testable local properties(i.e. of local states): if I 6= N and the variablep does not occur inĻ•, Ļˆ or Īø, thenfrom ` Ļˆ āˆ§ T (pI) āˆ§ pI ā‰¤ Ļ• ā†’ pI ā‰¤ Īøinfer ` Ļˆ āˆ§ I(Ļ•) ā†’ Ļ• ā‰¤ Īø

As a consequence of the above axioms and rules, we obtain the following

Corollary . For I 6= N , every local state is testable. In other words:if I 6= N andp does not occur inĻ•, then from

` I(Ļ•) āˆ§ Ļ• 6= āŠ„ āˆ§ (I(p) āˆ§ āŠ„ 6= p ā‰¤ Ļ• ā†’ p = Ļ•)

we can infer ` T (Ļ•).Separation Axiom. If a state is bothI-separated andJ-separated, then it is alsoN \ I-separated,I āˆŖ J-separated andI āˆ© J-separated:

` >I āˆ§ >J ā†’ >N\I āˆ§ >IāˆŖJ āˆ§ >Iāˆ©J

The following axioms state that+i andāˆ’i are proper superpositions of0i and1i:

Proper Superposition Axioms: ` +i ā†’ 30i āˆ§31i and ` āˆ’i ā†’ 30i āˆ§31i.

The next axiom expresses the above-mentioned property of linear operators onH of being uniquely determined by their values on all the states| x怉1 āŠ— Ā· Ā· Ā· | x怉n,with | x怉i āˆˆ {| 0怉i, | 1怉i, | +怉i}:

25

Determinacy Axiom of Deterministic Programs. For deterministic programsĻ€, Ļ€ā€²:

`āˆ§

~cāˆˆ{0,1,+}n

(Ļ€(~cN ) = Ļ€ā€²(~cN ) ā†’ Ļ€(p) = Ļ€ā€²(p) )

The next axiom is the central one of our system, capturing the computationalessence of entanglement, as a semantic counterpart of Proposition 6 of Section 2:

Entanglement Axiom. If Ļ€ is deterministic andi 6= j, then:

` T (pi) ā†’ pi?(Ļ€ij) =j Ļ€ij(pi)

Before presenting out next axioms, we note some consequence of the previousones. First, as for testability, we can define a proof-theoretic notion of locality. AformulaĻ• is I-local if ` I(Ļ•) is a theorem; similarly, a programĻ€ is I-local if` I(Ļ€) is a theorem.

Proposition 16. Any formula of the formĻ•I is alwaysI-local. Any formula ofthe formĻ€ij is {i, j}-local. If Ļ• andĻˆ areI-local formulas andĻ€ is anI-localprogram, thenĻ• āˆØ Ļˆ, Ļ• āˆ§ Ā¬Ļˆ andĻ• āˆ§ [Ļ€]Ļˆ areI-local. If Ļ• is I-local andĻˆ isJ-local, thenĻ• āˆ§ Ļˆ is I āˆŖ J-local.

Proposition 17. If Ļ• is atestableI-local formula, thenĻ•? is anI-local program.>I is I-local. If Ļ€ andĻ€ā€² areI-local, thenĻ€ āˆŖ Ļ€ā€² andĻ€;Ļ€ā€² areI-local.

Proposition 18. Local programs act locally.In other words:

` I(Ļ€) āˆ§ p =I q ā†’ p =N\I Ļ€(p) =I Ļ€(q)

Proposition 19. Systems composed of identical parts are identical:

` p =I q āˆ§ p =J q ā†’ p =IāˆŖJ q

Proposition 20. ` pI āŠ„ q ā†” pI āŠ„ qI

Proposition 21. (Dual Local Atomicity Rule).If I 6= N , Ļ• andĪø areI-separated,andp does not occur inĻ•,Ļˆ or Īø, then: from

` Ļˆ āˆ§ T (pI) āˆ§ pI āŠ„ Ļ• ā†’ pI āŠ„ Īø

infer` Ļˆ āˆ§ T (Ļ•I) āˆ§ T (ĪøI) ā†’ Ļ• =I Īø

26

Proof: By using the fact thatpI āŠ„ q ā†” pI āŠ„ qI and theI-locality of pI , wecan rewrite the assumption as

` Ļˆ āˆ§ T (pI) āˆ§ pi ā‰¤ (>Iāˆ§ āˆ¼ Ļ•I) ā†’ pI ā‰¤ (>Iāˆ§ āˆ¼ ĪøI)

Assume nowĻˆ āˆ§ T (Ļ•I) āˆ§ T (ĪøI). Then the formula>Iāˆ§ āˆ¼ Ļ•I = >I āˆ§ Ā¬(>I āˆ§[Ļ•I?]āŠ„) is I-local (sinceĻ•I is testableI-local, soĻ•I? is anI-local program, so>I āˆ§ [Ļ•I?]āŠ„ is I-local) and similarly>Iāˆ§ āˆ¼ ĪøI is I-local. So we can apply theLocal Atomicity Rule, obtaining that:(>Iāˆ§ āˆ¼ Ļ•I) ā‰¤ (>Iāˆ§ āˆ¼ ĪøI). Applyingorthocomplementation, we have that:āˆ¼ (>Iāˆ§ āˆ¼ ĪøI) ā‰¤āˆ¼ (>Iāˆ§ āˆ¼ Ļ•I). Fromthis we get that:ĪøI =āˆ¼āˆ¼ ĪøI = āŠ„t āˆ¼āˆ¼ ĪøI =āˆ¼ >It āˆ¼āˆ¼ ĪøI =āˆ¼ (>Iāˆ§ āˆ¼ĪøI) ā‰¤āˆ¼ (>Iāˆ§ āˆ¼ Ļ•I) =āˆ¼ >It āˆ¼āˆ¼ Ļ•I = āŠ„ t Ļ•I = Ļ•I . But by the Local StatesAxiom, this implies thatĪøI = Ļ•I (since both are testableI-local with I 6= N ,thus they are local states). Since bothĪøI andĻ•I areI-separated, it follows thatĪø =I Ļ•.

Theorem 4. (Compatibility of Programs Affecting Different Qubits).If Iāˆ©J = āˆ…andĻ€, Ļ€ā€² are deterministic, then

` I(Ļ€) āˆ§ J(Ļ€ā€²) ā†’ Ļ€;Ļ€ā€²(p) = Ļ€ā€²;Ļ€(p)

Proof: This is an immediate application of the Determinacy Axiom above.By that axiom, it is enough to show the required identity for allp of the formp = ~cN , with ~c āˆˆ {0, 1,+}n. Using the fact thatI āˆŖ (N \ (I āˆŖ J)) āŠ† N \ J andJāˆŖ(N\(IāˆŖJ)) āŠ† N\I (sinceIāˆ©J = āˆ…) and the Proposition saying that local pro-grams ā€œact locallyā€, we can easily show that(Ļ€;Ļ€ā€²)(~cN ) =N\(IāˆŖJ) cN =N\(IāˆŖJ)

(Ļ€ā€²;Ļ€)(~cN ), (Ļ€;Ļ€ā€²)(~cN ) =I Ļ€(~cN ) =I (Ļ€ā€²;Ļ€)(~cN ) and(Ļ€;Ļ€ā€²)(~cN ) =J Ļ€ā€²(~cN ) =J

(Ļ€ā€²;Ļ€)(~cN ). Using a previous Proposition, we put these together to conclude that(Ļ€;Ļ€ā€²)(~cN ) =IāˆŖJāˆŖ(N\(IāˆŖJ)) (Ļ€ā€²;Ļ€)(~cN ), i.e. that(Ļ€;Ļ€; )(~cN ) = (Ļ€ā€²;Ļ€)(~cN ).

Proposition 22. (Dual Entanglement).If Ļ€ is deterministic andi 6= j, then

` T (qj) ā†’ qj?(Ļ€ij) =i Ļ€ā€ ij(qj)

Proof: AssumeT (qj) and we need to show thatqj?(Ļ€ij) =i Ļ€ā€ ij(qj). Itis easy to see that both sides arei-separated (i.e.ā‰¤ >i), and also that both(qj?(Ļ€ij))i and(Ļ€ā€ ij(qj))i are testable (since they are local states), so we are inthe conditions of the Dual Local Atomicity Rule (Proposition 21) above. By thatProposition, to prove the above identity, it is enough to show that:

` T (pi) āˆ§ pi āŠ„ Ļ€ā€ ij(qj) ā†’ pi āŠ„ qj?(Ļ€ij).

27

To show this, letpi be such thatT (pi) and pi āŠ„ Ļ€ā€ ij(qj). By the Adjoint-ness Theorem, we have thenĻ€ij(pi) āŠ„ qj , and soqj?(Ļ€ij(pi)) = āŠ„. By theprevious Proposition (on Compatibility of Programs on Different Qubits), wehave: pi?(qj?(Ļ€ij)) = (pi?; qj?)(Ļ€ij) = (qj?; pi?)(Ļ€ij) = qj?(pi?(Ļ€ij)) =qj?(Ļ€ij(pi)) = āŠ„ (where we have used the Entanglement Axiom). So we ob-tain thatpi āŠ„ qj?(Ļ€ij). (So using the Dual Local Atomicity Rule, the desiredconclusion follows).

Proposition 23. (Entanglement Preparation Lemma)

` Ļ€ij(pi) āŠ„ qj ā†’ Ļ€ij āŠ„ (pi āˆ§ qj)

Proof: From the hypothesis, we obtain thatqj āŠ„ (Ļ€ij(pi))j , and so(piāˆ§qj) āŠ„(Ļ€ij(pi))j , from which it follows that(pi āˆ§ qj) āŠ„ [pi?](Ļ€ij(pi))j (using the factthat pi?(pi āˆ§ qj) = pi āˆ§ qj , by Adequacy). On the other hand, we haveĻ€ij ā‰¤[pi?](Ļ€ij(pi))j (sincepi?(Ļ€ij) ā‰¤ (pi?(Ļ€ij))j = (Ļ€ij(pi))j , by the EntanglementAxiom), and so we obtain that(pi āˆ§ qj) āŠ„ Ļ€ij .

Theorem 5. (Teleportation Property).If i, j, k are distinct indices then

` (Ļƒjk?;Ļ€ij?)(pi) =k (Ļ€ij ;Ļƒjk)(pi)

Proof: By the same argument as above, it is enough to prove that:

` T (qk) āˆ§ qk āŠ„ (Ļ€ij ;Ļƒjk)(pi) ā†’ qk āŠ„ (Ļƒjk?;Ļ€ij?)(pi)

To show this, letqk such thatT (qk) andqk āŠ„ (Ļ€ij ;Ļƒjk)(pi). Thenqk āŠ„ Ļƒjk(Ļ€ij(pi)),and by Adjointness Theorem we haveĻƒā€ jk(qk) āŠ„ Ļ€ij(pi). By Dual Entanglement,it follows that qk?(Ļƒjk) āŠ„ Ļ€ij(pi). By the Entanglement Preparation Lemma,we haveĻ€ij āŠ„ (qk?(Ļƒjk) āˆ§ pi). Hence we obtain:qk? ((Ļƒjk?;Ļ€ij?)(pi)) =qk? (Ļ€ij?(Ļƒjk?(pi))) = Ļ€ij? (qk?(Ļƒjk?(pi))) =ijk Ļ€ij?(qk?(Ļƒjk) āˆ§ pi) = āŠ„(where we have used Theorem 4 on the Compatibility of Programs on DifferentQubits). So we obtain, as desired, thatqk āŠ„ (Ļƒjk?;Ļ€ij?)(pi).

Corollary . If ij, k are distinct then

` Ļ€ij?(pi āˆ§ Ļƒjk) =k (Ļ€ij ;Ļƒjk)(pi)

Proof: By the Repeatability Axiom, we haveĻƒjk?(pi) ā‰¤ Ļƒjk. AssumingthatĻƒjk?(pi) 6= āŠ„, we obtain thatĻƒjk?(pi) =jk Ļƒjk (sinceĻƒjk is testable and

28

{j, k}-local, and so itā€™s a local state) and also thatĻƒjk?(pi) =i pi (since ā€œlocalprograms act locallyā€, by Proposition 18). Thus, we obtain thatĻƒjk?(pi) =ijk

piāˆ§Ļƒjk. Applying the{i, j} local programĻ€ij , we obtain thatĻ€ij?(piāˆ§Ļƒjk) =ijk

Ļ€ij?(Ļƒjk?(pi)) = (Ļƒjk?;Ļ€ij?)(pi) =k (Ļ€ij ;Ļƒjk)(pi), from which we obtain thedesired conclusion.

By a refinement of the proof of Teleportation Property, we can prove the fol-lowing proof-theoretic version of Lemma 2 in Section 2.2:

Proposition 24. (Entanglement Composition Lemma).For distinct indicesi, j, k, l,programsĻ€, Ļ€ā€², Ļ€ā€²ā€² and local{1}-programsĻƒ1, Ļ1 we have:

` Ļ€ij āˆ§ Ļ€ā€²kl ā†’ [Ļƒj ; Ļk;Ļ€ā€²ā€²jk?](Ļ€;Ļƒ1;Ļ€ā€²ā€²; Ļā€ 1;Ļ€ā€²)il

Thedomaindom(Ļ•) of a mapĻ€ is defined asdom(Ļ€) :=< Ļ€ > >.

Theorem 6. (Agreement Property). If two I-local mapsĻ€, Ļ€ā€² have the samedomain and they separate the input-state, then their output states agree on all non-I qubits: i.e. ifI āˆ© J = āˆ… then for all deterministic programsĻ€, Ļ€ā€² we have` T (p) āˆ§ I(Ļ€) āˆ§ I(Ļ€ā€²) āˆ§ dom(Ļ€) = dom(Ļ€ā€²) āˆ§ Ļ€(p) ā‰¤ >I āˆ§ Ļ€ā€²(p) ā‰¤ >I ā†’Ļ€(p) =N\I Ļ€

ā€²(p).

Proof: Letā€™s putĻˆ := T (p) āˆ§ I(Ļ€) āˆ§ I(Ļ€ā€²) āˆ§ dom(Ļ€) = dom(Ļ€ā€²) āˆ§ Ļ€(p) ā‰¤>I āˆ§ Ļ€ā€²(p) ā‰¤ >I , and let us assume thatĻˆ is true. By definition,Ļ€(p) is testable(sinceĻ€ is deterministic, soĻ€(p) = Ļ€[p] =āˆ¼ [Ļ€ā€ ] āˆ¼ p, and every sentence ofthe formāˆ¼ Ļˆ is testable), and the same is true forĻ€ā€²(p). So we can use theDual Local Atomicity Rule to prove the above identity. Let nowqN\I be suchthatT (qN\I) andqN\I āŠ„ Ļ€(p). Then(Ļ€; qN\I?)(p) = āŠ„. By the Compatibilityof Programs on Different Qubits, we obtain that(qN\I?;Ļ€)(p) = āŠ„, i.e. p ā‰¤[qN\I ][Ļ€]āŠ„ = [qN\I ]Ā¬z怈Ļ€ć€‰> = [qN\]Ā¬dom(Ļ€). But dom(Ļ€) = dom(Ļ€ā€²), sop ā‰¤ [qN\I ]Ā¬dom(Ļ€ā€²) = [qN\I ][Ļ€ā€²]āŠ„, i.e. (qN\I?;Ļ€ā€²)(p) = āŠ„. Working nowin reverse, we apply again the Compatibility of Programs on Different Qubits,obtaining(Ļ€ā€²; qN\I?)(p) = āŠ„, i.e. qN\I āŠ„ Ļ€ā€²(p). So we have proved that:

` Ļˆ āˆ§ T (qN\I) āˆ§ qN\I āŠ„ Ļ€(p) ā†’ qN\I āŠ„ Ļ€ā€²(p).

By applying now the Dual Local Atomicity Rule, we obtain

` Ļˆ ā†’ Ļ€(p) =N\I Ļ€ā€²(p),

i.e. the desired conclusion.

29

Characteristic Formulas. In order to formulate our next axioms (dealing withspecial logic gates), we give some characteristic formulas for binary states, con-sidering two qubits indexed byi andj:

States Characteristic Formulas

| 00怉ij = | 0怉iāŠ— | 0怉j 怈0i?怉0j āˆ§ [1i?] āŠ„Bell states:Ī²i,j

xy = | 0怉iāŠ— | y怉j + (āˆ’1)x | 1怉i āŠ— y怉j 怈0i?怉yj āˆ§ 怈1i?怉yj āˆ§ 怈+i?怉(āˆ’)xj

with 0 = 1 and1 = 0 , x, y āˆˆ {0, 1} where(āˆ’)x = āˆ’ if x = 1and(āˆ’)x = + if x = 0

Ī³i,j = Ī²i,j00 + Ī²i,j

01 =| 00怉ij+ | 01怉ij+ | 10怉ij+ | 11怉ij 怈0i?怉+j āˆ§ć€ˆ1i?怉+j āˆ§ć€ˆ+i?怉+j

Locality Axiom for Quantum Gates. Our special quantum gates are local, af-fecting only the specified qubits:

` {i}(Xi) āˆ§ {i}(Zi) āˆ§ {i}(Hi) āˆ§ {i, j}(CNOTij)

In addition to this, we require forX,Z,H:

Characteristic Axioms for Quantum GatesX andZ.

` 0i ā†’ [Xi]1i ; ` 1i ā†’ [Xi]0i ; ` +i ā†’ [Xi]+i

` 0i ā†’ [Zi]0i ; ` 1i ā†’ [Zi]1i ; ` +i ā†’ [Zi]āˆ’i

` 0i ā†’ [Hi]+i ; ` 1i ā†’ [Hi]āˆ’i ; ` +i ā†’ [Hi]0i

Notation. Forx, y āˆˆ {0, 1} and distinct indicesi, j āˆˆ N , we make the followingabbreviations for ā€œBell formulasā€:Ī²ij

xy := (Zx1 ;Xy

1 )ij .

Proposition 25. The Bell statesĪ²i,jxy are characterized by the logic Bell formulas

Ī²ijxy. In other words, a state satisfies one of these formulas iff it coincides with the

corresponding Bell state.

Proof: It is enough to check that the formulasĪ²ijxy imply the corresponding char-

acteristic formulas in the above table. For this, we use the Entanglement Ax-iom and the following (easily checked) theorems:` 01 ā†”< Zx

1 ;Xy1 > y1,

` 11 ā†”< Zx1 ;Xy

1 > y1, ` +1 ā†’< Zx1 ;Xy

1 > (āˆ’)x1 .

Characteristic Axioms for CNOT . With the above notations, we put:

` 0i āˆ§ cj ā†’ [CNOTij ]cj ; ` 1i āˆ§ 0j ā†’ [CNOTij ]1j

` 1i āˆ§ 1j ā†’ [CNOTij ]0j ; ` 1i āˆ§+j ā†’ [CNOTij ]+j

` +i āˆ§ 0j ā†’ [CNOTij ]Ī²ij00 ; ` +i āˆ§ 1j ā†’ [CNOTij ]Ī²

ij01

` +i āˆ§+j ā†’ [CNOTij ]Ī³ij where Ī³ij = 怈0i?怉+j āˆ§ć€ˆ1i?怉+j āˆ§ć€ˆ+i?怉+j

30

Proposition 26. For all x, y āˆˆ {0, 1}: ` (Hi;CNOTi,j(xi āˆ§ yj) = Ī²ijxy

Corollary . If i, j, k are all distinct then` (CNOTij ;Hj ; (xi āˆ§ yj)?)(p) =k Ī²

i,jxy?(p).

Proof: From the above Proposition and fromHā€  = H, CNOT ā€  = CNOT ,we get(CNOTi,j ;Hi)(Ī²ij

xy) = xi āˆ§ yi, and sodom(CNOTi,j ;Hi) == 怈CNOTij ;Hi; (xi āˆ§ yj)?怉> = 怈Ī²ij

xy?怉> = dom(Ī²ijxy?). The conclusion fol-

lows from this, together with the Agreement Property.

5 Correctness of the Teleportation Protocol

Following [29], quantum teleportation is the name of a technique that makes itpossible to teleport the state of a quantum system without using a channel thatallows for quantum communication, but with a channel that allows for classicalcommunication. We are working inHāŠ—HāŠ—H, withH being the two-dimensional(qubit) space, and son = 3. We assume two agents, Alice and Bob who are sepa-rated in space and each has one qubit of an entangled EPR pair that is representedby Ī²2,3

00 āˆˆ H(2) āŠ—H(3). Alice holds in addition to her part of the EPR pair also aqubit q1 āˆˆ H(1), in an unknown local stateq1. (Note thatq1 is a testable1-localproperty, since it is a1-local state.) Alice wants to ā€œteleportā€ this unknown stateto Bob, i.e. she will perform a program that will output a state satisfyingid13(q1).To do this, she first entanglesq1 with her partq2 of the EPR pair (i.e. she performsaCNOT1,2 gate on the two qubits and then a Hadamard transformationH1 on thefirst component). Bobā€™s qubit has suffered during the actions of Alice and whenAlice will measure her qubits she will destroy the entanglement of the EPR pairthat she shares with Bob. The initial state of Bobā€™s qubit is known and we cancalculate which changes it has gone through when we know the result that Aliceobtains from the two measurements. Moreover, the result that Alice obtains fromthe two measurements indicate the actions that Bob has to perform in order totransfer his qubitq3 into the stateid13(q1) (corresponding to the qubit Alice hadbefore the protocol). It is enough for Alice to send Bob two classical bits encodingthe resultx1 of the first measurement and the resulty2 of the second measurement.This means that Bob will have to applyy times theX-gate followed byx timestheZ gate, if he wants to force his qubitq3 into the stateid13(q1).In our syntax, the quantum program described here is:

Ļ€ =ā‹ƒ

x,yāˆˆ{0,1}

CNOT12;H1; (x1 āˆ§ y2)?;Xy3 ;Zx

3

31

and the validity expressing the correctness of teleportation is

` Ļ€(q1 āˆ§ Ī²2,300 ) =3 id13(q1).

To show this, observe that by applying the above Corollary (at the end of thelast section) in which we takei = 1, j = 2, k = 3, we obtain that the validityabove (to be proved) is equivalent to: (Ī²12

xy?;Xy3 ;Zx

3 )(q1 āˆ§Ī²2,300 ) =3 id13(q1).

Replacing the logical Bell formulas with their definitionsĪ²ijxy := (Zx

1 ;Xy1 )ij , we

obtain the following equivalent validity: ((Zx1 ;Xy

1 )12?;Xy3 ;Zx

3 )(q1āˆ§ id23) =3

id13(q1) , whereid = Z01 ;X0

1 is the identity. This last validity follows from ap-plying the (Corollary of) Teleportation Property and the validityZx

1 ;Xy1 ;Xy

1 ;Zx1 =

id (due toXāˆ’1 = X,Zāˆ’1 = Z).Note. This proof of correctness can be easily adapted to coverLogic-Gate Tele-portation. Moreover, the whole range of quantum programs covered by the ā€œen-tanglement networksā€ in [15] can be similarly treated using our logic.

6 Conclusions and Future Work

We presented here a dynamic logic for compound quantum systems, capable ofexpressing and proving highly non-trivial features of quantum information flow,such as entanglement and teleportation, properties of local transformations, sep-aration, Bell statesetc. The logic is Boolean, but hasmodalities capturing thenon-classical logical dynamics of quantum systems; in addition, it hasspatial fea-tures, allowing us to express properties ofsubsystemsof a compound quantumsystem. The logic comes with a simple relational semantics, in terms of quantumstates and quantum actions in a Hilbert space. We present a sound proof system,and we use it to prove interesting properties of quantum information, including aformal correctness proof for the Teleportation protocol.

However, there are a number of open problems left. Although in [6] wesketched a completeness result for the quantum dynamic logic ofsingle-systemquantum frames,no corresponding completeness result is known for compoundsystems. So the completeness problem for the logicLQP presented in this paperis still open.

Although in this paper we have only considerediteration-freequantumPDL(i.e. a logic that does not includeiteration, or Kleene star,Ļ€āˆ—, among the oper-ations on programs), since iteration was not needed in our simple quantum pro-gramming applications. But one can of course add iteration and consider the re-sulting logic, which would be useful in applications to quantum programs involv-

32

ing while-loops. The usualPDL axioms for Kleene star are sound, but againcompleteness remains an open problem.

Another problem, of great importance for quantum computation, is extend-ing our setting to deal with thequantitative aspects of quantum information(inparticular with notions like phase and probability). Our aim in this paper was todevelop a logic to reason aboutqualitativequantum information flow, so we ne-glected theprobabilisticaspects of quantum systems. There are natural ways toextend our setting, using quantum versions ofprobabilistic modal logic, and weplan to investigate them in future work.

A similar, but deeper, open problem is the one of developing a logic that candeal with finer quantitative aspects of quantum, such as(relative) phase. This isan important concept for quantum computation, so a logic that can deal with phaseaspects would be most useful.

Acknowledgments.We thank Bob Coecke for useful discussions, ideas and com-ments on this work, and especially for presenting (a preliminary version of) thispaper at the 2nd International Workshop on Quantum Programming Languages(QPL2004) organised by Peter Selinger. We thank Samson Abramsky and PrakashPanangaden for the useful discussions that took place at COMLAB in 2004 on thetopic of this paper. Sonja Smets thanks Amilcar Sernadas and Paulo Mateus forthe useful discussions that took place at IST in November 2004 on exogenous anddynamic quantum logic.

References[1] S. Abramsky and B. Coecke, ā€œA Categorical Semantics of Quantum Protocols.ā€, to

be published in the proceedings of the 19th IEEE conference on Logic in ComputerScience (LiCSā€™04). Available at arXiv:quant-ph/0402130.

[2] I. Amemiya and H. Araki, ā€œA Remark on Pironā€™s paperā€,Publications of the ResearchInstitute of Mathematical Sciences Kyoto University, series A,2, 423-427 (1967)

[3] H. Amira, B. Coecke and I. Stubbe, ā€œHow Quantales Emerge by Introducing Induc-tion within the Operational Approachā€,Helvetica Physica Acta, 71, 554-572 (1998)

[4] A. Baltag, ā€œDynamic and Epistemic Logics for Quantum Measurementsā€, Presentedat PMLā€™04, Brussels 2004.

[5] A. Baltag and S. Smets: ā€œThe Logic of Quantum Programs ā€, P. Sellinger (ed.), Pro-ceedings of the 2nd International Workshop on Quantum Programming Languages(QPL2004, affiliated with LICSā€™04),TUCS General Publication No 33, 39-56,TurkuCenter for Computer Science, 2004.

33

[6] A. Baltag and S. Smets, ā€œComplete Axiomatizations for Quantum Actionsā€, submit-ted toInternational Journal of Theoretical Physics, proceedings issue of IQSA2004.

[7] A. Baltag and S. Smets, ā€œWhat can Logic learn from Quantum Mechanics?ā€, sub-mitted for presentation at the Workshop on ā€œQuantum Information: Epistemologicaland Logic Lessonsā€, workshop affiliated with the European Conference for AnalyticPhilosophy (ECAPā€™05), Lisbon, Portugal, August 27-31 2005.

[8] E.G. Beltrametti and G. Cassinelli, ā€œOn State Transformations Induced by Yes-NoExperiments, in the Context of Quantum Logicā€,Journal of Philosophical Logic, 6,369-379 (1977)

[9] O. Brunet and P. Jorrand, ā€œDynamic Quantum Logic for Quantum Programsā€, Greno-ble 2003. Available at arXiv:quantph/0311143

[10] B. Coecke, D.J. Moore and S. Smets, ā€œLogic of Dynamics& Dynamics of Logic;Some Paradigm Examplesā€, in S. Rahman, J. Symons, D.M .Gabbay and J.P. VanBendegem (eds.),Logic, Epistemology and the Unity of Science(2004)

[11] B. Coecke, D.J. Moore and I. Stubbe: ā€œQuantaloids describing Causation and Prop-agation for Physical Propertiesā€ (arXiv: quant-ph/0009100), Foundations of PhysicsLetters 14, 357-367 (2001).

[12] B. Coecke and I. Stubbe, ā€œOn a Duality of Quantales Emerging from an OperationalResolutionā€,International Journal of Theoretical Physics, 38, 3269-3281 (1999)

[13] B. Coecke and S. Smets, ā€œThe Sasaki Hook is not a [Static] Implicative Connectivebut Induces a Backward [in Time] Dynamic One that Assigns Causesā€,InternationalJournal of Theoretical Physics, to appear (arXiv: quant-ph/0111076)

[14] B. Coecke, ā€œStructural Characterization of Compoundnessā€,International Journal ofTheoretical Physics, 39, 585-594, 2000.

[15] B. Coecke, ā€œThe Logic of Entanglementā€, March 2004, arXiv: quant-ph/0402014.

[16] M.L. Dalla Chiara and R. Giuntini, ā€œQuantum Logicsā€, in D.M. Gabbay and F. Guen-thner, (eds.)Handbook of Philosophical Logic, Second Edition, vol. 6, Kluwer Ac.Pub., Dordrecht, 129-228, 2002.

[17] M.L. Dalla Chiara, R. Guintini and R. Greechie,Reasoning in Quantum Theory,Kluwer Ac. Pub., Dordrecht, 2004.

[18] W. Daniel, ā€œOn the Non-Unitary Evolution of Quantum Systemsā€,Helvetica PhysicaActa, 55, 330-338 (1982)

[19] W. Daniel, ā€œAxiomatic Description of Irreversible and Reversible Evolution of aPhysical Systemā€,Helvetica Physica Acta, 62, 941-968 (1989)

[20] CL.-A. Faure, D.J. Moore and C. Piron, ā€œDeterministic Evolutions and SchrodingerFlowsā€, Helvetica Physica Acta, 68, 150-157 (1995)

[21] R. Goldblatt, ā€œOrthomodularity is not elementaryā€,The Journal of Symbolic Logic,49, 401-404 (1984)

34

[22] R.I. Goldblatt, ā€œSemantic Analysis of Orthologicā€,Journal of Philosophical Logic,3, 19-35, 1974.

[23] G. M. Hardegree, ā€œStalnaker Conditional and Quantum Logicā€,Journal of Philosoph-ical Logic, 4, 399-421 (1975)

[24] G. M. Hardegree, ā€œThe Conditional in Abstract and Concrete Quantum Logicā€, inC.A. Hooker,The Logico-Algebraic Approach to Quantum Mechanics, vol. 2, D. Rei-del Publishing Company, Dordrecht (1979)

[25] D. Harel, D. Kozen, J. Tiuryn,Dynamic Logic, MIT-Press, Massachusetts (2000)

[26] J.M. Jauch,Foundations of Quantum Mechanics, Addison-Wesley, Reading, Mas-sachusetts (1968)

[27] J.M. Jauch and C. Piron, ā€œOn the Structure of Quantal Proposition Systemsā€,Hel-vetica Physica Acta, 42, 842-848 (1969)

[28] R. Mayet ā€œSome Characterizations of the Underlying Division Ring of a Hilbert Lat-tice by Automorphismsā€,International Journal of Theoretical Physics, 37 (1), 109-114 (1998)

[29] M. Nielsen and I. L. Chuang,Quantum Computation and Quantum Information,Cambridge University Press, 2000.

[30] P. Mateus and A. Sernadas, ā€œReasoning about Quantum Systemsā€, in J. Alferes and J.Leite (eds.)Logics in Artificial Intelligence, Ninth European Conference, JELIAā€™04,issue ofLecture Notes in Artificial Intelligence, 3229, 239-251, 2004.

[31] C. Piron, ā€œ Axiomatique quantique (PhD-Thesis)ā€,Helvetica Physica Acta, 37, 439-468 (1964), English Translation by M. Cole: ā€œQuantum Axiomaticsā€ RB4 Technicalmemo 107/106/104, GPO Engineering Department (London).

[32] C. Piron, Foundations of Quantum Physics, W.A. Benjamin Inc., Massachusetts(1976)

[33] S. Smets, ā€œOn Causation and a Counterfactual in Quantum Logic: the Sasaki Hookā€,Logique et Analyse, 173-175, 307-325 (2001)

[34] S. Smets, ā€œOn Quantum Propositional Dynamic Logicā€, Presented at PMLā€™04, Brus-sels 2004.

[35] S. Smets, ā€œFrom Intuitionistic Logic to Dynamic Operational Quantum Logicā€,Poz-nan Studies in Philosophy and the Humanities, to appear.

[36] M.P. Soler, ā€œCharacterization of Hilbert spaces by orthomodular spacesā€,Communi-cations in Algebra, 23(1), 219-243 (1995)

35