analysis and optimisation of the source of quantum ... · internship report - icfp master’s...

27
Analysis and optimisation of the source of quantum advantage in one-qubit systems. Internship report - ICFP Master’s degree - ENS Paris Laboratoire d’informatique de Paris 6 April 1, 2018 - July 7, 2018 Intern: Pierre-Emmanuel Emeriau Supervisors: Elham Kashefi, Shane Mansfield I explicitly go to the question of how we can simulate with a computer the quantum-mechanical effects? . . . Let the computer itself be built of quantum mechanical elements which obey quantum mechanical laws. - R.Feynman [1] Abstract Non-locality and contextuality are key features of quantum mechanics that distinguish it from classical physics and can be exploited as computational advantages. We aim to analyse and optimise a new version of contextuality - namely sequential transformation contextuality - intro- duced by S.Mansfield and E.Kashefi which differs from the traditional notion of contextuality in the sense of Kochen and Specker. While the latter requires a Hilbert space of dimension strictly greater than 2 to be witnessed, the new version can be implemented on single qubits as it does not specifically rely on the system but rather on the sequence of unitary transformations applied to the system. We aim to explore protocols built upon this kind of contextuality by translating known protocols into this new framework. It may provide various advantages over known protocols such as an improved security.

Upload: others

Post on 09-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

Analysis and optimisation of the source ofquantum advantage in one-qubit systems.

Internship report - ICFP Master’s degree - ENS ParisLaboratoire d’informatique de Paris 6

April 1, 2018 - July 7, 2018

Intern:Pierre-Emmanuel Emeriau

Supervisors:Elham Kashefi, Shane Mansfield

I explicitly go to the question of how we can simulate witha computer the quantum-mechanical effects? . . . Let thecomputer itself be built of quantum mechanical elements whichobey quantum mechanical laws.- R.Feynman [1]

AbstractNon-locality and contextuality are key features of quantum mechanics that distinguish it fromclassical physics and can be exploited as computational advantages. We aim to analyse andoptimise a new version of contextuality - namely sequential transformation contextuality - intro-duced by S.Mansfield and E.Kashefi which differs from the traditional notion of contextualityin the sense of Kochen and Specker. While the latter requires a Hilbert space of dimensionstrictly greater than 2 to be witnessed, the new version can be implemented on single qubits asit does not specifically rely on the system but rather on the sequence of unitary transformationsapplied to the system. We aim to explore protocols built upon this kind of contextuality bytranslating known protocols into this new framework. It may provide various advantages overknown protocols such as an improved security.

Page 2: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

CONTENTS Master 2 ICFP

Contents1 Introduction to quantum information and to quantum resources 1

1.1 General introduction to quantum information . . . . . . . . . . . . . . . . . . . 11.2 Quantum states of interest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Quantum gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.4 Complexity classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Review of Measurement-based Quantum Computation 5

3 The notion of static contextuality 83.1 General framework for contextuality . . . . . . . . . . . . . . . . . . . . . . . . . 83.2 Contextuality as a resource for quantum advantages . . . . . . . . . . . . . . . . 11

3.2.1 Game approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2.2 Mermin’s all-versus-nothing (AvN) arguments for contextuality . . . . . . 123.2.3 Promoting linearity to non-linearity using contextuality . . . . . . . . . . 13

3.3 Quantifying contextuality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4 The notion of dynamic contextuality 164.1 Formalism of ontological models . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.2 Non-contextuality for transformations in sequential contexts . . . . . . . . . . . 174.3 Translation of MBQC⊕ into a single-qubit protocol . . . . . . . . . . . . . . . . 17

4.3.1 Correctness and security of a protocol . . . . . . . . . . . . . . . . . . . . 174.3.2 Standard MBQC⊕ framework . . . . . . . . . . . . . . . . . . . . . . . . 184.3.3 Single-qubit implementation of an AND gate . . . . . . . . . . . . . . . . 18

4.4 Quantum resource enabling the implementation of an AND gate via a single-qubit protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4.5 Further discussion on the single-qubit protocol . . . . . . . . . . . . . . . . . . . 21

5 Conclusion and acknowledgement 22

Lip6 0 ENS Paris-Saclay

Page 3: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

1 Introduction to quantum information and to quantum resources Master 2 ICFP

1 Introduction to quantum information and to quantumresources

1.1 General introduction to quantum information

Quantum computers promise to outperform classical computers in a variety of informationprocessing tasks. Nevertheless, the quantum features that enable a computational advantageare poorly understood. Is it superposition? Interference? Entanglement? So far, it remainsunknown. However, some serious candidates are beginning to emerge and the present work ispart of the ongoing effort. Identifying quantum resources - i.e. quantum features that cannotbe realised by a classical system - is crucial in quantum information and quantum foundations.To develop efficient quantum algorithms or new secure communication protocols, one needsto understand what features make the quantum theory distinct from any classical one. Onestrategy to isolate a quantum advantage is to try to classically reproduce a part of the quantumtheory: if a part of the theory can be simulated efficiently by a classical system (when subject toequivalent constraints e.g. locality) then we may conclude that this particular part of the theoryis not resourceful for quantum information. Designing quantum protocols that can outperformtheir classical counterpart then requires resources that lie outside of such parts of the theory.

According to our view, such a strategy originates from the 1935 EPR (Einstein-Podolsky-Rosen) argument for the incompleteness of quantum physics [2]. This led Bell to state hisfamous no-go theorem [3]. No-go theorems are theorems that state that a particular set ofdata cannot be explained by any classical theory satisfying certain properties. In particular,no go theorems for quantum physics constrain the permissible types of classical hidden vari-able theories that could reproduce the same empirical predictions. Hidden variable theories areclassical theories that try to rephrase the apparent randomness of quantum mechanics in termsof deterministic hidden states. Bell’s theorem states that no physical local hidden variables(LVH) can ever reproduce all predictions of quantum mechanics because quantum theory vio-lates an inequality that constrain such theories. Bell’s theorem identify non-locality as a purelynon-classical feature thanks to entangled states; thus quantum physics is inherently non-local.Correlations permitted by non-locality cannot be reproduced in a LHV. The means of distin-guishing between quantum theory and a classical hidden variable theories often takes the formof an inequality - such as the CHSH (Clauser-Horne-Shimony-Holt) inequality [4]. Witnessingthe violation of such an inequality provides information on possible sources of non-classicality.

Several results have demonstrated that contextuality is a resource for quantum computationin certain instances [5][6][7]. Contextuality was first established as a feature of quantum physicsby the Bell-Kochen-Specker theorem, another no-go theorem [3][8]. It places further constraintson the permissible type of hidden variable theories. Informally, contextuality would arise ina theory when it features global inconsistency while preserving local consistency. The crucialpoint that allows us to avoid having an inconsistent physical theory as a whole is that not allobservables are compatible, and so we can never directly observe the global picture. In thatsense, we cannot observe globally the empirical set of data. From our point of view, a clear,generalised definition of contextuality is yet to be given in spite of a promising suggestion byR.Spekkens [9]. Recently, S.Mansfield and E.Kashefi proposed a new version of contextuality[10] that arises when performing sequences of transformations. Remarkable features can arisewhen translating known protocols into this framework. In this report, we aim at analysing andoptimising the computational power of sequential transformation contextuality in single-qubitprotocol. Here, the standard notion of contextuality will be referred as static contextualitywhile the new version will be referred as dynamic contextuality.

Lip6 1 ENS Paris-Saclay

Page 4: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

1 Introduction to quantum information and to quantum resources Master 2 ICFP

1.2 Quantum states of interest

The basic unit of classical information used in computing and communications is the bit(binary digit). It can have only of two states; commonly 0 or 1. Analogously, the basic unitof quantum information is the qubit (quantum bit). A qubit is a two-level quantum systemwhose state can be written as: |ψ〉 = α|0〉+β|1〉 where |α|2 + |β|2 = 1 (normalisation conditionfor a quantum state). Crucially, α and β can be complex numbers. The polarization of a singlephoton is an example of systems that can be used as qubits (the two states here being verticaland horizontal polarizations). The states |0〉 and |1〉 are orthogonal and form a basis we usuallycall the computational basis. The state |ψ〉 is then a complex superposition of the states |0〉and |1〉. When measured in this basis, superposition is destroyed and |ψ〉 collapses to |0〉 witha probability |α|2 and to |1〉 with a probability |β|2. For a system of n qubits, any state hasthe following form: |ψ〉 = α1|00...00〉+ α2|00..01〉+ ... + α2n|11...11〉 with

∑2n

i=0 |αi|2 = 1. Thenotation |a1a2...an〉 with ∀i = 1...n, ai ∈ {0, 1} specifies the state of each qubit and has to beunderstood as a tensor product: |a1〉 ⊗ |a2〉 ⊗ ... ⊗ |an〉. Each qubit lives in a 2-dimensionalHilbert space; a system of n qubits thus lives in 2n-dimensional Hilbert space. Note that, inthe following, we will often drop the normalisation factor.

Greenberger–Horne–Zeilinger (GHZ) states [11] are particularly interesting for this report.A GHZ state is an entangled quantum state of n qubits (n > 2); in general, it reads:

|GHZ〉n =|0〉⊗n + |1〉⊗n√

2(1.1)

Any exchange of the states |0〉 and |1〉 for a qubit yields an equally valid GHZ state. Forinstance, |001〉+ |110〉 is another 3-qubit GHZ state. These states are strongly contextual; i.e.for appropriate choices of local measurements, they can exhibit a non-classical empirical featureknown as strong contextuality (see section 3.2).

Another class of states we wish to consider are cluster states (also called graph states) [12].Given a lattice graph G(V,E) (V being the set of vertices and E the set of edges) of dimensiond (d=1,2,3), we define a connected subgraph G(C, E). C is a subset of V with the propertythat any two sites a, a′ ∈ C are connected and any sites a ∈ C and a′ ∈ V \C are not connected.Two sites a and a′ are said to be connected if there exists a sequence of neighbouring sites thatlink a and a′. We define a cluster state on C as the following:

|ψ〉C =⊗c∈C

(|0〉c ⊗

γ∈ΓZ(c+γ) + |1〉c

)(1.2)

with Γ being an appropriate basis for the lattice using the convention that σc+γz = 1 when c+γ 6∈C. Zc (resp. Xc) is the Pauli-Z (resp. X) operator at site c. This state is stabilized by thefamily of operators Kc = X(c)⊗γ∈Γ∪−ΓZ

(c+γ) for c ∈ C where Γ ∪−Γ specifies all neighbouringsites of c. Any cluster can be implemented experimentally relatively easily. Given a cluster C,first, qubits in the |+〉 state should be prepared at each vertex, and then a controlled-phasegates (a CZ gate) should be applied between qubits whose corresponding graph vertices areconnected. This last step can be realised with a Hamiltonian which turns out to be equivalentto the quantum Ising model.

A remarkable feature of cluster states is that they enable universal quantum computing in theMBQC framework (see section 2).

Lip6 2 ENS Paris-Saclay

Page 5: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

1 Introduction to quantum information and to quantum resources Master 2 ICFP

1.3 Quantum gates

Operations on qubits are realised through quantum gates, analogous to classical logic gates.An important question is the minimal set of gates which enables universality. Classically, anyBoolean expression can be constructed out of a fixed number of gates: for instance AND (seetable 1), OR (see table 2) and NOT. Such a set is called universal. In fact, it can be reducedto two gates such as AND and XOR (see table 3), AND and NOT, or OR and NOT.

a b AND(a, b)0 0 00 1 01 0 01 1 1

Table 1: Truth table of an ANDgate.

a b OR(a, b)0 0 00 1 11 0 11 1 1

Table 2: Truth table of an ORgate.

a b OR(a, b)0 0 00 1 11 0 11 1 0

Table 3: Truth table of a XORgate.

We may now wonder which sets of quantum gates are universal for quantum computing.A framework will be universal for quantum computing if one can implement all the gates of auniversal set. Representing gates with matrices relies on representing qubit states as vectors

i.e. α|0〉+ β|1〉 −→(αβ

). Tensor products are obtained with the Kronecker product of vectors

(or matrices). For instance:

(ab

)⊗(cd

)=

a(cd

)b

(cd

) =

acadbcbd

We list below the commonly used quantum gates:

Single-qubit gates:

• the Pauli matrices: X =

(0 11 0

), Y =

(0 −ii 0

), Z =

(1 00 −1

).

• the Hadamard gate: H = 1√2

(1 11 −1

).

• the π/2-phase gate: S =

(1 00 i

).

Two-qubit gates:

• the controlled-Z gate: CZ =

1 0 0 00 1 0 00 0 1 00 0 0 −1

.

• the controlled-NOT gate: CNOT = CX =

1 0 0 00 1 0 00 0 0 10 0 1 0

.

Lip6 3 ENS Paris-Saclay

Page 6: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

1 Introduction to quantum information and to quantum resources Master 2 ICFP

To understand how a control gate works, consider a general controlled-U gate (U being anyunitary matrix). Figure 1 and table 4 explain how it acts on two qubits. Depending on thestate of the first qubit (called the control qubit), a unitary U may be applied to the otherqubit (called the target qubit). For instance, the CNOT gate acts on the qubits q1 and q2:CNOT|q1〉|q2〉 = |q1〉|q1 + q2 mod 2〉.

Uq2

q1

Figure 1: General controlled-U gate. Thecontrol qubit is q1 and the target qubit is q2.U is applied to q2 when q1 is in the |1〉 state.

Control qubit q1 Target qubit q2

|0〉 q2

|1〉 Uq2

Table 4: Result of the application of acontrolled-U gate on two qubits.

A group of particular interest in quantum information is the Clifford group C. It consists ofoperators which leave the Pauli group P fixed under conjugation: ∀C ∈ C, ∀P ∈ P , CPC† ∈ P .C is called the normalizer group of P . The elements of the Clifford group are the Hadamardgate H, the CNOT gate and the π/2-phase gate P . In [13], D.Gottesman and E.Knill showedthe following crucial theorem.

Theorem : Any quantum computer performing only: a) Clifford group gates, b) measurementsof Pauli group operators, and c) Clifford group operations conditioned on classical bits, whichmay be the results of earlier measurements, can be perfectly simulated in polynomial time on aprobabilistic classical computer.

Any quantum computation involving only Clifford operation can thus be efficiently simulatedclassically. Since there are strong reasons to believe that the class of problems that can beefficiently solved by a quantum computer is strictly larger than that which can be performed by aprobabilistic classical computer, Clifford operations are believed to be not universal for quantumcomputation. Nevertheless, adding any non Clifford unitary operation provides universality:{H,CNOT, P}+ any non-Clifford is thus a universal set. Another set for universal quantumcomputation is: all single-qubit gates and the CNOT gate.

1.4 Complexity classes

The complexity of an algorithm is defined as the minimal number of elementary gatesneeded to implement the algorithm. An algorithm is said to be efficient if its complexitygrowths polynomially in the size of the input.

Basic classical complexity classes are:

• P (Polynomial): set of problems accepting an efficient (deterministic) algorithm.

• BPP (Bounded-error Probabilistic Polynomial): set of problems that can be solved withprobability greater than 2/3 by an efficient probabilistic algorithm.

• NP (Nondeterministic Polynomial time): set of problems for which the solutions can bedeterministically verified in polynomial time.

• PSPACE (Polynomial Space): set of problems that can be solved by an algorithm usingat most a polynomial amount of memory.

Lip6 4 ENS Paris-Saclay

Page 7: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

2 Review of Measurement-based Quantum Computation Master 2 ICFP

Additionally, we have the quantum complexity class:

• BQP (Bounded-error Quantum Polynomial): set of problems that can be solved withprobability greater than 2/3 by an efficient quantum algorithm.

We have: P ⊆ BPP ⊆ BQP ⊆ PSPACE. Strict inclusions are believed to hold though itis not proven yet (see figure 2). In particular, it is strongly believed that some problems areefficiently solvable by a quantum computer but not by its classical counterpart: it would implythat BPP(BQP [14].

PSPACE

BQP

BPP

P

Figure 2: Believed hierarchy of complexity classes.

2 Review of Measurement-based Quantum ComputationHere we introduce Measurement-based Quantum Computation (usually called MBQC) which

is a framework for quantum computing developed by R.Raussendorf and H.Briegel [15]. Theusual picture for quantum computing is presented below (see an example of a circuit for quan-tum teleportation in figure 3). Roughly, each line represents a qubit on which unitary gates aswell as measurements can be performed within the circuit. It is a general picture because anytransformation on qubits allowed by quantum mechanics can be represented in that way.

Figure 3: Commonly used circuit picture for quantum computing. This particular circuit may be used toperform a quantum teleportation protocol [16].

Now MBQC is a different framework of computation and, remarkably, it is equivalent tothe usual one in the sense that we can map circuits to MBQCs and vice versa. In other words,it can also be use to implement universal quantum computation. We may wonder what is theaim of developing different frameworks if there are all equivalent and universal for quantumcomputation. We first introduce the framework and then answer this question.

Lip6 5 ENS Paris-Saclay

Page 8: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

2 Review of Measurement-based Quantum Computation Master 2 ICFP

Control computer

Entangled stateServer

c.c.

Client

Figure 4: General picture for MBQC. A classical client uses a classical information channel (c.c.) to performmeasurements on an entangled multi-qubit state located in a (distant) quantum server.

As shown in figure 4, MBQC consists of two components:

• an entangled multi-qubit resource state which can be shared among several parties thoughno direct communication between parties is allowed during the computation. Only single-qubit measurements are performed on this resource state.

• a classical control computer which can store classical information, exchange it with theparties and compute certain functions.

Specifically, according to the function it will compute, the classical control computer sendsclassical information to each party specifying the measurement basis. In turn, each party sendsback the measurement outputs. Remarkably, without loss of generality, the control computercan be restricted to parity computation ⊕L i.e. it only performs addition modulo 2 [15]. Weshall denote MBQC with parity computer as MBQC⊕.

Now MBQC can be used in different ways. Cluster-state computation can achieve universalquantum computing. After the preparation of the initial cluster state, a sequence of single-qubitmeasurements which may be chosen based on previous measurement outcomes (adaptivity) isperformed allowing the read-out of the computation on the final, unmeasured qubit. Here, anyadditional power to parity computation is provided by the initial resource state as the amountof entanglement of the cluster state decreases with every single-qubit measurement. Quantuminformation is processed with the network through adaptive measurements in a certain basis:at each site the choice of a measurement basis may depend on the previous measurement out-comes. Adaptivity is required to achieve universal quantum computing because the basis inwhich a qubit is measured may depend on the output of the previous measurements.

Another question we can ask in the setting of MBQC in the setting of MBQC is to identifythe resources needed to promote the power of parity computers to a certain class of complexity.We have already seen that cluster states can promote ⊕L to BQP . Here we focus on promoting⊕L to P i.e. we want to identify the resources needed to implement non-linear functions witha parity computer. The aim is to compute f(x) for any boolean function f given any inputbit-string x. The procedure goes as follows (see figure 4 for a direct link with the generalpicture):

Client: Given a bit-string x as input, the client performs a linear preprocessingoutputting the bit-string s(x,m) which depends on the input x but may alsodepend on the outcomes of the preceding measurements.

Classical communication: The bits of s are communicated classically fromthe client to the server in a certain order. The server sends back the resultsof the measurements already performed allowing the client to adapt the thefollowing bits of s.

Lip6 6 ENS Paris-Saclay

Page 9: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

2 Review of Measurement-based Quantum Computation Master 2 ICFP

Server: Given bits of s, the server performs the required measurements out-putting the bit-string m.

Client: Once every measurement has been performed, the result f(x) can berecovered with the parity of m: f(x) = ⊕

imi.

This is the kind of MBQC which is of interest from our perspective and we shall refer to it later.For the reader to link it back to the client-server picture, we will use the following color code:green for the client, blue for the server and orange for (classical or quantum) communications.

Now we can state why we think MBQC is an important framework for quantum informationby listing below what we believe are the main advantages of MBQC.

• As stated in the introduction, a crucial step for the development of quantum informa-tion is the experimental realisation of a quantum computer. This scheme only relies onsingle-qubit measurements performed on an entangled multi-qubit resource state whichappears less experimentally challenging than coherently controlling qubits. This issue liesin producing the initial resource state. It was shown that cluster states are resource statefor universal computing and that they can be created efficiently with a quantum Ising-type interaction [12]. Thus cluster-state computation in the MBQC framework appearsa great candidate for experimental realisation.

• It can also be embedded in the client-server picture (see figure 4) where a classical clientcan send a classical information to a quantum server allowing the client to perform ef-ficiently a quantum computation. This picture should be actively studied since it islikely that early quantum computers will only be available remotely following the modelcurrently used for accessing high performance computation.

• It can be made universal or to provide increase computational power even when measure-ments are restricted only to those in the stabilizer framework. The latter has been widelystudied and thus provides a powerful mathematical basis for the development of MBQC.

• It can help identifying quantum advantages over classical systems and the computationalpower accessible via particular states and measurements [5]. This last point is of course oftremendous importance since it is crucial to identify what features of quantum mechanicsenable a computational advantage. For instance, the classical parity computer - onlycapable of performing additions mod 2 - can be promoted to classical universality havingaccess to GHZ-states and local measurements. Thus, the access to quantum resourcesvastly increases the set of computable functions

Lip6 7 ENS Paris-Saclay

Page 10: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

3 The notion of static contextuality Master 2 ICFP

3 The notion of static contextualityIn this section, we aim at introducing the traditional notion of contextuality as first con-

sidered by J.Bell [3] and S.Kochen and E.Specker [8]. We first define the framework we willuse and give a precise definition of contextuality. We then review the role of contextuality as aresource for computation. We also provide a way to quantify contextuality [17].

3.1 General framework for contextuality

Our study relies on the sheaf-theoretic approach, a framework first introduced in [18] andreviewed in [17]. Two ingredients are essential to describe an experiment and its outcomes.

• An abstract description of a particular experiment setup is formalized as ameasurementscenario. It consists of a triple < X ,M,O > where:

– X is a finite set of measurements (e.g. observables in quantum mechanics).

– M is a set of subsets of X . Each C ∈ M is called a measurement context andrepresents a set of measurements that can be performed together (e.g. M consistsof sets of commuting observables in quantum mechanics).

– O is a finite set of outcomes values for each measurement (usually in this report,O = Z2).

• Given a measurement scenario, the objects of interest are empirical models: they aretables of data which specify probability distribution over the joint outcomes of compatiblemeasurements i.e. it assigns a non-zero probability when the corresponding joint outcomeof compatible measurements is possible 5.

We also introduce bundle diagrams [19] (see figures 5 and 6) which are a very convenient wayto represent a given experiment and to witness contextuality. For example, let us considerthe (2, 2, 2) Bell scenario (2 parties, 2 observables each, 2 possible outcomes). It consists oftwo experimenters, Alice and Bob, who can each choose between performing two differentmeasurements, say a1 and a2 for Alice and b1 and b2 for Bob, obtaining one of the two possibleoutcomes 0 and 1. In terms of the previous description, it is represented as follows:

X = {a1, a2, b1, b2}, M = {{a1, b1}, {b1, a2}, {a2, b2}, {b2, a1}}, O = 0, 1.

•a1

• b1

• a2

•b2

•0

•1

• 0

• 1• 0

• 1•0

•1

O

XM

Figure 5: The example of the (2, 2, 2) Bell measure-ment scenario.

•a1

• b1

• a2

•b2

•0

•1

• 0

• 1• 0

• 1•0

•1

Figure 6: A particular empirical model (orangelinks) for the (2, 2, 2) Bell measurement scenario.

Lip6 8 ENS Paris-Saclay

Page 11: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

3 The notion of static contextuality Master 2 ICFP

The elements of X are represented by the vertices of the basis of the bundle diagram (see greenvertices in figure 5). The elements ofM represent the edges between those vertices (see bluelines in figure 5). The outcomes (i.e. the elements of O) are displayed above each measurement(see purple vertices in figure 5). The only missing parts in the diagram are the joint outcomes:when assigned a non zero-probability, they are represented by edges in the upper part of thebundle diagram. It is specified by an empirical model e (see orange links in figure 6). Note that,unless the edges in the upper part are given weight, then the bundle diagram only representsa possibilistic empirical model (i.e. one only knows what joint outcomes are possible withoutknowing the probability associated with each joint outcome). It is often enough to witnesscontextuality as we will see below. For example, figure 7 features a complete empirical modelbecause it gives weight to the joint outcomes while figure 9 only features a possibilistic empiricalmodel.

A B 00 01 10 11a1 b1

1/2 0 0 1/2a1 b2

3/8 1/8 1/8 3/8a2 b1

3/8 1/8 1/8 3/8a2 b2

1/8 3/8 3/8 1/8

Table 5: An empirical model on the (2, 2, 2) Bell scenario specifying the probabilities of the joint outcomes:the CHSH model.

The empirical model displayed in figure 6 (namely the CHSH model) can be also expressed ina table (see table 5).

Formally an empirical model e = {eC}C∈M is a family of probability distributions. Foreach context C ∈ M, eC is a probability distribution (a row of the probability table) overfunctions f : C −→ O (a cell). As an example, the first row of table 5 corresponds to:e{a1,b1} = 1

2(a1, b1 7→ 0, 0), 1

2(a1, b1 7→ 1, 1).

We require that the marginals of these distributions agree whenever contexts overlap i.e :

∀C,C ′ ∈M, eC |C∩C′ = eC′ |C∩C′ (3.3)

The notation eC |U with U ⊆ C stands for the marginalisation of probability distribution: fort ∈ OU , eC |U(t) :=

∑s∈OC ,s|U=t eC(s). Let us try to make this formula and these notions explicit

with an example.

Let us consider the first and second rows of the table 5. We have U = C ∩ C ′ = {a1, b1} ∩{a1, b2} = {a1}. Consider any t ∈ OU : for instance t0 : a1 7→ 0 (the measurement of a1 givesthe outcome 0). For the second row (C ′ = {a1, b2}), the only s ∈ OC′ (we will see that suchobjects are called sections) such that s|U = t are s1 : a1, b2 7→ 0, 0 with probability eC′(s1) = 3

8

and s2 : a1, b2 7→ 0, 1 with eC′(s2) = 18. Summing the probabilities: eC′ |U(t0) = 1

2. Considering

also the other case where t1 : a1 7→ 1, we obtain: eC′|U = 12(a1 7→ 0), 1

2(a1 7→ 1). The same

procedure on the first row gives: eC |U = 12(a1 7→ 0), 1

2(a1 7→ 1) so that the desired equality

holds. One can check that table 5 verifies this condition each time two contexts overlap inagreement with equation 3.3.

This fundamental requirement holds for all empirical models arising from quantum predictions[18]. The reason is that the compatibility of marginals is a generalisation of the usual no-signalling condition (that is a feature of the empirical predictions of quantum theory [20]).

Lip6 9 ENS Paris-Saclay

Page 12: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

3 The notion of static contextuality Master 2 ICFP

It is now worthwhile to introduce the notion of sections which are essential in the sheaf-theoretic approach. It describes measurement outcomes and we implicitly already used thenotion above. We recall that X is the set of measurements and O = Z2 is the set of outcomesfor each individual measurement. ∀U ⊆ X , a section over U is a function s : U → O.

As an example, let us consider the case where X = {a1, a2, b1b2}, O = Z2 and the set ofcompatible measurements is M = {{a1, b1}, {b1, a2}, {a2, b2}, {b2, a1}}. For each context C ∈M, we thus have four different sections specified by the four different outcomes of the pairof observables in C: ∀C = {ai, bj} ∈ M, the four sections over C are given by s : ai, bj 7→00, 01, 10 and 11. Now a section over the entire set of measurement X is called a globalsection. Contextuality of a given empirical model is linked to the non-existence of global sectionscompatible with that empirical model and we develop that idea in the following paragraph.

We can now define the notion of contextuality. More precisely we have a qualitative hierarchyof contextuality that we introduce below, starting from non-contextual empirical models to thestrongest kind of contextuality.

•a1

• b1

• a2

•b2

•0

•1

• 0

• 1• 0

• 1•0

•1

1/2

1/2

1/2

1/2

1/2

1/2

1/2

1/2

Figure 7: Non-contextual em-pirical model on the (2, 2, 2) Bellscenario.

•a1

• b1

• a2

•b2

•0

•1

• 0

• 1• 0

• 1•0

•1

Figure 8: Logical contextualempirical model on the (2, 2, 2)Bell scenario (Hardy model).

•a1

• b1

• a2

•b2

•0

•1

• 0

• 1• 0

• 1•0

•1

Figure 9: Strongly contextualempirical model on the (2, 2, 2)Bell scenario (PR box).

• An empirical model e is said to be non-contextual if is there exists a probability dis-tribution d on the set of global sections OX (note that OX acts as the canonical set ofdeterministic non-contextual hidden variables) such that ∀C ∈ M, d|C = eC . As anexample, consider the empirical model presented in figure 7. Let d = 1

2(a1, a2, b1, b2 7→

0, 0, 0, 0), 12((a1, a2, b1, b2 7→ 1, 1, 1, 1). Then for any C ∈ M, eC can be obtained by re-

stricting the above distribution d to the context C. The empirical model presented in thebundle diagram in figure 7 is thus said to be non-contextual.

• Such a global distribution cannot be found for a contextual empirical model. Equiva-lently, it has no realisation by factorisable hidden variable models [18]; thus for Bell-typescenarios with space-like separated measurements, contextuality specialises to the usualnotion of non-locality. Witnessing contextuality is equivalent to witnessing the viola-tion of a Bell-like inequality (see [18] for a general proof of equivalence). We may referto it as probabilistic contextuality. This kind of contextuality is harder (and sometimesimpossible) to visualise on a bundle diagram because one has to keep track of the proba-bilities. Indeed, each partial (i.e. not global) section s on a context C has a probabilityeC(s) associated with it (cell of the tables). Now we have to consider all global sectionsthat pass through s (i.e. global sections g such that g|C = s). If, for all contexts C and

Lip6 10 ENS Paris-Saclay

Page 13: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

3 The notion of static contextuality Master 2 ICFP

for all sections s on context C, all global sections that pass through s can be assignedweights that sum to at least eC(s) then the empirical model is non-contextual. This canbe non trivial to check but can be encoded intro a linear programming problem.

• A stronger version of contextuality is referred as logical contextuality. It arises whenthere exists a partial section in the empirical model that cannot be extended to a globalsection. This is often easily seen on a bundle diagram (depending on whether such adiagram can be drawn at all) as it implies that there exists at least one partial sectionthat cannot belong to a global section or equivalently to a closed path in the diagram. Forinstance, consider the Hardy model (see figure 8). As the yellow path witnesses the failureof a partial section s : a1, b1 7→ 1, 1 to belong to a global section, logical contextuality isnecessarily at play: if we consider the section s : a1, b1 7→ 1, 1 then one cannot extend it toa global section as this first section necessarily implies that b1, a2 7→ 1, 0, a2, b2 7→ 0, 1 andb1, a1 7→ 1, 0 which leads to a (logical) contradiction as we started with a1 7→ 1. Hencethe logical kind of contextuality.

• Strong contextuality arises when no partial section can be extended to a global one.Again, it is easily seen on a bundle diagram as any partial section leads to a contradictionwhen trying to extend it to a global one. One can check that the Popescu-Rohrlich [21]box displayed in figure 9 is strongly contextual (see for instance the highlighted path).

3.2 Contextuality as a resource for quantum advantages

This section is devoted to showing that quantum advantages over classical computationcan arise from contextuality. We will first introduce a game which contextuality allows us towin while it is impossible via a classical approach. Then we will focus on promoting linearcomputation to non-linear computation via contextuality.

3.2.1 Game approach

Let us introduce the Mermin-Peres magic square game. The game goes as follows: supposeyou are given a 3×3 matrix that can be filled with ±1 entries. The aim is to fill the matrix suchthat the product of elements belonging to the same row equals +1 and the product of elementsbelonging to the same column equals −1. A simple argument shows that it is impossible to doso with pre-determined value assignments in each cell: the multiplication of the results for eachrow must equal the multiplication of the results for each column as it amounts to multiplyingall elements of the matrix in both cases. Indeed, the following equality on entries should holds:

(a1a2a3)︸ ︷︷ ︸row 1

× (b1b2b3)︸ ︷︷ ︸row 2

× (c1c2c3)︸ ︷︷ ︸row 3

= (a1b1c1)︸ ︷︷ ︸column 1

× (a2b2c2)︸ ︷︷ ︸column 2

× (a3b3c3)︸ ︷︷ ︸column 3

However, with the aforementioned rules, the multiplication of the rows gives (+1) × (+1) ×(+1) = +1 while the multiplication of the columns gives (−1)× (−1)× (−1) = −1. Thus, wecannot succeed in this game with a classical approach.We can fulfill these requirements in quantum physics (see figure 10). Consider a 4-dimensionalHilbert space for two independent spin-1/2 particles. All operators within the same row (orcolumn) are mutually commuting: it is easily seen for the first and last rows (and columns).For the middle ones, it comes from the anticommutation of different Pauli matrices. Eachrow (or column) thus defines a context. Note that all these operators have eigenvalues ±1as they square to unity. Now taking the product of all operators belonging to the same rowgives +I while the product of operators belonging to the same column gives −I. Hence the

Lip6 11 ENS Paris-Saclay

Page 14: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

3 The notion of static contextuality Master 2 ICFP

+I ⊗ Za3

−X ⊗ Za2

+X ⊗ Ia1

+Z ⊗ Zb3

+Y ⊗ Yb2

+X ⊗Xb1

+Z ⊗ Ic3

−Z ⊗Xc2

+I ⊗Xc1

−1 −1 −1

+1

+1

+1

Con

text

1

Context 2

Figure 10: Mermin-Peres magic square: quantum resources provide an advantage over classical methods.

desired result. As highlighted above, any attempt to assign a pre-determined outcome to eachobservable would yield a contradiction and we may conclude that such requirements cannot befulfilled by a hidden variable model: the is a simple example of contextuality in the traditionalsense of Bell-Kochen-Specker [3] [8].

3.2.2 Mermin’s all-versus-nothing (AvN) arguments for contextuality

In 1990, Mermin presented a simple proof for strong contextuality [22] later generalizedto a large class of examples in quantum mechanics using stabilizer theory [19]. We will showanother simple example where no hidden variable theory can reproduce the desired results.

Consider the standard tripartite GHZ state (each party i = 1, 2, 3 has a qubit):

|GHZ〉3 =|000〉+ |111〉√

2

This is the unique state stabilized by: X1X2X3, −X1Y2Y3, −Y1X2Y3 and −Y1Y2X3. Each partyi = 1, 2, 3 performs a measurement (Xi or Yi) with outcome si. For the ith party, we associatethe measured eigenvalue +1 with si = 0 and −1 with outcome si = 1. While the measurementoutcomes si are individually random, correlations appear when performing a measurementcorresponding to a stabilizer operator. Because X1X2X3|GHZ〉3 = |GHZ〉3 then, for thisparticular measurement, we have s1 ⊕ s2 ⊕ s3 = 0 (⊕ being the modulo-2 addition). Likewise,for the three other measurements: s1 ⊕ s2 ⊕ s3 = 1 as the eigenvalue of the GHZ state for theremaining operators is −1.

Now let us try to reproduce these results with a non-contextual hidden variable model. Then,for i = 1, 2, 3, we should assign pre-determined outcomes xi, yi ∈ Z2 to the operators Xi, Yi.The above relations then impose the following equations:

x1 ⊕ x2 ⊕ x3 = 0

x1 ⊕ y2 ⊕ y3 = 1

y1 ⊕ x2 ⊕ y3 = 1

y1 ⊕ y2 ⊕ x3 = 1

(3.4)

Lip6 12 ENS Paris-Saclay

Page 15: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

3 The notion of static contextuality Master 2 ICFP

This set of equations is inconsistent. Indeed, each xi and yi appears exactly twice on the lefthand sides so the sum gives 0 while on the right hand side it gives 1. This is another exampleof contextuality that cannot be reproduced by a classical approach. It actually proves strongcontextuality since no global assignment is possible. Note that GHZ states (with at least threequbits) are strongly contextual. A state is strongly contextual if there exists measurements onit for which the resulting empirical model is strongly contextual. Remarkably, the 2-qubit GHZstates (also called Bell states) are not strongly contextual.

3.2.3 Promoting linearity to non-linearity using contextuality

Contextuality cannot be reproduced by a classical theory. A legitimate question is to askwhether contextuality can provide a quantum advantage that can be used in some compu-tational task. Short answer: yes. In this section, we will show that contextual systems canpromote classical linear computing to non-linear computing [6]. This is one example of an ad-vantage. Why is this one relevant? At first, it might appear not to be of much use. Firstly, it ishard to prove separation of the BQP and BPP complexity classes, so it is a good toy problem totest which quantum features enable boosts of computational power for more restricted classes.Also, the supervisor had developed a programme of quantum-enhanced classical computingwhere quantum implementation of non-linear parts enables quantum security tricks to be used[23]. This kind of problem (linearity VS non-linearity) has become a very active field [24]. Here,we will rely on the MBQC framework detailed in section 2.

Recall the two essential components for MBQC: an entangled multi-partite quantum stateand a classical control computer. The classical computer only needs to perform XOR gates tocontrol the measurements and compute the desired output. The computational power of thiscomputer is thus limited to parity computation and we focus on MBQC⊕. Parity computationcan efficiently solve these problems in a complexity class named ⊕L while universal classicaland quantum computation are associated with classes BPP and BQP . It is believed that ⊕Lis weaker than P which, in turn, is weaker than BQP though none of these inclusions areproven to be strict. The notation ⊕L→ P indicates that the parity computer is promoted tofull universal classical computation when, for example, quantum states are used as a resource.

Promoting parity computer (⊕L) to classical universality (P ) can be achieved by giving itaccess to AND gates (see table introduction). If implementable in the MBQC framework, anatural question is to ask for the minimal size of the resources needed for one AND gate. Itappears enriching to explore this question.

Let a and b be the input bits. The aim is to perform AND(a, b). The first step is toconsider a bi-partite system. A device implementing a deterministic AND gate of two inputbits on a bi-partite system using parity computation is a PR box (see figure 9). Accordingto the inputs a and b, measurements are performed outputting the bits m1 and m2 such thatXOR(m1,m2) = AND(a, b) or equivalently m1 ⊕m2 = ab (see figure 11). A direct link can beestablished between the pictorial representation of the PR box and the corresponding bundlediagram: in figure 9, setting a1 to a = 0, b1 to b = 0, a2 to a = 1 and b2 to b = 1 gives thedesired AND gate after computing the parity of the inputs. Indeed the correlations are suchm1 ⊕m2 = 0 if at most one of the input bit is 1 which corresponds the the three first entriesof the AND truth table (see AND truth table). The last entry - AND(a, b) = 1 - happens onlyif both a are b are equal to 1 and for these inputs m1 ⊕m2 = 1.Nonetheless, PR boxes are not quantum mechanically realisable [21]: they are no-signalling but

Lip6 13 ENS Paris-Saclay

Page 16: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

3 The notion of static contextuality Master 2 ICFP

AND(a, b) = XOR(m1,m2)

m1 ∈ {0, 1} m2 ∈ {0, 1}

a ∈ {0, 1} b ∈ {0, 1}

Figure 11: Pictorial representation of the PR-box.

oddly more contextual than quantum mechanics allows. Here, the CHSH quantity reads:

CHSH = E(0, 0) + E(0, 1) + E(1, 0)− E(1, 1) (3.5)

where E(a, b) is the correlation coefficient of the outcomes of Alice and Bob for the inputs aand b. This quantity obeys two different inequalities in the classical theory and in the quantumtheory respectively:

CHSHCl 6 2 (3.6)

CHSHQM 6 2√

2 (3.7)

Eq. 3.6 is a Bell-type inequality. Eq. 3.7 was established by B.Tsirelson [25] and gives a boundfor quantum mechanics. Now for the PR box, if a = 1 and b = 1 then the outcomes are max-imally anti-correlated (E(1, 1) = −1); otherwise they are maximally correlated (E(a, b) = 1).Thus CHSHPR = 4 and it violates the quantum mechanical inequality proving PR boxes can-not be realized by quantum mechanical systems.

The next logical step is to consider a tripartite system. We will prove that given classicalinput bits a and b, AND(a, b) can be performed in the MBQC⊕ framework using a 3-qubit GHZstate. The proof relies intrinsically on Mermin’s AvN argument for contextuality. Consider thestate |ψ〉 = |001〉+|110〉√

2. Let c be a third input bit depending on a and b: c = a⊕ b. Each input

bit is sent to a measuring device (one for each qubit) which acts on the initial state according tothe value of the corresponding input bit. Measuring devices which receive bit 0 measure Pauliobservable X and those which receive 1 measure Y . Now |ψ〉 is stabilized by X1X2X3, X1Y2Y3,Y1X2Y3 and Y1Y2X3. According to the values of the input bits, one of the four stabilizers isperformed. Note that the associated eigenvalue is exactly (−1)AND(a,b) (see 3rd column of table6). Now if we associate binary 0 with measured eigenvalue +1 and binary 1 with −1, thenthe outcomes are correlated such that: m1 ⊕m2 ⊕m3 = AND(a, b) (see table 6). This provesthe desired result and we may conclude that 3-qubit GHZ state is an optimal resource (in thesense that it minimizes the number of required qubits) to promote parity computation ⊕L touniversal classical computation P .

Note the following important remark. In [6], J.Anders and E.Browne show that one mayextend parity computation to universal classical using a GHZ state in the MBQC⊕ framework.It only requires non adaptive measurement since one can implement an AND gate non adap-tively. In [26], M.Hoban et al. ask what features of MBQC⊕ remain when performing onlynon adaptive measurements. Crucially, they show that some non-linear functions are efficientlycomputable while some others require an exponential number of qubits. This is consistent withthe above result because computing the product of three input bits a, b and c requires firstcomputing p1 = ab and then computing p2 = p1c = abc which is an adaptive computation

Lip6 14 ENS Paris-Saclay

Page 17: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

3 The notion of static contextuality Master 2 ICFP

input bits Measurement Eigenvalue Parity of outputsa b c = a⊕ b for (a, b, c) associated with |ψ〉 m1 ⊕m2 ⊕m3

0 0 0 X1X2X3 +1 00 1 1 X1Y2Y3 +1 01 0 1 Y1X2Y3 +1 01 1 0 Y1Y2X3 −1 1

Table 6: Implementation of the AND of two classical input bits a and b using a 3-qubit GHZ state as an initialresource.

since the computation of the second AND requires the output of the first AND. This remarkis trivial but highly important. It shows that ⊕L → P cannot be allowed efficiently by non-adaptive MBQC⊕ since it requires an exponential number of qubits (in the number of inputbits). Nevertheless, it is allowed by adaptive MBQC⊕ using GHZ states as a resource.

3.3 Quantifying contextuality

The main question this section addresses is the following: given an empirical model e, canwe provide a way to quantify the amount of contextuality in that model? S.Abramsky et al.provide a useful notion in [17], namely the notion of contextual fraction. First, we note thatgiven two empirical models e and e′ on the same measurement scenario, then, for λ ∈ [0, 1],λe + (1 − λ)e′ is a well-defined empirical model and defined by taking the convex sum ofprobability distributions at each context. Note that the convex sum preserves compatibilityrequirement.

Now for a given empirical model e, we ask for a convex decomposition of the form:

e = λeNC + (1− λ)e′ (3.8)

with λ ∈ [0, 1]. In other words, instead of asking for a non-contextual hidden variable model (i.easking for a probability distribution on global assignments that marginalizes to the distributionover the joint outcomes at each context), we only ask for a subprobability distribution onglobal assignments that marginalizes at each context to a sub-distribution of the empirical datawhich explains a fraction of the events. This would give a non-contextual empirical model eNC .The remaining events that were not taken into account are contained in e′. Now, we try tomaximise λ, given a maximal weight to such a global distribution (i.e. we could say we try toexplain the more events we can with a non-contextual theory). Maximising λ gives the non-contextual fraction of an empirical model e: NCF(e). The contextual fraction is then definedas: CF(e) := 1 − NCF(e) [17]. The remaining model - which is necessarily contextual if theinitial model was a contextual one - is strongly contextual as every feature of non-contextualityis contained in eNC . This implies that any empirical model e admits the following convexdecomposition into a non-contextual model and a strongly contextual model:

e = NCF(e)eNC + CF(e)eSC (3.9)

Note that this decomposition is not necessarily unique. Naturally, when CF (e) = 1 (implyingthat the non-contextual fraction vanishes), the empirical model is strongly contextual.

Finding a probability distribution with maximal weight on global assignments for a given em-pirical model can be formulated as a linear programming problem and thus the contextualfraction can be computed via linear programming. Moreover this contextual fraction is linked

Lip6 15 ENS Paris-Saclay

Page 18: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

4 The notion of dynamic contextuality Master 2 ICFP

to violations of generalized Bell inequalities which come out as solutions to the dual linear pro-gramming problem. It provides yet another argument for using this measure of contextuality(see [17] for more details).

4 The notion of dynamic contextualityWe now introduce the notion of sequential transformation contextuality introduced by

S.Mansfield and E.Kashefi in [10]. We shall refer to it as dynamic contextuality. Indeed"transformation contextuality" has already been introduced by R.Spekkens in [9]; however thetwo notions differ slightly. The denomination "dynamic contextuality" avoids confusion andsuits well this new approach as we shall see.

4.1 Formalism of ontological models

We briefly review the ontological model formalism. The central component of ontologicalmodels is the ontic space Λ, comprising the states of a hypothetical underlying hidden variabletheory. Operationally [9], primitives elements of a physical theory are preparation, transfor-mation and measurement procedures. They can be understood as lists of instructions to beimplemented in the laboratory.

• Preparation of a quantum state ρ results in an ontic state sampled according to aprobability distribution dρ on Λ.

• A quantum measurement M corresponds to a function ξM : Λ → P (O) i.e. to eachontic state, it assigns a probability distribution over the set of outcomes O.

• In the simplest case, a quantum transformation U corresponds to an endomorphismfu : Λ→ Λ.

Now for any combination of preparation, transformation and measurement procedures, theontological theory predicts that the empirical statistics, eρ,U,M ∈ P (O), are given by:

eρ,U,M =∑λ∈Λ

dρ(λ)ξM(fU(λ)) (4.10)

Traditional contextuality (i.e. BKS - Bell, Kochen and Specker - contextuality) can beexpressed in this framework. Non-contextuality requires that, for each valid context C, com-patibility of measurements is reflected at the ontological level through factorisability of the jointmeasurement function ξC : Λ→ P (O|C|2) [10]; i.e.

ξC =∏M∈C

ξM (4.11)

Crucially, there is the implicit requirement that for any measurement M occurring in twodifferent contexts C and C ′, its ontological representation ξM is context-independent; that is:

ξM(C) = ξM(C′) (4.12)

Remarkably, this description of non-contextuality via factorisability is equivalent to the de-scription in terms of global valuations used in section 3 [18]. A theory which does not respectone of these features would be called a contextual theory.

Lip6 16 ENS Paris-Saclay

Page 19: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

4 The notion of dynamic contextuality Master 2 ICFP

4.2 Non-contextuality for transformations in sequential contexts

We now make explicit the notion of non-contextuality for transformations in sequentialcontexts. Each context C is defined by a sequence of transformations C = (Ui)i=1...t performedin a pre-defined order (here from 1 to t). For non-contextuality, we have two requirements:

• Sequential composition is reflected at the ontological level; that is:

fUt...U1 = fUt ◦ ... ◦ fU1 (4.13)

It follows from the condition of factorisability expressed in equation 4.11.

• The ontological representation of transformations are independent of sequential context;i.e. whenever a transformation U occurs in contexts C and C ′ then:

fU(C) = fU(C′) (4.14)

This is the implicit requirement of non-contextuality that equation 4.12 also expresses.

This notion differs from transformation contextuality introduced by R.Spekkens [9] in whicha context is a convex decomposition of a completely positive map corresponding to a specifictransformation procedure. Again, non-contextuality requires that these convex decompositionsare reflected at the ontological model and that ontological representations of transformationsare independent of operational context. We refer to our notion of sequential transformationcontextuality as dynamic contextuality as transformations are performed dynamically in se-quence.

4.3 Translation of MBQC⊕ into a single-qubit protocol

We might wonder if this picture is of any interest and if it provides any kind of quantumadvantage. We come back to the MBQC⊕ framework (see section 2) and we will see that thisnotion allows to promote a parity computer to non-linearity (see section 3.2.3) using a singlequbit in the |+〉 state if we allow the client to perform Pauli transformations on the qubit.

4.3.1 Correctness and security of a protocol

When studying a given protocol, two elements are of capital importance: its correctnessand its security (also called blindness). In the client-server picture, security properties ofthe protocol are the ability of hiding the secret information of the client from the server (i.e.input bits or the result of the computation) when the client delegates part of the computationto the server. Intuitively, we wish that, whatever the server does, its knowledge on the client’scomputation does not increase.

Correctness: we will say that a given protocol is correct if for every run of the protocolwhere both players are honest (i.e. adhere to the protocol), the desired function is implementedfor all inputs.

Security or blindness: we will say that a protocol is secure (or blind) if all informationsent from the client to the server is independent of the inputs when averaged over the client’ssecret parameter r which is unknown from the server.

Lip6 17 ENS Paris-Saclay

Page 20: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

4 The notion of dynamic contextuality Master 2 ICFP

4.3.2 Standard MBQC⊕ framework

The main result is that, in the MBQC⊕ framework, a classical client limited to paritycomputation can promote its power of computation to classical universality if we allow that theclient classically communicates to a quantum server which is able to prepare quantum statesand to perform measurements controlled by the classical client on the quantum states (see figure12). We saw in section 3.2.3 that one could implement an AND gate when GHZ states are usedas resource states. Remarkably, it requires (strong) static contextuality which is provided bythe resource state.

Classicalclient ⊕

Quantumserverc.c

Figure 12: Client-server picture of the MBQC⊕ framework: a classical client restricted to parity computationscommunicates classically with a quantum server.

Crucially, it was shown that the corresponding protocol (see protocol 1 below) is correct butnot secured [23] as the following theorem holds.

Theorem: No classical protocol in which the client is restricted to XOR computations candelegate deterministically computation of AND to a server while keeping the blindness.

This means that, to achieve blindness (if possible), one must let the client have quantumfeatures. The natural following question is: what minimal quantum features of the client allowblindness?

Protocol 1 Implementation of an AND gate in the MBQC⊕ framework.

• Input to the client: two classical bits a and b.• Ouput from the client: AND(a, b).

Protocol:• Client’s round

1. Client receives input bits a and b.2. Client computes c = a⊕ b.3. Client sends a, b and c to the server.

• Server’s round1. Server receives bits a, b and c.2. Server performs 3 measurements on the GHZ state (already prepared by the server);

each measurement is parametrised by a, b and c respectively.3. Server obtains outcomes mi and sends them to the client.

• Client’s round1. Client computes out = m1 ⊕m2 ⊕m3 which equals AND(a, b) by correctness of the

protocol.2. Client outputs out.

4.3.3 Single-qubit implementation of an AND gate

To extend the previous framework, we consider now a client still restricted to parity com-putation but which can now interact with a quantum resource (see figure 13) as follows: the

Lip6 18 ENS Paris-Saclay

Page 21: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

4 The notion of dynamic contextuality Master 2 ICFP

resource is prepared in a fixed state by the server, sent to the client which can perform con-trolled transformations on it before sending it back to the server which then performs a fixedmeasurement on the state. The outcome is returned to the client which can output the desiredfunction (see protocol 2 above). We will prove that this protocol is now both correct and blind[23]. We call this computational model l2-TBCC (transformation-based classical computing) -l2 being for the restriction of the client to mod2-linear (i.e. parity) computation.

Client ⊕ Serverq.c

Figure 13: Client-server picture of the single-qubit protocol: a client restricted to parity computations com-municates with a server using a single qubit on which the client may perform unitary transformations.

Protocol 2 Single-qubit implementation of an AND gate.

• Input to the client: two classical bits a and b.• Ouput from the client: AND(a, b).

Protocol:• Server’s round

1. Server prepares a |+〉 state and sends it to the client.• Client’s round

1. Client receives input bits a and b and the |+〉 state.2. Client generates a random bit r ∈ {0, 1}.3. Client modifies the |+〉 state as follows:

|ψ〉 = Zr(S†)a⊕bSbSa|+〉

4. Client sends |ψ〉 to the server.• Server’s round

1. Server performs a measurement with respect to the X basis on |ψ〉 obtaining theoutcome s.

2. Server sends s to the client.• Client’s round

1. Client computes out = s⊕ r which equals AND(a, b) by correctness of the protocol.2. Client outputs out.

CorrectnessHere, we want to prove that given input bits a and b, AND(a, b) can be implemented in this

picture.

|+〉 Sa Sb S†a⊕b X meas.S†a⊕bSbSa|+〉

Figure 14: Single-qubit AND protocol in the client-server picture.

Let: S0 = I2 and S1 =

(1 00 i

).

Lip6 19 ENS Paris-Saclay

Page 22: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

4 The notion of dynamic contextuality Master 2 ICFP

The procedure is summarised in figure 14. The key idea is that, except when a = b = 1, thesequential transformations S†a⊕bSbSa is equivalent to applying the identity and thus it does notchange the initial |+〉 state: when the server performs a X measurement, it will obtain theeigenvalue +1. Now for the case a = b = 1, the sequential transformations amount to applyingZ and Z|+〉 = |−〉 so that the server will now obtain −1 when performing a X measurement.The correctness is ensure by:

S†a⊕bSbSa = ZAND(a,b) (4.15)

a b a⊕ b S†a⊕bSbSa S†a⊕bSbSa|+〉 s0 0 0 I2 |+〉 00 1 1 I2 |+〉 01 0 1 I2 |+〉 01 1 0 Z |−〉 1

Table 7: Implementation of the AND of two classical input bits a and b in the single-qubit protocol.

Mapping measured eigenvalue +1 to 0 and −1 to 1, the server gets an outcome bit s whenperforming a X measurement such that AND(a, b) = s (see table 7). In this proof, we did notconsider the random bit r which might be generated by the client to ensure blindness (see thefollowing part). Indeed, we will see that the client performs an additional transformation Zr.Moreover, equation 4.15 shows that applying an additional Zr is easily taken into account sincethe total transformation then amounts to ZAND(a,b)⊕r: the client outputs s ⊕ r instead of s torecover the desired function.

BlindnessIf the server is untrusted, its most general strategy to learn any information on input bits

a and b is to prepare a bipartite state π1,2 and to send the first subsystem to the client whilekeeping the other one. Once the client performed its sequential transformations, the state ofthe server system reads (up to a normalisation factor):∑

r

(ZAND(a,b)⊕r ⊗ I2)π1,2(ZAND(a,b)⊕r ⊗ I2) (4.16)

But since r is randomly distributed, so is AND(a, b)⊕ r so the state above does not depend ona or b hence the blindness of the protocol.

Thus, the protocol described is thus both correct and blind.

4.4 Quantum resource enabling the implementation of an AND gatevia a single-qubit protocol

In this section, we prove that the implementation of an AND gate as described above requiresdynamic contextuality [10]. From a computational point of view, in cases where a client limitedto parity computations to perform the controlled transformations, it is reasonable to assumethat, at the ontological level, the transformations are mod2-linear (parity). Thus the onticstate space Λ can also be embedded into (Z2)s for some s ∈ N. We call such realisations l2-ontological. Recall that, in dynamic contextuality, a context is a sequence of transformations.Here, we have four different contexts Ca,b = (S†a⊕bSbSa) specified by different values of a and b.

Lip6 20 ENS Paris-Saclay

Page 23: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

4 The notion of dynamic contextuality Master 2 ICFP

Now recall that unitaries are represented by invertible functions. We have only two invertiblefunctions available on Z2: the identity function, fid(λ) = λ⊕0 and the NOT function, fNOT(λ) =λ ⊕ 1. Thus the l2-ontological transformation corresponding to a unitary is simply additionby some vector u ∈ (Z2)s i.e. for an initial ontic state λ a transformation is reflected at theontological level by:

fU(λ) = λ⊕ u (4.17)

Without loss of generality (cf [10]), measurement is reflected at the ontological level by:

ξM(λ′) = λ′.1 (4.18)

with λ′ the final ontic state.

We now prove the following property:

Any l2-ontological realisation of the AND in the l2-TBCC framework is dynamically contextual.

Proof. Suppose that preparation results in an initial ontic state λ ∈ (Z2)s and transformationsamount to addition by vectors s1a, s2b, s3a⊕b ∈ (Z2)s, respectively. The indices 1, 2, 3 keep track ofthe transformations because even when the bits a, b or a⊕b agree, the ontological representationof these transformations differs as the are performed sequentially. The final ontic state resultingfrom these transformations is then λ′ = λ⊕ s1a ⊕ s2b ⊕ s3a⊕b. Now non-contextual realisation ofthe AND function requires that the following equations are satisfied.

(λ⊕ s10 ⊕ s2

0 ⊕ s30).1 = 0 (C0,0)

(λ⊕ s10 ⊕ s2

1 ⊕ s31).1 = 0 (C0,1)

(λ⊕ s11 ⊕ s2

0 ⊕ s31).1 = 0 (C1,0)

(λ⊕ s11 ⊕ s2

1 ⊕ s30).1 = 1 (C1,1)

(4.19)

Equations 4.19 describe evaluation of the computation for the respective sequential contexts.A contextual realisation would permit transformation vectors to vary according to context: forinstance s1

0(C0,0) 6= s1

0(C0,1). Here, however, we assume non-contextuality and we thus require

that the same transformation vector does not depend on the context. Then these equations arenot jointly satisfiable. Following Mermin’s AvN argument for contextuality (albeit for dynamiccontextuality rather than BKS contextuality), we face a parity problem since the left hand-sidemust sum to 0 while the right-hand side must sum to 1. This concludes the proof.

4.5 Further discussion on the single-qubit protocol

We now specifically turn to a question that arises during the internship. We first noticedthat in the NMQC⊕ (Non-adaptive Measurement-Based Quantum Computing), one cannotimplement all non-linear functions efficiently [26]. In particular, one must distinguish between:

• the n-tuple AND function: gn(x) =∏n

i=1 xi.

• the pairwise AND function: hn(x) =⊕n

j=1 xj+1.(⊕j

i=1 xk).

Indeed, to achieve the n-tuple AND function gn deterministically in the NMBQC⊕ framework,one requires no fewer than (2n − 1) qubits while the pairwise AND function hn can be imple-mented deterministically with no fewer than (n+ 1) qubits (see [26]). This shows that hn canbe implemented efficiently while gn cannot since it requires an exponential number of qubits.

Lip6 21 ENS Paris-Saclay

Page 24: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

5 Conclusion and acknowledgement Master 2 ICFP

This is easily understandable since performing the n-tuple AND function requires adaptivity.

Now it was shown that the pairwise AND function can be implemented in the single-qubitprotocol (see [27]). This made us wonder whether full classical computation can be achievedwith single-qubit protocols. It is clear that any function computed efficiently in the NMBQC⊕framework is implementable in l2-TBCC. The question of non-adaptivity is somehow less trivial.We see two solutions to that problem.

If measurements performed by the server are not destructive then according to the outcomeof the X measurement by the server, it can keep sending the same |+〉 state to the client whichcan now perform adaptive measurements on the following rounds since it possesses the resultsof previous computations. If measurements are destructive (e.g. if the single-qubit is encodedonly in a photon) then, to implement the n-tuple AND function, the server may prepare atmost (n−1) |+〉 state (which is linear in the number of input bits this time) on which the clientperforms adaptive measurement i.e. it can keep some qubits untransformed until it receivessome results of computations from the server on previous qubits which can dictate the followingtransformations to apply.

Both methods would enable efficient full classical computation with both correctness andblindness.

5 Conclusion and acknowledgementQuantum Computing has been a subject of huge interest in recent years, from researchers

and the general public alike, due to its intriguing potential for applications which will foreverbe beyond the reach of classical computing. Despite recent progress in both experimental andtheoretical techniques, difficulties in communicating the needs and results of these respectivecamps has resulted in a lack of major implementable applications for near-term technologies.Indeed existing technology can only reliably produce, maintain and control relatively smallnumbers of qubits while nevertheless most theoretical work has focussed on idealised situationswith unbounded resources. Thus there is a pressing need to reach maximum performance outof what is currently available to us - that is to say few-qubit systems. Focusing on analysing thesource of quantum advantages over classical computing in few-qubit systems to come up withefficient and implementable applications is thus of great importance. From this perspective,it has proven fruitful to investigate the precise sources of quantum advantages over classicalsystems. A key non-classical phenomenon known as contextuality has been singled out as theessential resource enabling the onset of increased computational power and universal quantumcomputing in various restricted kinds of hybrid computational models. In other models, how-ever, contextuality cannot even arise, and identification of the precise non-classical behaviourenabling advantages remains open.

The internship was thus greatly fulfilling as I could learn on fundamental aspects of quantumphysics as well as on practical few-qubit protocols. Contextuality really comes out as anexcellent candidate for quantum advantage even though a clear, general definition of this notionis yet to be given. Indeed, dynamical contextuality appears as a new promising notion whichenables a quantum advantage; from that perspective, a generalised notion of contextuality isneeded. Remarkably, new features may appear from studying such notions - e.g. improvedsecurity as seen with the single-qubit protocol studied. I will continue as a PhD student in thesame group and there are indeed challenging and promising questions yet to be answered: e.g.generalised contextuality, upgraded versions of the protocols mentioned in this report.

Lip6 22 ENS Paris-Saclay

Page 25: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

5 Conclusion and acknowledgement Master 2 ICFP

AcknowledgmentI would like to greatly thank Elham Kashefi and Shane Mansfield for their brilliant guidancethroughout the internship. Elham provided her global picture on various aspects of quantuminformation while Shane could nurture my interest in foundation of quantum mechanics. I amreally excited to continue as a PhD student in the same cheerful and welcoming research group.

Lip6 23 ENS Paris-Saclay

Page 26: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

REFERENCES Master 2 ICFP

References[1] Richard P. Feynman. Simulating physics with computers. International Journal of Theo-

retical Physics, 21(6-7):467–488, June 1982.

[2] A. Einstein, B. Podolsky, and N. Rosen. Can Quantum-Mechanical Description of PhysicalReality Be Considered Complete? Physical Review, 47(10):777–780, May 1935.

[3] John S. Bell. On the Problem of Hidden Variables in Quantum Mechanics. Reviews ofModern Physics, 38(3):447–452, July 1966.

[4] John F. Clauser, Michael A. Horne, Abner Shimony, and Richard A. Holt. ProposedExperiment to Test Local Hidden-Variable Theories. Physical Review Letters, 23(15):880–884, October 1969.

[5] Robert Raussendorf. Contextuality in Measurement-based Quantum Computation. Phys-ical Review A, 88(2), August 2013. arXiv: 0907.5449.

[6] Janet Anders and Dan E. Browne. Computational power of correlations. Physical ReviewLetters, 102(5), February 2009. arXiv: 0805.1002.

[7] Mark Howard, Joel Wallman, Victor Veitch, and Joseph Emerson. Contextuality suppliesthe ‘magic’ for quantum computation. Nature, 510(7505):351–355, June 2014.

[8] Simon Kochen and E. P. Specker. The Problem of Hidden Variables in Quantum Mechan-ics. In The Logico-Algebraic Approach to Quantum Mechanics, The University of WesternOntario Series in Philosophy of Science, pages 293–328. Springer, Dordrecht, 1975.

[9] R. W. Spekkens. Contextuality for preparations, transformations, and unsharp measure-ments. Physical Review A, 71(5), May 2005. arXiv: quant-ph/0406166.

[10] Shane Mansfield and Elham Kashefi. Quantum advantage from sequential transformationcontextuality. arXiv:1801.08150 [quant-ph], January 2018. arXiv: 1801.08150.

[11] Daniel M. Greenberger, Michael A. Horne, and Anton Zeilinger. Going Beyond Bell’s The-orem. In Bell’s Theorem, Quantum Theory and Conceptions of the Universe, FundamentalTheories of Physics, pages 69–72. Springer, Dordrecht, 1989.

[12] Hans J. Briegel and Robert Raussendorf. Persistent entanglement in arrays of interactingparticles. Physical Review Letters, 86(5):910–913, January 2001. arXiv: quant-ph/0004051.

[13] Daniel Gottesman. The Heisenberg Representation of Quantum Computers. arXiv:quant-ph/9807006, July 1998. arXiv: quant-ph/9807006.

[14] Scott Aaronson. BQP and the Polynomial Hierarchy. In Proceedings of the Forty-secondACM Symposium on Theory of Computing, STOC ’10, pages 141–150, New York, NY,USA, 2010. ACM.

[15] Robert Raussendorf and Hans J. Briegel. A One-Way Quantum Computer. PhysicalReview Letters, 86(22):5188–5191, May 2001.

[16] Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Informa-tion: 10th Anniversary Edition. Cambridge University Press, New York, NY, USA, 10thedition, 2011.

Lip6 24 ENS Paris-Saclay

Page 27: Analysis and optimisation of the source of quantum ... · Internship report - ICFP Master’s degree - ENS Paris Laboratoired’informatiquedeParis6 April1,2018-July7,2018 Intern:

REFERENCES Master 2 ICFP

[17] Samson Abramsky, Rui Soares Barbosa, and Shane Mansfield. The contextual fraction as ameasure of contextuality. Physical Review Letters, 119(5), August 2017. arXiv: 1705.07918.

[18] Samson Abramsky and Adam Brandenburger. The sheaf-theoretic structure of non-localityand contextuality. New Journal of Physics, 13(11):113036, 2011.

[19] Samson Abramsky, Rui Soares Barbosa, Kohei Kishida, Raymond Lal, and Shane Mans-field. Contextuality, Cohomology and Paradox. arXiv:1502.03097 [quant-ph], February2015. arXiv: 1502.03097.

[20] G. C. Ghirardi, A. Rimini, and T. Weber. A general argument against superluminaltransmission through the quantum mechanical measurement process. Lettere al NuovoCimento, 27(10):293–298, March 1980.

[21] Valerio Scarani. Feats, Features and Failures of the PR-box. arXiv:quant-ph/0603017,844:309–320, 2006. arXiv: quant-ph/0603017.

[22] N. David Mermin. Extreme quantum entanglement in a superposition of macroscopicallydistinct states. Physical Review Letters, 65(15):1838–1840, October 1990.

[23] Vedran Dunjko, Theodoros Kapourniotis, and Elham Kashefi. Quantum-enhanced SecureDelegated Classical Computing. arXiv:1405.4558 [quant-ph], May 2014. arXiv: 1405.4558.

[24] Matty J. Hoban and Dan E. Browne. Stronger Quantum Correlations with Loophole-freePost-selection. Physical Review Letters, 107(12), September 2011. arXiv: 1102.1438.

[25] B. S. Tsirel’son. Quantum analogues of the Bell inequalities. The case of two spatiallyseparated domains. Journal of Soviet Mathematics, 36(4):557–570, February 1987.

[26] Matty J. Hoban, Earl T. Campbell, Klearchos Loukopoulos, and Dan E. Browne. Non-adaptive Measurement-based Quantum Computation and Multi-party Bell Inequalities.New Journal of Physics, 13(2):023014, February 2011. arXiv: 1009.5213.

[27] Marco Clementi, Anna Pappa, Andreas Eckstein, Ian A. Walmsley, Elham Kashefi, andStefanie Barz. Classical multiparty computation using quantum resources. Physical ReviewA, 96(6), December 2017. arXiv: 1708.06144.

Lip6 25 ENS Paris-Saclay