# Experimental superposition of time directions

Teodor Strömberg<EMAIL_ADDRESS>Peter Schiansky  University
of Vienna, Faculty of Physics & Vienna Doctoral School in Physics,
Boltzmanngasse 5, A-1090 Vienna, Austria  Marco Túlio Quintino  University of
Vienna, Faculty of Physics & Research Network Quantum Aspects of Space Time
(TURIS), Boltzmanngasse 5, 1090 Vienna, Austria  Institute for Quantum Optics
and Quantum Information, Boltzmanngasse 3, 1090 Vienna, Austria  Sorbonne
Université, CNRS, LIP6, F-75005 Paris, France  Michael Antesberger  University
of Vienna, Faculty of Physics & Vienna Doctoral School in Physics,
Boltzmanngasse 5, A-1090 Vienna, Austria  Lee Rozema  University of Vienna,
Faculty of Physics & Research Network Quantum Aspects of Space Time (TURIS),
Boltzmanngasse 5, 1090 Vienna, Austria  Iris Agresti  University of Vienna,
Faculty of Physics & Research Network Quantum Aspects of Space Time (TURIS),
Boltzmanngasse 5, 1090 Vienna, Austria  Časlav Brukner  Institute for Quantum
Optics and Quantum Information, Boltzmanngasse 3, 1090 Vienna, Austria
University of Vienna, Faculty of Physics & Research Network Quantum Aspects of
Space Time (TURIS), Boltzmanngasse 5, 1090 Vienna, Austria  Philip Walther
<EMAIL_ADDRESS>University of Vienna, Faculty of Physics &
Research Network Quantum Aspects of Space Time (TURIS), Boltzmanngasse 5, 1090
Vienna, Austria

###### Abstract

In the macroscopic world, time is intrinsically asymmetric, flowing in a
specific direction, from past to future. However, the same is not necessarily
true for quantum systems, as some quantum processes produce valid quantum
evolutions under time reversal. Supposing that such processes can be probed in
both time directions, we can also consider quantum processes probed in a
coherent superposition of forwards and backwards time directions. This yields
a broader class of quantum processes than the ones considered so far in the
literature, including those with indefinite causal order. In this work, we
demonstrate for the first time an operation belonging to this new class: the
quantum time flip. Using a photonic realisation of this operation, we apply it
to a game formulated as a discrimination task between two sets of operators.
This game not only serves as a witness of an indefinite time direction, but
also allows for a computational advantage over strategies using a fixed time
direction, and even those with an indefinite causal order.

##  I Introduction

In recent years, the framework of quantum theory has been generalised to
describe agents interacting through quantum processes with indefinite causal
orders [1, 2, 3]. These processes have been realised experimentally using
photonic platforms [4, 5, 6, 7, 8], thereby witnessing the implementation of
causally non-separable series of events. Remarkably, these are not the most
general processes allowed by quantum mechanics. Take, for example, the quantum
SWITCH [2]: even though the causal order of the constituent events is
indefinite, each operation is accessed only in a single time direction. By
considering processes where the time direction of the underlying operations is
indefinite, one can go beyond the framework of indefinite causality. Indeed, a
quantum superposition of evolutions with opposite thermodynamic arrows of time
was first proposed in [9]. By associating the “forwards” temporal direction
with a positive change in the entropy generated in a thermodynamic process,
and its “time-reversing” counterpart with a negative change, the corresponding
superposition of processes exhibits a quantum-mechanically undefined
thermodynamic arrow of time.

More generally, processes with an indefinite time direction can be studied by
considering operations that exhibit a time symmetry; these operations admit a
change of reference frame that yields a valid quantum evolution in which the
time coordinate is inverted. Unitary channels are an example of such
operations, and in particular they admit the following time-reversal
symmetries: for every evolution $U$, both the inverse $U\to U^{\dagger}$ and
the transpose $U\to U^{T}$ are valid time-reversal operations.

Given quantum operations that can in principle be accessed in both time
directions, we can consider coherent superpositions of transformations made in
the forwards and backwards time-directions. This amounts to a new kind of
process, which we will refer to as being inseparable in the arrow of time, an
example of which - called the quantum time flip \- was recently introduced in
Ref. [10].

Figure 1: Time-reversal and the quantum time flip. (a) The forwards (top) and
backwards (bottom) directions of the same time-evolution are shown in yellow
and blue, respectively. The backwards time-evolution is given by some function
$f$ of the forwards evolution, and decomposing the total time evolution into
steps shows that $f$ must be order reversing. The inverse and transpose are
examples of such order reversing functions. (b) Quantum gates are often
modelled as black boxes with an input and an output. In this work, we consider
black boxes that can be accessed in two different directions, producing either
the forwards or backwards time-evolution depending on which direction the box
is accessed in. Here, the backwards time-evolution is taken to be the
transpose. (c) A control degree of freedom can be introduced to control in
which direction the black box is accessed. (d) By putting the control qubit in
a coherent superposition of the two states in (c) the box is accessed in a
superposition of both directions, and the input state is propagated in a
superposition of time directions. This is a realisation of the quantum time
flip. (e) The quantum time flip can be applied to more than a single gate.
This figure illustrates a scenario where two gates are accessed in a
superposition of orders, in which they always have the opposite time
directions. As described in the main text, this use of two quantum time flips
can yield a computational advantage.

This process cannot be realised within the quantum circuit model. In this work
we nevertheless present a photonic implementation of the quantum time flip by
exploiting device dependent symmetries of our experimental apparatus. A
quantum state undergoing a time evolution is encoded in the polarization
degree of freedom of a single photon, while a control qubit determining the
time direction is encoded in its path degree of freedom. We show that
polarization operations with waveplates naturally implement different time
directions for forwards and backwards propagation directions through the
waveplates, given the correct Stokes-parameter convention. This results in a
deterministic time-reversal, in contrast to more general approaches which may
involve multiple uses of the input operation in combination with probabilistic
or non-exact methods [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]. We can
furthermore realise the quantum time flip deterministically by passing the
photon through the waveplates in a superpositon of the two propagation
directions.

We certify the indefinite time direction by demonstrating an information-
theoretic advantage of the quantum time flip in the context of a computational
game. In this setting, the quantum time flip not only outperforms strategies
that utilise operations with a fixed time direction, but even strategies that
exploit operations with an indefinite causal order [4, 21].

##  II Quantum circuits, unitary transposition, and processes with indefinite
time direction

The standard quantum circuit formalism provides solid grounds for quantum
computing and forms the basis for quantum complexity theory [22, 23]. However,
it also imposes limitations on how we apply quantum theory. In a circuit,
operations necessarily respect a definite causal order and the strict notion
of input and output. The existence of time reversal processes such as unitary
transposition is forbidden by the standard circuit formalism when given access
to one [15, 16] or even two [10] uses of an unknown unitary. However, for
practical and foundational reasons, researchers have been designing and
pursuing non-exact and probabilistic schemes aimed towards this goal [11, 12,
13, 15, 14, 16, 17, 18, 19]. Remarkably, a very recent work shows that in the
qubit case, when four uses of the input operation are available, there exists
a quantum circuit to invert arbitrary unitary operations [20].

In quantum theory, reversible operations are described by unitary operators.
Processes which reverse a composition of such operations may be expressed by a
function $f$ satisfying:

$f(UV)=f(V)f(U),\quad\forall U,V,$ (1)

for all unitary operators $U$ and $V$ (see Fig. 1). Under natural assumptions,
it can be proven that, up to a unitary transformation, there are only two time
reversal functions $f$, unitary transposition $f(U)=U^{T}$ and unitary
inversion $f(U)=U^{-1}$ [10]. For two-dimensional systems, unitary
transposition and unitary inversion are unitarily equivalent via a Pauli
$\sigma_{Y}$ operation. This follows from the identity,
$U^{-1}=\sigma_{Y}U^{T}\sigma_{Y}$ which holds for all operators
$U\in\mathcal{SU}(2)$. Hence, for qubits, universal unitary transposition is
possible if and only if unitary inversion is possible.

Figure 2: Classes of game strategies. The figure depicts different strategies
for the game described in the main text and their corresponding maximum
winning probabilities $p$. These strategies differ in how they are able to
access the gates picked by the referee. The strategies (a)-(c) are shown here
in the forwards time direction, but are also valid in the backwards time
direction in which both gates are transposed. Each subsequent strategy is
strictly better than the previous one, and only players who have access to a
quantum time flip process can win the game with unity probability. (a)
Parallel gate order. (b) Causally ordered gate sequence. (c) Process without a
definite causal order. (d) Quantum time flip.

When focusing on a particular physical implementation, the general aspects of
the standard quantum circuit formalism may limit our view and lead to an
apparent mismatch between theory and practice. A known illustrative example is
the universal coherent control of unitary operations, where an arbitrary
unitary $U$ is applied to the target system conditional on the state of a
control qubit:
$U\mapsto\mathbb{1}\otimes\outerproduct{0}{0}_{C}+U\otimes\outerproduct{1}{1}_{C}$.
While it is not possible to design a quantum circuit to perform universal
control, a simple Mach-Zehnder optical interferometer can be used for this
task [24, 25, 26]. Indeed, experimental control of black box quantum gates has
been demonstrated [27, 28]. Such experimental implementations exploit the
knowledge of the position of the physical device performing the gate,
circumventing this apparent limitation imposed by the quantum circuit
formalism.

Although time reversal processes such as unitary transposition are not
possible within the standard circuit formalism when given access to one [15,
16] or even two [10] uses of an unknown unitary, in this work we implement
general qubit unitary transposition, as well as the quantum time flip process,
using a particular optical construction. Similar to the case of universal
coherent control, we make use of knowledge about our specific experimental
apparatus and realise a gadget implementing an arbitrary unitary $U$ which may
be used in two different directions. In the ‘forwards’ direction, this gadget
implements the standard $U$, while in the ‘backwards’ one it has the effect of
the transposed operation $U^{T}$.

Moreover, in addition to “simply” reversing a quantum evolution, we also
coherently superpose the forwards and backwards time evolutions, and in so
doing perform an optical implementation of a process with an indefinite time
direction [10], i.e. one which cannot be described as a convex mixture of
processes where time flows forwards and processes where time flows backwards.
The process that we implement optically is the quantum time flip for unitary
transposition, a process which acts on unitary operations as:

$U\mapsto
U\otimes\outerproduct{0}{0}_{C}+U^{T}\otimes\outerproduct{1}{1}_{C}.$ (2)

We then compose the time flip process of Eq. (2) with its flipped version,
$V\mapsto
V^{T}\otimes\outerproduct{0}{0}_{C}+V\otimes\outerproduct{1}{1}_{C}$, to
obtain a process which acts on a pair of unitary operators as:

$(U,V)\mapsto
UV^{T}\otimes\outerproduct{0}{0}_{C}+U^{T}V\otimes\outerproduct{1}{1}_{C}.$
(3)

In addition to having an indefinite time direction, the process described in
Eq. (3) cannot be described by general process matrices with indefinite
causality such as the quantum switch [2] or the Oreshkov-Costa-Brukner (OCB)
process [3]. In the next section, we will explain how to witness this
property.

##  III Game description

We now describe a discrimination task, first introduced in Ref. [10], where
the quantum time flip process will be used as a resource to increase our
performance. In this game, a referee provides the player with two black box
unitaries, $U$ and $V$, belonging to either the set $\mathcal{M}_{+}$ or
$\mathcal{M}_{-}$, which are known to respect the property:

$\displaystyle\mathcal{M}_{+}:=$
$\displaystyle\Big{\\{}(U,V):UV^{T}=+U^{T}V\Big{\\}}$ (4)
$\displaystyle\mathcal{M}_{-}:=$
$\displaystyle\Big{\\{}(U,V):UV^{T}=-U^{T}V\Big{\\}}.$ (5)

The player is then challenged to determine which of the two sets the gates
were picked from, while only being allowed to access each of the black boxes
once.

As discussed in the previous section, a player able to perform the quantum
time flip may implement the process:

$(U,V)\mapsto
UV^{T}\otimes\outerproduct{0}{0}_{C}+U^{T}V\otimes\outerproduct{1}{1}_{C}.$
(6)

Consider as a strategy an initial state of the form
$|\psi\rangle_{T}\otimes|+\rangle_{C}$, where
$|\pm\rangle_{C}=\frac{|0\rangle_{C}\pm|1\rangle_{C}}{\sqrt{2}}$,
$|\psi\rangle$ is an arbitrary state, and the subscripts $C$ and $T$ refer to
the control and target qubits. Sending this state through the gate in Eq. (6)
gives the state:

$\bigg{[}\frac{UV^{T}+U^{T}V}{2}\bigg{]}\ket{\psi}_{T}|+\rangle_{C}+\bigg{[}\frac{UV^{T}-U^{T}V}{2}\bigg{]}\ket{\psi}_{T}|-\rangle_{C}.$
(7)

Since the states $\ket{\pm}$ are orthogonal, a player using this strategy can
always correctly determine which set was chosen by the referee.

Figure 3: Experimental apparatus. (a) A type-II spontaneous parametric down-
conversion source generates frequency degenerate single-photon pairs at
$1546\text{\,}\mathrm{nm}$ in a ppKTP crystal (top). The signal photon is sent
to a heralding detector, while the idler photon is routed to a balanced bulk
beam-splitter and coupled into single-mode fiber. A piezo-electric actuator
attached to one of the fiber couplers allows for control over the
interferometric phase, and pairs of HWPs / QWPs are used for polarization
compensation through the fibers. After the initial beam-splitter two fiber
circulators guide the photon through the V-gadget. Propagating through the
gadget in the ‘forwards’ direction implements the unitary $V$, while
propagating ‘backwards’ has the effect of applying the transposed operation
relative to the ‘forward’ direction. One of the two paths through first the
gadget therefore results in the $V^{T}$ being applied instead of $V$. Two
additional circulators then route the photon through a gadget implementing $U$
($U^{T}$) in ‘forwards’ (‘backwards’) direction. Finally, the signal photon is
sent to a fiber beam-splitter, which applies a Hadamard gate on the path
degree of freedom, and correlates the two spatial output modes with the sets
$\mathcal{M}_{+}$, $\mathcal{M}_{-}$. Detection is performed by
superconducting nanowire single-photon detectors (SNSPDs) housed in a
$1\text{\,}\mathrm{K}$ cryostat. Additional QWP/HWP pairs are used to
compensate fiber-induced polarization rotations. (b) The fiber circulators
route the light from port $1\rightarrow 2$, from $2\rightarrow 3$ and block
light entering in port 3. The bidirectional boxes in Fig. 1 are realised using
sets of three waveplates. Depending on the propagation direction, they
implement either the unitary operation $U$/$V$ or $U^{T}$/$V^{T}$.

In contrast, players who do not have access to indefinite time strategies may
not be able to ascertain with certainty to which set a given pair of unitaries
$(U,V)$ belongs. In order to make this claim concrete, Ref. [10] considers a
particular game where the set $\mathcal{M}_{+}$ has 13 pairs of unitary
operators respecting $UV^{T}=+U^{T}V$, and $\mathcal{M}_{-}$ has 8 pairs of
unitary operators respecting $UV^{T}=-U^{T}V$; these two sets of unitary
operators are presented in the Methods. Here, we consider an average case
variation of the aforementioned game, which goes as follows: with uniform
probability $p=\frac{1}{13+8}$, the referee picks a pair of unitary operators
$(U,V)$ from $\mathcal{M}_{+}$ or $\mathcal{M}_{-}$ and lets the player make a
single use of each. We then consider the optimal success probability of
players who have access to different kinds of resources. As indicated by Eq.
(7), players who have access to the quantum time flip can always win with
unity probability. The three other classes of strategies, shown in Fig. 2,
only have access to a single time direction, forwards or backwards, and convex
combinations of these strategies will be called separable in the arrow of
time; a detailed mathematical characterisation of these strategies is
presented in the methods. Employing the computer-assisted proof methods of
Ref. [29] we obtain upper bounds on the maximal success probabilities for
players restricted to particular classes of strategies. The code for this is
openly available in our online repository, see Methods for details.

The first alternative strategy we consider is one in which the player is
restricted to using $U$ and $V$ in parallel, and this results in a maximal
success probability that is bounded by
${\frac{88}{100}\leq}p_{\text{par}}\leq\frac{89}{100}$. Next, we consider
players restricted to causally ordered strategies, whose maximal success
probability is found to be bounded by $\frac{90}{100}\leq
p_{\text{causal}}\leq\frac{91}{100}$. Finally, players given access to process
matrices with indefinite causality (also called indefinite testers [30]), but
with definite time direction, have their maximal success probability bounded
by $\frac{91}{100}<p_{\text{i.c.}}\leq\frac{92}{100}$. This game is hence an
example of a channel discrimination task with strict hierarchy between four
different classes of strategies. Additionally, while the operations selected
by the referee are treated as being fully characterised in the above analysis,
there are no assumptions made about the measurements performed by the player,
and these can be chosen freely. This is therefore an example of a semi-device-
independent certification of an indefinite causal order [31, 32] and
indefinite time direction.

##  IV Experiment

Our photonic implementation of the game described in the previous section
makes use of the quantum time-flip strategy from Eq. (7) to achieve a success
probability exceeding that of any strategy only using the gates in one time
direction. To coherently apply the quantum time flip, we employ polarization
optics in a partially common-path interferometer, depicted in Fig. 3, with the
control and target qubits being encoded in the path and polarization degrees
of freedom of a single-photon, respectively. Our experiment makes use of two
quantum time flips, sequentially applied to the two unitaries $V$ and $U$. The
resulting controlled channel is the one of Eq. (7) where the gates $UV^{T}$
and $U^{T}V$ act on the target (polarization) qubit and are implemented using
two Simon-Mukunda polarization gadgets consisting of three waveplates each
[33], for which the transpose operation is obtained by reversing the
propagation direction.

Such polarization gadgets generally do not realise the transpose operation in
the backwards propagation direction, but rather a related operation:

$U_{\mathrm{fw}}\rightarrow U_{\mathrm{bw}}=PU_{\mathrm{fw}}^{T}P^{\dagger},$
(8)

where $P$ is a matrix describing the change of reference frame to the
backwards direction, and the subscripts indicate the propagation direction.
While it is possible to construct a gadget that implements the transpose by
introducing time-reversal symmetry breaking elements (T. Strömberg, R.
Peterson, and P. Walther, SU(2) gadgets for counterpropagating polarization
optics, Manuscript under preparation), here we instead exploit the fact that
the transpose is a basis-dependent operation. More concretely, by adopting the
convention $(S_{1},S_{2},S_{3})\leftrightarrow(-Z,-Y,-X)$ for our Stokes
parameters [34] we find that $P=\mathbb{1}$, and the polarization gadgets
transform as the transpose under counterpropagation (see Methods).
Superimposing two propagation directions through a gadget therefore allows us
to implement the quantum time flip, with the photon path acting as a control
degree of freedom. The specific coherent superposition of time flips in Eq.
(3) is achieved through the use of fiber optic circulators.

The optical circuit in Fig. 3 begins with a bulk beam-splitter that
initializes the control qubit into the state
$\ket{+}_{C}=\frac{1}{\sqrt{2}}(\ket{0}_{C}+\ket{1}_{C})$, after which two
fiber circulators guide the photons through the $V$ gadget in two different
directions, giving the joint control-target state:

$\frac{1}{\sqrt{2}}(V\ket{\psi}_{T}\otimes\ket{0}_{C}+V^{T}\ket{\psi}_{T}\otimes\ket{1}_{C}).$
(9)

Entering the circulators from a different port, the photons are then directed
to the $U$ gadget, which they once again propagate through in opposite
directions, transforming the joint state to:

$\frac{1}{\sqrt{2}}(U^{T}V\ket{\psi}_{T}\otimes\ket{0}_{C}+UV^{T}\ket{\psi}_{T}\otimes\ket{1}_{C}).$
(10)

At the end of the optical circuit, a fiber beam-splitter applies a Hadamard
gate on the control qubit, giving the state:

$\small\bigg{[}\frac{UV^{T}+U^{T}V}{2}\bigg{]}\ket{\psi}_{T}|+\rangle_{C}+\bigg{[}\frac{UV^{T}-U^{T}V}{2}\bigg{]}\ket{\psi}_{T}|-\rangle_{C}.$
(11)

A projective measurement on the control (path) qubit in the computational
basis then reveals whether $(U,V)$ belong to $\mathcal{M}_{+}$ or
$\mathcal{M}_{-}$.

The partially common-path structure of the interferometer has two distinct
advantages: (1) photons in the two different propagation directions of the
interferometer hit exactly the same spots on the waveplates and the physical
symmetries of the gadget therefore ensures the faithful implementation of the
time flip independently of any imperfections in the waveplates, (2) the paths
traversed in both directions do not contribute any phase noise to the
interferometer, thereby simplifying the phase stabilization. More
specifically, only the paths connecting the two beam-splitters with the fiber
circulators, as well as the fibers directly between the circulators, add phase
noise to the interferometer. These fiber components, as well as the bulk beam-
splitter at the interferometer input, are housed in a thermally and
acoustically insulated box. The passive stabilization of these elements is
sufficient to bring the phase drift down to a value of approximately
$10\text{\,}\mathrm{mrad}\text{\,}{\mathrm{min}}^{-1}$. The use of a bulk-
beamsplitter at the input was chosen in order to balance the losses induced by
the fiber circulators through the free-space to fiber coupling, and to give
control over the interferometer phase through a piezo-electric actuator, while
the fiber beam-splitter at the output ensures perfect spatial mode overlap for
high interferometric visibility.

Figure 4: Unitary transposition infidelity. The yellow and blue bars indicate
the infidelity, $1-\mathcal{F}$, of the unitaries $U$ and $V$ from the sets
$\mathcal{M}_{+}$ and $\mathcal{M}_{-}$, measured in the forward propagation
direction, with respect to the transpose of the reconstructed unitary measured
in the backwards propagation direction. The standard deviation of the
infidelities is shown in light blue. Higher bars indicate a lower infidelity,
and therefore higher fidelity between the unitaries in the two propagation
directions. The average infidelity is $7.9\times 10^{-4}\pm 1.8\times 10^{-5}$
indicating that the gadgets faithfully implement the transpose and the base
unitary. The uncertainties were estimated using a Monte-Carlo simulation of
the tomography accounting for errors in the waveplate angles. We attribute the
residual errors to imperfect waveplate retardance in the tomography, and angle
differences between the setting of the forwards and backwards unitaries, since
in principle the gadgets perfectly implement the transpose of the unitary in
the forward direction. Figure 5: Experimental winning probabilities of the
quantum flip game. The figure shows the relative probability for a photon to
exit in a given port of the interferometer for all the pairs of unitaries in
the sets $\mathcal{M}_{+}$ and $\mathcal{M}_{-}$. For the gates in the set
$\mathcal{M}_{+}$ the game is won when the photon exits in the ’$+$’ port
(blue), whereas for the ones in the set $\mathcal{M}_{-}$ the correct outcome
is the ’$-$’ port. The observed average winning probability is $0.9945$. Since
the histogram corresponds to the actual number of times the different outcomes
were recorded there is no associated uncertainty.

##  V Results

Before demonstrating the quantum time flip in the context of the game, we
first verified the ability of a polarization gadget to implement both a
unitary and its transpose simultaneously, in the two different propagation
directions of the light. To this end, we performed quantum process tomography
on the implemented unitaries from the sets $\mathcal{M}_{+}$ and
$\mathcal{M}_{-}$, in both propagation directions. We then compared the
fidelity
$\mathcal{F}=\big{\langle}(U_{\text{fw}}|\Psi\rangle)^{\dagger}U_{\text{bw}}^{T}|\Psi\rangle\big{\rangle}_{\ket{\Psi}}$
between the reconstructed unitaries in the forward direction, $U_{\text{fw}}$
and $V_{\text{fw}}$, with the transposed reconstructed unitaries in the
backwards direction, $U_{\text{bw}}^{T}$ and $V_{\text{bw}}^{T}$ (see
Methods). The results of this are shown in Fig. 4, where the infidelity,
defined as $1-\mathcal{F}$, is plotted. The average infidelity is less than
$10^{-3}$, indicating that the gadgets correctly implement the unitaries and
their transpose. Note that the fidelity of the transpose is independent of any
errors in the retardance of the waveplates in the gadget itself. Such
imperfections would cause the fidelity in the implementation of a desired
unitary to drop, but would affect the forward and backward directions
symmetrically. The same is true for undesired offsets in the waveplate angles,
however in the measurements shown in Fig. 4 the unitaries in the two
directions were measured in separate runs, causing them to indeed be sensitive
to waveplate angle errors, in addition to errors in the tomography itself.

Having verified the ability to implement a given unitary and its transpose
with a single black box simultaneously, we then realised the game discussed in
the previous sections. Using a single photon for every round of the game, a
total of one million rounds were played. The data for the different elements
of $\mathcal{M}_{+}$ and $\mathcal{M}_{-}$ was collected sequentially to
reduce the time spent rotating the waveplates. The game itself was played
using the collected data by uniformly sampling from the two sets of unitaries
(see Methods). The relative winning probabilities for each setting are shown
in Fig.5, where it can be seen that our implementation exceeds the indefinite
tester bound of $0.92$ for every setting, and by extension any strategy that
is separable in the arrow of time. More specifically, the average winning
probability is found to be $0.9945$, with the best and worst case
probabilities being $0.9993$ and, $0.9860$ respectively.

The formulation of the indefinite-time-direction witness as a game with only
two outcomes, win or lose, allows for a straightforward statistical
interpretation of the results. Since we have an upper bound on the probability
of success for an indefinite tester, we can calculate the probability $P$ of
such a player having obtained $v$ or more victories in $N$ rounds:

$P=\sum_{k=v}^{N}\binom{N}{k}p_{\mathrm{i.c.}}^{k}(1-p_{\mathrm{i.c.}})^{N-k}.$
(12)

This probability is exactly the $P$-value for the experimentally implemented
process not being indefinite in its time direction. Out of the $N=10^{6}$
rounds played in the experiment, $v=994,512$ were won by successfully
identifying the correct set, while $5,488$ rounds were lost. Using a Chernoff
bound tailored for the binomial distribution, we can provide an upper bound on
the $P$-value, given by:

$\sum_{k=v}^{N}\binom{N}{k}p_{\mathrm{i.c.}}^{k}(1-p_{\mathrm{i.c.}})^{N-k}\leq\exp\left(-N\,D\left(\frac{v}{N}\big{|}\big{|}p_{\mathrm{i.c.}}\right)\right),$
(13)

where $\exp$ is the exponential function and:

$D\left(\frac{v}{N}\big{|}\big{|}p\right):=\frac{v}{N}\ln\left(\frac{v}{Np}\right)+\left(1-\frac{v}{N}\right)\ln\left(\frac{1-v/N}{1-p}\right)$
(14)

is the relative entropy. Direct calculation shows that
$D\left(\frac{v}{N}||p_{\mathrm{i.c.}}\right)\approx 0.0627$, hence the
$P$-value is upper bounded by $P\leq e^{-10^{4}}$, which is an extremely small
number. We therefore conclude that a strategy with a definite time direction
could not have produced as many wins as were observed, and the implemented
process was inseparable in its arrow of time.

##  VI Discussion

In this work we have demonstrated, for the first time, a process that is
inseparable in the arrow of time. Using an optical interferometer, we
implemented a coherent superposition of arbitrary unitary transformations and
their time-reversal. Such a process can only be probabilistically simulated by
a quantum circuit with a definite time direction. Even agents equipped with
two copies of the gates and able to combine them in an indefinite order cannot
realise the process deterministically, unless they are given the ability of
pre- and post-selecting quantum systems [35, 36, 2, 37, 38, 39, 40]. It is
worth noting that our implementation of controlled unitary transposition is
not in contradiction with the no-go theorem, stating that there is no quantum
circuit that can transform an unknown quantum unitary gate to its transpose
[10, 41, 15]. Analogously to the impossibility of perfect unitary coherent
control [10, 25, 28, 42], our implementation adopts a device that implements
an arbitrary gate $U$, and while this gate can remain unknown, the physical
device itself is neither arbitrary nor unknown. Indeed, it is the particular
symmetries of the physical device that necessarily and deterministically
generate the transposed gate $U^{T}$. Hence, in this context, our
demonstration highlights the limitations of the quantum circuit model for
describing the full range of quantum information processing protocols. Through
a channel discrimination game, in which we outperform any strategy with a
definite time direction, we furthermore certify that the coherent
superposition of time-directions yields a process that is inseparable in its
arrow of time.

Just as the study of indefinite causality led to the discovery and realisation
of quantum information protocols with practical advantages [43, 44], we
envision that future studies of processes with an indefinite time order will
expand both the theoretical and experimental toolkit, and open up new avenues
for quantum information processing. The experimental methods in this work
could, for instance, be used to implement transposed circuits of higher
dimension through the Reck scheme [45]. Finally, the investigation of time
reversed quantum processes also holds applications in quantum thermodynamics.
Indeed, in [10], it was shown that the processes for which the quantum time
flip produces another valid process are exactly those which do not increase
the entropy in either time direction, and the application of superpositions of
two time directions in the context of thermodynamic work was recently studied
in [9, 46].

## Acknowledgements

We thank Robert Peterson for fruitful discussions. This research was funded in
whole, or in part, by the Austrian Science Fund (FWF) through [F7113]
(BeyondC), [FG5] (Research Group 5) and [TAI 483]. For the purpose of open
access, the author has applied a CC BY public copyright licence to any Author
Accepted Manuscript version arising from this submission. M.T.Q. and C.B.
acknowledge the Austrian Science Fund (FWF) through the SFB project BeyondC
(sub-project F7103), a grant from the Foundational Questions Institute (FQXi)
as part of the Quantum Information Structure of Spacetime (QISS) Project
(qiss.fr). The opinions expressed in this publication are those of the authors
and do not necessarily reflect the views of the John Templeton Foundation.
This project has received funding from the European Union’s Horizon 2020
research and innovation programme under the Marie Skłodowska-Curie grant
agreement No 801110. It reflects only the authors’ view, the EU Agency is not
responsible for any use that may be made of the information it contains. ESQ
has received funding from the Austrian Federal Ministry of Education, Science
and Research (BMBWF).

## Author contributions

T.S. and P.S. carried out the experiment and collected the data. T.S. and I.A.
build the experimental setup. T.S., P.S. and M.T.Q. analysed the data. T.S.
and P.S. designed the experiment. M.T.Q. carried out the computer assisted
proofs. M.A. and L.R. conceived the experiment. P.W., C.B. and I.A. supervised
the project. All authors contributed to writing the manuscript.

## Data availability

All data used in this work is openly available in Zenodo under:
10.5281/zenodo.7352614

## Code availability

The code used to perform the computer assisted proofs is openly available at
the following online repository: https://github.com/mtcq/UnitaryTransposition

## References

  * Hardy [2005] L. Hardy, Probability Theories with Dynamic Causal Structure: A New Framework for Quantum Gravity, arXiv e-prints , gr-qc/0509120 (2005), arXiv:gr-qc/0509120 [gr-qc].
  * Chiribella  _et al._ [2013a] G. Chiribella, G. M. D’Ariano, P. Perinotti, and B. Valiron, Quantum computations without definite causal structure, Phys. Rev. A 88, 022318 (2013a), arXiv:0912.0195 [quant-ph].
  * Oreshkov  _et al._ [2012] O. Oreshkov, F. Costa, and Č. Brukner, Quantum correlations with no causal order, Nature Communications 3, 1092 (2012), arXiv:1105.4464 [quant-ph].
  * Procopio  _et al._ [2015] L. M. Procopio, A. Moqanaki, M. Araújo, F. Costa, I. Alonso Calafell, E. G. Dowd, D. R. Hamel, L. A. Rozema, Č. Brukner, and P. Walther, Experimental superposition of orders of quantum gates, Nature Communications 6, 7913 (2015), arXiv:1412.4006 [quant-ph].
  * Rubino  _et al._ [2017] G. Rubino, L. A. Rozema, A. Feix, M. Araújo, J. M. Zeuner, L. M. Procopio, Č. Brukner, and P. Walther, Experimental verification of an indefinite causal order, Science Advances 3, e1602589 (2017), arXiv:1608.01683 [quant-ph].
  * Rubino  _et al._ [2022] G. Rubino, L. A. Rozema, F. Massa, M. Araújo, M. Zych, Č. Brukner, and P. Walther, Experimental entanglement of temporal order, Quantum 6, 621 (2022), arXiv:1712.06884 [quant-ph].
  * Goswami  _et al._ [2018] K. Goswami, C. Giarmatzi, M. Kewming, F. Costa, C. Branciard, J. Romero, and A. G. White, Indefinite Causal Order in a Quantum Switch, Phys. Rev. Lett. 121, 090503 (2018), arXiv:1803.04302 [quant-ph].
  * Rubino  _et al._ [2021] G. Rubino, L. A. Rozema, D. Ebler, H. Kristjánsson, S. Salek, P. Allard Guérin, A. A. Abbott, C. Branciard, Č. Brukner, G. Chiribella, and P. Walther, Experimental quantum communication enhancement by superposing trajectories, Physical Review Research 3, 013093 (2021), arXiv:2007.05005 [quant-ph].
  * Rubino  _et al._ [2021] G. Rubino, G. Manzano, and Č. Brukner, Quantum superposition of thermodynamic evolutions with opposing time’s arrows, Communications Physics 4, 1–10 (2021), arXiv:2008.02818 [quant-ph].
  * Chiribella and Liu [2022] G. Chiribella and Z. Liu, Quantum operations with indefinite time direction, Communications Physics 5, 190 (2022), arXiv:2012.03859 [quant-ph].
  * Chiribella and Ebler [2016] G. Chiribella and D. Ebler, Optimal quantum networks and one-shot entropies, New Journal of Physics 18, 093053 (2016), arXiv:1606.02394 [quant-ph].
  * Sardharwalla  _et al._ [2016] I. S. B. Sardharwalla, T. S. Cubitt, A. W. Harrow, and N. Linden, Universal Refocusing of Systematic Quantum Noise, ArXiv e-prints (2016), arXiv:1602.07963 [quant-ph].
  * Navascués [2018] M. Navascués, Resetting Uncontrolled Quantum Systems, Phys. Rev. X 8, 031008 (2018), arXiv:1710.02470 [quant-ph].
  * Quintino  _et al._ [2019a] M. T. Quintino, Q. Dong, A. Shimbo, A. Soeda, and M. Murao, Reversing Unknown Quantum Transformations: Universal Quantum Circuit for Inverting General Unitary Operations, Phys. Rev. Lett., 123, 210502 (2019a), arXiv:1810.06944 [quant-ph].
  * Quintino  _et al._ [2019b] M. T. Quintino, Q. Dong, A. Shimbo, A. Soeda, and M. Murao, Probabilistic exact universal quantum circuits for transforming unitary operations, Phys. Rev. A 100, 062339 (2019b), arXiv:1909.01366 [quant-ph].
  * Quintino and Ebler [2022] M. T. Quintino and D. Ebler, Deterministic transformations between unitary operations: Exponential advantage with adaptive quantum circuits and the power of indefinite causality, Quantum 6, 679 (2022), arXiv:2109.08202 [quant-ph].
  * Trillo  _et al._ [2020] D. Trillo, B. Dive, and M. Navascués, Translating Uncontrolled Systems in Time, Quantum 4, 374 (2020), arXiv:1903.10568 [quant-ph].
  * Trillo  _et al._ [2022] D. Trillo, B. Dive, and M. Navascués, A universal quantum rewinding protocol with an arbitrarily high probability of success, arXiv e-prints (2022), arXiv:2205.01131 [quant-ph].
  * Schiansky  _et al._ [2022] P. Schiansky, T. Strömberg, D. Trillo, V. Saggio, B. Dive, M. Navascués, and P. Walther, Demonstration of universal time-reversal for quantum processes, arXiv e-prints (2022), arXiv:2205.01122 [quant-ph].
  * Yoshida  _et al._ [2022] S. Yoshida, A. Soeda, and M. Murao, Reversing unknown qubit-unitary operation, deterministically and exactly, arXiv e-prints (2022), arXiv:2209.02907 [quant-ph].
  * Taddei  _et al._ [2021] M. M. Taddei, J. Cariñe, D. Martínez, T. García, N. Guerrero, A. A. Abbott, M. Araújo, C. Branciard, E. S. Gómez, S. P. Walborn, L. Aolita, and G. Lima, Computational advantage from the quantum superposition of multiple temporal orders of photonic gates, PRX Quantum 2, 010320 (2021), arXiv:2002.07817 [quant-ph].
  * Nielsen and Chuang [2000] M. Nielsen and I. Chuang,  _Quantum Computation and Quantum Information_, Cambridge Series on Information and the Natural Sciences (Cambridge University Press, 2000).
  * Watrous [2008] J. Watrous, Quantum Computational Complexity, arXiv e-prints (2008), arXiv:0804.3401 [quant-ph].
  * Soeda [2013] A. Soeda, Limitations on quantum subroutine designing due to the linear structure of quantum operators (2013).
  * Araújo  _et al._ [2014] M. Araújo, A. Feix, F. Costa, and Č. Brukner, Quantum circuits cannot control unknown operations, New Journal of Physics 16, 093026 (2014), arXiv:1309.7976 [quant-ph].
  * Bisio  _et al._ [2016] A. Bisio, M. Dall’Arno, and P. Perinotti, Quantum conditional operations, Phys. Rev. X 94, 022340 (2016), arXiv:1509.01062 [quant-ph].
  * Zhou  _et al._ [2011] X.-Q. Zhou, T. C. Ralph, P. Kalasuwan, M. Zhang, A. Peruzzo, B. P. Lanyon, and J. L. O’Brien, Adding control to arbitrary unknown quantum operations, Nature Communications 2, 413 (2011), arXiv:1006.2670 [quant-ph].
  * Thompson  _et al._ [2018] J. Thompson, K. Modi, V. Vedral, and M. Gu, Quantum plug n’ play: modular computation in the quantum regime, New Journal of Physics 20, 013004 (2018).
  * Bavaresco  _et al._ [2021] J. Bavaresco, M. Murao, and M. T. Quintino, Strict hierarchy between parallel, sequential, and indefinite-causal-order strategies for channel discrimination, Phys. Rev. Lett. 127, 200504 (2021), 2011.08300 [quant-ph].
  * Chiribella and Ebler [2019] G. Chiribella and D. Ebler, Quantum speedup in the identification of cause-effect relations, Nature Communications 10, 1472 (2019), arXiv:1806.06459 [quant-ph].
  * Bavaresco  _et al._ [2019] J. Bavaresco, M. Araújo, Č. Brukner, and M. T. Quintino, Semi-device-independent certification of indefinite causal order, Quantum 3, 176 (2019), arXiv:1903.10526 [quant-ph].
  * Cao  _et al._ [2022] H. Cao, J. Bavaresco, N.-N. Wang, L. A. Rozema, C. Zhang, Y.-F. Huang, B.-H. Liu, C.-F. Li, G.-C. Guo, and P. Walther, Experimental semi-device-independent certification of indefinite causal order, arXiv e-prints (2022), arXiv:2202.05346 [quant-ph].
  * Simon and Mukunda [1990] R. Simon and N. Mukunda, Minimal three-component su(2) gadget for polarization optics, Physics Letters A 143, 165–169 (1990).
  * Frigo  _et al._ [2022] N. J. Frigo, F. Bucholtz, G. A. Cranch, and J. M. Singley, On the choice of conventions in polarization evolution calculations and representations, J. Lightwave Technol. 40, 179–190 (2022).
  * Oeckl [2005] R. Oeckl, General boundary quantum field theory: Foundations and probability interpretation, arXiv e-prints , hep-th/0509122 (2005), arXiv:hep-th/0509122 [hep-th].
  * Oreshkov and Cerf [2016] O. Oreshkov and N. J. Cerf, Operational quantum theory without predefined time, New Journal of Physics 18, 073037 (2016), arXiv:1406.3829 [quant-ph].
  * Chiribella  _et al._ [2013b] G. Chiribella, G. M. D’Ariano, P. Perinotti, and B. Valiron, Quantum computations without definite causal structure, Phys. Rev. A 88, 022318 (2013b), arXiv:0912.0195 [quant-ph].
  * Silva  _et al._ [2017] R. Silva, Y. Guryanova, A. J. Short, P. Skrzypczyk, N. Brunner, and S. Popescu, Connecting processes with indefinite causal order and multi-time quantum states, New Journal of Physics 19, 103022 (2017), arXiv:1701.08638 [quant-ph].
  * Svetlichny [2011] G. Svetlichny, Time Travel: Deutsch vs. Teleportation, International Journal of Theoretical Physics 50, 3903–3914 (2011), arXiv:0902.4898 [quant-ph].
  * Lloyd  _et al._ [2011] S. Lloyd, L. Maccone, R. Garcia-Patron, V. Giovannetti, Y. Shikano, S. Pirandola, L. A. Rozema, A. Darabi, Y. Soudagar, L. K. Shalm, and A. M. Steinberg, Closed Timelike Curves via Postselection: Theory and Experimental Test of Consistency, Phys. Rev. Lett. 106, 040403 (2011), arXiv:1005.2219 [quant-ph].
  * Chiribella  _et al._ [2021] G. Chiribella, E. Aurell, and K. Życzkowski, Symmetries of quantum evolutions, Physical Review Research 3, 033028 (2021), arXiv:2101.04962 [quant-ph].
  * Nakayama  _et al._ [2014] S. Nakayama, A. Soeda, and M. Murao, Universal construction of controlled-unitary gates using dynamical decoupling and the quantum zeno effect, AIP Conference Proceedings 1633, 183–185 (2014), https://aip.scitation.org/doi/pdf/10.1063/1.4903131.
  * Allard Guérin  _et al._ [2016] P. Allard Guérin, A. Feix, M. Araújo, and Č. Brukner, Exponential Communication Complexity Advantage from Quantum Superposition of the Direction of Communication, Physical review letters 117, 100502 (2016), arXiv:1605.07372 [quant-ph].
  * Wei  _et al._ [2019] K. Wei, N. Tischler, S.-R. Zhao, Y.-H. Li, J. M. Arrazola, Y. Liu, W. Zhang, H. Li, L. You, Z. Wang, Y.-A. Chen, B. C. Sanders, Q. Zhang, G. J. Pryde, F. Xu, and J.-W. Pan, Experimental Quantum Switching for Exponentially Superior Quantum Communication Complexity, Phys. Rev. Lett. 122, 120504 (2019), arXiv:1810.10238 [quant-ph].
  * Reck  _et al._ [1994] M. Reck, A. Zeilinger, H. J. Bernstein, and P. Bertani, Experimental realization of any discrete unitary operator, Physical review letters 73, 58 (1994).
  * Rubino  _et al._ [2022] G. Rubino, G. Manzano, L. A. Rozema, P. Walther, J. M. R. Parrondo, and Č. Brukner, Inferring work by quantum superposing forward and time-reversal evolutions, Physical Review Research 4, 013208 (2022), arXiv:2107.02201 [quant-ph].
  * Chiribella  _et al._ [2009] G. Chiribella, G. M. D’Ariano, and P. Perinotti, Theoretical framework for quantum networks, Phys. Rev. A 80, 022339 (2009), arXiv:0904.4483 [quant-ph].
  * Ziman [2008] M. Ziman, Process positive-operator-valued measure: A mathematical framework for the description of process tomography experiments, Phys. Rev. A 77, 062112 (2008), arXiv:0802.3862 [quant-ph].

## Methods

###  VI.1 Arbitrary unitary transposition

The description of linear retarders depends on the convention used for the
polarization states, i.e. which Pauli matrices are associated with which
Stokes parameters. The most commonly used convention in quantum optics is:

$(S_{1},S_{2},S_{3})\leftrightarrow(Z,X,Y),$ (15)

corresponding to the $\\{H,V\\}$, $\\{+,-\\}$ and $\\{L,R\\}$ polarizations
being the eigenstates of $Z$, $X$ and $Y$ respectively. Under this convention,
a linear retarder, such as a waveplate, at an angle $\theta$ to the vertical
axis, is described by the following matrix:

$\begin{gathered}U(\theta)=e^{-\frac{i}{2}\theta
Y}e^{-\frac{i}{2}rZ}e^{\frac{i}{2}\theta Y}\\\
=\begin{bmatrix}\cos(\theta)&-\sin(\theta)\\\
\sin(\theta)&\cos(\theta)\end{bmatrix}\begin{bmatrix}e^{i\frac{r}{2}}&0\\\
0&e^{-i\frac{r}{2}}\end{bmatrix}\begin{bmatrix}\cos(\theta)&\sin(\theta)\\\
-\sin(\theta)&\cos(\theta)\end{bmatrix}\end{gathered}$ (16)

where $r$ is the retardance of the element. Note that the matrix $U(\theta)$
is symmetric since:

$\displaystyle U(\theta)^{T}$ $\displaystyle=(e^{\frac{i}{2}\theta
Y})^{T}(e^{-\frac{i}{2}rZ})^{T}(e^{-\frac{i}{2}\theta Y})^{T}$ (17)
$\displaystyle=e^{-\frac{i}{2}\theta Y}e^{-\frac{i}{2}rZ}e^{\frac{i}{2}\theta
Y}.$

Propagating through such an element backwards has the effect of taking
$\theta\rightarrow-\theta$. This transformation can be written as:

$ZU(\theta)Z=U(-\theta)$ (18)

since

$Ze^{-\frac{i}{2}\theta Y}Z=e^{\frac{i}{2}\theta Y}.$ (19)

For a general polarization gadget consisting of several linear retarders
described by the unitary $U_{G,\mathrm{fw}}$ in the forwards direction we find
the unitary for the backwards propagation direction, $U_{G,\mathrm{bw}}$, by
transposing the order of the individual linear retarders and changing the sign
of their respective angles:

$U_{G,\mathrm{fw}}=U_{1}(\theta_{1})\ldots U_{n}(\theta_{n})\rightarrow
U_{G,\mathrm{bw}}=U_{n}(-\theta_{n})\ldots U_{1}(-\theta_{1})$ (20)

which can be written:

$U_{G,\mathrm{fw}}\rightarrow ZU_{G,\mathrm{fw}}^{T}Z$ (21)

since:

$\displaystyle Z(U_{1}(\theta_{1})\ldots U_{n}(\theta_{n}))^{T}Z$
$\displaystyle=ZU_{n}(\theta_{n})\ldots U_{1}(\theta_{1})Z$ (22)
$\displaystyle=ZU_{n}(\theta_{n})Z\ldots ZU_{1}(\theta_{1})Z$
$\displaystyle=U_{n}(-\theta_{n})\ldots U_{1}(-\theta_{1}).$

The transformation in Eq. (21) is not useful for realising the transpose,
since the $Z$ gates around the unitary $U_{G,\mathrm{fw}}^{T}$ have to be
undone to recover the transpose. However, this problem can be overcome by
picking a different convention for the polarization basis states, such as
$(S_{1},S_{2},S_{3})\leftrightarrow(X,Y,Z)$ which is a cyclic permutation of
the aforementioned one (corresponding to a rotation of the basis vectors by
$\pi/3$ around the vector $\begin{bmatrix}1&1&1\end{bmatrix}$), and which is
commonly used in polarimetry. In this work, we chose the convention:

$(S_{1},S_{2},S_{3})\leftrightarrow(-Z,-Y,-X).$ (23)

The minus signs are necessary to preserve the handedness of the coordinate
system when exchanging $X$ and $Y$. That this convention yields the desired
transformation under counterpropagation can be realised by noting that the
Stokes parameters of a unitary always transform as
$(S_{1},S_{2},S_{3})\rightarrow(S_{1},-S_{2},S_{3})$, however for completeness
we will perform the calculation explicitly. In the convention of Eq. (23) a
linear retarder at an angle $\theta$ is written as:

$U(\theta)=e^{\frac{i}{2}\theta X}e^{\frac{i}{2}rZ}e^{-\frac{i}{2}\theta X}$
(24)

and the corresponding unitary in the backwards direction is

$\displaystyle U(-\theta)$ $\displaystyle=e^{-\frac{i}{2}\theta
X}e^{\frac{i}{2}rZ}e^{\frac{i}{2}\theta X}$ (25)
$\displaystyle=(e^{\frac{i}{2}\theta X}e^{\frac{i}{2}rZ}e^{-\frac{i}{2}\theta
X})^{T}$ $\displaystyle=U(\theta)^{T}.$

It then follows that a general waveplate gadget also transforms as the
transpose:

$\displaystyle U_{G,\mathrm{fw}}=U_{1}(\theta_{1})\ldots
U_{n}(\theta_{n})\rightarrow U_{G,\mathrm{bw}}$
$\displaystyle=U_{n}(-\theta_{n})\ldots U_{1}(-\theta_{1})$ (26)
$\displaystyle=(U_{1}(\theta_{1})\ldots U_{n}(\theta_{n}))^{T}$
$\displaystyle=U_{G,\mathrm{fw}}^{T}.$

###  VI.2 Sets of unitary operators used in the game

In this section, we explicitly list the two sets of unitary operators used in
the discrimination task considered in this work. These sets of operators were
first presented at Ref. [10].

$\displaystyle\mathcal{M}_{+}:=$
$\displaystyle\Bigg{\\{}(I,I),(I,X),(I,Z),(X,I),(X,X),(X,Z),(Z,I),(Z,X),(Z,Z),$
(27)
$\displaystyle\qquad\qquad\left(\frac{X-Y}{\sqrt{2}},\frac{X+Y}{\sqrt{2}}\right),\left(\frac{X+Y}{\sqrt{2}},\frac{X-Y}{\sqrt{2}}\right),\left(\frac{Z-Y}{\sqrt{2}},\frac{Z+Y}{\sqrt{2}}\right),\left(\frac{Z+Y}{\sqrt{2}},\frac{Z-Y}{\sqrt{2}}\right)\Bigg{\\}}$
$\displaystyle\mathcal{M}_{-}:=$
$\displaystyle\Bigg{\\{}(Y,I),(Y,X),(Y,Z),(I,Y),(X,Y),(Z,Y),$
$\displaystyle\qquad\qquad\left(\frac{I+iY}{\sqrt{2}},\frac{I-iY}{\sqrt{2}}\right),\left(\frac{I-iY}{\sqrt{2}},\frac{I+iY}{\sqrt{2}}\right)\Bigg{\\}}.$

###  VI.3 Obtaining upper bounds for different classes of strategies

We now detail how to obtain an upper bound on the winning probability of the
game described in the main manuscript. Let $N$ be the total number of pairs of
unitary operators contained in the set $\mathcal{M}_{+}$ and
$\mathcal{M}_{-}$. Following a uniform distribution, i.e., with probably
$1/N$, the referee picks a pair of unitary operators $(U_{i},V_{i})$. The
player should then employ a quantum strategy to guess whether $(U_{i},V_{i})$
belongs to $\mathcal{M}_{+}$ or $\mathcal{M}_{-}$. Let $p(\pm|(U_{i},V_{i}))$
the probability that the player guesses $(U_{i},V_{i})\in\mathcal{M}_{\pm}$.
The probability of such player to win the game is then given by

$p=\frac{1}{N}\sum_{(U_{i},V_{i})\in\mathcal{M}_{+}}p\big{(}+|(U_{i},V_{i})\big{)}+\sum_{(U_{i},V_{i})\in\mathcal{M}_{-}}p\big{(}-|(U_{i},V_{i})\big{)}.$
(28)

For the qubit scenario considered here, we can analyse the case where unitary
gates act backwards by simply considering the case where all involved unitary
operators are transposed. This is true because, as discussed earlier, there
are only two anti-homomorphisms from $\mathcal{SU}(d)$ to $\mathcal{SU}(d)$,
and for any $U\in\mathcal{SU}(2)$, we have that
$U^{-1}=\sigma_{Y}U^{T}\sigma_{Y}$. More explicitly, the winning probability
for players using the unitary gates backwards is given by

$p=\frac{1}{N}\sum_{(U_{i},V_{i})\in\mathcal{M}_{+}}p\big{(}+|(U_{i}^{T},V_{i}^{T})\big{)}+\sum_{(U_{i}^{T},V_{i}^{T})\in\mathcal{M}_{-}}p\big{(}-|(U_{i}^{T},V_{i}^{T})\big{)}.$
(29)

Also, as we show more explicitly later, since the success probability is
linear function of the strategies, convex combinations of forward and
backwards strategies cannot increase the maximal success probability. Hence it
is enough to analyse the forward and backwards case.

When the player is restricted to parallel strategies, the most general
approach consists of preparing a quantum state $\rho$, sending part of this
state to the operators $U_{i}$ and $V_{i}$, and then performing a quantum
measurement with outcomes labelled as $+$ or $-$, that is,

$\small
p_{\text{par}}\big{(}\pm|(U_{i},V_{i})\big{)}=\mathrm{tr}{\Big{[}M_{\pm}\,\Big{(}U_{i}\otimes
V_{i}\otimes\mathbb{1})\rho(U_{i}^{\dagger}\otimes
V_{i}^{\dagger}\otimes\mathbb{1})\Big{)}\Big{]}},$ (30)

where $M_{+},M_{-}\geq 0$ are the POVM operators associated to the outcomes
$+$ and $-$, see Fig. 2 for a pictorial illustration.

Parallel strategies may be analysed in the (parallel) tester formalism [47,
29], also known as process POVM [48]. Let us label the linear spaces
corresponding to the input and output spaces as $\mathcal{H}_{I}$ and
$\mathcal{H}_{O}$ respectively. We can then write $U_{i}\otimes
V_{i}:\mathcal{H}_{I}\to\mathcal{H}_{O}$ with
$\mathcal{H}_{I}\cong\mathcal{H}_{O}\cong\mathbb{C}_{2}\otimes\mathbb{C}_{2}$.
In the tester formalism, operations are viewed as states and Eq. (30) may be
written as the generalized Born’s rule. More formally, we have that:

$p_{\text{par}}\big{(}\pm|(U_{i},V_{i})\big{)}=\mathrm{tr}{\Big{[}T_{\pm}\,|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes V_{i}|]},$ (31)

where111Here $\mathcal{L}(\mathcal{H}_{I}\otimes\mathcal{H}_{O})$ denotes the
set of linear operators from $\mathcal{H}_{I}\otimes\mathcal{H}_{O}$ (linear
endomorphisms).
$T_{+},T_{-}\in\mathcal{L}(\mathcal{H}_{I}\otimes\mathcal{H}_{O})$ are tester
elements and ${|U_{i}\otimes
V_{i}\rangle\rangle\in}(\mathcal{H}_{I}\otimes\mathcal{H}_{O})$ is the Choi
vector of $U_{i}\otimes V_{i}$ defined as:

$|U_{i}\otimes V_{i}\rangle\rangle:=\sum_{l}\ket{l}\otimes\Big{(}U_{i}\otimes
V_{i}\ket{l}\Big{)},$ (32)

where $\\{\ket{l}\\}$ is the computational basis for $\mathcal{H}_{I}$. The
operators $T_{+}$ and $T_{-}$ are parallel testers when $T_{+},T_{-}\geq 0$
and their sum respects:

$T_{+}+T_{-}=\sigma_{I}\otimes\mathbb{1}_{O},$ (33)

where $\sigma\in\mathcal{L}(\mathcal{H}_{I})$ is a quantum state. As shown in
Refs. [47, 29, 48], all parallel strategies as in Eq. (30) can be represented
by testers such as those in Eq. (31), and vice versa. Hence, when optimizing
over all possible strategies, instead of considering all possible states
$\rho$ and measurements $M_{\pm}$ as in Eq. (30), we may optimize over all
valid testers $T_{\pm}$ as in Eq. (31).

One advantage of using the tester formalism, is that the maximal probability
of winning the discrimination game can be written in terms of a semidefinite
program (SDP) via the following optimisation problem:

$\displaystyle\max\;$
$\displaystyle\frac{1}{N}\Bigg{[}\sum_{(U_{i},V_{i})\in\mathcal{M}_{+}}\mathrm{tr}\Big{(}T_{+}\;|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes
V_{i}|\;\Big{)}+\sum_{(U_{i},V_{i})\in\mathcal{M}_{-}}\mathrm{tr}\Big{(}T_{-}\;|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes V_{i}|\Big{)}\Bigg{]}$ (34)
s.t.: $\displaystyle T_{+},T_{-}\geq 0$ (35) $\displaystyle
T_{+}+T_{-}=\sigma_{I}\otimes\mathbb{1}_{O}$ (36)
$\displaystyle\mathrm{tr}(\sigma)=1.$ (37)

Following the steps of Ref. [29], the dual problem is given by:

$\displaystyle\min\;$ $\displaystyle\mathrm{tr}(C)/d_{I}$ (38) s.t.:
$\displaystyle\frac{1}{N}\sum_{(U_{i},V_{i})\in\mathcal{M}_{+}}\;|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes V_{i}|\leq C$ (39)
$\displaystyle\frac{1}{N}\sum_{(U_{i},V_{i})\in\mathcal{M}_{-}}\;|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes V_{i}|\leq C$ (40)
$\displaystyle\mathrm{tr}_{O}(C)=\mathrm{tr}_{IO}(C)\,\frac{\mathbb{1}_{I}}{d_{I}},$
(41)

where $d_{I}$ is the dimension of $\mathcal{H}_{I}$ (for our particular
problem, $d_{I}=4$). By the definition of dual problem, if we find a linear
operator $C$ satisfying the feasibility constraints of inequality (39),
inequality (40), and Eq. (41), the quantity $\mathrm{tr}(C)/d_{I}$ is an upper
bound on the maximal success probability. In order to obtain a computer-
assisted-proof upper bound with fraction of integers, we use standard and
efficient floating-point arithmetic algorithms to solve the SDP, obtain an
operator $C$ which satisfies the constraints of the dual problem and truncate
it in such a way that the feasibility constraints are still satisfied. We
refer to our online repository (see Code Availability) for an implementation
of this procedure and to Ref. [29] for a detailed explanation on how to
perform the truncation step.

When the player is restricted to causal strategies (also referred to as
sequential strategies), the most general approach consists of preparing a
quantum state $\rho$, sending part of this state to the operators $U_{i}$ (or
to $V_{i}$), applying a quantum channel $\mathcal{E}$, then performing the
operation $V_{i}$ (or $U_{i}$), and finally performing a quantum measurement
with outcomes labelled as $+$ or $-$, that is:

$\displaystyle p_{\text{seq}}(\pm$
$\displaystyle|(U_{i},V_{i}))=\mathrm{tr}\Big{[}M_{\pm}\,(V_{i}\otimes\mathbb{1})\mathcal{E}\Big{(}U_{i}\otimes\mathbb{1}\,\rho\,U_{i}^{\dagger}\otimes\mathbb{1}\Big{)}(V_{i}^{\dagger}\otimes\mathbb{1})\Big{]}.$

Using the concept of sequential testers [47, 29], we can also write the
problem of finding the optimal causal strategy as an SDP. Since there is a
notion of causal order, we label the input and output space of the first
operation as $\mathcal{H}_{I_{1}}$ and $\mathcal{H}_{O_{1}}$ respectively.
Analogously, we use $\mathcal{H}_{I_{2}}$ and $\mathcal{H}_{O_{2}}$ for the
second operations. If the player uses the operation $U_{i}$ first and $V_{i}$
second, we have that $U_{i}:\mathcal{H}_{I_{1}}\to\mathcal{H}_{O_{1}}$ and
$V_{i}:\mathcal{H}_{I_{2}}\to\mathcal{H}_{O_{2}}$. Following Ref. [29], the
primal and dual problem for causal strategies are respectively given by

$\displaystyle\max\;$
$\displaystyle\frac{1}{N}\Bigg{[}\sum_{(U_{i},V_{i})\in\mathcal{M}_{+}}\mathrm{tr}\Big{(}T_{+}\;|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes
V_{i}|\;\Big{)}+\sum_{(U_{i},V_{i})\in\mathcal{M}_{-}}\mathrm{tr}\Big{(}T_{-}\;|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes V_{i}|\Big{)}\Bigg{]}$ (42)
s.t.: $\displaystyle T_{+},T_{-}\geq 0$ (43) $\displaystyle
T_{+}+T_{-}=W_{I_{1}O_{1}I_{2}}\otimes\mathbb{1}_{O_{2}}$ (44)
$\displaystyle\mathrm{tr}_{I_{2}}(W_{I_{1}O_{1}I_{2}})=\sigma_{I_{1}}\otimes\mathbb{1}_{O_{1}}$
(45) $\displaystyle\mathrm{tr}(\sigma)=1.$ (46)

and

$\displaystyle\min\;$ $\displaystyle\mathrm{tr}(C)/d_{I}$ (47) s.t.:
$\displaystyle\frac{1}{N}\sum_{(U_{i},V_{i})\in\mathcal{M}_{+}}\;|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes V_{i}|\leq C$ (48)
$\displaystyle\frac{1}{N}\sum_{(U_{i},V_{i})\in\mathcal{M}_{-}}\;|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes V_{i}|\leq C$ (49)
$\displaystyle\mathrm{tr}_{O_{2}}(C)=\mathrm{tr}_{I_{2}O_{2}}(C)\otimes\frac{\mathbb{1}_{I_{2}}}{d_{I_{2}}}$
(50)
$\displaystyle\mathrm{tr}_{O_{1}I_{2}O_{2}}(C)=\mathrm{tr}_{I_{1}O_{1}I_{2}O_{2}}(C)\,\frac{\mathbb{1}_{I_{1}}}{d_{I_{1}}}.$
(51)

Another sequential strategy would be to use $V_{i}$ before $U_{i}$. For this
case, the semidefinite program is then exactly the same as the one before, but
we exchange the roles of $V_{i}$ and $U_{i}$. Our methods show that, when
$U_{i}$ precedes $V_{i}$, the success probability is bounded by
$\frac{90}{100}\leq p_{UV}\leq\frac{91}{100}$, and when $V_{i}$ precedes
$U_{i}$, the success probability is bounded by $\frac{90}{100}\leq
p_{VU}\leq\frac{91}{100}$. Since the two bounds coincide, we have
$\frac{90}{100}\leq p_{\text{causal}}\leq\frac{91}{100}$.

When the player is restricted to general quantum strategies without a definite
causal order, the strategies are described by means of an indefinite tester
[30], which are positive semidefinite operators that add up to a process
matrix [3], that is $T_{+}+T_{-}=W$, where $W$ is a bipartite process matrix.
Following Ref. [29], and defining the trace-and-replace maps as
${}_{i}X:=\mathrm{tr}_{i}(X)\otimes\mathbb{1}_{i}$, the primal and the dual
problem are respectively given by

$\displaystyle\max\;$
$\displaystyle\frac{1}{N}\Bigg{[}\sum_{(U_{i},V_{i})\in\mathcal{M}_{+}}\mathrm{tr}\Big{(}T_{+}\;|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes V_{i}|\;\Big{)}$ (52)
$\displaystyle\phantom{\frac{1}{N}\Bigg{[}aaaa}+\sum_{(U_{i},V_{i})\in\mathcal{M}_{-}}\mathrm{tr}\Big{(}T_{-}\;|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes V_{i}|\Big{)}\Bigg{]}$ s.t.:
$\displaystyle T_{+},T_{-}\geq 0$ (53) $\displaystyle T_{+}+T_{-}=W$ (54)
${}_{I_{2}O_{2}}W=_{O_{1}I_{2}O_{2}}W$ (55)
${}_{I_{1}O_{1}}W=_{O_{2}I_{1}O_{1}}W$ (56) $\displaystyle
W=_{O_{1}}W+_{O_{2}}W-_{O_{1}O_{2}}W$ (57)
$\displaystyle\mathrm{tr}(W)=\mathrm{tr}(\mathbb{1}_{O_{1}O_{2}}).$ (58)

and

$\displaystyle\min\;$ $\displaystyle\mathrm{tr}(C)/d_{I}$ (59) s.t.:
$\displaystyle\frac{1}{N}\sum_{(U_{i},V_{i})\in\mathcal{M}_{+}}\;|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes V_{i}|\leq C$ (60)
$\displaystyle\frac{1}{N}\sum_{(U_{i},V_{i})\in\mathcal{M}_{-}}\;|U_{i}\otimes
V_{i}\rangle\rangle\langle\langle U_{i}\otimes V_{i}|\leq C$ (61)
${}_{O_{1}}C=_{I_{1}O_{1}}C$ (62) ${}_{O_{2}}C=_{I_{2}O_{2}}C.$ (63)

###  VI.4 Data analysis

As described in the main text, the game was played by having the referee pick
pairs of unitaries from the sets $\mathcal{M}_{\pm}$ in a uniformly random way
in every round. The player’s outcome was determined by the first unused photon
detection event in the event list corresponding to that choice of unitary by
the referee. More concretely, let $O^{j,k}_{\pm}$ be the $k$-th element in the
time ordered list of detection events $\mathcal{O}^{j}_{\pm}$ for the
implemented pair of unitaries $M_{\pm}^{j}$. Then the outcome of the $n$-th
round of the game, in which the referee picked the pair of unitaries
$M_{\pm}^{j}$ for the $k$-th time, is $O^{j,k}_{\pm}$.

In order to filter out background events resulting from various back-
reflections in the experimental setup, as well as detector dark counts, two-
fold coincidence events between the signal and idler photons were used to time
filter the detection events.

The superconducting nanowire detectors used in the experiment have a slight
polarization dependence in their detection efficiency, and due to the
different pairs of unitaries generating different target qubit states the
event rates for different implemented unitaries varied. This difference in
efficiency was not necessary to account for, because the number of events for
each pair of unitaries was truncated, in reverse chronological order, to match
the setting with the fewest events. To find the numbers of rounds won and
lost, the data was sampled from once, drawing $10^{6}$ different samples from
unique, chronologically ordered (for each setting) detection events. The exact
number of won and lost rounds in this sampling were $994,512$ won and $5,488$
lost.

A detection efficiency imbalance is also present in the two output ports of
the interferometer, corresponding to the two different measurement outcomes of
the control qubit. This efficiency difference could quite easily be
characterised and corrected for, however such actions are equivalent to
classical post-processing and is captured by the indefinite tester. Imbalanced
detection efficiency could therefore not lead to a violation of the bound, and
is not necessary to correct for since the data already violates the bound.

The measurement of the fidelity between the unitary implemented in one
direction and the transpose of the unitary in the other direction was
performed with coherent light. To estimate the fidelity, the two unitaries
were first fitted to the data using a maximum likelihood estimation and then
the fidelity was calculated by evaluated the following average:

$\mathcal{F}=\big{\langle}(U_{\text{fw}}|\Psi\rangle)^{\dagger}U_{\text{bw}}^{T}|\Psi\rangle\big{\rangle}_{\ket{\Psi}},$
(64)

taken over 1000 Haar-random states $\ket{\Psi}$. This was done in every step
of a Monte-Carlo simulation to estimate the measurement uncertainties induced
by the waveplate errors.