## Abstract

Quantum computers achieve a speed-up by placing quantum bits (qubits) in superpositions of different states. However, it has recently been appreciated that quantum mechanics also allows one to ‘superimpose different operations’. Furthermore, it has been shown that using a qubit to coherently control the gate order allows one to accomplish a task—determining if two gates commute or anti-commute—with fewer gate uses than any known quantum algorithm. Here we experimentally demonstrate this advantage, in a photonic context, using a second qubit to control the order in which two gates are applied to a first qubit. We create the required superposition of gate orders by using additional degrees of freedom of the photons encoding our qubits. The new resource we exploit can be interpreted as a superposition of causal orders, and could allow quantum algorithms to be implemented with an efficiency unlikely to be achieved on a fixed-gate-order quantum computer.

## Introduction

Quantum mechanics has long been recognized as a counter-intuitive theory, with ideas such as wave-particle duality, quantum superposition and entanglement defying our natural way of thinking. In recent years, these sorts of uniquely quantum properties are being exploited to develop revolutionary technologies, such as quantum cryptography, quantum metrology and perhaps the most well-known example, quantum computation. In the field of quantum computation, the circuit model was used to show that universal quantum computation is possible^{1}, and the circuit model has since been an incredibly successful tool, leading to important quantum algorithms which greatly outperform their classical counterparts^{2}. The circuit model takes advantage of the fact that quantum mechanics allows for the superposition and interference of quantum bits (qubits) in different states to achieve a computational speed-up. However, in addition to the superpositions of states, quantum mechanics also allows for the superposition of quantum circuits^{3,4}—a feature which is not used in the standard quantum circuit model. Nevertheless, such superpositions of quantum circuits are rapidly becoming central to several foundational research programs studying the role of time and causality in quantum theory^{5,6,7,8,9}. These superpositions of quantum circuits (sometimes called a ‘superposition of causal orders’) give rise to new counter-intuitive quantum predictions, and it has recently been predicted that they could provide quantum computers with even further computational advantages^{8,10}. In particular, superimposing quantum circuits, each with a different gate ordering, can allow one to accomplish a specific computational task with fewer quantum gate uses than a quantum computer which has a fixed-gate order^{10}.

One of the most useful methods for quantifying the performance of a quantum algorithm is its query complexity. Loosely speaking, this is the number of times that a quantum gate is used (or queried). The use of the query complexity is motivated by the assumption that applying a gate is a cost that we wish to minimize. In an optical quantum computer this cost would be either another physical copy of the gate (say a different set of waveplates, or interferometer), or a repeated usage of the same gate at a later time. In an ion-trap^{11} or super-conducting^{12} quantum computer the cost would be the application of another pulse sequence to the qubits. Given that one of the main difficulties in creating a scalable quantum computer is the implementation of multiple gates^{13,14}, techniques to reduce the query complexity are essential for practical quantum computing.

Just as in a classical electronic circuit, in a fixed-order quantum circuit one connects a series of logic gates by wires (see Fig. 1a or Fig. 1b). This is an intuitive and extremely powerful method for designing quantum algorithms, but there are advantages to other models. One example is measurement-based quantum computing^{15,16}, a different paradigm than the circuit model which paved the way for many experimental implementations of quantum algorithms^{17,18}. Unlike other models of computation, what is considered here is a strict extension of the quantum circuit model, which therefore allows for additional computational power. The particular extension we study in our experiment is to allow for superpositions of different quantum circuits; that is, to coherently control which quantum circuit is applied on an input state (see Fig. 1c). In this case, the order of quantum gates acting on a set of qubits could be controlled by the state of another set of qubits—this is not allowed in the standard-quantum circuit model, wherein the gate order is independent of the state of the qubits^{4}.

Coherently controlling the order of quantum gates conditioned on the state of a set of qubits is a new type of operation. A proposal for one such operation is the ‘N-SWITCH’, which takes *N* different gates and applies them in a given superposition of different permutations^{19}. Using this operation, a quantum algorithm has recently been proposed to solve a specific problem with a query complexity of *O*(*N*), while a fixed-order circuit is likely to require *O*(*N*^{2}) queries to solve the same problem^{9,10}. In other words, the N-SWITCH reduces the query complexity by a factor *N*. Since it has been shown that the N-SWITCH can be simulated by *N*^{2} fixed-order gates^{10}, a factor of *N* is the maximum advantage that can be achieved with this operation. It is an open question whether there exist other resources without fixed-gate order that would allow further advantages.

In this paper, we report on our experimental demonstration of a 2-SWITCH operation, which we implement by taking advantage of additional degrees of freedom of the physical system which encodes our qubits. Our technique makes it possible to apply two quantum gates in a superposition of both possible orders, and it enables us to determine if the gates commute or anti-commute with only a single use (or query) of each gate. On the other hand, determining if two gates commute or anti-commute using a quantum circuit with a fixed-gate order would require at least two uses of one of the gates^{8,20}. Moreover, when this problem is scaled to *N* gates, creating a superposition of quantum circuits is likely to provide an exponential advantage over classical algorithms, and a linear advantage over quantum algorithms with fixed-gate order^{10}. The techniques that we demonstrate here could allow some quantum algorithms to be implemented with an efficiency that is unlikely to be achieved on a quantum computer with a fixed-gate order.

## Results

### Theoretical objective

In our task, one is presented with two unitary gates, *U*_{1} and *U*_{2}, and the guarantee that *U*_{1} and *U*_{2} either commute or anti-commute (but *U*_{1} and *U*_{2} are otherwise unknown and arbitrary). The goal is to determine which statement is true. This is the first step towards demonstrating the quantum algorithm proposed in ref. 10, and, in the case with *N*=2 causal orders, it corresponds to the information processing task introduced in ref. 8. In the standard-circuit model this task cannot be carried out with a single use of each gate^{8}; this limitation is evident in all previous experimental investigations of commutation relations, which all used one gate at least twice^{21,22}. However, using the 2-SWITCH operation to apply *U*_{1} and *U*_{2} in a superposition of both orders allows us to distinguish whether the gates commute or anti-commute with only one use of each gate. To see this, consider using the 2-SWITCH operation in the circuit shown in Fig. 1d. Given that the 2-SWITCH applies *U*_{1}*U*_{2} if the upper qubit is in and *U*_{2}*U*_{1} if upper qubit is in , it is straightforward to show that, when the input to the circuit is initially in the state (where is an arbitrary state of qubit 2), the result (after performing a Hadamard gate on the control qubit, and before measuring it) is the state

In equation (1), [*U*_{1}, *U*_{2}] and {*U*_{1}, *U*_{2}} are the commutator and anti-commutator of *U*_{1} and *U*_{2}, respectively. Given the guarantee of either commutation or anti-commutation, if the upper qubit is measured and found in we know for certain that the gates commute; on the other hand, if it is found in we know for certain that the gates anti-commute. Thus one can unambiguously distinguish between the two cases. Note that, although Fig. 1d shows the 2-SWITCH operation as a gate in a quantum circuit, it cannot be implemented by querying *U*_{1} and *U*_{2} only once in a fixed order.

### Experimental implementation

Although creating superpositions of circuits is a conceptually simple idea, it is not immediately clear how it could be carried out in the laboratory. The most obvious solution is to place the physical circuit elements—such as wires or optical fibres connecting the gates—in a quantum superposition. However, this would require quantum control over macroscopic systems, and is likely to remain unattainable in the foreseeable future. Instead, we use additional degrees of freedom of our qubits to control the order with which they traverse the gates. Note that other implementations have been independently proposed, both making use of internal degrees of freedom (G. Chiribella, R. Ionicioiu, T. Jennewein and D. Terno, personal communication, July 2012)^{10,23,24}, and in adiabatic quantum computing^{25}. The internal degrees of freedom could be any degrees of freedom of the physical system that the qubits are encoded in. For example, trapped ions possess many electronic and vibrational modes, many of which could be suitably controlled^{23}. In our experiment, we use a spatial degree of freedom of photonic qubits to create a superposition of different gate orders acting on a qubit encoded in the photon's polarization. While the use of multiple degrees of freedom of a single photon is a well-known tool in photonic-quantum computing^{26,27,28,29,30,31,32}, our work is the first experimental demonstration which uses this tool to superimpose quantum gate orders. Furthermore, using controlled-path gates^{31}, which coherently place a photon in one of two paths dependent on the state of another photon, our technique would form the basis of a 2-SWITCH operation between two different photons, making it possible to create multi-particle circuits with no fixed-gate order.

At the centre of our implementation is a Mach–Zehnder interferometer with a loop in each arm (see Fig. 2), which allows us to create the required superposition of gate orders. In particular, it enables one qubit (qubit 1 of the circuit in Fig. 1d), encoded in a spatial degree of freedom of the photon, to coherently control the order in which two gates are applied to another qubit (qubit 2 of Fig. 1d), encoded in the photon's polarization. We choose to use a spatial degree of freedom as control (that is different than previous theoretical work which proposed using polarization as control^{10,23}) since it proved to be much more stable experimentally. Briefly, a single photon is sent to a 50/50 beamsplitter, which creates the spatial qubit: if transmitted, and if reflected. The unitary gates *U*_{1} and *U*_{2} are implemented on the polarization state of the same photon using a set of waveplates. Now, dependent on whether the photon is reflected or transmitted, the polarization qubit will see either *U*_{1}*U*_{2} or *U*_{2}*U*_{1}. The two paths then coherently recombine on a final 50/50 beamsplitter (enacting the Hadamard gate shown in Fig. 1c). Finally, simply measuring the state of the spatial qubit (that is, whether the photon exits port 0 or 1 of the final beamsplitter) tells us if *U*_{1} and *U*_{2} commute or anti-commute.

Before continuing, we must specify what constitutes a ‘gate use’ in a photonic experiment. In accordance with previous work^{10,23}, we define a single gate use as a single photon passing through a single physical copy of a gate. This definition is well motivated, since it quantifies both the number of physical devices required, and the experimental cost of rerouting photons through the same gate at a later time. If we imagine affixing counters to each set of waveplates, which increment every time a photon passes by, then we can read the number of uses of a gate directly off of the counter. Note that such a counter system will factorize out, and thus will not destroy the interference^{10}. In this hypothetical situation, each time a photon passes through our experiment the counters of *U*_{1} and *U*_{2} will always read 1. Thus, by this definition, we use each gate once in our experiment.

### Data for sets of Pauli gates

To verify the successful implementation of this protocol we tested its performance on a number of representative unitary gates. The first set of gates we tested were the four Pauli gates (including identity), . The Pauli gates have simple commutation and anti-commutation relationships: each gate only commutes with itself and identity, and anti-commutes with the other gates. For example, *σ*_{x} commutes with and *σ*_{x}, and anti-commutes with *σ*_{y} and *σ*_{z}. Thus, setting *U*_{1}=*σ*_{x} means that when *U*_{2} is set to either or *σ*_{x} the photon will always exit port 0. On the other hand, if *U*_{2} is set to *σ*_{y} or *σ*_{z}, the photon should always exit port 1.

To acquire data, *U*_{1} and *U*_{2} were first set to identity so that the phase of the interferometer could be set to *π*; this was carried out using a piezo-driven mirror (in Fig. 2). Then *U*_{1} and *U*_{2} could be set to any desired single-qubit unitary gate by setting the waveplate angles appropriately (See Supplementary Note 1 and Supplementary Table 1). For the Pauli-gate data, we cycled *U*_{1} and *U*_{2} through all 16 possible permutations and monitored the photon counts out of each port of the final beamsplitter. For every Pauli-gate combination, the probability for the photons to exit each port was estimated (see the Methods Section for details, including a discussion of the error bars). The resulting probabilities are plotted in Fig. 3. When the gates commute, we expect all of the photons to exit port 0, while if they anti-commute they should all exit port 1. Our observed data agrees very well with this prediction. For the Pauli gates, we were able to successfully determine whether a pair of gates commuted or anti-commuted with a success rate (probability to exit the ‘correct port’) of 0.973±0.016. For this data, the initial polarization state was , but, as we verified experimentally, the protocol is independent of the polarization (see Supplementary Note 2 and Supplementary Fig. 1).

### Comparison with the best fixed-order quantum circuit

Without using a superposition of different quantum circuits, it is impossible to perfectly determine if two gates commute or anti-commute with a single use of each gate^{8}. However, it has not been appreciated before that, using a fixed-order quantum circuit, this task can be accomplished probabilistically. In the Supplementary Note 3 we present a calculation, based on the ‘quantum comb’ formalism^{33,34,35}, showing that the maximum average success rate is 0.9288 (the full derivation is explicitly made another publication^{36}). To rigorously compare our protocol to such a quantum circuit, we randomly generated 50 pairs of commuting gates and 50 pairs of anti-commuting gates (see the Methods Section D) and we tested our protocol with each pair. A subset of the data for these gates is plotted in Fig. 4, and the full data set in presented in Supplementary Fig. 2. The success rate of our protocol over the 100 pairs of commuting and anti-commuting gates is 0.976±0.015, which surpasses the fixed-order bound by more than three s.d.

## Discussion

Our experiment also has implications, in the broader context, for the study of causal structures in quantum mechanics, a topic that has recently received increasing theoretical^{6,7,37} and experimental^{38,39} attention. Traditionally, space-time events are defined with respect to some coordinate system, which describes a given underlying space-time. If we attach some fixed space-coordinates to the waveplates of our interferometer, one can say that there are two different times at which each photon can undergo the corresponding operation. In this perspective, one would describe the experiment in terms of four space-time events (in our experiment these would be: *U*_{1} first, *U*_{2} second, *U*_{1} second and *U*_{2} first), whose causal order is determined by the underlying classical space-time. Note, however, that any attempt to physically distinguish the two times at which a photon can pass through a gate would reveal which-way information and thus destroy the interference. The results of the experiment confirm that such information is not available anywhere and that the interpretation of the experiment in terms of four, causally-ordered events cannot be given any operational meaning. If, on the other hand, one requires events to be defined operationally, in terms of measurable interactions with physical systems (as in the hypothetical photon-counter example discussed above), then the experiment should be described in terms of only two events—a single use of each of the two gates. Thus we can take the interference in our experiment to demonstrate that the two events cannot be ordered according to any definite causal relation; in this sense, our experiment can be seen as the first realization of a ‘superposition of causal orders’. Indeed, it is shown elsewhere^{36} that the 2-SWITCH realized here corresponds to an example of a causally non-separable process, as defined in ref. 5.

In conclusion, we have shown how to use additional degrees of freedom of the physical system encoding a quantum system to apply quantum operations without a fixed, definite causal order. This allowed us to accomplish a task which is impossible with a fixed order of operations. Our demonstration of superimposed quantum circuits illustrates that removing the requirement of a fixed-gate order can provide quantum algorithms with real practical advantages and it shows a feasible way to obtain this advantage.

## Methods

### Single-photon source

The source generated photon pairs, in a separable polarization state, by means of the process of spontaneous parametric down conversion using a Sagnac loop^{40,41}. The Sagnac loop was built using a dual-wavelength polarizing beamsplitter and two mirrors. A type-II collinear periodically-poled Potassium Titanyl Phosphate crystal of length 20 mm was placed inside the loop and pumped by a 23.7 mW diode laser centred at 395 nm. Photon pairs were created at degenerate wavelength 790 nm. We set the pump beam polarization to be horizontal to generate the down-converted photons in a separable polarization state . The dichroic mirror transmited the pump beam and reflected the down-converted photons, and the half waveplate (HWP) and quarter waveplate (QWP) were used to adjust the polarization of the pump beam. Long and narrow band pass filters blocked the pump beam and selected the desired down-converted wavelength. Polarizers were aligned to transmit only down-converted photons with the desired polarization. After this, the down-converted photon pairs were coupled into single-mode fibres, and one photon from the pair was used as a herald while the other single photon was sent to our interferometer using a fibre collimator.

### Optical implementation

We implemented our protocol using a Mach–Zehnder interferometer with two symmetric arm loops, see Fig. 2b. After the first beamsplitter, the reflected and transmitted beams were sent to a different combination of waveplates which formed the unitary gates. The symmetric loops were built to have the same input direction through the unitary gates for both the transmitted and reflected beams; that is, the photons always traversed the waveplates in the same direction, regardless of whether they saw *U*_{1} or *U*_{2} first. After this, the two paths were recombined on the second beam splitter. For the reflected beam, a HWP at 0° was used before the waveplates implementing *U*_{2} to ensure that the polarization state of the reflected and transmitted paths was the same before the unitary gates; this was required because the reflected path picked up a reflection phase not seen by the transmitted mode. Another a HWP at 0° was used in the transmitted arm after *U*_{2} to compensate the reflection from the second beamsplitter.

After the interferometer, the photons exiting port 0 and 1 were coupled into single-mode fibres. Then, the single photons were detected using avalanche photodiodes which were connected to a home-built coincidence counter based on Spartan 3E FPGA to register two-photon events between either port and the heralding photon. Since the coupling efficiency of each port and the detection efficiency of each avalanche photodiodes were slightly different we had to correct for this to calculate the probabilities reported in Figs 3 and 4. To perform this correction, we varied the phase of the interferometer to send all of the photons from port 0 to port 1, and we recorded the counts out of port 0 (*C*_{0}) and the counts out of port 1 (*C*_{1}) as the phase was varied. We then computed an efficiency factor *η*, such that *C*_{0}+*C*_{1}/*η* was constant. We found that *η* was typically around 0.7, but its exact valued varied because the coupling efficiencies changed slightly from one day to the next. Using this, we estimated the probability to exit port 0 as *P*_{0}=*C*_{0}/(*C*_{0}+*C*_{1}/*η*), and the probability to exit port 1 as *P*_{1}=1−*P*_{0}.

The visibility of the interferometer was 99.4±0.2 with a phase drift <9 mrad min^{−1}. A complete data set (20 waveplate settings) was acquired in ∼2 min (1 s of data was taken at each setting, so the majority of the time was spent moving waveplates). The observed phase drift would lead to a negligible error (of only ≈0.02%) over the 2-min measurement time. At each setting ∼40,000 photon pairs were observed. The error bars were estimated by performing each measurement five times and observing the s.d.. Each measurement setting had a slightly different s.d., but for convenience we took the largest s.d. as the error bar for each measurement setting. The dominant contribution to these fluctuations was a phase drift caused by rotating the waveplates, and the Poissonian error bars (due to 40,000 counts) are much smaller than these observed fluctuations.

### Polarization unitary gates

It is well known that the combination of three waveplates (in a quarter-half-quarter configuration) can implement an arbitrary single-qubit polarization gate. Since this method is completely general, we used it to implement each of the two unitary gates *U*_{1} and *U*_{2}. Each of the six waveplates were mounted using a motorized rotation mount, which allowed the unitary gates to be set remotely while only minimally disturbing the phase of the interferometer. However, we still found a slight systematic phase drift when the waveplates were rotated. We attributed this to slightly ‘wedged’ shaped waveplates, which could change the optical path of each interferometer arm differently. For our waveplates (true-zero order waveplates from Special Optics, which were the most parallel waveplates we tested), we observed a maximum phase drift of 0.002 rad per deg of waveplate rotation. The waveplate angles used to implement the different polarization gates are tabulated in Supplementary Tables 1 and 2. On average, setting the six waveplates to implement a specific *U*_{1} and *U*_{2} required a total rotation of ≈45°; this would introduce a systematic error in the phase of the interferometer of ∼0.009 rad and an additional error onto our measured probabilities of 0.4%.

### Generating commuting and anti-commuting pairs of gates

We tested our protocol on 50 randomly chosen pairs of commuting gates and on 50 randomly chosen pairs of anti-commuting gates. To generate these gates we followed a very simple protocol. First, we randomly chose a unitary gate from the Haar measure. Next, to generate two anti-commuting gates *A*_{1} and *A*_{2}, we set *A*_{1}=*σ*_{z}^{†} and *A*_{2}=*σ*_{y}^{†} (where *σ*_{y} and *σ*_{z} are Pauli gates). Then, two commuting gates were defined from as

and

where *θ*_{1} and *θ*_{2} were also chosen randomly (we selected them from a uniform distribution between 0 and 2*π*). After this we computed the waveplate angles required to implement *C*_{1}, *C*_{2}, *A*_{1} and *A*_{2} (these angles are listed Supplementary Table 2).

## Additional information

**How to cite this article:** Procopio, L. M. *et al*. Experimental superposition of orders of quantum gates. *Nat. Commun.* 6:7913 doi: 10.1038/ncomms8913 (2015).

## References

- 1.
Deutsch, D. Quantum computational networks.

*Proc. R. Soc. Lond A Math. Phys. Sci.***425**, 73–90 (1989). - 2.
Nielsen, M. A. & Chuang, I. L.

*Quantum Computation and Quantum Information*1st ed. Cambridge University Press (2000). - 3.
Aharonov, Y.

*et al.*Superpositions of time evolutions of a quantum system and a quantum time-translation machine.*Phys. Rev. Lett.***64**, 2965–2968 (1990). - 4.
Chiribella, G.

*et al.*Quantum computations without definite causal structure.*Phys. Rev. A.***88**, 022318 (2013). - 5.
Oreshkov, O.

*et al.*‘Quantum correlations with no causal order,’.*Nat. Commun.***3**, 1092 (2012). - 6.
Hardy, L. Quantum gravity computers: On the theory of computation with indefinite causal structure. in

*Quantum Reality, Relativistic Causality, and Closing the Epistemic Circle*379–401Springer (2009). - 7.
Rudolph., T. Quantum causality: information insights.

*Nat. Phys.***8**, 860–861 (2012). - 8.
Chiribella., G. Perfect discrimination of no-signalling channels via quantum superposition of causal structures.

*Phys. Rev. A.***86**, 040301 (2012). - 9.
Brukner, Č. Quantum causality.

*Nat. Phys.***10**, 259–263 (2014). - 10.
Araújo, M.

*et al.*Computational advantage from quantum- controlled ordering of gates.*Phys. Rev. Lett.***113**, 250402 (2014). - 11.
Cirac, J. I. & Zoller, P. Quantum computations with cold trapped ions.

*Phys. Rev. Lett.***74**, 4091 (1995). - 12.
DiCarlo, L.

*et al.*Demonstration of two-qubit algorithms with a superconducting quantum processor.*Nature***460**, 240–244 (2009). - 13.
Martin-Lopez, E.

*et al.*Experimental realization of shor's quantum factoring algorithm using qubit recycling.*Nat. Photonics***6**, 773–776 (2012). - 14.
Barz, S.

*et al.*A two-qubit photonic quantum processor and its application to solving systems of linear equations.*Sci. Rep.***4**, 6115 (2014). - 15.
Raussendorf, R. & Briegel, H. J. A one-way quantum computer.

*Phys. Rev. Lett.***86**, 5188 (2001). - 16.
Raussendorf, R.

*et al.*Measurement-based quantum computation on cluster states.*Phys. Rev. A.***68**, 022312 (2003). - 17.
Walther, P.

*et al.*Experimental one-way quantum computing.*Nature***434**, 169–176 (2005). - 18.
Prevedel, R.

*et al.*High-speed linear optics quantum computing using active feed-forward.*Nature***445**, 65–69 (2007). - 19.
Colnaghi, T.

*et al.*Quantum computation with programmable connections between gates.*Phys. Lett. A.***376**, 2940–2943 (2012). - 20.
Andersson, E.

*et al.*Comparison of unitary transforms using franson interferometry.*J. Mod. Opt.***52**, 1485–1494 (2005). - 21.
Yao, X.-C.

*et al.*Experimental realization of programmable quantum gate array for directly probing commutation relations of pauli operators.*Phys. Rev. Lett.***105**, 120402 (2010). - 22.
Kim, Y.-S.

*et al.*Experimental verification of the commutation relation for pauli spin operators using single-photon quantum interference.*Phys. Lett. A.***374**, 4393–4396 (2010). - 23.
Friis, N.

*et al.*Implementing quantum control for unknown subroutines.*Phys. Rev. A***89**, 030303 (2014). - 24.
Rambo, T.

*et al.*Functional quantum computing: An optical approach, Preprint at http://arxiv.org/abs/1211.1257 (2012). - 25.
Nakago, K.

*et al.*Parallelized adiabatic gate teleportation, Preprint at http://arxiv.org/abs/1310.4061 (2013). - 26.
Englert, B.-G.

*et al.*Universal unitary gate for single-photon two-qubit states.*Phys. Rev. A.***63**, 032303 (2001). - 27.
Barreiro, J. T.

*et al.*Generation of hyperentangled photon pairs.*Phys. Rev. Lett.***95**, 260501 (2005). - 28.
Barreiro, J. T.

*et al.*Beating the channel capacity limit for linear photonic superdense coding.*Nat. Phys.***4**, 282–286 (2008). - 29.
Lanyon, B. P.

*et al.*Simplifying quantum logic using higher-dimensional Hilbert spaces.*Nat. Phys.***5**, 134–140 (2009). - 30.
Gao, W.-B.

*et al.*Experimental demonstration of a hyper-entangled ten-qubit Schrodinger cat state.*Nat Phys.***6**, 331–335 (2010). - 31.
Zhou, X.-Q.

*et al.*Adding control to arbitrary unknown quantum operations.*Nat. Commun.***2**, 413 (2011). - 32.
Rozema, L. A.

*et al.*Quantum data compression of a qubit ensemble.*Phys. Rev. Lett.***113**, 160504 (2014). - 33.
Chiribella, G.

*et al.*Quantum Circuit Architecture.*Phys. Rev. Lett.***101**, 060401 (2008). - 34.
Gutoski, G. & Watrous, J. Toward a general theory of quantum games. in

*Proceedings of the thirty-ninth annual ACM symposium on Theory of computing*565–574ACM (2007). - 35.
Chiribella, G. Optimal networks for quantum metrology: semidefinite programs and product rules.

*New. J. Phys.***14**, 125008 (2012). - 36.
Araujo, M.

*et al.*Witnessing causal nonseparability, Preprint at http://arxiv.org/abs/1506.03776 (2015). - 37.
Wood, C. J. & Spekkens, R. W. The lesson of causal discovery algorithms for quantum correlations: causal explanations of bell-inequality violations require fine-tuning.

*New. J. Phys.***17**, 033002 (2015). - 38.
Fitzsimons, J.

*et al.*Quantum correlations which imply causation, Preprint at http://arxiv.org/abs/1302.2731 (2013). - 39.
Ried, K.

*et al.*A quantum advantage for inferring causal structure.*Nat. Phys.***11**, 414–420 (2015). - 40.
Taehyun, K.

*et al.*Phase-stable source of polarization-entangled photons using a polarization sagnac interferometer.*Phys. Rev. A.***73**, 012316 (2006). - 41.
Fedrizzi, A.

*et al.*A wavelength-tunable fiber-coupled source of narrowband entangled photons.*Opt. Express.***15**, 15377–15386 (2007).

## Acknowledgements

We thank T. Batalhão, A. Feix, C. Greganti, F. Massa for stimulating discussions, and T. Rögelsperger and J. Thomson for assisting with the figures. We acknowledge support from the European Commission, QUILMI (No. 295293), EQUAM (No. 323714), PICQUE (No. 608062), GRASP (No.613024), QUCHIP (No.641039), and RAQUEL (No. 323970); the Austrian Science Fund (FWF) through START (Y585-N20), the doctoral programme CoQuS, and Individual Project (No. 2462); the Vienna Science and Technology Fund (WWTF, grant ICT12-041); the United States Air Force Office of Scientific Research (FA8655-11-1-3004); the John Templeton Foundation; and the Foundational Questions Institute (FQXi). L.M.P. acknowledges partial support from CONACYT-México. L.A.R was partially funded by a Natural Sciences and Engineering Research Council of Canada (NSERC) Postdoctoral Fellowship, and E.G.D. was partially funded by the Herchel Smith—Harvard Undergraduate Research Fellowship.

## Author information

## Author notes

- Fabio Costa

Present address: Centre for Engineered Quantum Systems, School of Mathematics and Physics, The University of Queensland, St Lucia, QLD 4072, Australia

- Emma G. Dowd

Present address: Department of Physics, Harvard University, Cambridge, MA

- Deny R. Hamel

Present address: Département de physique et d'astronomie, Université de Moncton, Moncton, New Brunswick E1A 3E9, Canada

## Affiliations

### Faculty of Physics, University of Vienna, Boltzmanngasse 5, Vienna A-1090, Austria

- Lorenzo M. Procopio
- , Amir Moqanaki
- , Mateus Araújo
- , Fabio Costa
- , Irati Alonso Calafell
- , Emma G. Dowd
- , Deny R. Hamel
- , Lee A. Rozema
- , Časlav Brukner
- & Philip Walther

### Institute for Quantum Optics and Quantum Information, Austrian Academy of Sciences, Boltzmanngasse 3, Vienna A-1090, Austria

- Mateus Araújo
- , Fabio Costa
- & Časlav Brukner

## Authors

### Search for Lorenzo M. Procopio in:

### Search for Amir Moqanaki in:

### Search for Mateus Araújo in:

### Search for Fabio Costa in:

### Search for Irati Alonso Calafell in:

### Search for Emma G. Dowd in:

### Search for Deny R. Hamel in:

### Search for Lee A. Rozema in:

### Search for Časlav Brukner in:

### Search for Philip Walther in:

### Contributions

L.M.P., A.M., and L.A.R. designed and built the final experiment, collected the data, and performed the final analysis. L.M.P., I.A.C., E.G.D., A.M. and D.R.H. designed and built an early version of the experiment. P.W. designed the experiment and supervised the project. M.A., F.C, and C˘.B. provided the theoretical analysis and the concept for the experiment. All authors contributed to the writing of the final manuscript.

### Competing interests

The authors declare no competing financial interests.

## Corresponding authors

Correspondence to Lorenzo M. Procopio or Philip Walther.

## Supplementary information

## PDF files

- 1.
### Supplementary Information

Supplementary Figure 1-3, Supplementary Tables 1-2, Supplementary Notes 1-3 and Supplementary References

## Rights and permissions

This work is licensed under a Creative Commons Attribution 4.0 International License. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in the credit line; if the material is not included under the Creative Commons license, users will need to obtain permission from the license holder to reproduce the material. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/

## About this article

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.