Programmable Projective Measurement With Linear Optics

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Programmable projective measurement with linear optics

Ulysse Chabaud1 ,∗ Eleni Diamanti1 , Damian Markham1 , Elham Kashefi1,2 , and Antoine Joux3†
1
Laboratoire d’Informatique de Paris 6, CNRS,
Sorbonne Université, 4 place Jussieu, 75005 Paris
2
School of Informatics, University of Edinburgh, 10 Crichton Street, Edinburgh, EH8 9AB and
3
Chaire de Cryptologie de la Fondation SU, Sorbonne Université,
Institut de Mathématiques de Jussieu – Paris Rive Gauche, CNRS, INRIA,
Université Paris Diderot, Campus Pierre et Marie Curie, 4 place Jussieu, 75005 Paris
(Dated: May 8, 2018)
The swap test is a central primitive in quantum information, providing an efficient way of com-
paring two unknown quantum states. In this work, we generalise this test for the case where one
has access to multiple copies of a reference state, but to only one copy of the tested state. We
present a circuit implementing this test and propose a simple linear optical implementation using
arXiv:1805.02546v1 [quant-ph] 7 May 2018

the Hadamard interferometer. We show that both the circuit and the interferometer can be used as
programmable projective measurement devices, with a precision scaling with their size. This also
leads to a natural interpretation of the notion of projective measurement in quantum mechanics.

I. INTRODUCTION
H H
Quantum information features various non-classical
properties, including for instance the non-cloning the-
orem [1, 2]. As a result, quantum information has to SWAP
be handled differently than classical information. For
example, the simple task of discriminating between two FIG. 1: Circuit representation of a swap test. The ancilla
classical strings of n bits can be done by a straightfor- qubit is measured in the computational basis.
ward comparison in at most n steps, while comparing
two n qubits states is non trivial. Indeed, even assuming
that the complete classical descriptions of such two quan-
tum states were available, comparing these descriptions entanglement detection. Moreover, the swap test allows
would take up to 2n steps. Moreover, as soon as one of estimating the overlap of two states [13]. Hence, given
the states is unknown, any deterministic discrimination two vectors of classical data encoded into two quantum
is hopeless due to the probabilistic nature of quantum states, the distance between these vectors can be esti-
information [3]. mated using the swap test, which is useful in particular
The swap test, introduced in [4], provides an effi- for quantum machine learning [14].
cient probabilistic tool to compare two unknown quan- From a practical point of view, it has been shown that
tum states. It takes as input two quantum states |φi and linear optics can be used to implement the swap test,
|ψi that are not entangled and outputs 1 with probabil- using the Hong-Ou-Mandel effect [15]. The linear op-
ity 12 + 12 | hφ|ψi |2 and 0 with probability 21 − 12 | hφ|ψi |2 , tics platform is particularly attractive in quantum infor-
where hφ|ψi is the overlap between the states |φi and |ψi. mation. Indeed, it is possible to implement a universal
When the measurement outcome is 0 (resp. 1), we con- quantum computer solely with linear optical tools [16].
clude that the states were identical, up to a global phase Furthermore, the Boson Sampling model – a linear opti-
(resp. different). A circuit implementing the swap test is cal model for non-universal quantum computing – is an
represented in Fig. 1, where the matrix outstanding candidate for demonstrating the power of
  quantum computers in the near-term [17], and a recent
1 1 1
H=√ (1) proposal for demonstrating quantum superiority also re-
2 1 −1 lies on linear optics [18]. In the optical implementation
is a Hadamard matrix. The swap test is a natural tool proposed in [15], two single photons in different spatial
when it comes to quantum state comparison, as it per- modes are sent at the same time through a beamsplitter.
forms a projection onto the symmetric subspace of the Measuring the intensity of the output modes gives statis-
input states Hilbert space [5–7]. It finds application in tics that can be post-processed in order to reproduce the
various quantum communication protocols [4, 8, 9]. The statistics of a swap test, where the states to be compared
product test [10–12] uses the swap test as a subroutine for are the states of the single photons. Two indistinguish-
able photons will always pass the test, while two photons
whose states have an overlap x < 1 will pass the test with
probability 12 + 21 x.
∗ Electronic address: ulysse.chabaud@gmail.com Despite the wide range of applications of the swap
† Electronic address: antoine.joux@m4x.org test and the potential for its implementation, a difficulty
2

comes from the fact that for many applications it is nec- H H


essary to use multiple copies of both input states. Indeed,
the swap test satisfies the one-sided error requirement, H H
i.e. if the input states are identical, the test will always
declare them as identical. On the other hand, if the input
states are different, the test can obtain a wrong conclu-
sion and declare the states identical. The probability that H H
this happens is strictly less than 1, hence by repeating
the test various times, the probability that the sequence
of tests never answers 0 can be brought down arbitrarily S0
close to 0, exponentially fast. However, the swap test
is destructive, in the sense that the tested states cannot S1
be reused for a new test because they become maximally
entangled during the test [15]. This means that in or-
Sn-1
der to boost the correctness of the test when the input
states are different, multiple copies of both states must
be available.
In this work, we study a generalised swap test that FIG. 2: Swap circuit of order M . The unitaries Sk are tensor
products of swap gates described in the main text (2). The
we call swap test of order M , where one has access to
ancilla qubits are measured in the computational basis at the
M − 1 copies of a reference state, but to only a single end of the computation. The probability of obtaining 0 for
copy of the other tested state. In Sec. II we describe a all measurement outcomes is M 1
+ MM−1 | hφ|ψi |2 .
circuit implementing the swap test of order M when M
is a power of 2, and we show the optimality of this test
under the one-sided error requirement. In Sec. III, we
further show that the corresponding circuit can be used qubits. These ancilla qubits are first initialised in the
as a programmable projective measurement device, with |+i state. Then, they are used as control qubits for the
a precision scaling with the inverse of its size. Generalis- gates S0 , . . . , Sn−1 , which can be applied in any order,
ing the equivalence between the swap test and the Hong- where for all k ∈ {0, . . . , n − 1}
Ou-Mandel effect [15], we study in Sec. IV the Hadamard
interferometer, and show that its output statistics can be
O
SWAP j2k+1 + i, j2k+1 + 2k + i ,
 
Sk =
efficiently post-processed to reproduce those of the swap
i∈[0,2k −1],
test of order M , thus providing an easily implementable
j∈[0,2n−k−1 −1]
programmable projective measurement device, with the
aforementioned precision. For completeness, we intro- (2)
duce in Sec. V a general family of interferometers which with SWAP[i, j] being the unitary operation that swaps
reproduce the appropriate statistics when M is not nec- the ith and j th qubits for i, j ∈ {0, . . . , M − 1}.
essarily a power of 2. We conclude with an interpretation These controlled gates are applied to the input states
of our results and discuss various applications in Sec. VI. |φi , |ψi , . . . , |ψi (one copy of a state |φi and M −1 copies
of a state |ψi). Finally, a Hadamard gate is applied to
each ancilla, which is then measured in the computational
II. SWAP CIRCUIT OF ORDER M basis. By a simple induction, we obtain that the proba-
bility of obtaining the outcome 0 for all ancilla qubits is
the squared norm of the following state:
Let M ≥ 2. We introduce the following generalisation
of the swap test: 1
(|φψ . . . ψi + |ψφ . . . ψi + · · · + |ψ . . . ψφi), (3)
Definition 1. The swap test of order M is a binary test M
that takes as input a state |φi and M − 1 copies of a state which only depends on the overlap between the states |φi
|ψi, and outputs 1 with probability M1
+ MM−1 | hφ|ψi |2 and and |ψi. More precisely,
M −1
0 with probability ( M )(1 − | hφ|ψi |2 ). If the outcome
1 (resp. 0) is obtained, the test concludes that the states 1 M −1
Pr(0, . . . , 0) = + | hφ|ψi |2 . (4)
|φi and |ψi were identical (resp. different). M M
Such a test clearly satisfies the one-sided error require- The swap circuit of order M thus implements the swap
ment, i.e. if |φi = |ψi then the test will always say so. test of order M . Indeed, if the outcome (0, . . . , 0) is ob-
In the following, we restrict to the swap test of or- tained, the test outputs 1 and we conclude that the states
der M when M is a power of 2, writing n = log M . were identical, while for any other outcome the test out-
We introduce the swap circuit of order M (Fig. 2), that puts 0 and we conclude that the states were different.
acts on M input qubits by applying n consecutive lay- Note that in the case where M = 2, the scheme reduces
ers of products of swap gates controlled by n ancilla to the original swap test.
3

Because the M − 1 last input qubits are in the same the swap test of order M . In the next section, we give
state, swapping them acts as the identity. This can be an alternative interpretation of the swap circuit of order
used to simplify the swap circuit of order M by replacing M in terms of a programmable projective measurement
the n layers of swap gates in Eq. (2) by the following device.
n layers S00 , . . . , Sn−1
0
, which have to be applied in this
order:
k
2O −1 III. PROGRAMMABLE PROJECTIVE
MEASUREMENT
Sk0 SWAP l2n−k , (l + 1)2n−k − 1 .
 
= (5)
l=0
A projective measurement with respect to a state |ψi
This reduces the total number of swap gates from M log 2
M
is a process that takes as input a state |φi and out-
to M − 1 without changing the number of ancilla qubits. puts 1 with probability | hφ|ψi |2 and 0 with probability
We now prove the optimality of the swap test of order 1 − | hφ|ψi |2 . We introduce the notion of precision of a
M under the one-sided error requirement, i.e. we show projective measurement.
that it achieves the lowest error probability for the iden-
tity testing of an input |φi , |ψi , . . . , |ψi. This identity Definition 2. Given a quantum state |ψi and  > 0, a
testing is directly linked to the state comparison of |φi projective measurement with precision  is a process that
and |ψi. For this purpose, we first derive a more general takes as input a quantum state |φi and outputs 1 with
result. In Ref. [19], the authors consider the problem probability P (1) and 0 with probability P (0), such that
of testing the identity of M quantum states with the |(| hφ|ψi |2 ) − P (1)| ≤  and |(1 − | hφ|ψi |2 ) − P (0)| ≤ .
promise that all the states are pairwise identical or or-
thogonal. In particular, they show that the optimal value Note that the two conditions in the previous definition
for the error probability of any identity test satisfying the are equivalent, since P (0) + P (1) = 1. It will thus suffice
one-sided error requirement is M 1
. We extend their result to consider e.g. the first condition.
to the case where the states to be compared are no longer
supposed pairwise identical or orthogonal: Theorem 2. A swap circuit of order M can be used to
1
perform a projective measurement with precision M .
Theorem 1. Under the one-sided error requirement,
any identity test of M unknown quantum states Proof. Since Pr(0, . . . , 0) = M 1
+ MM−1 | hφ|ψi |2 , we can
|ψ0 i , . . . , |ψM −1 i has an error probability at least consider all the circuit except |φi as a black box in Fig. 2,
and post-process the measurement outcomes D as fol-
M −1
1 X Y lows: if D = (0, . . . , 0), output 1, and output 0 otherwise
hψk |ψσ(k) i, (6) (Fig. 3). The setup now takes a single state |φi in input
M!
σ∈SM k=0
and outputs 1 with probability P (1) = M 1
+ MM−1 | hφ|ψi |2 ,
where SM is the symmetric group over {0, . . . , M − 1}. and 0 with probability P (0) = 1 − P (1). We have
1
|(| hφ|ψi |2 ) − P (1)| ≤ M , hence this device performs a
Proof. An identity test satisfying the one-sided error 1
projective measurement with precision M .
requirement can only be wrong when declaring identical
(outputting 1) states that were not identical. Hence, to
prove Theorem 1, it suffices to lower bound the probabil- Theorem 2 implies that given a large enough swap cir-
ity of outputting 1 for any identity test. This is done by cuit and the ability to produce many copies of a state
showing that the optimal identity test consists in a pro- |ψi, one can projectively measure any state with respect
jection onto the symmetric subspace of the input states to the state |ψi up to arbitrary precision. This preci-
Hilbert space. We detail the proof in the Appendix A. sion scales as the inverse of the number of copies. The
circuit can thus be used as a programmable projective
Applying Theorem 1 with |ψ0 . . . ψM −1 i = |φψ . . . ψi measurement device, where the programmable resource
implies that the value M 1
+ MM−1 | hφ|ψi |2 is a lower bound is the reference state |ψi whose number of copies can
for the error probability of any identity test of M states be adjusted to control the precision of the measurement
|φi , |ψi , . . . , |ψi (one copy of a state |φi and M −1 copies (Fig. 3).
of a state |ψi). With Definition 1 we directly obtain the The implementation of the swap circuit of order M
following result: is however challenging, due to the presence of many
Corollary 1. The swap test of order M has optimal er- controlled-swap gates. In order to lower the implemen-
1
ror probability M + MM−1 | hφ|ψi |2 under the one-sided er- tation requirements, we study in the next section the
ror requirement. Hadamard interferometer and show that its statistics can
be efficiently post-processed to reproduce those of a swap
The swap circuit of order M is thus optimal for quan- circuit of order M . This comes at the cost that the device
tum state comparison with an input |φi , |ψi , . . . , |ψi, un- no longer has a quantum output, which however does not
der the one-sided error requirement, since it implements matter for most applications. In particular we show that
4

k th detector detects dk photons for all k ∈ {0, . . . , M −1},


is then
1

Post-processing
d1
Pr(D) = |α|2 Pri (D) + |β|2 Prd (D)
(9)
= Prd (D) + | hφ|ψi |2 [Pri (D) − Prd (D)] ,
dn
Swap circuit of 0 where Pri (D) is the probability in the indistinguishable
order M=2n case and Prd (D) is the probability in the distinguishable
case. The single photon encoding maps quantum state
comparison to distinguishability of single photons. Note
that for any measurement outcome D = (d0 , . . . , dM −1 ),
we have d0 + · · · + dM −1 = M since an interferometer is
a passive device that does not change the total number
of photons. For any interferometer of size M , we prove
in Appendix B the following inequality:

FIG. 3: The swap circuit of order M used as a pro- Pri (D)


grammable projective measurement device. It takes as in- Prd (D) ≥ , (10)
M
put a state |φi and the internal measurement outcomes are
post-processed such that the device outputs 1 with probability for any detection pattern D. Combining this inequality
M
1
+ MM−1 | hφ|ψi |2 and 0 with probability MM−1 (1 − | hφ|ψi |2 ). with Eq. (9) yields
The programmable resource is the state |ψi and the process
uses M − 1 copies of this state as well as n = log M ancillas.
 
1 M −1
Pr(D) ≥ + | hφ|ψi |2 Pri (D). (11)
M M

This last expression is valid for any interferometer and


the Hadamard interferometer provides a simple linear op- can be used it to retrieve, in the context of linear op-
tical platform for the programmable projective measure- tics, the error probability bound for state comparison
ment that we have described. under the one-sided error requirement obtained in Corol-
lary 1. Indeed, assume that E is a detection event, which
could be a disjoint union of detection events, used for
IV. HADAMARD INTERFEROMETER an identity test: if E is obtained we conclude that the
states were identical (or equivalently that the photons
In what follows, we consider optical unitary interfer- were indistinguishable), otherwise we assume that the
ometers of size M which take as input one single photon states were different (or equivalently that the first pho-
in a quantum state |φi and M − 1 indistinguishable sin- ton was distinguishable from the others). The one-sided
gle photons in a state |ψi, one in each spatial mode (the error requirement can thus be written as Pri (E) = 1:
spatial modes of the interferometers will be indexed from indistinguishable photons always pass the test. For dif-
0 to M − 1). These states should be thought of as en- ferent input states |φi and |ψi, the error probability of
coded in additional degrees of freedom of the photons the corresponding test is then given by Pr(E), which by
(e.g. polarisation, time-bins, phase). The output modes Eq. (11) is lower bounded by M 1
+ MM−1 | hφ|ψi |2 .
are measured using photon number detection. We now study a particular unitary interferometer,
There exist complex amplitudes α and β and a state when the size M is a power of 2, namely the Hadamard
|ψ ⊥ i with hψ|ψ ⊥ i = 0 such that interferometer [20, 21] and show that it provides a prac-
tical and simple implementation of the swap test of order
|φi = α |ψi + β |ψ ⊥ i , (7) M . For M = 4 spatial modes (Fig. 4), this interferometer
is described by the Hadamard-Walsh transform of order
where α = hψ|φi and |α|2 + |β|2 = 1. We have the fol- 2:
lowing homomorphism property for single photon states:  
1 H H
|1φ i = |1αψ+βψ⊥ i = α |1ψ i + β |1ψ⊥ i , (8) √ (12)
2 H −H
where for any state |χi, |1χ i is the state of a single pho- where H is a Hadamard matrix, see Eq. (1). In the
ton encoding the state |χi. It thus suffices to compute general case, the Hadamard interferometer of order M
the output statistics separately when |φi = |ψi (indis- is described by the Hadamard-Walsh transform of order
tinguishable case) and when |φi = |ψ ⊥ i (distinguishable n = log M , which is defined by induction:
case) to obtain the output statistics in the general case by  
linearity. The probability of detecting the photon num- 1 Hk Hk
Hk+1 = √ , (13)
ber pattern D = (d0 , . . . , dM −1 ), or equivalently that the 2 Hk −Hk
5

words, the detection patterns D such that π(D) = 0 can


only occur if hφ|ψi = 6 0. On the other hand, with the
third equivalence, the detection patterns D such that
π(D) 6= 0 are those that saturate the bound obtained
in Eq. (11). The Hadamard interferometer can thus be
used to compare the states |φi and |ψi: if the outcome D
obtained satisfies π(D) = M , we conclude that the states
were identical, otherwise π(D) = 0 and we conclude that
the states were different. We show in particular that the
interferometer described by the unitary matrix Hn satis-
fies
1 M −1 2
Pr[π(D) = M ] = + |hφ|ψi| , (17)
M M
FIG. 4: Hadamard interferometer with 4 input modes. The
dashed red lines represent balanced beamsplitters. The in- and
put states are one single photon in state |φi and three single
photons in state |ψi, one in each mode. Pr[π(D) = 0] = 1 − Pr[π(D) = M ], (18)

for any detection pattern D. Hence the identity test using


the Hadamard interferometer of order M is a swap test of
with H0 = 1 and H1 = H. We can now state our main order M . The measurement outcomes D have to be post-
result linking the Hadamard interferometer and the swap processed by computing π(D). Using the group structure
test of order M . of the matrix S, we show that this can be done in time
O(M log M ).
Theorem 3. The output statistics of the Hadamard in-
terferometer of order M can be classically post-processed
in time O(M log M ) to reproduce those of the swap test Note that the group structure invoked in the proof is
of order M . preserved under permutations, so Theorem 3 also applies
Proof. We give hereafter an overview of the proof and to the unitary interferometers described by permutations
refer to the Appendix C for further details. of the Hadamard-Walsh transform.
Due to the structure of the Hadamard-Walsh trans- The conclusion to be drawn from Theorem 3 is that
form, we are able to show that there exists a collection of as long as a state |ψi can be encoded using single pho-
detection patterns which saturates the bound in Eq. (11) tons, then one can perform a swap test of order M with
and to characterise this collection. We introduce the respect to the state |ψi using the Hadamard interferome-
M × M matrix ter of order M and an efficient classical post-processing of
√ the measurement outcomes. The post-processing consists
S = (sij )0≤i,j≤M −1 = M Hn , (14) in the following parity test: given the measurement out-
come D = (d0 , . . . , dM −1 ), where d0 + · · · + dM −1√= M ,
thus omitting the normalisation factor. The matrix S construct the matrix SD from the matrix S = M Hn
only has +1 and −1 entries. We show that its lines, to- by keeping the k th column only if dk is odd. If the lines
gether with the element-wise multiplication, form a group (1, 2, 4, . . . , 2n−1 ) of SD all have an even number of −1,
n
isomorphic to (Z/2Z) . We define for all measurement output 1. Output 0 otherwise. This means that the post-
outcomes D = (d0 , . . . , dM −1 ) the function processing only requires the parity of the photon number
in each output mode.
M −1 M −1
X Y d Using the argument developed in the proof of Theo-
π(D) = (sij ) j , (15) rem 2, by considering the M − 1 identical photons and
i=0 j=0
the interferometer as a black box whose outcomes are
and exploit the aforementioned group structure to obtain post-processed as described above, we also deduce the
the following equivalences: following result from Theorem 3:

π(D) 6= 0 ⇔ π(D) = M Corollary 2. The Hadamard interferometer of order M


can be used to perform a projective measurement with
⇔ Pri (D) 6= 0 1
precision M , using a classical post-processing of its mea-
(16)
Pri (D) surement outcomes that takes time O(M log M ) (Fig. 5).
⇔ Prd (D) = .
M
With the first two lines, the condition π(D) = 0 is di- Interestingly, the unitary interferometers described by
rectly equivalent to having a detection event D that can the Hadamard-Walsh transform and its permutations are
only be witnessed in the distinguishable case. In other not the only unitary interferometers which can reproduce
6

1
form a M -approximate projective measurement with a
d0
post-processing of its measurement outcomes√that takes
1 time at most M · N . The lines of FG = M UG to-
d1 gether with the element-wise multiplication form a group

Post-processing
isomorphic to G.
Hn
dM-2
Proof. We use the notations of the Theorem. The
invariant factor decomposition of G gives
0
dM-1 G ' (Z/a1 Z) ⊗ · · · ⊗ (Z/aN Z) , (20)

where N ∈ N∗ and a1 , . . . , aN ∈ N∗ are unique, satis-


FIG. 5: The Hadamard interferometer of order M used as a fying ai |ai+1 for i ∈ {1, . . . , N − 1} and a1 . . . aN = M .
programmable projective measurement device. A single pho- Given that the lines of Fa together with the element-wise
ton in the state |φi goes through a linear interferometer along multiplication form a group isomorphic to (Z/aZ)
with M − 1 indistinguishable single photons in the state |ψi. √ for all
a ∈ N∗ , the lines of FG = (fij )0≤i,j≤M −1 = M UG to-
The parity of the number of photons in each output mode
is measured and efficiently post-processed, such that the de-
gether with the element-wise multiplication form a group
vice outputs 1 with probability M1
+ MM−1 | hφ|ψi |2 and 0 with isomorphic to G.
M −1 2
probability M (1 − | hφ|ψi | ). Since the group structure was the only argument in-
voked in the proof of Theorem 3, the same conclusion
can be drawn here, by following the same argument:

the statistics of a swap test with efficient post-processing, 1 M −1 2


Pr[π(D) = M ] = + |hφ|ψi| , (21)
and indeed we present a generalisation in Sec. V. How- M M
ever, it is the simplicity of the Hadamard interferometer where
in terms of experimental implementation that motivates
our interest towards this interferometer. In particular, M
X −1 M
Y −1
d
this interferometer can be simply implemented with a π(D) = (fij ) j . (22)
few balanced beamsplitters. A result by Reck et al. [22] i=0 j=0
states that any M × M unitary interferometer can be
implemented using phase shifters and at most M (M2 −1) The group G is finitely generated by N elements, so
beamsplitters, possibly unbalanced. For the Hadamard N lines of FG are sufficient to generate all its lines by
interferometer, only M log M
balanced beamsplitters are element-wise multiplication. The condition π(D) = M
2
needed and no phase shifters. The proof of this statement can thus be checked in time at most M · N .
is based on a simple induction detailed in Appendix D.
In particular, for G ' (Z/M Z), the corresponding in-
V. GROUP GENERALISATION FOR ANY terferometer is described by the (normalised) QFT of or-
VALUE OF M der M , while for G ' (Z/2Z)n , we retrieve Theorem 3
and the Hadamard interferometer.
The Hadamard interferometer requires the size param-
eter M to be a power of 2. This requirement can be
VI. CONCLUSION AND DISCUSSION
relaxed, possibly raising the experimental requirements
at the same time. Indeed, for any value of M , one can
associate to any abelian group of order M an interferom- We have studied a generalisation of the swap test in
eter of size M which has the desired statistics. This is the case where many copies of a reference state can be
the object of the following result that uses the invariant produced, but only a single copy of the tested state is
factor decomposition of an abelian group: available. We have shown that this test has optimal error
probability under the one-sided error requirement. When
Theorem 4. Let G be an abelian group of order M . the number of input states M is a power of 2, we have
Then there exists N ∈ N∗ and a1 , . . . , aN ∈ N∗ , where introduced a simple circuit implementing the swap test
ai |ai+1 for i ∈ {1, . . . , N − 1} and a1 . . . aN = M , such of order M .
that the interferometer described by the M × M unitary We have proven that the Hadamard interferometer
matrix has the same statistics up to an efficient classical post-
1 processing of the measurement outcomes, while using
UG = √ Fa1 ⊗ · · · ⊗ FaN , (19) only number resolving detectors and balanced beamsplit-
M
ters, which lowers the cost for an experimental imple-
2iπ
where Fa = (e a kl )0≤k,l≤a−1 is the Quantum Fourier mentation of the swap test of order M . The Hadamard
Transform (QFT) of order a for all a ∈ N∗ , can per- and the QFT interferometers have been studied e.g.
7

in the context of benchmarking Boson Sampling ma- Appendix A: Proof of optimality


chines [20, 21, 23], and we have generalised the corre-
sponding class of interferometers by noticing a group An identity test on a Hilbert space H is a binary test
structure in the lines of the unitary matrices describing which can be written as a positive-operator valued mea-
these interferometers. We have interpreted our results sure {Π0 , Π1 }, with Π0 + Π1 = I. Such a test takes as
in an alternative way, which opens the way for a fruitful input a pure tensor product state |ψ0 . . . ψM −1 i ∈ H⊗M
application: being able to produce many copies of a state and outputs 0 with probability
allows to perform a projective measurement with respect
to this state, with a precision scaling as the number of P (0) = Tr[Π0 |ψ0 . . . ψM −1 i hψ0 . . . ψM −1 |], (A1)
copies. We provided a programmable projective measure-
ment device which can be implemented using only linear and 1 with probability
optics.
This result also gives rise to a natural interpretation P (1) = 1 − P (0) = Tr[Π1 |ψ0 . . . ψM −1 i hψ0 . . . ψM −1 |].
of the notion of projective measurement in quantum me- (A2)
chanics, as a comparison between one state and several If the output 1 is obtained we conclude that we had
copies of another state using an interferometer: in the |ψ0 i = · · · = |ψM −1 i, whereas if the output 0 is obtained
macroscopic limit, when many copies of a reference eigen- we conclude that the states were not all identical. The
state are available, we retrieve a macroscopic classical one-sided error requirement can thus be written as
detector. ⊗M
∀ |ψi , Tr[Π0 |ψi hψ| ] = 0. (A3)
The Hadamard interferometer is easily implementable,
but this comes at the cost that we are detecting all modes,
Following [24], the symmetric subspace of H⊗M can be
i.e. that there is no more quantum output compared to
characterised as
the swap circuit of order M . However, for most appli-
cations, it is only the classical output statistics of the S = span{|ψi
⊗M
: |ψi ∈ H}, (A4)
circuit that matters. Our scheme provides a lower error
probability than the swap test in the context where one and the orthogonal projector onto this space can be writ-
has access to many copies of only one of the states, e.g. ten as
when one of the states is easier to produce. It thus finds
application for various quantum information tasks, such 1 X
PS = Pσ , (A5)
as the aforementioned photon indistinguishability bench- M!
σ∈SM
marking, but also for enhancing quantum communication
protocols, quantum state comparison, and entanglement where for all σ ∈ SM and all |ψ0 . . . ψM −1 i ∈ H⊗M we
detection. have Pσ |ψ0 . . . ψM −1 i = |ψσ(0) . . . ψσ(M −1) i. Given the
For completeness, it could be interesting to charac- characterisation of the symmetric subspace, the one-sided
terise the full class of interferometers that are optimal error requirement in Eq. (A3) implies that the supports
for state comparison under the one-sided error require- of PS and Π0 are disjoint. The support of PS is thus
ment, as we only gave a broad class of such interferome- included in the support of Π1 , given that Π0 + Π1 = I
ters using a group construction. We conjecture that the and this implies in turn that Π1 ≥ PS by positivity of
Hadamard interferometer will remain the simplest to im- Π1 .
plement among this class of optimal schemes. It would The error probability of the identity test under the
be also interesting to consider the influence of real ex- one-sided error requirement is given by the probability
perimental conditions, as our scheme assumes that the of outputting the result 1 while the states were not all
input states are pure. The one-sided error requirement identical:
is also a challenge experimentally, as any interferometer
or detector would suffer from the effects of imperfection P (1) = Tr[Π1 |ψ0 . . . ψM −1 i hψ0 . . . ψM −1 |]
and noise. We leave these analyses open for future work. ≥ Tr[PS |ψ0 . . . ψM −1 i hψ0 . . . ψM −1 |]
1 X
≥ Tr[Pσ |ψ0 . . . ψM −1 i hψ0 . . . ψM −1 |]
M!
σ∈SM

VII. ACKNOWLEDGEMENTS 1 X
≥ Tr[|ψσ(0) . . . ψσ(M −1) i hψ0 . . . ψM −1 |]
M!
σ∈SM
We kindly acknowledge F. Grosshans and A. Olivo M −1
1 X Y
for interesting and fruitful discussions. This work has ≥ hψk |ψσ(k) i,
been supported in part by the European Union’s H2020 M!
σ∈SM k=0
Programme under grant agreement number ERC-669891 (A6)
and by the European Research Council Starting Grant where in the third line we used the expression of the
QUSCO. orthogonal projector PS onto the symmetric subspace.
8

Appendix B: Statistics of an interferometer In order to obtain more readable expressions, we define


for all k ∈ {0, . . . , M − 1} and for any detection pattern
Recall that we consider optical unitary interferometers D,
of size M which take as input one single photon in a quan- ( u Per(U
0k 0,D−1k )
tum state |φi and M − 1 indistinguishable single photons √ if dk 6= 0,
pk (D) = D! (B5)
in a state |ψi, one in each spatial mode, indexed from 0 0 otherwise.
to M − 1. The output modes are measured using photon
number detection. A measurement outcome thus has the Using the Laplace expansion of the permanent, the pre-
form D = (d0 , . . . , dM −1 ), with d0 + · · · + dM −1 = M . vious equations (B2, B4) rewrite
The permanent of an M × M matrix T = M −1 2
(tij )0≤i,j≤M −1 is defined by X
Pri (D) = dk pk (D) , (B6)


X M
Y −1 k=0
Per(T ) = tkσ(k) , (B1)
and
σ∈SM k=0
M
X −1
where SM is the symmetric group over {0, . . . , M − 1}. Prd (D) = dk |pk (D)|2 . (B7)
We now compute Pri (D) and Prd (D) for all detection k=0
patterns D. PM −1
In the indistinguishable case, M indistinguishable pho- Since k=0 dk = M , we obtain, using √ Cauchy-Schwarz

tons, one in each mode, are sent through a linear op- inequality with the complex vectors dk 0≤k≤M −1 and
tical network described by an M × M unitary matrix
√
dk pk (D) 0≤k≤M −1 ,
U = (uij )0≤i,j≤M −1 . The probability of a detection event
D can be computed (see, e.g, [17]) as Pri (D)
Prd (D) ≥ , (B8)
M
|Per(UD )|2
Pri (D) = , (B2) for any detection pattern D.
D!
where D! = d0 ! . . . dM −1 ! and where UD is the matrix
obtained from U by repeating dk times the k th column Appendix C: Proof of Theorem 3
for k ∈ {0, . . . , M − 1}.
In the distinguishable case, M − 1 indistinguishable Let us define
photons are sent in modes 1, . . . , M − 1 through a linear √
optical network described by an M × M unitary matrix S = (sij )0≤i,j≤M −1 = M Hn , (C1)
U = (uij )0≤i,j≤M −1 , along with one additional photon
in the 0th mode in an orthogonal state. Since it is fully thus omitting the normalisation factor. We have
distinguishable from the others, the additional photon √ √
behaves independently, hence the probability of detect- S = 2H ⊗ · · · ⊗ 2H , (C2)
| {z }
ing the photon number pattern D for one distinguishable n times
photon and M − 1 indistinguishable photons in input is √
where H is a Hadamard matrix. The lines of 2H, to-
M
X −1 gether with the element-wise multiplication, form a group
Prd (D) = Pri (D − 1k ) · Pri (1k ). (B3) isomorphic to Z/2Z, thus the lines of S together with the
k=0 element-wise multiplication form a group isomorphic to
dk 6=0 n
(Z/2Z) . As a consequence, multiplying element-wise all
the lines of S by its ith line for a given i amounts to
This last expression formalises the fact that the M −1 in-
permuting the lines of S. Let D = (d0 , . . . , dM −1 ) and
distinguishable photons give a detection pattern D − 1k
k ∈ {0, . . . , M − 1} such that dk 6= 0. Let also SD−1k
which, completed by the additional distinguishable pho-
be the matrix obtained from S by repeating dl times the
ton in the k th output mode, forms the pattern D. Devel-
lth column for l 6= k and dk − 1 the k th column. For all
oping this expression with Eq. (B2) yields
i ∈ {0, . . . , M − 1}, one can obtain the matrix S0,D−1k
M −1 (with the 0th line removed) from the matrix Si,D−1k
1 X (with the ith line removed) by multiplying element-wise
Prd (D) = dk |u0k Per(U0,D−1k )|2 (B4)
D!
k=0
all lines by the ith line and permuting the lines. Since
dk 6=0 the permanent is invariant by line permutation we ob-
tain, for all i ∈ {0, . . . , M − 1} and all k ∈ {0, . . . , M − 1}
where U0,D−1k is the matrix obtained from U by remov- such that dk 6= 0,
ing the 0th line, then by repeating dl times the lth column
for l 6= k and by repeating dk − 1 times the k th column. Per(Si,D−1k ) = ik (D)Per(S0,D−1k ), (C3)
9
QM −1 d
where ik (D) = sik j=0 (sij ) j . Finally, we use We finally conclude by combining Eqs. (C10,C11) and
the Laplace row expansion formula for the permanent Eq. (9):
of SD to obtain, for all D = (d0 , . . . , dM −1 ) and all X
k ∈ {0, . . . , M − 1} such that dk 6= 0, Pr[π(D) = M ] = Pr(D)
π(D)=M
M −1 (C12)
M −1
X
Per(SD ) = sik Per(Si,D−1k ) 1 2
= + |hφ|ψi| .
i=0 M M
−1
M
!
X The post-processing mentioned in the main test,
= sik ik (D) Per(S0,D−1k ) i.e. computing π(D), can be done efficiently in
i=0 (C4)
  time O(M log M ) for any detection pattern D =
M
X −1 M
Y −1 (d0 , . . . , dM −1 ). Indeed, let SD be the M × M matrix
d
= (sij ) j  Per(S0,D−1k ) obtained from S by repeating dk times the k th column
i=0 j=0 for k ∈ {0, . . . , M − 1}. The expression π(D) in Eq. (15)
= π(D)Per(S0,D−1k ), is the sum of the product of the elements of each line of
SD . Since the entries of the matrix S are only +1 and
where we used Eq. (C3) in the second line. With the −1, π(D) = M if and only if the number of −1 on the
general expressions of Pri (D) (B2) and Prd (D) (B4), this lines of SD is even for all lines. The condition π(D) = M
equation implies can thus be written as a system of M linear equations
n
modulo 2. Since (Z/2Z) is finitely generated by n ele-
M Pri (D) = π(D)2 Prd (D). (C5)
ments, the M lines of SD can be generated with at most
With the Laplace column expansion formula for the per- n lines using element-wise multiplication, for any mea-
manent of SD and the last line of Eq. (C4), we also obtain surement outcome D. Hence, computing the parity of
the number of −1 on each line of SD , which is equivalent
M 2 Pri (D) = π(D)2 Pri (D). (C6) to testing π(D) = M , can be done by computing at most
In particular, combining Eqs. (C5,C6), n = log M parity equations, with a number of terms in
each equation which is at most M .
M 2 π(D)2 Prd (D) = π(D)4 Prd (D). (C7) A simple induction shows that a possible choice for
Now Prd (D) is non-zero for all D, since by Eq. (B4) it is a the lines whose parity has to be tested is the lines with
sum of moduli squared of permanents of (2n −1)×(2n −1) index 2k for k ∈ {0, . . . , n − 1} (the lines of the matrix
matrices, which in turn cannot vanish by a result of [25]. being indexed from 0 to M − 1).
Hence the previous equation rewrites
M π(D) = π(D)2 . (C8)
As a consequence, π(D) = M or π(D) = 0 for all D. Appendix D: The Hadamard interferometer can be
Combining Eqs. (C5,C8) we obtain implemented with a few balanced beamsplitters
π(D) 6= 0 ⇔ π(D) = M
⇔ Pri (D) 6= 0 Let Ik be the k×k identity matrix for all k. The size M
(C9) is a power of 2, with n = log M . We prove by induction
Pri (D) over n that, there exist P0 (n), . . . , Pn−1 (n) permutation
⇔ Prd (D) = ,
M matrices of order M/2, such that
and thus
X n−1
Y
Pk (n) IM/2 ⊗ H Pk (n)T .

Pri [π(D) = M ] = Pri (D) Hn = (D1)
π(D)=M k=0
X
= Pri (D) (C10) Since multiplying matrices is equivalent to setting up ex-
Pri (D)6=0 perimental devices in sequence, and given that H is the
= 1. matrix describing a balanced beamsplitter, Eq. (D1) im-
plies the result we want to prove.
We also obtain For n = 1, we have M = 2 and Eq. (D1) is true with
X P0 (1) = I1 . For brevity, we define for all k
Prd [π(D) = M ] = Prd (D)
π(D)=M H (k) = Ik ⊗H. (D2)
1 X
= Pri (D) (C11) Assuming that Eq. (D1) is true for n, we use the recursive
M
π(D)=M definition of the Hadamard-Walsh transform
1
= . Hn+1 = H ⊗ Hn , (D3)
M
10

along with properties of the tensor product of matrices where Q is a permutation matrix of order M and where in
in order to obtain the third line we have used Eq. (D1). Setting Pk (n+1) =
Q (I2 ⊗ Pk (n)) for k ∈ {0, . . . , n − 1} and Pn (n + 1) =
Hn+1 = (Hn ⊗ I2 ) H (M ) = Q (I2 ⊗ Hn ) QT H (M ) IM proves Eq. (D1) for n + 1, since these matrices are
permutation matrices of order M . This completes the
" n−1
#
Y
(M/2)
= Q I2 ⊗ Pk (n)H Pk (n) QT H (M )
T
induction and the proof of the result.
k=0
"n−1 #
Y
(M ) T
QT H (M )

=Q (I2 ⊗ Pk (n)) H I2 ⊗ Pk (n)
k=0
n−1
Y T
= [Q (I2 ⊗ Pk (n))] H (M ) [Q (I2 ⊗ Pk (n))] H (M ) ,
k=0
(D4)

[1] W. K. Wootters and W. H. Zurek, Nature 299, 802 [15] J. C. Garcia-Escartin and P. Chamorro-Posada, Physical
(1982). Review A 87, 052330 (2013).
[2] D. Dieks, Physics Letters A 92, 271 (1982). [16] E. Knill, R. Laflamme, and G. J. Milburn, Nature 409,
[3] A. Chefles, Contemporary Physics 41, 401 (2000). 46 (2001).
[4] H. Buhrman, R. Cleve, J. Watrous, and R. De Wolf, [17] S. Aaronson and A. Arkhipov, Theory of Computing 9,
Physical Review Letters 87, 167902 (2001). 143 (2013).
[5] S. M. Barnett, A. Chefles, and I. Jex, Physics Letters A [18] J. M. Arrazola, E. Diamanti, and I. Kerenidis, arXiv
307, 189 (2003). preprint arXiv:1711.02200 (2017).
[6] M. Kleinmann, H. Kampermann, and D. Bruss, Physical [19] M. Kada, H. Nishimura, and T. Yamakami, Journal of
Review A 72, 032308 (2005). Physics A: Mathematical and Theoretical 41, 395309
[7] A. Montanaro and R. de Wolf, arXiv preprint (2008).
arXiv:1310.2035 (2013). [20] A. Crespi, Physical Review A 91, 013811 (2015).
[8] J. N. de Beaudrap, Physical Review A 69, 022307 (2004). [21] A. Crespi, R. Osellame, R. Ramponi, M. Bentivegna,
[9] N. Kumar, E. Diamanti, and I. Kerenidis, Physical Re- F. Flamini, N. Spagnolo, N. Viggianiello, L. Innocenti,
view A 95, 032337 (2017). P. Mataloni, and F. Sciarrino, Nature communications
[10] F. Mintert, M. Kuś, and A. Buchleitner, Physical Review 7, 10469 (2016).
Letters 95, 260502 (2005). [22] M. Reck, A. Zeilinger, H. J. Bernstein, and P. Bertani,
[11] S. Walborn, P. S. Ribeiro, L. Davidovich, F. Mintert, and Physical review letters 73, 58 (1994).
A. Buchleitner, Nature 440, 1022 (2006). [23] N. Viggianiello, F. Flamini, M. Bentivegna, N. Spagnolo,
[12] A. W. Harrow and A. Montanaro, Journal of the ACM A. Crespi, D. J. Brod, R. Osellame, and F. Sciarrino,
(JACM) 60, 3 (2013). arXiv preprint arXiv:1710.03578 (2017).
[13] A. K. Ekert, C. M. Alves, D. K. Oi, M. Horodecki, [24] A. W. Harrow, arXiv preprint arXiv:1308.6595 (2013).
P. Horodecki, and L. C. Kwek, Physical review letters [25] R. Simion and F. W. Schmidt, Discrete Mathematics 46,
88, 217901 (2002). 107 (1983).
[14] S. Lloyd, M. Mohseni, and P. Rebentrost, arXiv preprint
arXiv:1307.0411 (2013).

You might also like