You are on page 1of 18

Programming Non-Trivial Algorithms

in the Measurement Based Quantum Computation Model


P.M. Alsinga , A.M. Smithb , M.L. Fantoa , C.C. Tison a , and G.E. Lotta
a Air Force Research Lab., Information Directorate, 525 Brooks Rd, Rome, NY 13441, USA;
b Oak Ridge National Laboratory, QIS Group, Oak Ridge, TN 37831, USA

ABSTRACT
We provide a set of prescriptions for implementing a quantum circuit model algorithm as measurement based
quantum computing (MBQC) algorithm1, 2 via a large cluster state. As means of illustration we draw upon our
numerical modeling experience to describe a large graph state capable of searching a logical 8 element list (a
non-trivial version of Grover’s algorithm3 with feedforward). We develop several prescriptions based on analytic
evaluation of cluster states and graph state equations which can be generalized into any circuit model operations.
Such a resulting cluster state will be able to carry out the desired operation with appropriate measurements and
feed forward error correction. We also discuss the physical implementation and the analysis of the principal
3-qubit entangling gate (Toffoli) required for a non-trivial feedforward realization of an 8-element Grover search
algorithm.

1. INTRODUCTION
L. Grover first showed that a speed up over classical searches was possible using quantum mechanics. His
search algorithm, now known as Grover’s algorithm,3 along with Shor’s factoring algorithm4 helped to spur the
interest in all manners of quantum computing. Multiple models of universal quantum computing have been
found and tested including photonic implementation such as Linear Optical Quantum Computing LOQC,5 and
Measurement Based Quantum Computing (MBQC) or equivalently cluster state quantum computing (CSQC)1, 6
just to name a few. While these models have been shown to be universal it remains unclear in many models how
to design, or equivalently program, any arbitrary logical operation or algorithm. The most well know model of
quantum computing is the circuit model which has strong analogies to classical computing architecture. It is also
known that there is a mapping of the circuit model to the MBQC model. MBQC is of particular importance for
to the application of blind quantum computation.7 BQC utilizes the unique separation of the initial entangled
state resource from the subsequent single qubit measurements utilized to affect quantum gates, to obfuscate
the apparent results performed on the ”blind” quantum computer from the true results known to the operator
issuing the command sequence of measurement operations. In this work we explore that mapping and provide
some relevant examples related to a non-trivial implementation of Grover’s Algorithm. Though the programming
examples are in general implementation agnostic, we are primarily concerned with photon-based qubits when it
come to actual experimental realizations.
This “programing” in MBQC is equivalent to the problem of deciding the number of photons and the location
of the 2 photon entangling operations that form the cluster or graph state, as well as the single qubit measurement
pattern applied upon the state in order to implement a desired logical operation. We will describe a surprisingly
small set of prescriptions which translate a series of logical gate operations on a logical state to a physical cluster
state and a set of single photon measurements. We will write equations for the cluster states in terms of the
measured and output qubits. This lets us read off the effective operation induced on the output state and we
show it can be made the same as that of the circuit model.
We consider photonic cluster states in which a logical qubit can be thought of as linear cluster state. Thus
our general cluster state is a set of parallel entangled linear cluster states. Such linear cluster states can be
formed with linear optical elements from the sequential addition of single photons to the end of each cluster
state, as has been shown recently in.8
For further information send correspondence to P.M.A.: E-mail: paul.alsing@us.af.mil.
As a non-trivial example we examine Grover’s algorithm for the experimentally verified 4 element search
of Walther et al. implemented by a double pass of a spontanious parametric down conversion source,2 and
then extend the methods to the much larger 8 element search using the Bell State measurement induced Toffoli
gate of Guo.9 From this we draw a set of prescriptions that allows for translation between the circuit model
and the MBQC model. While further in-depth details of the Grover Algorithm MBQC programming will
appear in an upcoming article10 here we concentrate primarily on analysis of the non-trivial Toffoli gate and it’s
implementation.

2. CLUSTER STATE PRELIMINARIES


2.1 Linear and box cluster state construction
√ (CS), or in general, a graph state, is a 2D collection of qubits (i) all initialized in the |+i =
A cluster state
(|0i + |1i)/ 2 state, entangled pairwise by the diagonal CPHASE gates CZij . Here the computational basis
states |ai = {|0i, |1i} for a ∈ (0, 1) are the {1, −1} eigenstates respectively of the Pauli σz ≡ Z = diagonal(1, −1)
operator. Because the CZij gates are diagonal, they commute and hence can be applied simultaneously in parallel
to create the initial CS entangled resource. This initial entangled resource will be ”eaten up” via single qubit
measurements as the quantum algorithm computation proceeds (discussed below).
In Fig.(1A) we have the simplest linear CS CZ12 | + +i. Here the 2-qubit diagonal CPHASE operator CZ12

|+> 1 1 CZ14 3

CZ12 CZ12 CZ34

|+> 2 2 CZ23
4
A) B)
Figure 1. Simple Cluster-states. A) The simplest cluster state consisting of 2 qubits linked by a CZ12 | + +i. B) The
smallest cluster state capable of performing Grover’s algorithm. It consists of 4 qubits and 4 CZ operations of the form
|i1234 = CZ13 CZ24 CZ12 CZ34 | + + + +i1234

acting on two qubits 1 and 2 is defined by its action on the computation basis states |abi12 ≡ |ai1 ⊗ |bi2 for
a, b ∈ (0, 1) as
CZ12 |abi12 = (−1)ab |abi12 . (1)
1
Noting that for n = 2 and N = 2n the state | + +i = √N a,b={0,1} |abi is the unbiased (i.e. equal quantum
P

amplitude) state, we use Eq.(1) to find


  
1 0 0 0 1
1 X 1 1 0 1 0 0  1 , (2)
(−1)ab |abi12 = (|00i12 + |01i12 + |10i12 − |11i12 ) = 
   
CZ12 | + +i12 = √
N ab 2 2  0 0 1 0   1
0 0 0 −1 1

where columns and rows are labeled by {00, 01, 10, 11} (from here on out we will drop normalization factors,
noting that all states must have unit norm at the end of operations). Pictorially, the CZ12 entanglement of the
qubits 1, 2 each in the initial |+i state in Fig.(1A) is represented by the solid vertical line between them. Since
CZ12 CZ12 = I this link could be removed by applying an additional CZ gate, i.e. CZ12 CZ12 | + +i12 = | + +i12 ,
which would pictorially be represented by the two black dots labeled 1 and 2 in Fig.(1A) sans the solid connecting
vertical line.
In Fig.(1B) we have the ”box” cluster state |i1234 = CZ13 CZ24 CZ12 CZ34 | + + + +i1234 , the smallest CS
capable of implementing Grover’s algorithm on a N = 4 bit search.2 It is illuminating to detail the derivation of
this state, since many of the steps utilized will appear again and again in future computations.

|i1234 = CZ13 CZ24 CZ12 CZ34 | + + + +i1234 ,


X
= CZ13 CZ24 CZ12 CZ34 |abcdi1234 ,
a,b,c,d
X
ac
= (−1) (−1) (−1)ab (−1)cd |abcdi1234 ,
bd

a,b,c,d
X
= (−1)ab |abi12 Z3a Z4b (−1)cd |cdi1234 ,
a,b,c,d
X X
= CZ34 (−1)ab |abi12 Z3a Z4b |cdi1234 ,
a,b c,d
X
= CZ34 (−1)ab |abi12 Z3a Z4b | + +i34 ,
a,b
X
= CZ34 (−1)ab |abi12 H3 H4 |abi34 ,
a,b
X
= CZ34 H3 H4 (−1)ab |abi12 |abi34 ,
a,b
X X
⊗2 ⊗2
|i1234 = CZ34 H34 CZ34 |abi12 |abi34 ≡ CZ34 H34 CZ12 |abi12 |abi34 , (3)
a,b a,b

The above derivation warrants line-by-line comments. In the second line we have expanded the unbiased 4-
qubit state | + + + +i1234 into the computational basis states (CBS). In line three have used the definition
Eq.(1) of CZij on the CBS to explicitly write the phase factors. In line four we have used the useful fact
that (−1)ac |ci3 = Z3a |ci3 and (−1)bd |di4 = Z4b |di4 . In line five we use Eq.(2) to factor out the operator CZ34
noting that since it is diagonal it commutes with the diagonal operators Z3a Z4b . This allows us in line six to
perform the sum over (c, d) which yields the unbiased 2-qubit state | + +i34 . In line seven we use the simple but
non-transparentrelationship
 that (dropping subscripts) Z a |+i = Z a H|0i = H (H Z a H)|0i = H X a |0i = H|ai
1 1
where H = √12 is the Hadamard operator with the property that H|0i = |+i and H|1i = |−i where
1 −1

|±i = (|0i ± |1i)/ 2, and the fact that X = H Z H. Lasty, X is the bit flip operator X|0i = |1i and X|1i = |0i,
with {1, −1} eigenstate {|+i, |−i}. For a ∈ {0, 1}, X a |0i = |ai encodes the bit-flip nature of X. Z a |+i = H|ai
in line seven is the crucial step that reveals the correlated nature between qubits P1, 2 and 3, 4. In line eight we
now factor out the H3 H4 operators to the right to reveal the correlated state a,b (−1)ab |abi12 |abi34 . In line
nine we once again use Eq.(1) on qubits 3, 4 to factor out CZ34 to the left. Note, we could have also factored
CZ1,2 , but we in general prefer the former in order to keep the operators on the left acting on qubits 3, 4. This
is the feedforward nature of the CS computing, i.e. the computation proceeds in columns of qubits, from left
columns to right columns.
Note that going back
P to Eq.(2) and usingP the above manipulations (againPdropping normalizaitons), we see
that CZ12 | + +i12 = ab (−1)ab |abi12 = ab Z2a |abi12 = a Z2a |a+i12 = H2 a |aai ≡ H2 |φ+ i12 = |0i1 |+i2 +
P
|1i1 |−i2 where |φ+ i12 = √12 (|00i12 + |11i12 ) is the symmetric Bell state. Thus, the very last equality in Eq.(3)
⊗2 P
is just another re-writing of the box-CS in Fig.(1B) in the form |i1234 = CZ34 H34 CZ12 a,b |abi12 |abi34 =
CZ12 CZ34 (H3 |φ+ i13 ) (H4 |φ+ i24 ). From this last expression we see that H3 |φ+ i13 and H4 |φ+ i24 are the upper
and lower horizontal CZ links between qubits 1, 3 adn 2, 4 respectively, and CZ12 and CZ34 just add the left
and right vertical CZ links between quibts 1, 2 adn 3, 4 respectively.
2.2 Further 4-qubit cluster state constructions
Here we show several illustrative examples for the equations that describe cluster states and their corresponding
cluster state figures. For clarity we repeat the cluster state equation for the “box” cluster state from Eq.(3),
1
X
|i1234 = |abi12 CZ34 (H3 ⊗ H4 )(−1)ab |abi34 ,
{a,b}=0
X
⊗2
= CZ34 H34 CZ34 |abi12 |abi34 ,
a,b
X
⊗2
= CZ34 H34 CZ12 |abi12 |abi34 . (4)
a,b

If we now apply a CZ12 to |i1234 , we remove the vertical link (CZ-entanglement) between qubits 1, 2 as
illustrated as in Fig.(??A), and we create the ”U-shaped” CS consisting of 3 CZ gates on 4 qubits,

|ψA i = CZ13 CZ24 CZ34 | + + + +i1234 = CZ12 |i1234


1
X
= |abi12 CZ34 (H3 ⊗ H4 )|abi34 . (5)
{a,b}=0

This is equivalent to the “box” cluster state Eq.(4) minus the “first” CZ12 gate on qubits 1, 2, recalling that
the CZ gates commute, [CZi,j , CZi0 ,j 0 ] = 0. Fig.(??B) shows the box cluster state minus the “last” CZ gate on
qubits 3, 4, removing that vertical link,

|ψB i = CZ12 CZ13 CZ24 | + + + +i1234 = CZ34 |i1234


1
X
= |abi12 (H3 ⊗ H4 )(−1)ab |abi34 . (6)
{a,b}=0

Fig.(??C) shows the box cluster state minus the “top” horizontal CZ gate,

|ψC i = CZ12 CZ24 CZ34 | + + + +i1234 = CZ13 |i1234


1
X
= |abi12 CZ34 (I3 ⊗ H4 )(−1)ab |cbi34 ,
{a,b,c}=0
1
X
= |abi12 CZ34 (I3 ⊗ H4 )(−1)ab | + bi34 . (7)
{a,b}=0

Fig.(??D) shows the box cluster state minus the “bottom” horizontal CZ gate,

|ψD i = CZ12 CZ14 CZ34 | + + + +i1234 = CZ24 |i1234


1
X
= |abi12 CZ34 (H3 ⊗ I4 )(−1)ab |aci34 ,
{a,b,c}=0
1
X
= |abi12 CZ34 (H3 ⊗ I4 )(−1)ab |a+i34 , (8)
{a,b}=0

|ψA i and |ψB i are easy to understand. In Eq.(5) the CZ12 produces a factor of (−1)ab which cancels the similar
term in Eq.(4). Alternatively, Eq.(5) results from the identity CZ12 CZ12 = I12 . The analogous situation arises
for Eq.(6) which results from the identity CZ34 CZ34 = I34 .
In |ψC i and |ψD i the summation is over 3 qubits, because the missing horizontal CZ gates are no longer
enforcing the correlation between 1 & 3 and 2 & 4 receptively. The simplest way to see how the final form of
|ψC i in Eq.(7) arises is begin from the definition (first equality in Eq.(7)) and note that one directly obtains
the phase factors (−1)ab (−1)bd (−1)cd . This is almost the same factors that appear in |i1234 except for the
missing term (−1)ac . Recall that in |i1234 the terms (−1)ac (−1)bd |cdi34 gave rise to Z3a Z4b |cdi34 leading to
H3 H4 |abi34 (after the summation on c, d yielding | + +i34 ). In |ψC i the lone term (−1)bd now gives rise to
I3 Z4b |cdi34 leading to I3 H4 |abi34 (after the summation on c, d yielding | + +i34 ). The net effect of the CZ13
is to remove the link between qubits 1, 3, which operationally changes H3 → I3 and returns qubit 3 to the |+i3
state in the last line of Eq.(7). Analogous operations occur for qubit 4 in |ψD i in Eq.(8).
It is also illuminating to see how |ψC i arises directly from the action of CZ13 on the first form of |i1234 in
Eq.(4), namely how CZ13 (H3 ⊗ H4 ) eventually gives rise to (I3 ⊗ H4 ) in Eq.(7). Since CZ13 and H3 ⊗ H4 do not
commute, we write this as [CZ13 ⊗ I4 ] · [I1 ⊗ H3 ⊗ H4 ] = [CZ13 ] · [I1 ⊗ H3 ] ⊗ H4 . To compute [CZ13 ] · [I1 ⊗ H3 ]
we write them as 4 × 4 matrices on qubits 1, 3 as
       
I 0 H 0 H 0 H 0 I 0
= = = [I1 ⊗ H3 ] · CN OT13 .
0 Z 0 H 0 ZH 0 H 0 HZH = X

This yields
X
|ψC i = CZ34 (−1)ab [I1 ⊗ H3 ] · CN OT13 ⊗ H4 |abi12 |abi34 ,
ab
X
= CZ34 (−1)ab [I1 ⊗ H3 ] · CN OT13 |aai13 ⊗ H4 |bbi24 .
ab

We now note that CN OT13 |aai13 = |a, a ⊕ ai13 = |a0i13 and that I1 ⊗ H3 converts this later state into |a+i13 .
Putting the qubit labels back in numerical order yields our desired result, the last line of Eq.(7),
1
X
|ψC i = |abi12 CZ34 (I3 ⊗ H4 )(−1)ab | + bi34 .
{a,b}=0

2.3 Single qubit measurements


So far we have been concerned with the construction of the CS resource. We now turn to second half of the
MBQC procedure which are the single qubit measurements, whose sequential choice, along with the CS resource,
determines the quantum gates that are effected on the output qubits. As mentioned above, once the CS resource
has been constructed, the quantum computation proceeds by single qubit measurements on columns, starting
on the leftmost column of the 2D grid, and proceeding rightwards. In general, after each measurement on a give
column (say col-m), an effective gate is enacted on the output quibts in the adjacent column to the right of the
measure column (say, col-out). In order continue with the next iteration of the computation, a new column of
qubits col-new, initialized to the state | + + · · · icol-new are appended to the right of col-out, and horizontal CZ
gates are enacted to link corresponding pairs of qubits in rows between col-out and col-new. We will illustrate
the measurement procedure with the box-CS |i1234 in Eq.(4). Since there are only two columns, only one set
of single qubit measurements occurs on qubit 1, 2, with output appearing on qubits 3, 4 (see Fig.(1B)).
Single qubit measurements are performed by projecting qubits into the Z rotated basis states
1 1  
|±α i ≡ √ |0i ± eiα |1i = eiα/2 √ e−iα/2 |0i ± eiα/2 |1i ,

(9)
2 2
a
h±α |0i := eiα/2 , h±α |1i := ±e−iα/2 ⇒ h±α |ai := ± ei(−1) α/2 , (10)

where in the last line we have dropped the normalization factors 1/ 2 for notational convenience. We now
project qubits 1, 2 of
X1
|i1234 = |abi12 CZ34 (H3 ⊗ H4 )(−1)ab |abi34 ,
{a,b}=0
onto the basis state |±α i1 |±β i2 . Without loss of generality we can assume that the random projections of the
measurements are into the |+α i1 |+β i2 . In general this will not be the case, but from the observed (and recorded)
measurement values, corrections to the state which assumes the |+α i1 |+β i2 projection results can be made in
post-processing.1 This post-processing error correction is one of the key features of MBQC. Thus assuming
projecting of qubits 1, 2 into the state |+α i1 |+β i2 yields the output state
a
α/2+(−1)b β/2)
ei((−1)
X
⊗2
P12 (α, β)|i1234 = |+α i1 |+β i2 CZ34 H34 (−1)ab |abi34 ,
ab
a
α/2+(−1)b β/2)
ei((−1)
X
⊗2
= |+α i1 |+β i2 CZ34 H34 CZ34 |abi34 ,
ab
⊗2
≡ |+α i1 |+β i2 CZ34 H34 CZ34 RZ (α, β)34 | + +i34 , (11)

where in the last line we have defined RZ (α, β)34 ≡ RZ (−α)3 ⊗ RZ (−β)4 where the z-rotation operator RZ (θ)
is defined by  −i θ/2 
−i (θ/2) Z e 0
RZ (θ) = e = . (12)
0 ei θ/2
In general, we will drop the measured qubits in their projected state |+α i1 |+β i2 , since by the act of measurement
they are decoupled from the subsequent calculation (i.e. are separable from the subsequent qubits in remaining
CS-grid). Thus, from the combination of 9i) construction of the box-CS |i and the projective measurements of
qubit 1, 2 the effective operation proceeding rightwards from input qubits 1, 2 to output qubits 3, 4
⊗2
| + +i12 → CZ34 H3,4 CZ34 RZ (α, β)34 | + +i3,4 . (13)

Often in the literature this is written without the qubit subscripts | + +i → CZ H ⊗2 CZ RZ (α, β) | + +i, which
are left implied as the computation proceeds rightward.
For a computation to proceed for the next iteration, we would (i) append another column of qubit | + +i5,6 ,
(ii) apply horizontal entangling CZ gates CZ35 CZ46 and (iii) project qubits 3, 4 into the measurement states
(in general) |±0α i3 |±0β i4 . This procedure would then enact a further gate sequence CZ H ⊗2 CZ RZ (α0 , β 0 ) with
output on qubits 5, 6. Below we will show how the above described MBQC computation on the 4-qubit box-CS
|i1234 enacts the single-shot (i.e. only one measured column - qubits 1, 2) Grover algorithm on a 4-element
(2-bit) search. In the next section we first review Grover’s algorithm.

3. BRIEF REVIEW OF GROVER’S ALGORITHM


Grover’s algorithm operates on the basis of phase inversion (which √ tags the solution state) and amplitude am-
plification.3, 11, 12 A uniform input state |ψi = [1, 1, . . . , 1, 1]/ N equivalent to an all plus state i.e. |+i⊗n =
H ⊗n |0i⊗n is acted on by an oracle that applies an operator which flips one and only one relative phase by π. Such
an operation on n physical qubits (which hold N = 2n logical elements) is exactly Cn−1 Z= (I − 2|N − 1ihN − 1|)
in the 0,1 basis. Here Cn−1 Z is multi-qubit control-Z gate with qubits 1 to n-1 acting as controls and qubit n as
the target. The C n−1 Z gate is not in the Clifford group for n ≥ 3 and as such this algorithm can’t be efficiently
simulated on a classical computer. The location of the flipped relative phase can be controlled by the oracle by
various means including single qubit X flips before and after the Cn−1 Z gate. The case of N=8 requires at least
n = 3 photons to hold the logical state at any given time. For N=8, the phase inversion (or tagging) operation
can be written as,
Uf = (X i,j,k )C 2 Z(X i,j,k ), (14)
where X i,j,k is the Kronecker product of 3 single qubit rotations of either the identity or the Pauli flip X such
that X i,j,k = (X i ⊗ X j ⊗ X i ), where {i, j, k} ∈ {0, 1} is controlled by the oracle. This readily generalizes to the
case of n qubits as Uf = (X i1 ,i2 ,...,in )C n−1 Z(X i1 ,i2 ,...,in ).
The second step in Grover’s algorithm is to apply the amplitude amplification operation.3, 11 This operation
is defined as,
U⊥ = (2|ψihψ| − |0ih0|), (15)
where |ψi is the uniform input state. This operation requires no knowledge of the correct answer and can
therefore be performed by the “user.” U⊥ can be rewritten in terms of the Cn Z operation for the N=8 case as,

U⊥ = (2|ψihψ| − |0ih0|) = −(H ⊗3 (I − 2|0ih0|)H ⊗3 )


U⊥ = eiπ (H ⊗3 X ⊗3 (I − 2|7ih7|)X ⊗3 H ⊗3 ) (16)

which can be written as,


U⊥ = eiπ (H ⊗3 X ⊗3 (C 2 Z)X ⊗3 H ⊗3 ). (17)
The overall phase of eiπ can be dropped. The X ⊗3 = (X ⊗ X ⊗ X) operations are static and move the
minus sign from the C 2 Z to the 0th element. On n qubits the amplitude amplification operation generalizes to
U⊥ = (H ⊗n X ⊗n (C n−1 Z)X ⊗n H ⊗n ). Grover’s iterator consists of only these two operations (U⊥ Uf ). Therefore
to implement Grovers algorithm on n logical qubits we only need to implement the Cn−1 Z gate along with
single qubit flips and Hadamard gates. This represents a challenge for the practical implementation of Grover’s
2), Cn−1 Z gates are difficult to implement. Grover’s algorithm repeats this iterator
algorithm as for large n (n > √
a prescribed number (k = O( 2n )) times to reach an approximate solution |Ψout i = (U⊥ Uf )k |+i⊗n .3, 11, 12

4. THE N=4 ELEMENT SEARCH AND ITS SIMPLIFICATIONS ON 4 PHOTONS


Here and in the following subsection we review the 4 element search, the only size of Grover’s algorithm search
that has been performed to date in the MBQC implementation.2 This careful comparison will allow us to identify
both the logical circuit being implemented and the cluster state which created it. From the section above it is
clear that to implement the algorithm we need 2 physical qubits to hold the logical state at any given time and
we need to be able to implement C 1 Z = CZ, X and H operations. In this case only one application of the
iterator is required. This can be written in the circuit model as,

|Ψout i = U⊥ Uf | + +i. (18)

We can rewrite the circuit model algorithm in terms of Eqs.(14-17) as,

|Ψout i = (H ⊗2 X ⊗2 (CZ)X ⊗2 H ⊗2 ) ×
((X i ⊗ X j )CZ(X i ⊗ X j ))| + +i. (19)

{i, j} ∈ {0, 1} are the controls used by the oracle to “select” the target state.
Due to the small size of the N=4 case it is possible to significantly simplify both the phase inversion operation
and the amplitude amplification operator. To begin with, the phase inversion Uf has been experimentally
demonstrated with the CZ gate and only 2 single qubit Z operations.2 We note that the four possible phase
tagging matrices are,
   
−1 0 0 0 1 0 0 0
 0 1 0 0 0 −1 0 0
U0 =  0 0 1 0 = −(Z ⊗ Z)CZ, U1 = 0 0 1 0 = (Z ⊗ I)CZ,
 

0 0 0 1 0 0 0 1
   
1 0 0 0 1 0 0 0
0 1 0 0 0 1 0 0 
U2 =  0 0 −1 0 = (I ⊗ Z)CZ, U3 = 0 0 1 0  = (I ⊗ I)CZ. (20)
 

0 0 0 1 0 0 0 −1

We also note that  


1 0 0 0
0 −1 0 0
H ⊗2 (Z ⊗2 CZ)H ⊗2 = H ⊗2   H ⊗2 ,

(21)
0 0 −1 0
0 0 0 −1
is exactly the amplitude amplification operation U⊥ shown in Eq. (15).
Therefore we can now rewrite Eq.(19) in a simplified form as,

U⊥ Uf | + +i = H ⊗2 Z ⊗2 (CZ)H ⊗2 (Z i ⊗ Z j )CZ | + +i,


 
(22)
2 ⊗2 ⊗2
≡ (−i) H Z P12 (α, β)|i1234 , (23)

where we have used (i) Eq.(11) and Eq.(13) (and [Z i ⊗ Z j , CZ] = 0) and (ii) the fact that for α, β ∈ {0, π}
Eq.(12) gives RZ (0) = I and RZ (−π) = i Z. Thus, up to an overall local operation H ⊗2 Z ⊗2 that can be applied
in post processing, the previous section calculation on involving |i1234 yields the 4-element Grover algorithm.
(Note that since H ⊗2 Z ⊗2 is applied last, the correct result of the 4-element search can be inferred numerically
from the experimental data without ever having to explicitly apply the operation physically). The Grover search
on 4-elements in the form of Eq.(23) was implemented experimentally by Walther et al. in their seminal paper2
and remains the only photonic implementation of Grover’s algorithm performed to date in MBQC.
We pause to note an important point on this simplified equation. While it does exactly implement Grover’s
algorithm it can not be trivially extended to larger numbers of qubits. The equivalence of,

(H ⊗2 Z ⊗2 (CZ)H ⊗2 ) ≡ (H ⊗2 X ⊗2 (CZ)X ⊗2 H ⊗2 ), (24)

only holds for n = 2 because the minus signs in the CZ and Z ⊗2 align beneficially as shown above. For n > 2
this is no longer the case: combinations of products of CZ and Z gates on different qubits fail to produce a lone
single minus sign on the diagonal of an 8 × 8 matrix. As an example, neither Z ⊗3 nor CZij CZj,k produce a
single minus sign on the diagonal (the minimum achievable is two minus signs on the diagonal). Therefore, for
n > 2 we must revert to the definition of Eq.(14) and Eq.(17). This is the reason to date that no one has yet to
go beyond Walther et al work and experimentally realize a 2n -element Grover search for n > 2.

5. THE N=8 ELEMENT SEARCH


Similar to the section above we can define Grover’s algorithm on a n = 3 logical qubit state encoding N = 8
logical elements using Eq.(14) and Eq.(17). For the 8 element search, Grover’s algorithm requires two applications
of the iterator,
|Ψout i = U⊥ Uf U⊥ Uf |+i⊗3 . (25)
There is one simplification that can be readily made in this, and in any other case. The first phase inversion
operation acting on the uniform input state Uf |+i⊗n can be simplified as follows.

Uf |+i⊗3 = (X i ⊗ X j ⊗ X k )C 2 Z(X i ⊗ X j ⊗ X k )|+i⊗3


= (X i ⊗ X j ⊗ X k )C 2 Z|+i⊗3 . (26)

Here we take √ advantage of the fact that the input to Grover’s algorithm is always the uniform state |+i⊗n =
[1, 1, . . . , 1, 1]/ N and the first oracle determined operator, in this case (X i ⊗ X j ⊗ X k ) has no effect on this
state. We will denote the first phase inversion as

Uf0 = (X ijk )C 2 Z ≡ H ⊗3 Z ijk H ⊗3 C 2 Z, (27)

using X = HZH. Thus we can write the full equation for Grovers algorithm on 8 elements as follows, by
combining Eqs.(17,25,26),

|Ψout i = (H ⊗3 X ⊗3 (C 2 Z)X ⊗3 H ⊗3 )(X ijk )C 2 Z(X ijk )


×(H ⊗3 X ⊗3 (C 2 Z)X ⊗3 H ⊗3 )(X ijk )C 2 Z|+i⊗3 . (28)

We now need to define cluster states and the measurements required on them that are equivalent to these logical
operations.
1 4 7

2 5 8

3 6 9

Figure 2. The three operations of Grover’s N = 8 algorithm. Horizontal lines represent CZ operations between
qubits. The four vertical boxes represent the C 2 Z gates which are trivially equivalent to the Toffoli gate and can be
implemented as suggested by.9 Each qubit is measured in the Z basis with a rotation angle relative to 0 as listed above
the qubits. Only the angles {α, β, γ} ∈ {0, π} are modified by the oracle the angles 0 or π are static. A) Uf0 that act
on the initial unbiased state |+i⊗3 . B) The static amplitude amplification step operation U⊥ . C) The Oracle controlled
phase flip operation Uf .

6. PROGRAMMING THE N=8 GROVER’S ALGORITHM


Fig.(2) shows the graph states required for Grover’s algorithm on 8 elements. We construct these graph states by
describing the necessary steps (qubits, entangling gates and measurements) for each of the three operators needed
for Grovers algorithm Uf0 , U⊥ and Uf respectively using C 2 Z gates, CZ gates and single qubit measurements
in the z-basis. It is also important to note that the order of operations in the figures is left to right while the
effective order of operations in the equations is read right to left.

6.1 A) U0f
We will now describe Uf0 on qubits 1 − 9 in the leftmost three columns in Fig.(2A) above. While we read the the
operations lexigraphically from left to right, the operations are executed right to left on input states. We begin
with the three photons 1, 2, 3 in the leftmost column initialized into the | + ++i123 state which represents the
unbiased input to Grover’s algorithm.3 From Eq.(28) and Fig.(2A) we see that the very first operation which
we must be able to implement on this unbiased state is the C 2 Z123 gate. Here we have already encountered a
problem as our simple prescriptions only allow for nearest neighbor interactions in cluster states, and C 2 Z123
by its nature is not nearest neighbor. The state which implements Grover’s algorithm shown in full in Fig.(3) is
not strictly speaking a cluster state or even a graph state13 as the three qubit interaction creates a hyper-graph
state.14 We must therefore extend our prescriptions from cluster states to graph and hypergraph states. Similar
to our definition of CZ in Eq.(2) on 2-qubits we can analogously define C 2 Z on 3-qubits as,
X
C 2Z = (−1)abc |abcihabc|. (29)
abc={0,1}

Note that C 2 Z is a pure 3-qubit and cannot be built up from products of 2-qubit CZ gates (which introduce
factors of the form (−1)ab ). Shende and Markov15 have shown that the decomposition of the n−qubit C n N OT
(or n−qubit Toffoli, which is simply related to C n Z) requires at least 2n CN OT gates. Lanyon et al 16 have used
higher dimensional Hilbert spaces to reduce the CN OT gate count of generalized Toffoli gates. A discussion of
the physical implementation of the C 2 Z gate via photon-based qubits is appears in the appendix.
It is trivial to then extend this definition to all C n−1 Z gates. In addition, it is simple to see that our
prescription of a vertical CZ gate above as (−1)ab on all terms can simply be changed to (−1)abc for vertical
only C 2 Z. We have thus rewritten our first prescription as: 1) Vertical C n−1 Z gates act as (−1)a...n on all terms
in the equation. The constraint on vertical 2 qubit nearest neighbors interactions has been relaxed.
6.1.1 Step 1: Entangle first column of qubits 1, 2, 3
Applying
P C 2 Z123 to the first column of qubits written in the computational basis as |Ψ(0) i = | + ++i123 =
abc |abci123 yields
X
|Ψ(1) i = C 2 Z123 |Ψ(0) i = C 2 Z123 | + ++i123 = (−1)abc |abci123 , (30)
abc

depicted as the vertical box surrounding the first column in Fig.(2A).

6.1.2 Step 2: Add qubits 4, 5, 6 and entangle to qubits 1, 2, 3


P
The next step is to add the qubits | + ++i456 = def |def i456 and entangle them horizontally with qubits 1, 2, 3.
Following similar procedures as in the derivation of the 4-qubit box-CS in Eq.(3) we obtain

|Ψ(2) i = CZ14 CZ25 CZ3,6 |Ψ(1) i ⊗ | + ++i456 ,


XX
= (−1)abc |abci123 (−1)ad (−1)be (−1)cf |def i456 ,
abc def
XX
= (−1)abc |abci123 Z4a Z5b Z6c |def i456 ,
abc def
X
= (−1)abc |abci123 Z4a Z5b Z6c | + ++i456 ,
abc
X
= (−1)abc |abci123 H4 H5 H6 |abci456 ,
abc
X
⊗3
≡ |abci123 H456 C 2 Z456 |abci456 , (31)
abc
⊗3
= H456 C 2 Z456 |φ+ i14 |φ+ i25 |φ+ i36 .

We recall from Eq.(3) that we have used several key items. First we note (−1)ad |adi14 = Z4a |adi14 = Z6a |adi14 ,
after which we can perform the sum on d, e, f to put qubits 4, 5, 6 back in the state | + ++i456 . We then use
Z a |di4 = H4 |ai4 and similarly for qubits 4 and 5. We can then factor out the operators acting on 4, 5, 6 as in
the last line of Eq.(31).

6.1.3 Step 3: Measure qubits 1, 2, 3


We now project qubits 1, 2, 3 onto | + ++i123 namely onto the states | +α +β +γ i123 with the angles set to
(α, β, γ) = (0, 0, 0) as indicated above the first column of Fig.(2A). Now since h+|ai = 1 (ignoring normalization)
for all a ∈ {0, 1} we obtain
(0,0,0)
X
⊗3
|Ψ(3) i = P123 |Ψ(2) i = | + ++i123 H456 C 2 Z456 |abci456 ,
abc
⊗3
= |+ ++i123 H456 C 2 Z456 | + ++i456 . (32)

Eq.(32) indicates the central theme of MBQC, namely starting in the initial state |Ψ(0) i = | + ++i123 , the
prescription of

(i) operating on the left column of qubits with an entangling gate,


(ii) adding an additional column of qubits to the right and linking them to the left column of qubits with
horizontal CZ gate,

(iii) performing single qubit measurements of the left column of qubits in Z-rotated basis at angles {α, β, γ, . . .}
yields a new unitary operator acting on the right column of qubits in their initialized state, i.e. | + ++i123 →
⊗3
H456 C 2 Z456 | + ++i456 . This illustrates how the MBQC computation feedforwards from the first input (left)
column the second (right) output column. This is typically written in the literature without the subscripts as
| + ++i → H ⊗3 C 2 Z | + ++i on an ”effective logical” qubit register | + ++i. More directly the computation
proceeds in genaral as
0
O123 | + ++i123 | + ++i456 → | +α +β +γ i123 O456 (α, β, γ)| + ++i456 , (33)
though we typically drop the projected qubits | +α +β +γ i123 which are decoupled from the entangled resource
CS grid, and hence removed from further computation.
6.1.4 Step 4: Add qubits 7, 8, 9 and entangle to qubits 4, 5, 6
To proceed with the computation, we add another column of qubits 7, 8, 9 and horizontally entangle them with
qubits 4, 5, 6, namely |Ψ(4) i = CZ46 CZ57 CZ69 |Ψ(3) i ⊗ | + ++i789 . At first glance from Eq.(32) it appears that
⊗3
these diagonal CZ will not commute the non-diagonal Hadamards H456 . This is true in general. However, since
⊗3 2
H456 C Z456 acts on the specific state | + ++i456 , we have from the fourth line of Eq.(31) (after projecting qubits
1, 2, 3 onto | + ++i123 ) that
!
X
⊗3 2 abc a b c
H456 C Z456 | + ++i456 = (−1) Z4 Z5 Z6 | + ++i456 , (34)
abc

which acts as a diagonal operator on the special state |+ ++i456 . Note that while on the left hand side of Eq.(34)
each operator is explicitly unitary, the operator on the right hand side is diagonal, but non-unitary, specifically,
the diagonal elements are not all of unit magnitude. However, we will see that at the end of this next calculation
step we use Eq.(34) to convert the non-unitary operator back into a unitary operator, but now acting on output
qubits in the column to the right of input (left column) of qubits. Thus, using Eq.(34) we can commute diagonal
⊗3
combination of operators CZ46 CZ57 CZ69 past H456 C 2 Z456 to act directly on | + ++i789 to yield (dropping the
projected qubits 1, 2, 3)
⊗3
|Ψ(4) i = CZ46 CZ57 CZ69 H456 C 2 Z456 | + ++i456 ⊗ | + ++i789 ,
!
X X X
= (−1)abc Z4a Z5b Z6c CZ46 CZ57 CZ69 |def i456 |ghii789 ,
abc def ghi
!
X XX
= (−1)def Z4a Z5b Z6c |def i456 Z7d Z8e Z9f |ghii789 ,
abc def ghi
!
X X
= (−1)abc Z4a Z5b Z6c |def i456 Z7d Z8e Z9f | + ++i789 ,
abc def
!
X X
= (−1)abc Z4a Z5b Z6c |def i456 H7 H8 H9 |def i789 . (35)
abc def

Now at this stage we note that Z4a H7 |ddi47 = (−1)ad H7 |ddi47 = H7 (−1)ad |ddi47 = H7 Z7a |ddi47 , so that the last
line of Eq.(35) can be written as
XX
⊗3
|Ψ(4) i = H789 |def i456 (−1)abc Z7a Z8b Z9c |def i789 ,
abc def
!
X X
⊗3 abc
= H789 (−1) Z7a Z8b Z9c |def i456 |def i789 , (36)
abc def
!
X
⊗3 abc
= H789 (−1) Z7a Z8b Z9c |φ+ i47 |φ+ i58 |φ+ i69 .
abc

(−1)abc Z a Z b Z c on qubits 4, 5, 6 in column two to qubits


P
The above operation transfers the entangling gate abc
7, 8, 9 in column three.
6.1.5 Step 5: Measure qubits 4, 5, 6
d
In our final step, we project qubits 4, 5, 6 onto | +α +β +γ i456 . using h+α |di = ei(−1) α/2
(again ignoring
normalization factors) we obtain
(α,β,γ) 0
|Ψ(5) i = P456 |Ψ(5) i ≡ | +α +β +γ i456 |Ψ(5 ) i789 (37)

with
! 
(50 ) (−1)d α/2+(−1)e β/2+(−1)f γ/2
X X
⊗3
|Ψ i789 = H789 (−1) abc
Z7a Z8b Z9c ei |def i789 ,
abc def
!
X
⊗3
= H789 (−1)abc Z7a Z8b Z9c RZ (α, β, γ)789 | + ++i789 ,
abc
!
X
⊗3 abc
= H789 RZ (α, β, γ)789 (−1) Z7a Z8b Z9c | + ++i789 ,
abc
⊗3 ⊗3
= H789 RZ (α, β, γ)789 H789 C 2 Z789 | + ++i789 ,
= RX (α, β, γ)789 C 2 Z789 | + ++i789 ,
≡ (Uf0 )789 | + ++i789 , (38)

where the last line follows from the definition of Uf0 in Eq.(27), and we have used Eq.(34), H Z H = X,
RZ (α, β, γ) ≡ RZ (−α) ⊗ RZ (−β) ⊗ RZ (−γ), and RX (α, β, γ) ≡ RX (−α) ⊗ RX (−β) ⊗ RX (−γ). Eq.(38) is
our desired result, indicating MBQC operations on three columns of 9-qubits produces the action of the first
Grover tagging operation Uf0 .

6.1.6 Summary of U0f calculation:


A summary of the above calculation is as follows:

[C 2 Z123 | + ++i123 ] | + ++i456 | + ++i789


⊗3
→ | +α +β +γ i123 [H456 C 2 Z456 | + ++i456 ] | + ++i789
⊗3 ⊗3
→ | +α +β +γ i123 | + ++i456 ] [H789 RZ (α, β, γ)H789 C 2 Z789 | + ++i789 ], (39)

where the first line results from step 1 (entangle initial (leftmost) column of qubits), the second line results from
step 2 & 3 (entangle a new right column of output qubits and measure the left, input column of qubits), and the
third line step 3 results from a repetition of step 2 using a new output column of qubits.
Note that in the even numbered steps, when we entangle a newP(right) column of output qubits to the (left)
column of input qubits we have entangled states of the form Oinput abc |abciinput |abciP
output . In the odd number
steps, where we measurePthe input qubits, the previous correlated state is reduced to abc |abcioutput = | + ++i
so that we have Oinput abc |abciinput |abcioutput → O0 output | + ++ioutput , where Oinput → O0 output as a result
of the feedforward measurements.

6.2 B) U⊥
The next operation we must describe is the U⊥ operation of Eq.(17) which is U⊥ = H ⊗3 X ⊗3 (C 2 Z)X ⊗3 H ⊗3 .
We note that H ⊗3 RX (π, π, π) = RZ (π, π, π)H ⊗3 which conveniently puts the rotation and Hadamard opera-
tion in the order given by prescription 2). Therefore we can rewrite Eq.(17), implemented with only z-basis
measurements and dropping the overall phase, as,

U⊥ = H ⊗3 H ⊗3 RZ (π, π, π)H ⊗3 (C 2 Z)H ⊗3 RZ (π, π, π). (40)

Here we deliberately leave the identity H ⊗3 H ⊗3 = I ⊗3 on the left hand side of the equation. Recall that
in prescription 3) the measurement automatically creates a z-basis rotation and a Hadamard operation on the
output. This Hadamard is the result of the entanglement of the horizontal CZ operations and can not be avoided.
Our desired algorithm has no logical Hadamard at this point. Therefore we have to cancel the unwanted H ⊗3
with an additional column of qubits with horizontal CZs. These qubits are measured with 0 angle in the z-basis
giving RZ (0, 0, 0) = I ⊗3 and the horizontal CZs give a second H ⊗3 . The U⊥ operations contains no variable
measurements as given by Grover’s algorithm and it can be considered to be implemented by the “user”, without
any knowledge of the search “answer”, as opposed to the oracle. As it is a static device it lends itself well to
implementation as a multi-port integrated waveguide circuit. The U⊥ operation in isolation requires 15 qubits,
one C 2 Z and up to 12 CZ operations as can be seen in Fig(2B).
The general Uf operation is similar to the previously described Uf0 of Eq.(27), in fact Uf = Uf0 X ijk . Thus
we can take our cluster state equations and add the same number of qubits, entangling operations and rotations
before the C 2 Z as we have after.
We have thus discussed all of the required qubits, entangling gates and measurements needed to implement
Grover’s algorithm on 3 logical qubits or 8 logical elements purely in the cluster state basis. The full cluster state
which is the combination of the states discussed above is shown in Fig.(3) with the various sections and effective
operations labeled. Generation of photons remains difficult but is a well understood problem. The single qubit
measurements and subsequent feedforward operations needed to correct for errors are not easy to implement
but are standard for cluster state computing. The CZ operation is well know and an implementation of an all
optical Toffoli gate on an arbitrary 3 qubit state has recently been demonstrated.9 All of the requirements for
experiment are on the conceivable horizon.

7. CONCLUSION
We have studied the behavior of cluster state graph states and hypergraph states and developed a method of
writing a generalized graph state equation and interpreting the effective operation implemented by the cluster
state for given measurements. This gives the possibility of “programing” in cluster and graph states using known
sets of operations. As a demonstration of a nontrivial and useful algorithm we have examined Grover’s algorithm
and found equations that correctly describe the action of the state and the effective circuit which perfectly match
the experimental Grover’s algorithm of Walther,2 while expanding to the next logical size. Several interesting
questions remain. Such as how do the feed forward corrections behave in a hyper-graph state compared to a
cluster state? What optimizations can be made to reduce the size of the state? Can any arbitrary operation be
translated by this method. We will address these questions in future works.

ACKNOWLEDGMENTS
Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s)
and do not necessarily reflect the views of AFRL. This manuscript has been authored by AMS by UT-Battelle,
LLC, under Contract No. DE-AC05-00OR22725 with the U.S. Department of Energy. The United States
Government retains and the publisher, by accepting the article for publication, acknowledges that the United
States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the
published form of this manuscript, or allow others to do so, for United States Government purposes.

APPENDIX A. CLUSTER STATES FOR GROVER’S ALGORITHM


We have shown several components of Grover’s algorithm separately in Fig.(2). Note that the output qubits, the
last three qubits on the right hand side of each figure, are unmeasured and the equation in the sections above
are the effective transformations on these qubits. The cluster state shown here perform the desired operations
but are not exactly the same as in Fig.(2). That is because several optimization, i.e. reductions in the number
of qubits needed were made in Fig.(3), particularly between U⊥ Uf . Compare Fig.(3) and Fig.(2) for details.
0,0,0 α,β,γ π,π,π 0,0,0 π,π,π α,β,γ 0,0,0 α,β,γ π,π,π 0,0,0 π,π,π 0,0,0

|Ψout〉

n
C 2Z Hn RZ Hn RZ H n C 2Z Hn RZ Hn RZ H n C 2Z Hn RZ Hn RZ H n C 2Z Hn RZ Hn I Hn

Uf U⊥ Uf U⊥
Figure 3. A graph state capable of implementing Grovers algorithm. The logical output of the algorithm is a
separable state contained on the final three unmeasured qubits |Ψout i red dashed box. All qubits are initialized in the
|+i state. The effective circuit implemented by successful measurements of the qubits are shown below the graph state
both as individual operations and the 4 steps of Grover’s algorithm

APPENDIX B. CLUSTER STATE EQUATIONS


Given that the input is the unbiased state and all the entangling operations are effectively π phase flips the
cluster state is a real equal weight state and we need only keep track of the relative phases i.e. minus signs, of
each term from |00 . . . 00i to |11 . . . 11i for all 39 photons.
The Equation describing the full cluster state for implementing Grover’s algorithm as in Fig.(3) requires 39
qubits which will be labeled as {a, b, c, . . . , y, z, α, a0 , b0 , c0 . . . , j 0 , k 0 , l0 } with values {0, 1}. The qubits are grouped
into sets of three, i.e. {a, b, c}, {d, e, f }, . . . , {j 0 , k 0 , l0 }, which represent the vertical columns of three qubits each.
Qubits {a, b, c} are on the left hand side of Fig.(3) and are the unbiased input state and {j 0 , k 0 , l0 } are the
unmeasured output qubits number {37, 38, 39} on the far right hand side and are projected into |Ψout i. The
C 2 Z gates can be clearly seen as the only three qubit interactions, i.e. an exponential with three qubits values
(−1)abc . The horizontal CZ gates result in terms of the form (−1)ad+be+cf etc, which upon measurement will
induce the H and Rz rotations. Here the hypergraph state can be written as,
1 1 1
0 0
+h0 k0 +i0 l0 0 0 0 0 0 0
X X X
|Ψi = ... |a, b, ci|d, e, f i . . . |g 0 , h0 , i0 i(−1)g j (−1)d g +e h +f i
×
{a,b,c}=0 {d,e,f }=0 {j 0 ,k0 ,l0 }=0
0 0 0 0 0 0 0 0 0 0 0 0
(−1)a d +b e +c f (−1)a b c (−1)ya +zb +αc (−1)vy+wz+xα (−1)sv+tw+ux (−1)stu ×
(−1)ps+qt+ru (−1)mp+nq+or (−1)jm+kn+lo (−1)jkl (−1)gj+hk+il (−1)dg+eh+f i ×
(−1)ad+be+cf (−1)abc | + ++i37,38,39 , (41)

APPENDIX C. TELEPORTATION OF GATES VIA BELL STATE MEASUREMENTS


Here we describe essential features of the physical implementation of the 3-qubit CPHASE gate C 2 Zijk in the
main text, as implemented by photon-based qubits. We will actually discuss the experiments by Gao et al 17 and
Guo et al 9 that physically implemented 2-qubit and 3-qubit teleported CNOT gates respectively, since that are
directly relatable to teleported 2-qubit and 3-qubit CPHASE gates. The teleportation schemes of Gao et al and
Guo et al are illustrated in Fig.(4a,b) (left) and Fig.(4A,B) (right) respectively.
The essential idea of these teleported gates is to begin with some number of initial qubits in arbitrary states
and an equal number of Bell pairs (the rows of Fig.(4)). For each row, one makes independent Bell state
measurement (BSM)18 on the initial arbitrary input qubit and the leftmost qubit of the Bell pair (the first and
second columns in Fig.(4)). The rightmost qubits of all the Bell pairs (third column in Fig.(4)) are put off line
into a resource entangled state (the vertical box encompassing qubits 7, 8, 9 in Fig.(4a,b) and the double vertical
line connecting qubits 4, 6 in Fig.(4A,B)). Using the results of the BSM one determines the corrections required
for the third column of qubits in Fig.(4), which have been projected into some state by the BSM.
ngled states of three or more particles, so- u c in& 5 a u H A & u H B & 1 b u H A & u V B & 1 g u V A & u H B & 1 d u V A & u V B & .
-Horne-Zeilinger ~GHZ! states @1#, have ~1!
uantum systems to reveal the nonlocality
orld. Most recently, the young quantum Because the PBS transmits only the horizontal polarization
@2# has shown that quantum entangled component and reflects the vertical component, after passing
ited for information transmission and in- through PBS AB the incident state will evolve into
ng, for example, in quantum dense coding
m teleportation @5,6#. It is well known that Figure 4.u cTeleportation of gates via Bell State Measurements (BSM)
in& → a u H A2 & u H B1 & 1 b u H A2 & u V B2 & 1 g u V A1 & u H B1 &
d measurement of Bell states is essential
coding and quantum teleportation. The 1 d u V A1 & u V B2 & , ~2!
HZ case will thus allow us to generalize
C.1inBell
iparticle case. Also, State Analyzer
a generalization of where the subscript i j (i5A,B, j 51,2) denotes the transfor-
ping @7,8# a GHZ-state analyzer can actu- mation from input mode i to output mode j . Suppose that
Let us define the Bell
pare multiparticle GHZ states out of en- states as
these two photons A and B arrive at the polarizing beam
1 1 AB simultaneously,± and therefore
splitter PBS 1 their spatial 1
|φ± i = √
sing only single-quantum-bit ~qubit!
(|HHiop-± |V V i) = √ (|00i ± |11i)each
wave functions overlap , |ψother. √ (|HV
i = Then, i ± |V Hi)
according = √ (|01i ± |10i) ,
to the (42)
ntrolled-NOT gates @9# one can construct
2 a 2 2 2
indistinguishability of identical particles, we can directly de-
etwork to produce and identify any of the
note H A2 as H 2 , V A1 as V 1 , H B1 as H 1 , and V B2 as V 2 . Thus,
particles @10#.
~2! reads encoded qubits (H, V ) ↔ (0, 1). There is no 2-photon complete Bell
ed states for anywhere
numberfor
of horizontal/vertical polarization
Eq.
w such quantum state analyzer utilizing polarization encoding only.18 This is because the 2 detected photons can distinguish
networks have not yet
boratory. On the experimental side, Kwiat
at most two of the four possible
reported a high-intensity source of
Bell
auH states in Eq.(42), chosen without loss of~3!
1&u H 2& 1 b u H 2&u V 2& 1 g u V 1&u H 1& 1 d u V 1&u V 2& .
generality to be |φ± i. This
led photon pairs, by which one can easily
four Bell states. Also, a general and real-
or producing three-particle entanglements
irs has been given recently @12#. Further-
mplete Bell state measurement procedure
eady experimentally identify two of the
#.
e present a universal scheme and practi-
rocedures for identifying two of the
tes based on the concept of quantum era-
ments of the experimental setup are just
litters ~PBS! and half-wave plates ~HWP!.
ow that the scheme can also provide a
tate source by which one can experimen-
GHZ correlations @1# and entangled en-

to discuss the GHZ-state analyzer, let us


d version of the Bell-state analyzer, which
ferent from the Figure
former 5.
one shown
Bell state in Fig.
analyzer. TwoFIG.
photons
1. A enter portsanalyzer.
Bell-state A and BTwosimultaneously and enter
identical photons a polarizing beam splitter (PBS)
enter the
ider the arrangement of Fig. 1. Two iden-
which transmit H and reflects Bell-state analyzerSubsequent
V polarization. from input ports A andplates
half wave B. PBS AB , PBS1,
(HWP) and to create state superposition
are used
the Bell-state analyzer from modes A and
|±i which are further analyzedPBS2
Suppose they are in the most general
are three polarizing beam splitters, which transmit the hori-
by downstream polarizing beam splitters.
zontal polarization component and reflect the vertical component.
osition state D H1 , D V1 , D H2 , and D V2 are four trigger detectors.

18
2208~4!/$15.00 can be seen as follows 57 in Fig.(5)
2208 following the anlaysis of Pan
© 1998 The and Physical
American Zeilinger.
SocietyConsider an arbitrary state
of two qubits |ψP BSAB in i = α|HA2 HB1 i + β|HA2 VB2 i + γ|VA1 HB1 i + δ|VA1 VB2 i, where the subscripts Ai and

Bj indicate the transformation from the input ports for two photons A, B to the output ports i, j ∈ {1, 2}
of the polarization beam splitter P BSAB . Since the P BSAB transmits H and reflects V we can make the
identifications HA2 → H2 , VA1 → V1 , HB1 → H1 , and VB2 → V2 . Thus, upon exiting the P BSAB we have
the state |ψP BSABout i = α|H1 H2 i + β|H2 V2 i + γ|V1 H1 i + δ|V1 V2 i. Note that the component state |H1 H2 i and

|V1 V2 i each have one photon per exit mode, while |V1 H1 i and |H2 V2 i have two photons in either mode 1 or 2
respectively. Thus the state |ψ11 i = α|H1 H2 i + δ|V1 V2 i can be detected by coincidence of detectors positioned
along the path of modes 1 and 2. One the other hand, the state |ψ20,02 i = β|H2 V2 i + γ|H1 V1 i would register a
click (consisting of two photons) in either one of the detectors separately. Thus we can distinguish between |ψ11 i
and |ψ20,02 i by coincidence counting, where the subscripts ij are meant to indicate the photon number detected
in detector along the path of 1 and 2 respectively.
Now we can write the state |ψ11 i in terms of the Bell states in Eq.(42) |ψ11 i = √12 (α +δ)|φ+ i+ √12 (α −δ)|φ− i.
To complete the BSM we need to determine the relative phase ±1 between |φ+ i and |φ− i. This is accomplished

as follows. Half wave plates are inserted in each output path of √ the P BSAB set to 22.5 which√ corresponds to

45 (Hadamard) rotation of the polarization, namely |Hi → 1/ 2(|Hi + |V i) and |V i → 1/ 2(|Hi − |V i). The
Bell states are transformed as

|φ+ i → |φ+ i = 1/ 2(|H1 H2 i + |V1 V2 i) ⇒ coincidence in detectors: DH1 , DH2 or DV 1 , DV 2 (43)
− +

|φ i → |ψ i = 1/ 2(|H1 V2 i + |V1 H2 i) ⇒ coincidence in detectors: DH1 , DV 2 or DV 1 , DH2 . (44)
Now |φ+ i in Eq.(43) |H1 H2 i would register coincidence on detectors DH1 and DH2 in Fig.(5) while |V1 V2 i would
register coincidence on detectors DV 1 and DV 2 . On the other hand, in |ψ + i Eq.(44) |H1 V2 i would register
coincidence on detectors DH1 and DV 2 while |V1 H2 i would register coincidence on detectors DV 1 and DH2 . The
upshot of this analysis is that the BSM utilized in Fig.(4) can only detect projections (of input states entering
ports A and B) onto |φ± i, and hence only these measurement results can be correct for in post processing. The
other two incident Bell state |ψ ± i do not result in coincidence detection and involve some kind of superposition
between |HiA |V iB and |V iA |HiB so that the relative phase in |ψ ± i cannot be determined in the experimental
set up of Fig.(5).
The analysis of the 9-qubit Gao et al 9 teleported C 2 N OT (Toffoli) gate in Fig.(4a,b) (left) is straightforward
but quite lengthy, so we shall instead analyze the simpler 6-qubit teleported CN OT gate of Guo et al 17 in
Fig.(4A,B) (right), which will allows to glean the essential procedure involved in both schemes.

C.2 6-qubit teleported CNOT gate


The entangled resource state |χi3456 of the Guo et al scheme (using their notation) is

|χi3456 = CNOT4t 6c |φ+ i34 |φ+ i56 = |φ+ i34 |00i56 + |ψ + i34 |11i56 , (45)

where CN OT4t 6c indicates that 6 is the control qubit and 4 is the target qubit in the CN OT operation. This
resource is readily constructed off line by generating the two independent Bell pairs |φ+ i34 and |φ+ i56 (by means
such as a retro-reflected double pass of a UV laser through a BBO (β−BaB2 O4 ) crystal), first performing a
CZ one photon from each Bell pair, here 4, 6, (see the scheme by Weinfurter19 which utilizes two symmetrically
arranged partially polarizing beam splitters of transmittances (TH = 1, TV = 1/3) and (TH = 1/3, TV = 1)),
⊗2
and subsequent local Hadamards on qubits 3, 4, i.e. |χi3456 ∼ H34 CZ46 |φ+ i34 |φ+ i56 .
P
The arbitrary input state is on qubits 1, 2 which we write as |Ψin i12 = ij cij |iji1,2 . Expanding the pre-BSM
input state |Ψin i12 |χi3456 in terms of the computational basis states |abi of column qubit pairs 1, 2, 3, 5 and 4, 6
is a straight forward exercise to show that
   
X X
|Ψin i12 |χi3456 =  cij |i0i13 |j0i25  |00i46 +  cij |i1i13 |j1i25  |01i46 ,
ij ij
   
X X
+  cij |i1i13 |j1i25  |10i46 +  cij |i0i13 |j1i25  |11i46 , (46)
ij ij
X
= CN OT4t 6c cij |imi13 |jni25 |mni46 .
ijmn

We now wish to write this state in terms of the effective output state on qubits 4, 6 (last, output column),
and in terms of the Bell state Eq.(42) on qubit pairs 1, 3 and 2, 5. That is we the input qubits 1, 2 in |Φin i12 to
be teleported to
X
|Φout i46 = CN OT4t 6c |Φin i46 = cij |i ⊕ j, ji46 = c00 |00i46 + c11 |01i46 + c10 |10i46 + c01 |11i46 , (47)
ij

via the BSM on qubits pairs 1, 3 and 2, 5. The involved part of this calculations is writing the computational
bases states |imi13 and |jni25 in terms of the four Bell states. For this we use the inverse transformation given
in Eq.(42) to write
1 h  i
|abi = √ δab |φ+ i + (−1)ab |φ− i + δab̄ |ψ + i + (−1)ab̄ |ψ − i

(48)
2
where b̄ ≡ ¬b = 1 ⊕ b and δab̄ = 1 − δab . Substituting Eq.(48) into Eq.(46) yields

|Ψin i12 |χi3456 =


X 
cij δi0 |φ+ i + (−1)0 |φ− i + δi1 |ψ + i + (−1)i |ψ − i 13 δj0 |φ+ i + (−1)0 |φ− i + δj1 |ψ + i + (−1)j |ψ − i 25 |00i46 +
    
ij
X
cij δi1 |φ+ i + (−1)i |φ− i + δi0 |ψ + i + (−1)0 |ψ − i 13 δj1 |φ+ i + (−1)j |φ− i + δj0 |ψ + i + (−1)0 |ψ − i 25 |01i46 +
     
ij
X
cij δi1 |φ+ i + (−1)i |φ− i + δi0 |ψ + i + (−1)0 |ψ − i 13 δj0 |φ+ i + (−1)0 |φ− i + δj1 |ψ + i + (−1)j |ψ − i 25 |10i46 +
     
ij
X
cij δi0 |φ+ i + (−1)0 |φ− i + δi1 |ψ + i + (−1)i |ψ − i 13 δj1 |φ+ i + (−1)j |φ− i + δj0 |ψ + i + (−1)0 |ψ − i 25 |11i46 . (49)
     
ij

Though the above equation is a bit cumbersome, its usefulness derives from looking at projections of qubit 1, 3
and 2, 5 onto products of Bell states. For example,if the BSM projects onto |φ+ i13 |φ+ i25 we obtain the output
state on qubits 4, 6 (reading the terms off of Eq.(49))

|Φout i132546 = |φ+ i13 |φ+ i25 ×


X
cij (δi0 δj0 |00i46 + δi1 δj1 |01i46 + δi1 δj0 |10i46 + δi0 δj1 |11i46 +) ,
ij

|φ+ i13 |φ+ i25 c00 |00i46 + c11 |01i46 + c10 |10i46 + c01 |11i46 ,

=
= |φ+ i13 |φ+ i25 (I4 ⊗ I6 )|Φout i46 , (50)

which requires no correction of the output state |Φout i46 .


If the BSM projects onto |φ+ i13 |φ− i25 we instead obtain

|Φout i132546 = |φ+ i13 |φ− i25 ×


X
cij δi0 δj0 (−1)0 |00i46 + δi1 δj1 (−1)j |01i46 + δi1 δj0 (−1)0 |10i46 + δi0 δj1 (−1)j |11i46 + ,

ij

= |φ+ i13 |φ− i25 c00 |00i46 − c11 |01i46 + c10 |10i46 − c01 |11i46 ,


= |φ+ i13 |φ− i25 (I4 ⊗ Z6 )|Φout i46 , (51)

which requires a (I4 ⊗ Z6 ) correction of the output state |Φout i46 .


Lastly, if the BSM were constructed to detect projections onto |φ+ i13 |ψ + i25 we would instead obtain

|Φout i132546 = |φ+ i13 |ψ + i25 ×


X
cij (δi0 δj1 |00i46 + δi1 δj0 |01i46 + δi1 δj1 |10i46 + δi0 δj0 |11i46 +) ,
ij

|φ+ i13 |ψ + i25 c01 |00i46 + c10 |01i46 + c11 |10i46 + c00 |11i46 ,

=
= |φ+ i13 |ψ + i25 (X4 ⊗ X6 )|Φout i46 , (52)

which requires a (X4 ⊗ X6 ) correction of the output state |Φout i46 .


Note that while a Bell state analyzer could detect projections onto products of |φ± i13 and |φ± i25 (as per our
conventions for the BSM experimental setup) as in the previous two examples, it could not in addition also detect
projections onto the states |ψ ± i on either qubits 1, 3 or 2, 5. The above examples indicate that the pre-BSM
input state |Ψin i12 |χi3456 can be written as a linear superposition of products of Bell states on qubits 1, 3 and
2, 5 and |Φout i46 on qubit 4, 6 with corrections determined by the Bell State components for each term in the
sum (for a full listing of the linear superposition see the supplemental material accompanying Gao et al 17 ).
REFERENCES
1. H. J. Briegel and R. Raussendorf, “A one-way quantum computer,” Phys. Rev. Lett. 86, pp. 910–913, 2001.
2. P. Walther and et. al, “Experimental one-way quantum computing,” Nature 434, pp. 169–176, 2005.
3. L. Grover, “A fast quantum mechanical algorithm for database search,” Proc. 28th annual ACM Sym. on
Theory of Comp. (STOC) , pp. 212–219, 1996.
4. P. W. Shor SIAM J. Sci. Statist. Comp. 26, p. 1484, 1997.
5. P. Kok and et al. Rev. Mod. Phys. 79, p. 135, 2007.
6. H. J. Briegel and et. al, “Measurement-based quantum computation,” Nature Physics 5, pp. 19–26, 2009.
7. S. Barz, E. Kashefi, A. Broadbent, J. F. Fitzsimons, A. Zeilinger, and P. Walther, “Demonstraition of blind
quantum computing,” Science 335, pp. 303–307, 2012.
8. D. B. Uskov and et. al, arxiv:1407.6055 , 2014.
9. Y. Guo, D. Huang, and H. Lee, “Teleportaion-based toffoli gate on cluster sates via the bell state analysis,”
Phys. Scr. 87, p. 045010, 2013.
10. A. M. Smith, P. M. Alsing, G. E. Lott, and M. L. Fanto, “Programming non-trivial algorithms into the
measurement based model,” J. Mod. Opt. (special issue: Single Photon Sources, Detectors, and Applications)
, submitted Sep 2014.
11. M. A. Nielson and I. L. Chuang, Quantum Computation and Quantum Information, Cambridge Univ. Press,
N.Y., 2000.
12. P. Kaye, R. Laflamme, and M. Mosca, An Introduction to Quantum Computing, Oxford Univ. Press, N.Y.,
2007.
13. H. J. Briegel and R. Raussendorf, “Persistent entanglement in arrays of interacting particles,” Phys. Rev.
Lett 86, pp. 910–913, 2001.
14. M. Rossi, M. H. D. Bruss, and C. Macchiavello, “Quantum hypergraph states,” arXiv:1221.5554v2 , 2012.
15. V. V. Shende and I. L. Markov, “On the CNOT-cost of TOFFOLI gates,” arxiv:0803.2316 .
16. B. Lanyon and et al, “Simplifying quantum logic gates using higher-dimensional hilbert spaces,” Nature
Physics 5, p. 134, 2009.
17. W. Gao and et. al, “Teleportation-based realization of an optical quantum two-qubit entangling gate.,”
PNAS 107 (49), pp. 20869–20874, 2010.
18. J. W. Pan and A. Zeilinger, “Greenberger-horne-zeilinger-state analyzer,” Phys. Rev. A 57, pp. 2208–2211,
1998.
19. C. Schmid, N. Kiesel, W. Wieczorek, and H. Weinfurter, “The entanglement of the four-photon cluster
state,” New J. Phys. 9, p. 236, 2007.

You might also like