Programming Telepathy: Implementing Quantum Non-Locality Games
Anya Tafliovich, Eric C.R. Hehner

TL;DR
This paper introduces a formal framework for designing and analyzing quantum non-locality games, demonstrating how entanglement enables players to perform tasks impossible classically, akin to quantum telepathy.
Contribution
It provides the first comprehensive formal framework for specifying, implementing, and analyzing quantum non-locality games, advancing understanding of quantum pseudo-telepathy phenomena.
Findings
Framework enables precise specification of quantum non-locality games
Implementation demonstrates quantum advantage in communication tasks
Analysis reveals conditions under which quantum resources outperform classical strategies
Abstract
Quantum pseudo-telepathy is an intriguing phenomenon which results from the application of quantum information theory to communication complexity. To demonstrate this phenomenon researchers in the field of quantum communication complexity devised a number of quantum non-locality games. The setting of these games is as follows: the players are separated so that no communication between them is possible and are given a certain computational task. When the players have access to a quantum resource called entanglement, they can accomplish the task: something that is impossible in a classical setting. To an observer who is unfamiliar with the laws of quantum mechanics it seems that the players employ some sort of telepathy; that is, they somehow exchange information without sharing a communication channel. This paper provides a formal framework for specifying, implementing, and analysing…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsQuantum Computing Algorithms and Architecture · Quantum Mechanics and Applications · Computability, Logic, AI Algorithms
Programming Telepathy: Implementing Quantum Non-locality
Games
Anya Tafliovich
Computer Science
University of Toronto
Toronto, Canada
Eric C. R. Hehner
Computer Science
University of Toronto
Toronto, Canada
Abstract
Quantum pseudo-telepathy is an intriguing phenomenon which results from the application of quantum information theory to communication complexity. To demonstrate this phenomenon researchers in the field of quantum communication complexity devised a number of quantum non-locality games. The setting of these games is as follows: the players are separated so that no communication between them is possible and are given a certain computational task. When the players have access to a quantum resource called entanglement, they can accomplish the task: something that is impossible in a classical setting. To an observer who is unfamiliar with the laws of quantum mechanics it seems that the players employ some sort of telepathy; that is, they somehow exchange information without sharing a communication channel.
This paper provides a formal framework for specifying, implementing, and analysing quantum non-locality games.
keywords:
Quantum computing, quantum non-locality, pseudo-telepathy games, formal verification, formal methods of software design, logic of programming
††volume: SBMF††journal: Electronic Notes in Theoretical Computer Science††thanks: This work is in part supported by NSERC††thanks: Email: \[email protected]††thanks: Email: \[email protected]
1 Introduction
The work develops a formal framework for specifying, implementing, and analysing quantum pseudo-telepathy: an intriguing phenomenon which manifests itself when quantum information theory is applied to communication complexity. To demonstrate this phenomenon researchers in the field of quantum communication complexity devised a number of quantum non-locality games. The setting of these games is as follows: the players are separated so that no communication between them is possible and are given a certain computational task. When the players have access to a quantum resource called entanglement, they can accomplish the task: something that is impossible in a classical setting. To an observer who is unfamiliar with the laws of quantum mechanics it seems that the players employ some sort of telepathy; that is, they somehow exchange information without sharing a communication channel.
Quantum pseudo-telepathy, and quantum non-locality in general, are perhaps the most non-classical and the least understood aspects of quantum information processing. Every effort is made to gain information about the power of these phenomena. Quantum non-locality games in particular have been extensively used to prove separations between quantum and classical communication complexity. The need for a good framework for formal analysis of quantum non-locality is evident.
We look at quantum non-locality in the context of formal methods of program development, or programming methodology. This is the field of computer science concerned with applications of mathematics and logic to software engineering tasks. In particular, the formal methods provide tools to formally express specifications, prove correctness of implementations, and reason about various properties of specifications (e.g. implementability) and implementations (e.g. time and space complexity).
In this work the analysis of quantum non-locality is based on quantum predicative programming ([33, 32]), a recent generalisation of the well-established predicative programming ([23, 24, 25]). It supports the style of program development in which each programming step is proved correct as it is made. We inherit the advantages of the theory, such as its generality, simple treatment of recursive programs, and time and space complexity. The theory of quantum programming provides tools to write both classical and quantum specifications, develop quantum programs that implement these specifications, and reason about their comparative time and space complexity all in the same framework.
Presenting new non-locality paradigms or new pseudo-telepathy games is not the subject of this work. Our goal is developing a formal framework that encompasses all aspects of quantum computation and information. Formal analysis of quantum algorithms, including their time complexity, is presented in [33]. Analysis of quantum communication appears in [34]. This paper focuses on formal analysis of non-locality paradigms; we choose known pseudo-telepathy games as illustrative examples of our formalism.
The rest of this work is organised as follows. Section 2 is a brief introduction to quantum predicative programming. The contribution of this work is Section 3 which introduces a formal framework for specifying, implementing, and analysing quantum pseudo-telepathy and presents several examples of implementing and analysing non-locality games. Section 5 states conclusions and outlines directions for future research. A brief introduction to quantum computing is included in the Appendix.
1.1 Our contribution and related work
This work attempts to bring together two areas of active research: the study of quantum non-locality and applications of formal methods to quantum information and computation. Currently, the two worlds rarely meet.
Quantum non-locality has been studied extensively first by physicists and lately by researchers in the fields of quantum information and quantum communication complexity. Since the work of Bell in 1964 ([8]), researchers have been trying to provide an intuitive explanation of the genuinely non-classical behaviour produced by quantum mechanics. Today, quantum pseudo-telepathy games are considered one of the best and easiest to understand examples of these non-classical phenomena (e.g. [21, 14, 11, 12]).
Formal approaches to quantum programming include the language qGCL [30, 38, 39], process algebraic approaches developed in [4, 27, 26], tools developed in the field of category theory by [1, 2, 3, 16, 31], functional languages of [6, 7, 5, 35, 36], as well as work of [20, 19], [17], and [22]. A detailed discussion of the work related to quantum predicative programming is presented in [33]. Some researchers address the subject of formalising quantum non-locality more directly than others (e.g. [38]). To the best of our knowledge, formal approaches to reasoning about quantum pseudo-telepathy games have not been considered.
2 Quantum Predicative Programming
This section introduces the programming theory of our choice — quantum predicative programming. We briefly introduce parts of the theory necessary for understanding Section 3 of this work. For a course in predicative programming the reader is referred to [23]. An introduction to probabilistic predicative programming can be found in [24, 25]. Quantum predicative programming is developed in [33, 32] and is extended with reasoning about quantum communication in [34].
2.0.1 Predicative programming
In predicative programming a specification is a boolean expression. The variables in a specification represent the quantities of interest, such as prestate (inputs), poststate (outputs), and computation time and space. We use primed variables to describe outputs and unprimed variables to describe inputs. For example, specification in one integer variable states that the final value of is its initial value plus . A computation satisfies a specification if, given a prestate, it produces a poststate, such that the pair makes the specification true. A specification is implementable if for each input state there is at least one output state that satisfies the specification.
We use standard logical notation for writing specifications: (conjunction), (disjunction), (logical implication), (equality, boolean equivalence), (non-equality, non-equivalence), and if then else. The larger operators , , , and are the same as , , , and , but with lower precedence. We use standard mathematical notation, such as . We use lowercase letters for variables of interest and uppercase letters for specifications.
In addition to the above, we use the following notations: (prestate), (poststate), (), and defined by . The notation specifies that the values of all variables are unchanged. In the assignment , is a state variable (unprimed) and is an expression (in unprimed variables) in the domain of .
If and are specifications in variables , then the sequential composition of and is defined by
[TABLE]
where is obtained from by substituting all occurrences of primed variables with double-primed variables , and is obtained from by substituting all occurrences of unprimed variables with double-primed variables .
Various laws can be proved about sequential composition. One of the most important ones is the substitution law, which states that for any expression of the prestate, state variable , and specification ,
[TABLE]
Specification is refined by specification if and only if is satisfied whenever is satisfied, that is . Given a specification, we are allowed to implement an equivalent specification or a stronger one.
A program is an implemented specification. A good basis for classical (non-quantum) programming is provided by: , assignment, if then else, sequential composition, booleans, numbers, bunches, and functions.
Given a specification , we proceed as follows. If is a program, there is no work to be done. If it is not, we build a program , such that refines , i.e. . The refinement can proceed in steps: .
In it is possible for to appear in . No additional rules are required to prove the refinement. For example, it is trivial to prove that
[TABLE]
The specification says that if the initial value of is non-negative, its final value must be [math]. The solution is: if the value of is zero, do nothing, otherwise decrement and repeat.
2.0.2 Probabilistic predicative programming
A probability is a real number between [math] and , inclusive. A distribution is an expression whose value is a probability and whose sum over all values of variables is . Given a distribution of several variables, we can sum out some of the variables to obtain a distribution of the rest of the variables.
To generalise boolean specifications to probabilistic specifications, we use and [math] both as numbers and as boolean and , respectively.111Readers familiar with and notation can notice that we take the liberty to equate and . If is an implementable deterministic specification and is a distribution of the initial state , then the distribution of the final state is
[TABLE]
If and are specifications in variables , then the sequential composition of and is defined by
[TABLE]
where is obtained from by substituting all occurrences of primed variables with double-primed variables , and is obtained from by substituting all occurrences of unprimed variables with double-primed variables .
If is a probability and and are distributions, then
[TABLE]
Various laws can be proved about sequential composition. One of the most important ones, the substitution law, introduced earlier, applies to probabilistic specifications as well.
We use assignment, sequential composition, and if-then-else to reason about probability distributions that result from (probabilistically) changing the state variables. To reason about probability distributions that result from learning some new information, with no change to the state variables, we use the learn operator, introduced in [25]. If is the original probability distribution and is a boolean expression that describes the information we learn, then the resulting probability distribution is defined by
[TABLE]
If is a non-negative expression (not necessarily a probability distribution), then is the normalisation of .
If and are distributions, then is the generalisation of refinement to the probabilistic case.
2.0.3 Quantum Predicative Programming
Let be the set of all complex numbers with the absolute value operator and the complex conjugate operator ∗. Then a state of an -qubit system is a function , such that .
If and are two states of an -qubit system, then their inner product, denoted by , is defined by222We should point out that this kind of function operations is referred to as lifting.:
[TABLE]
A basis of an -qubit system is a collection of quantum states , such that . We adopt the following Dirac-like notation for the computational basis: if is from the domain , then x denotes the corresponding -bit binary encoding of and is the following quantum state:
[TABLE]
If is a state of an -qubit system and is a state of an -qubit system, then , the tensor product of and , is the following state of a composite -qubit system:
[TABLE]
We write to mean tensored with itself times.
An operation defined on an -qubit quantum system is a higher-order function, whose domain and range are maps from to the complex numbers. An identity operation on a state of an -qubit system is defined by
[TABLE]
For a linear operation , the adjoint of , written , is the (unique) operation, such that for any two states and , .
The unitary transformations that describe the evolution of an -qubit quantum system are operations defined on the system, such that .
In this setting, the tensor product of operators is defined in the usual way. If is a state of an -qubit system, is a state of an -qubit system, and and are operations defined on and -qubit systems, respectively, then the tensor product of and is defined on an qubit system by .
Just as with tensor products of states, we write to mean operation tensored with itself times.
Suppose we have a system of qubits in state and we measure it. Suppose also that we have a variable from the domain , which we use to record the result of the measurement, and variables , which are not affected by the measurement. Then the measurement corresponds to a probabilistic specification that gives the probability distribution of and (these depend on and on the type of measurement) and states that the variables are unchanged.
For a general quantum measurement described by a collection of measurement operators, which satisfy the completeness equation (see Appendix A), the specification is , where
[TABLE]
where is an abbreviation of and means “all other variables are unchanged”.
The simplest and the most commonly used measurement in the computational basis is:
[TABLE]
In this case the distribution of is and the distribution of the quantum state is:
[TABLE]
which is precisely the mixed quantum state that results from the measurement.
In order to develop quantum programs we need to add to our list of implemented things. We add variables of type quantum state as above and we allow the following three kinds of operations on these variables. If is a state of an -qubit quantum system, is a natural variable, and is a collection of measurement operators that satisfy the completeness equation, then:
- \normalshape(1)
is a program 2. \normalshape(2)
, where is a unitary transformation on an -qubit system, is a program 3. \normalshape(3)
is a program
The special cases of measurements are therefore also allowed.
The Hadamard transform, widely used in quantum algorithms, is defined on a -qubit system and in our setting is a higher-order function on :
[TABLE]
The operation on an -qubit system applies to every qubit of the system. Its action on the zero state of an -qubit system is:
[TABLE]
On a basis state , the action of is:
[TABLE]
where is the inner product of x and y modulo 2.
3 Quantum Non-locality
In predicative programming, to reason about distributed computation we (disjointly) partition the variables between the processes involved in a computation. Parallel composition is then simply boolean conjunction. For example, consider two processes and . owns integer variables and and owns an integer variable . Suppose . Parallel composition of with is then simply
[TABLE]
In quantum predicative programming, one needs to reason about distributed quantum systems. Recall that if is a state of an -qubit system and is a state of an -qubit system, then , the tensor product of and , is the state of a composite -qubit system. On the other hand, given a composite -qubit system, it is not always possible to describe it in terms of the tensor product of the component - and -qubit systems. Such a composed system is entangled. Entanglement is one of the most non-classical, most poorly understood, and most interesting quantum phenomena. An entangled system is in some sense both distributed and shared. It is distributed in the sense that each party can apply operations and measurements to only its qubits. It is shared in the sense that the actions of one party affect the outcome of the actions of another party. Simple partitioning of qubits is therefore insufficient to reason about distributed quantum computation.
The formalism we introduce fully reflects the physical properties of a distributed quantum system. We start by partitioning the qubits between the parties involved. For example, consider two parties and . owns the first qubit of the composite entangled quantum system and owns the second qubit. A specification is a program only if each party computes with its own qubits. In our example,
[TABLE]
are programs, if and are integer variables owned by and , respectively. The parties and can access only their own qubits: they could in theory be light years apart.
We define parallel composition of and which share an quantum system in state with the first qubits belonging to and the other qubits belonging to as follows. If
[TABLE]
where is a unitary operation on an -qubit system and is a unitary operation on an -qubit system, then
[TABLE]
Performing is equivalent to performing the identity unitary operation, and therefore if
[TABLE]
then
[TABLE]
Similarly, if
[TABLE]
where and are a collection of proper measurement operators for - and -qubit systems, respectively, then
[TABLE]
where is the number that corresponds to the binary string pq.
In our example,
[TABLE]
4 Pseudo-telepathy games
We formalise pseudo-telepathy games with players as follows. For each player , , we have a domain from which the inputs to player are provided and a range of player ’s possible output results. In addition we may have a promise : a condition on the inputs to the players. If no promise is given, we set to . The winning condition can involve inputs as well as outputs for each player. The strategy is a program, i.e. an implemented specification. The strategy is winning if, assuming the promise, the strategy yields a distribution that corresponds to the winning condition:
[TABLE]
4.1 Deutsch-Jozsa game
The Deutsch-Jozsa pseudo telepathy game [13, 11] is based on a well-known Deutsch-Jozsa algorithm [18]. The setting of the game is as follows. Alice and Bob are separated several light years apart and are each presented with a -bit string. They are promised that either the strings are identical or they differ by exactly half of the bits. To win the game the players must each output a -bit string, and these strings should be identical if and only if their input strings were identical.
We formalise the game as follows. We partition the space into the world of Alice (variables subscripted ) and the world of Bob (variables subscripted ). Then we have the following formalisation of the game:
[TABLE]
We demonstrate the quantum solution by implementing the following specification :
[TABLE]
Implementing the initial assignment:
[TABLE]
We begin by analysing the distribution that results from executing the solution program (we omit domains of for clarity and sum out the final quantum state, since it does not appear in the winning condition)
[TABLE]
To demonstrate that is winning, we need to show . Let us perform some preliminary calculations first:
[TABLE]
Similarly, analysing the amplitudes in the second case, we get:
[TABLE]
Normalising the winning condition:
[TABLE]
Finally, the strategy is winning since:
[TABLE]
The Deutch-Jozsa game is an example of two-player games. We now turn our attention to multi-player pseudo-telepathy games.
4.2 Mermin’s game
In Mermin’s game [28] there are three players. Each player receives a bit as input and outputs a bit . The promise is that the sum of the inputs is even. The players win the game if the parity of the sum of the outputs is equal to the parity of half the sum of the inputs.
We formalise the game as follows: , for . The promise is . The winning condition is .
We implement the following quantum strategy. The players share an entangled state . After receiving the input, each player applies the operation defined by to her qubit if the input is . The player then applies a Hadamard transform. The qubit is measured in the computational basis and the result of the measurement is the output.
The program is:
[TABLE]
where .
To prove the solution is correct, we begin by analysing the resulting distributions of the state variables. As before, we sum out the final quantum state, since it does not appear in the winning condition.
[TABLE]
To demonstrate that the strategy is winning, we need to show . We begin with some preliminary calculations:
[TABLE]
Normalising the winning condition:
[TABLE]
Finally, the strategy is winning, since:
[TABLE]
4.3 Parity Games
In parity games [10, 11, 15] there are at least three players. Each player is given a number , or, equivalently, an -bit binary string. The promise is that is divisible by . Each player outputs a single bit . The winning condition is that the sum of the outputs is half the sum of the inputs :
[TABLE]
Consider the following strategy. The players share an entangled state . Each player executes the following program:
[TABLE]
where the operator is defined by
[TABLE]
and is the Hadamard transform.
Again, we can prove that , where refers to the parallel execution of the above program after the initialisation of the shared entangled state. As before, we sum out the final quantum state, since it does not appear in the winning condition:
[TABLE]
Beginning with some preliminary calculations:
[TABLE]
where is defined by
[TABLE]
Finally, the strategy is winning, since:
[TABLE]
Note that if and , the parity game is a Mermin game.
5 Conclusion and Future Work
We have presented a formal framework for specifying, implementing, and analysing quantum pseudo-telepathy games.
Current research focuses on formalising quantum cryptographic protocols, such as BB84 [9], in our framework. While the communication involved in these protocols is amenable to analysis using tools developed in [34], the analysis of security aspects requires additional machinery. Integration of the techniques developed in this work is one of the more promising directions.
Appendix A Quantum Computation
In this section we introduce the basic concepts of quantum mechanics, as they pertain to the quantum systems that we will consider for quantum computation. The discussion of the underlying physical processes, spin--particles, etc. is not our interest. We are concerned with the model for quantum computation only. A reader not familiar with quantum computing can consult [29] for a comprehensive introduction to the field.
The Dirac notation, invented by Paul Dirac, is often used in quantum mechanics. In this notation a vector (a column vector by convention) is written inside a ket: . The dual vector of is , written inside a bra. The inner products are bra-kets . For -dimensional vectors and and -dimensional vector , the value of the inner product is a scalar and the outer product operator corresponds to an by matrix. The Dirac notation clearly distinguishes vectors from operators and scalars, and makes it possible to write operators directly as combinations of bras and kets.
In quantum mechanics, the vector spaces of interest are the Hilbert spaces of dimension for some . A convenient orthonormal basis is what is called a computational basis, in which we label basis vectors using binary strings of length as follows: if is an -bit string which corresponds to the number , then is a -bit (column) vector with in position and [math] everywhere else. The tensor product can be written simply as . An arbitrary vector in a Hilbert space can be written as a weighted sum of the computational basis vectors.
Postulate 1 (state space)
Associated to any isolated physical system is a Hilbert space, known as the state space of the system. The system is completely described by its state vector, which is a unit vector in the system’s state space.
Postulate 2 (evolution)
The evolution of a closed quantum system is described by a unitary transformation.
Postulate 3 (measurement)
Quantum measurements are described by a collection of measurement operators, which act on the state space of the system being measured. The index refers to the possible measurement outcomes. If the state of the system immediately prior to the measurement is described by a vector , then the probability of obtaining result is , in which case the state of the system immediately after the measurement is described by the vector . The measurement operators satisfy the completeness equation .
An important special class of measurements is projective measurements, which are equivalent to general measurements provided that we also have the ability to perform unitary transformations.
A projective measurement is described by an observable , which is a Hermitian operator on the state space of the system being measured. This observable has a spectral decomposition , where is the projector onto the eigenspace of with eigenvalue , which corresponds to the outcome of the measurement. The probability of measuring is , in which case immediately after the measurement the system is found in the state .
Given an orthonormal basis , , measurement with respect to this basis is the corresponding projective measurement given by the observable , where the projectors are .
Measurement with respect to the computational basis is the simplest and the most commonly used class of measurements. In terms of the basis , , the projectors are and . The state of the system immediately after measuring is .
For example, measuring a single qubit in the state results in the outcome [math] with probability and outcome with probability . The state of the system immediately after the measurement is or , respectively.
Suppose the result of the measurement is ignored and we continue the computation. In this case the system is said to be in a mixed state. A mixed state is not the actual physical state of the system. Rather it describes our knowledge of the state the system is in. In the above example, the mixed state is expressed by the equation . The equation is meant to say that is with probability and it is with probability . An application of operation to the mixed state results in another mixed state, .
Postulate 4 (composite systems)
The state space of a composite physical system is the tensor product of the state spaces of the component systems. If we have systems numbered [math] up to and excluding , and each system , , is prepared in the state , then the joint state of the composite system is .
While we can always describe a composite system given descriptions of the component systems, the reverse is not true. Indeed, given a state vector that describes a composite system, it may not be possible to factor it to obtain the state vectors of the component systems. A well-known example is the state . Such a state is called an entangled state.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Abramsky, S., High-level methods for quantum computation and information , in: Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science (2004), pp. 410–414.
- 2[2] Abramsky, S. and B. Coecke, A categorical semantics of quantum protocols , in: Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science (2004), pp. 415–425.
- 3[3] Abramsky, S. and R. Duncan, A categorical quantum logic , Mathematical Structures in Computer Science 16 (2006), pp. 469–489.
- 4[4] Adão, P. and P. Mateus, A process algebra for reasoning about quantum security , in: Proceedings of the 3rd International Workshop on Quantum Programming Languages (QPL 2005) , Electronic Notes in Theoretical Computer Science 170 (2007), pp. 3–21.
- 5[5] Altenkirch, T. and J. Grattage, A functional quantum programming language , in: Proceedings of the 20th Annual IEEE Symposium on Logic in Computer Science (2005), pp. 249–258.
- 6[6] Arrighi, P. and G. Dowek, Operational semantics for formal tensorial calculus , in: Proceedings of the 2nd International Workshop on Quantum Programming Languages , number 33 in TUCS General Publications (2004), pp. 21–38.
- 7[7] Arrighi, P. and G. Dowek, Linear-algebraic λ 𝜆 \lambda -calculus , ar Xiv:quant-ph/0501150 (2005).
- 8[8] Bell, J. S., On the Einstein-Podolsky-Rosen paradox , Physics 1 (1964), pp. 195–200.
