# Quantum machine learning with indefinite causal order

Nannan Ma  Centre for Quantum Technologies, National University of Singapore,
Singapore 117543, Singapore  P. Z. Zhao  Centre for Quantum Technologies,
National University of Singapore, Singapore 117543, Singapore  Jiangbin Gong
<EMAIL_ADDRESS>Centre for Quantum Technologies, National University of
Singapore, Singapore 117543, Singapore  Department of Physics, National
University of Singapore, Singapore 117551, Singapore  Joint School of National
University of Singapore and Tianjin University, International Campus of
Tianjin University, Binhai New City, Fuzhou 350207, China

###### Abstract

In a conventional circuit for quantum machine learning, the quantum gates used
to encode the input parameters and the variational parameters are constructed
with a fixed order. The resulting output function, which can be expressed in
the form of a restricted Fourier series, has limited flexibility in the
distributions of its Fourier coefficients. This indicates that a fixed order
of quantum gates can limit the performance of quantum machine learning.
Building on this key insight (also elaborated with examples), we introduce
indefinite causal order to quantum machine learning. Because the indefinite
causal order of quantum gates allows for the superposition of different
orders, the performance of quantum machine learning can be significantly
enhanced. Considering that the current accessible quantum platforms only allow
to simulate a learning structure with a fixed order of quantum gates, we
reform the existing simulation protocol to implement indefinite causal order
and further demonstrate the positive impact of indefinite causal order on
specific learning tasks. Our results offer useful insights into possible
quantum effects in quantum machine learning.

##  I introduction

Arising from intrinsic quantum features such as superposition and
entanglement, quantum computation [2, 3, 4] beating its classical counterparts
is becoming a reality. Numerous quantum algorithms [5, 6, 7, 8] and
experimental demonstrations [9, 10, 11, 12] have aimed to realize quantum
advantages. Inspired by the capabilities of classical-computation-based
machine learning [13] across various fields [14, 15, 16], the pursuit of a new
era in machine learning founded on quantum computation [17, 18, 19] is natural
and necessary to harness quantum advantages. In a typical quantum learning
model, a variational parameterized quantum circuit [20, 21, 22, 23, 24, 25,
26], containing various quantum gates, serves a role analogous to the neural
network in classical machine learning. The input vector $\bm{x}$ and
variational parameters $\bm{\theta}$ are encoded as gate parameters. The
output $y$ is represented by the expectation value of an observable measured
on the final state. This learning structure gives rise to a mapping function
$f_{\bm{\theta}}:\bm{x}\to y$, which is designed to approximate the ground
truth relation from $\bm{x}$ to $y$. The architecture of a quantum circuit
fundamentally influences learning model’s capability, akin to the role of
structure in classical neural networks.

Given that different quantum gates are not commutable in general, the ordering
of quantum gates plays an important role in a quantum circuit and consequently
in a quantum learning model. Specifically, the learning capability of a
quantum machine learning model can be analyzed in terms of the frequency
spectrum and Fourier coefficients of a Fourier series that expresses the
function $f_{\bm{\theta}}$. The Fourier coefficients are determined by the
multiplication of the quantum gates used in a learning model. Now if, as in
conventional quantum machine learning, the quantum circuit has a fixed order
of all involved quantum gates, then the Fourier coefficients of the associated
learning model lacks certain flexibility in response to changes in the
variational parameters and therefore limiting the learning ability of the
quantum model. This key recognition motivates us to introduce indefinite
causal order to relax this fixed-order limitation so as to achieve an enhanced
learning ability. The proposal of using indefinite causal order is also
stimulated by the fact that it is a frontier topic that holds substantial
advantages in quantum computation [27, 28, 29] and quantum information [30,
31, 32, 33]. Indeed, unlike classical physics with the order of operations
being predefined, quantum physics permits novel causality [34, 35, 36],
thereby leading to a coherent control of orders. Up to now, indefinite causal
order has been used to explore novel computational strategies and uncover more
efficient algorithms for specific tasks [37, 38, 39, 40, 41, 42, 43].
Moreover, the feasibility of implementing indefinite causal order has been
demonstrated in experiments [44, 45, 46]. Our objective is to leverage the
advantage of indefinite causal order so as to further unlock the potential of
quantum machine learning algorithms.

In particular, in this work we delve into the influence of causal orders on
quantum learning protocols, revealing how the flexibility of orders with
quantum properties relaxes the limitation arising from a fixed order in a
quantum circuit in order to enhance the performance of quantum machine
learning. The improvement from the extended causal order can be investigated
in terms of Fourier analysis. The resulting advantage due to indefinite causal
order is manifested as more flexible Fourier coefficients, as verified in some
specific tasks. By embracing the adaptability of causal orders imbued with
quantum characteristics, quantum machine learning, at least in the special
examples discussed below, is seen to be more useful and powerful.

This paper is organized as follows. We first briefly explain the constraint
imposed by a fixed causal order of quantum gates. Then, we construct a quantum
machine learning model based on a more intricate causal order and elaborate on
how the improvement of the learning ability arises from indefinite causal
order. Finally, we demonstrate how to simulate the indefinite causal order on
a quantum circuit and further utilize two examples to verify the enhanced
learning ability resulting from a more flexible causal order.

##  II impact of causal orders on quantum learning ability

As we show, conventional quantum machine learning relies on parameterized
quantum circuits. The structure of a quantum circuit for learning is hyper-
parameterized, which typically remains fixed in designing a quantum machine
learning protocol. In a typical circuit, different gates generally do not
commute with one another. This leads to a natural question: why one particular
order should be implemented but the others. The order of gates in a quantum
circuit is hence expected to be a crucial factor in determining the learning
ability of a quantum machine learning model. This implies that when expressing
the learning model in the Fourier series, a chosen particular order of gates
imposes a strong (but seems unnecessary) constraint on the resulting Fourier
coefficients.

To put the above-mentioned issue in a specific context, below we shall focus
on the widely adopted encoding-variational structure, where the circuit
consists of encoding blocks and variational blocks. For simplicity, we
consider a scenario involving a univariate function with the input variable
$x\in\mathbb{R}$. In this learning structure, the encoding gate is in form of
$g(x)=\exp(-ixH)$ with $H$ being a Hermitian generator, and a variational
block $W(\bm{\theta})$ is comprised of $N$ gates $T^{i}(\bm{\theta}_{i})$ with
variational parameter $\bm{\theta}_{i}$, $i\in[1,...,N]$. The overall unitary
evolution is then given by

$U(x,\bm{\theta})=g(x)W(\bm{\theta})=g(x)T^{N}(\bm{\theta}_{N})...T^{1}(\bm{\theta}_{1}).$
(1)

The output $f_{\bm{\theta}}(x)$ is set to be the expectation value of an
observable $O$ such that

$f_{\bm{\theta}}(x)=\bra{0}U^{\dagger}(x,\bm{\theta})OU(x,\bm{\theta})\ket{0},$
(2)

where $\ket{0}$ is the initial state.

To analyze the learning capability, we expand the function
$f_{\bm{\theta}}(x)$ into a Fourier series [47]. For this purpose, we
diagonalize the generator $H\equiv V^{\dagger}\sum V$, where $\sum$ is a
diagonal matrix with elements being the eigenvalues
$\lambda_{1},...\lambda_{d}$ of $H$. As such, the encoding gate yields
$g(x)=V^{\dagger}\exp(-ix\sum)V$. Considering that $V$ is a unitary operator
and thus can be absorbed into the neighboring variational block
$W(\bm{\theta})$ and the observable $O$, the encoding gate can be simply taken
as $g(x)=\exp(-ix\sum)$. The combination of this form of encoding gate $g(x)$
and the exact form of variational block $W(\bm{\theta})$ gives the $i$th
element of the final state $\ket{\psi}=U(x,\bm{\theta})\ket{0}$,

$\ket{\psi}_{i}=\sum_{j_{1},...j_{N-1}=1}^{d}e^{-i\lambda_{i}}T^{N}_{ij_{N-1}}(\theta_{N})\dots
T^{2}_{j_{2}j_{1}}(\theta_{2})T^{1}_{j_{1}1}(\theta_{1}),$ (3)

where $T^{k}_{mn}$ is an element of unitary matrix $T^{k}$. Thereafter, the
output under a measurement yields

$f_{\bm{\theta}}(x)=\sum_{k,l\in[d]}e^{i(\lambda_{k}-\lambda_{l})x}c_{kl}(\bm{\theta}),$
(4)

with

$\displaystyle c_{kl}(\bm{\theta})=$
$\displaystyle\sum_{\bm{i},\bm{j}}(T^{1})^{\dagger}_{1i_{1}}(\theta_{1})(T^{2})^{\dagger}_{i_{1}i_{2}}(\theta_{2})\dots(T^{N})^{\dagger}_{i_{N-1}k}(\theta_{N})O_{kl}$
$\displaystyle T^{N}_{lj_{N-1}}(\theta_{N})\dots
T^{2}_{j_{2}j_{1}}(\theta_{2})T^{1}_{j_{1}1}(\theta_{1}).$ (5)

Clearly then, the Fourier coefficients $c_{kl}(\bm{\theta})$ as functions of
variational parameters $\bm{\theta}$ are influenced by the adopted order of
$N$ gates in a variational block. This already hints that a more intricate
gate order corresponds to more complex Fourier coefficients, thereby
potentially resulting in a better learning ability.

In a conventional quantum circuit, the sequence of gates is predetermined and
hence the causal order is fixed. Consequently, this circuit can be seen as a
structure of slots with different gates to be inserted in. This kind of
structure can be understood as a higher-order transformation [48] that maps
certain quantum operators to other quantum operators, namely, a quantum
supermap. Extending this, various permutations of gates can be combined in a
distinguishable manner, thus defining the classical order. Put simply, for
each slot the utilized gates and their specific order are known. The
cumulative effect of such a classical order is a linear combination of
distinct fixed orders. This allows us to achieve different orders
simultaneously, but there is no coherence between these different orders. The
situation changes if we introduce quantum superposition, where different
orders coexist, implying the coherence between them. Our hope is that this
coherence can yield more sophisticated coefficient functions with respect to
the variational parameters. In the following, we take a specific example to
illustrate three different causal orders and how to harness quantum coherence
to improve the learning ability.

For a 2-switch structure depicted in Fig. 1, the arrangements of two operators
$A_{1}$ and $A_{2}$ define causal orders. If the control system is in
$\rho_{c}=\ket{1}\bra{1}$, the causal order is given by $A_{2}\cdot A_{1}$
(Fig. 1(a)). Conversely, if $\rho_{c}=\ket{0}\bra{0}$, the causal order
becomes $A_{1}\cdot A_{2}$ (Fig 1(b)). Thereafter, for the control system
$\rho_{c}=I/2$, the causal order yields a linear combination of the two
definite causal orders, as shown in Fig 1(c). However, when $\rho_{c}$ is in a
quantum superposition state $\ket{+}\bra{+}$ with
$\ket{+}=(\ket{0}+\ket{1})/\sqrt{2}$, the causal order becomes indefinite and
cannot be expressed as a combination of definite causal orders. Instead, the
indefinite causal order now exhibits the coherence between two causal orders
induced by items $\ket{1}\bra{0}$ and $\ket{0}\bra{1}$ (Fig 1(d)).

Figure 1: Illustration of different causal orders. (a) If $\rho_{c}$ is in
$\ket{1}\bra{1}$, the causal order is $A_{2}\cdot A_{1}$. (b) If $\rho_{c}$ is
in $\ket{0}\bra{0}$, the causal order is $A_{1}\cdot A_{2}$. (c) If $\rho_{c}$
is in the linear combination of two above state, i.e. in $I/2$ (classical 2
switch), the causal order is separable as the linear combination of two above
definite orders. (d) If $\rho_{c}$ in the superposition (i.e.
$\ket{+}\bra{+}$), the causal order is indefinite and cannot be separated into
some definite causal orders, with the superposition of causal order (induced
by $\ket{1}\bra{0}$ and $\ket{0}\bra{1}$).

Let us now generalize the 2-switch structure to the $N$-switch structure with
the causal orders defined by the arrangements of $N$ operators $A_{k}$. In
this case, the control system basis state $\ket{\pi}$ signifies that the $N$
gates are deployed in the order $(\pi_{1},...,\pi_{N})$ and the resulting
overall unitary gate is $\tilde{A}_{\pi}=A_{\pi_{N}}...A_{\pi_{1}}$. The order
here is encoded into the state $\ket{\pi}$ at the initialization stage of the
control process, and there is no dynamical control involved. For different
fixed orders $\pi\in\prod_{\mathcal{N}}$, we get different output function
$f^{\pi}_{\bm{\theta}(x)}$ with the same frequency spectrum, but different
coefficients

$\displaystyle c^{\pi}_{kl}(\bm{\theta})=\sum_{\bm{i},\bm{j}}$
$\displaystyle(T^{\pi_{1}})^{\dagger}_{1i_{1}}(\theta_{1})(T^{\pi_{2}})^{\dagger}_{i_{1}i_{2}}(\theta_{2})\dots(T^{\pi_{N}})^{\dagger}_{i_{N-1}k}(\theta_{N})O_{kl}$
$\displaystyle T^{\pi_{N}}_{lj_{N-1}}(\theta_{N})\dots
T^{\pi_{2}}_{j_{2}j_{1}}(\theta_{2})T^{\pi_{1}}_{j_{1}1}(\theta_{1}),$ (6)

where $\bm{\theta}$ is the variational parameter. As a consequence, the new
output with classical $N$-switch is in the form of the linear combination of
different orders such that

$f_{\bm{\theta}}(x)=\sum_{\pi}p_{\pi}\sum_{k,l\in[d]}c_{kl}^{\pi}e^{i(\lambda_{k}-\lambda_{l})x},$
(7)

with $p_{\pi}\geq 0$ and $\sum_{\pi}p_{\pi}=1$. In this case, the spectrum is
still the result of the difference of eigenvalues $\lambda_{k}-\lambda_{l}$
and remains the same as that in the fixed order case. By contrast, the control
system $\rho_{c}$ of a quantum $N$-switch structure includes not only diagonal
elements $\ket{\pi}\bra{\pi}$, similar to the fixed orders case, but also non-
diagonal elements $\ket{\pi}\bra{\pi^{\prime}}$, where $\pi$ and
$\pi^{\prime}$ are two different orders. Therefore, the coefficients appearing
in the output function contain new terms induced by the non-diagonal elements
of $\rho_{c}$, besides those in Eq. (6) induced by the diagonal elements. For
instance, with $\pi$ representing the ascending order
$W(\mathbf{\theta})^{\pi}=T^{N}(\theta_{N})...T^{1}(\theta_{1})$ and
$\pi^{\prime}$ as the descending order
$W(\mathbf{\theta})^{\pi^{\prime}}=T^{1}(\theta_{1})...T^{N}(\theta_{N})$, the
coefficient corresponding to $\ket{\pi^{\prime}}\bra{\pi}$ is given by

$\displaystyle c_{kl}^{\ket{\pi^{\prime}}\bra{\pi}}(\bm{\theta})=$
$\displaystyle\sum_{\bm{i},\bm{j}}(T^{N})^{\dagger}_{1i_{1}}(\theta_{N})(T^{N-1})^{\dagger}_{i_{1}i_{2}}(\theta_{N-1})\dots$
$\displaystyle(T^{1})^{\dagger}_{i_{N-1}k}(\theta_{1})O_{kl}T^{N}_{lj_{N-1}}(\theta_{N})\dots$
$\displaystyle T^{2}_{j_{2}j_{1}}(\theta_{2})T^{1}_{j_{1}1}(\theta_{1}).$ (8)

Therefore, the consequent output function is

$f_{\bm{\theta}}(x)=\sum_{\pi,\pi^{\prime}}\rho_{c}^{\ket{\pi^{\prime}}\bra{\pi}}\sum_{k,l\in[d]}c_{kl}^{\ket{\pi^{\prime}}\bra{\pi}}e^{i(\lambda_{k}-\lambda_{l})x},$
(9)

where $\rho_{c}^{\ket{\pi^{\prime}}\bra{\pi}}$ is the coefficient of element
$\ket{\pi^{\prime}}\bra{\pi}$ in the control system state $\rho_{c}$. Here,
the spectrum is still determined by $\lambda_{k}-\lambda_{l}$.

From the above discussion, it is clear that introducing controls of causal
order keeps the frequency spectrum of the output mapping unchanged but alters
the coefficients associated with respective frequencies. This flexibility of
these coefficients allows an enhancement on the learning ability. In contrast
to classical control of causal order that exploiting the linear combination of
different orders, quantum control takes the flexibility a step further by
introducing novel coefficients arising from the coherence of different orders,
which do not exist in any fixed order. This property indicates a higher level
of expressivity.

##  III Simulation of quantum causal order on a quantum circuit

Although a typical $N$-switch has been demonstrated experimentally, the
accessible quantum computation platforms, including relevant packages and
quantum computers, are all with a fixed order. As such, to explore the
advantages of quantum circuit with quantum causal order, we still rely on the
conventional quantum circuit with a fixed order to proceed with the
simulation, but will have to reform the existing method [49].

The fundamental concept involves utilizing certain subsystems to assist in
order control and subsequently discarding these subsystems. Let us now
consider the simulation of a quantum circuit with an $N$-switch with $N$
gates, denoted as $\\{A_{i}\\}$. The objective is to implement quantum causal
order on the target system $\mathcal{H}^{t}$. Given that each order $\pi_{i}$,
where $i\in\\{1,...,N!\\}$, is distinguishable, the bases $\ket{\pi}$ of an
ancillary system $\mathcal{H}^{\alpha}$ represent these permutation orders.
There are $N$ additional working target systems
$\mathcal{H}^{t_{1}},...,\mathcal{H}^{t_{N}}$, each isomorphic to
$\mathcal{H}^{t}$. Additionally, we require a control system
$\mathcal{H}^{c}\otimes\mathcal{H}^{C_{H}}$ to manage the insertion of gates.
In the control system, $\mathcal{H}^{c}$ is spanned by
$\\{\ket{k}^{c}\\}^{N}_{k=1}$, with the basis $\ket{k}^{c}$ indicating the
gates inserted into the current slot. Simultaneously, $\mathcal{H}^{C_{H}}$ is
spanned by $\\{\otimes_{i=1}^{N}\ket{\mathcal{K}_{i}}\\}$, where
$\mathcal{K}_{i}=1$ if the $i$th operator $A_{i}$ has been applied and
$\mathcal{K}_{i}=0$ otherwise.

The primary control method is as follows: The overall initial state is given
by

$\ket{\psi_{0}}=\ket{\psi}^{t}\otimes\ket{\psi_{\pi}}^{\alpha}\otimes\ket{0}^{c}\otimes\ket{\emptyset}^{C_{H}}\bigotimes_{i=1}^{N}\ket{0}^{t_{i}},~{}\forall\psi,$
(10)

where $\ket{\psi}^{t}$ is the initial target state and
$\ket{\psi_{\pi}}^{\alpha}=\sum_{i}c_{i}\ket{\pi_{i}}^{\alpha}$ represents the
superposition of different order. We employ control operators $U_{1}$ between
the initial state and the first slot, $U_{n+1}$ between the $n$th and
$(n+1)$th slots for $n\in\\{1,...,N-1\\}$, and $U_{N+1}$ between the $N$th
slot and the final state. According to the order state $\ket{\pi}$ of the
ancillary system, control operator $U_{1}$ transforms the initial state
$\ket{0}$ of $\mathcal{H}^{c}$ to $\ket{\pi(1)}$. Control operator $U_{n+1}$
changes the state $\ket{\pi(n)}$ of $\mathcal{H}^{c}$ to $\ket{\pi(n+1)}$ and
flips the state $\ket{\mathcal{K}_{\pi(n)}}$ of $\mathcal{H}^{C_{H}}$ from
$\ket{0}$ to $\ket{1}$. Control operator $U_{N+1}$ changes the state
$\ket{\pi(N)}$ of $\mathcal{H}^{c}$ to $\ket{0}$ and flips the state
$\ket{\mathcal{K}_{\pi(N)}}$ of $\mathcal{H}^{C_{H}}$ from $\ket{0}$ to
$\ket{1}$. Here, $\pi(n)$ represents the gate inserted in slot $n$ with the
order $\pi$. Following the control operator, a Controlled-SWAP operator swaps
the target system $\mathcal{H}^{t}$ and the additional working system
$\mathcal{H}^{t_{\pi(n)}}$ as indicated by the state $\ket{\pi(n)}$ of the
system $\mathcal{H}^{c}$. At each slot, gate $A_{k}$ is applied to the $k$th
additional working system $\mathcal{H}^{t_{k}}$ to ensure that the target
state undergoes the gate $A_{\pi(n)}$. Subsequently, another Controlled-SWAP
is applied to swap the target state back to the target system
$\mathcal{H}^{t}$.

In the above discussion, all subsystems are assumed to have proper dimensions,
but this condition is not realistic in practice. For example, the
$N!$-dimensional ancillary system represents the different orders of the
$N$-switch structure. However, in a quantum circuit, this system should
consist of $n$ qubits, as $2^{n}\geq N!$, and we need to take into account the
redundant $2^{n}-N!$ dimensions. To implement this simulation method, we need
to provide the realistic and feasible structure of the simulation circuit.
That is, in an $N$-switch structure, there are $N!$ different orders, and $N$
gates are inserted in these orders. These characteristics necessitate the
consideration of some redundancies in these systems. The ancillary system
$\mathcal{H}^{\alpha}$ comprises $N_{\alpha}=\lceil\log(N!)\rceil$ qubits. The
first $N!$ basis vectors, forming the effective space $E$, represent the
permutation orders, while the rest constitute a redundancy space $R$. In the
control system, $\mathcal{H}^{c}$ contains $N_{c}=\lceil\log(N)\rceil$ qubits.
The first $N$ basis vectors, denoted as the effective space $c_{E}$, indicate
one of $N$ gates to be inserted, and the rest form the redundancy space
$c_{R}$. Additionally, $\mathcal{H}^{C_{H}}$ is composed of $N$ qubits. The
target system consists of $N_{t}$ qubits, and the $N$ additional working
systems are all isomorphic to the target system, requiring $NN_{t}$ qubits.
Therefore, a total of $N_{t}(N+1)+N_{\alpha}+N+N_{c}$ qubits are necessary in
the quantum circuit. These redundancy spaces $R$ and $c_{R}$ (ignored in
previous work) should be treated appropriately. Taking into account the
redundancy spaces, we clarify the control unitary operators $U_{i}$,

$\displaystyle
U_{1}=\mathbbm{1}^{t}\otimes\mathbbm{1}^{C_{H}}\otimes\bigg{(}\sum_{\pi\in
E}\ket{\pi}\bra{\pi}^{\alpha}\otimes\sum_{i\in
cE}\ket{\pi(1)+i}\bra{i}^{c}+\sum_{\pi\in
E}\ket{\pi}\bra{\pi}^{\alpha}\otimes\sum_{i\in
cR}\ket{i}\bra{i}^{c}+\sum_{\pi\in
R}\ket{\pi}\bra{\pi}^{\alpha}\otimes\sum_{i}\ket{i}\bra{i}^{c}\bigg{)},$
$\displaystyle
U_{n}=\left(\mathbbm{1}^{tC_{H}}\otimes\text{SHIFT}^{(c,\alpha)}\right)\left(\mathbbm{1}\otimes\text{ExUnion}^{(C_{H},c)}\right),\quad
n\in\\{2,...,N\\},$ $\displaystyle
U_{N+1}=\left(\mathbbm{1}^{tC_{H}}\otimes\text{FINAL}^{(\alpha,c)}\right)\left(\mathbbm{1}\otimes\text{ExUnion}^{(C_{H},c)}\right),$
(11)

with some functional components

$\displaystyle\text{ExUnion}^{(C_{H},c)}=\sum_{i\in
cE}\ket{i}\bra{i}^{c}\otimes\sum_{K}\ket{K\bcancel{\cup}\\{i\\}}\bra{K}^{C_{H}}+\sum_{i\in
cR}\ket{i}\bra{i}^{c}\otimes\mathbbm{1}^{C_{H}},$
$\displaystyle\text{SHIFT}^{(c,\alpha)}=\sum_{j\in cE}\sum_{\pi\in
E}\ket{\pi}\bra{\pi}^{\alpha}\otimes\ket{\pi(\pi^{-1}(j)+1)}\bra{j}^{c}+\left(\sum_{j\in
cE}\sum_{\pi\in R}+\sum_{j\in cR}\sum_{\pi\in E}+\sum_{j\in cR}\sum_{\pi\in
R}\right)\ket{\pi}\bra{\pi}^{\alpha}\otimes\ket{j}\bra{j}^{c},$
$\displaystyle\text{FINAL}^{(\alpha,c)}=\left(\sum_{\pi\in E\&j\in
cE}\ket{\pi}\bra{\pi}^{\alpha}\otimes\ket{j}\bra{\pi(N)+j}^{c}+\sum_{\text{otherwise}}\ket{\pi}\bra{\pi}^{\alpha}\otimes\ket{j}\bra{j}^{c}\right),$
(12)

where $K\bcancel{\cup}\\{i\\}=K\cup{i}$ if ${i}\not\subset K$, else
$K\bcancel{\cup}{i}=K\setminus\\{i\\}$. At each time slot, the Controlled-SWAP
gate with $A_{k}$ acting on the additional working systems constructs the gate
the $\tilde{A}^{\prime}$, resulting in

$\tilde{A}^{\prime}=\left(\sum_{k\in
cE}\ket{k}\bra{k}^{c}\otimes\text{SWAP}(t,t_{k})+\sum_{k\in
cR}\ket{k}\bra{k}^{c}\otimes
I\right)\left(\bigotimes_{k=0}^{N-1}A_{k}\right)\left(\sum_{k\in
cE}\ket{k}\bra{k}^{c}\otimes\text{SWAP}(t,t_{k})+\sum_{k\in
cR}\ket{k}\bra{k}^{c}\otimes I\right)$ (13)

with the SWAP gate that swaps the states of two $d$-dimensional quantum
systems given by

$\text{SWAP}(a,b)=\sum_{i,j=0}^{d-1}\ket{i}\bra{j}^{a}\otimes\ket{j}\bra{i}^{b}.$
(14)

With such a construction, the overall quantum circuit for the $N$-switch
structure is apparent, and the final state $\ket{\psi_{f}}$ is given by

$\ket{\psi_{f}}=U_{N+1}\tilde{A}^{\prime}U_{N}\ldots
U_{2}\tilde{A}^{\prime}U_{1}\ket{\psi_{0}}.$ (15)

In this final state $\ket{\psi_{f}}$, the superposition of $N!$ permutation
orders is achieved with the superposition of the ancillary system state
$\ket{\psi_{\pi}}^{\alpha}$. It is noted that there are some redundant
elements from the bases $\ket{\pi}^{\alpha}$, where $\pi\in R$. This redundant
part can be discarded by setting the ancillary part in the observable as a
Hermitian operator existing in the effective space $E$.

##  IV Verification of improvement from indefinite causal order

After having illustrated the simulation method in the above section, let us
now take two examples to showcase the benefits of a more flexible causal
order. One is a quantum learning model with a 2-switch structure, where the
output function with indefinite causal order performs better than that with
fixed and classical orders. The other one is applying a 3-switch structure to
a binary classification task, where the classical order allows an improved
accuracy and the quantum order permits a higher-level improvement, compared
with the fixed-order structure.

###  IV.1 Quantum learning model with 2-switch

Consider a simple quantum circuit with a 2-switch structure. In this learning
structure, we take the initial state as $\ket{0}$, the input as $x$ (encoded
by the rotation angle of a $R_{X}$ gate) and the variational parameter as
$\theta$ (encoded by the rotation angle of a $R_{Z}$ gate). The observable is
$\sigma_{z}$ and the output is the expectation value of this observable,
denoted by $y$. For this setup, there exist two causal orders,
$R_{Z}(\theta)R_{X}(x)$ and $R_{X}(x)R_{Z}(\theta)$. With the first order
$R_{Z}(\theta)R_{X}(x)$, the output state is $R_{Z}(\theta)R_{X}(x)\ket{0}$
and then the final mapping function is $\cos x$. We can find that the
variational parameter $\theta$ disappears and hence this structure has no
learning ability based on the fact we cannot adjust the variational parameter
$\theta$ to fit the target function (not $\cos x$). For the second order
$R_{X}(x)R_{Z}(\theta)$, the output function is still $\cos x$ and thus this
circuit has no learning ability either.

We now add an order control system $\mathcal{H}^{c}$ with $\ket{0}^{c}$ and
$\ket{1}^{c}$ indicating the orders $R_{Z}(\theta)R_{X}(x)$ and
$R_{X}(x)R_{Z}(\theta)$ respectively. In this case, the initial state of whole
system is $\ket{+}^{c}\otimes\ket{0}$. In the classical 2-switch structure,
the whole observable reads $I^{c}\otimes\sigma_{z}$ and the output is the
linear combination of two different orders after tracing out the control
system, thereby the output being still $\cos x$. As a result, the classical
control version of this structure is unable to learn a general target
function. However, in the quantum case, the coherence of two different orders
is introduced into the learning model. This leads to the whole observable
being $\ket{+}\bra{+}^{c}\otimes\sigma_{z}$. It is straightforward that the
coherence of different orders is from the items $\ket{0}\bra{1}^{c}$ and
$\ket{1}\bra{0}^{c}$ in the control system. From this structure, a new
function appears, that is $[(3+\cos\theta)\cos x+1-\cos\theta]/4$. Clearly,
the variational parameter $\theta$ reemerges and an additional item with zero
frequency appears in this Fourier series.

This structure can be made more complex by replacing $R_{Z}(\theta)$ with a
general unitary gate involving three variational parameters such that
$R_{Z}(\theta)\to U(\theta,\phi,\lambda)$. For the order
$U(\theta,\phi,\lambda)R_{X}(x)$, the output function is given by
$\cos\theta\cos x-\sin\theta\sin\lambda\sin x$. It is obvious that the
variational parameter $\phi$ disappears and there is no constant item. For the
$R_{X}(x)U(\theta,\phi,\lambda)$, the output function reads $\cos\theta\cos
x-\sin\theta\sin\phi\sin x$, which is similar to the above one except for the
replacement between $\phi$ and $\lambda$ so that there is no constant item
with any definite order and their mixture (namely, classical control of
order). But with the coherence of these two different orders, a new item
emerges. It is
$(1+\sin\phi\sin\lambda)\cos\theta-\cos\phi\cos\lambda+(\sin\phi-\sin\lambda)\sin\theta\sin
x+[(1-\sin\phi\sin\lambda)\cos\theta+\cos\phi\cos\lambda]\cos x$ arising from
the interference between two orders $\ket{0}\bra{1}$ and $\ket{1}\bra{0}$. The
constant item appears, and all variational parameters can be used to optimize
this learning model.

###  IV.2 Improvement in a classification task

We have demonstrated the improvement of learning ability by analyzing the
output function. In the following, we perform a binary classification task
using a single qubit circuit with a two-dimensional dataset to showcase this
learning advantage in practical scenarios. Here, we use the package QISKIT
[50] to construct the quantum circuit and then train it with COBYLA so as to
get optimal parameters.

The input is a 2D vector $x=[x_{1},x_{2}]$ with $x_{1},x_{2}\in[-1,1]$. The
distribution of the dataset is as follows: a square with a width of 2 is
divided into two parts by a circle with a radius of $\sqrt{2/\pi}$. The
samples inside (outside) the circle with label $y=-1$ ($1$) are marked as
green (blue) points. The decision function is

$y=\text{sgn}\left[(x_{1})^{2}+(x_{2})^{2}-\frac{2}{\pi}\right].$ (16)

In this learning task, we utilize a single qubit system to perform the
computation. The model includes a $R_{Z}$ gate for encoding the variable
$x_{1}$, a $R_{Y}$ gate for encoding the variable $x_{2}$, and a unitary gate
$U(\phi,\theta,\omega)$ containing three trainable parameters
$[\phi,\theta,\omega]$. The observable is taken as $\sigma_{z}$. As the
output, denoted as $e\in[-1,1]$, is the expectation value, we define the
classification criterion as

$y=\begin{cases}-1,~{}~{}~{}e\leq 0,\\\ 1,\quad~{}~{}e>0.\end{cases}$ (17)

To provide a clearer comparison, we simplify the setup by using only one layer
that contains three gates mentioned above, without repeating it. The training
dataset consists of 200 sample points.

We start with the fixed order
$U_{\text{overall}}=U(\phi,\theta,\omega)R_{Y}(x_{2})R_{Z}(x_{1})$, as shown
in Fig. 2(a). The accuracy of classification for such structure is $50\%$ with
the optimal parameters vector
$[\lambda,\theta,\omega]=[1.6623,0.8838,1.5971]$. Then, we test this obtained
model. The testing result is shown in Fig. 2(b), where all input points are
recognized as green. The result indicates that the structure lacks the ability
to learn the target pattern.

Figure 2: Circuit with the fixed order and the classification result for two
dimensional binary classification task. (a) The circuit with fixed order. The
first two gates $R_{Z}$ and $R_{Y}$ are used to encode the two dimensional
input vector $[x_{1},x_{2}]$, and the unitary gate with three training
parameters $\\{\lambda,\theta,\omega\\}$ is as the variational part. (b) The
classification result of 200 randomly selected samples. The wrongly classified
samples are marked with red circles. The accuracy is $50\%$.

Then, we introduce the circuit setup for simulating classical and quantum
3-switch with $U(\phi,\theta,\omega)$, $R_{y}(x_{2})$ and $R_{z}(x_{1})$, the
structure of which is shown in Fig. 3. The circuit consists of 9 qubits, where
$n_{\alpha}=3$ qubits $(q_{6},q_{7},q_{8})$ are allocated for the ancillary
system $\mathcal{H}^{\alpha}$, $n_{c}=2$ qubits $(q_{4},q_{5})$ are allocated
for the control system $\mathcal{H}^{c}$, and qubit $q_{0}$ is allocated for
the target $\mathcal{H}^{t}$. There is an additional working target system
$(q_{1},q_{2},q_{3})\in\mathcal{H}^{t_{1}t_{2}t_{3}}$. Considering that it is
unnecessary to record which gate is used in our simulation, there is no system
$\mathcal{H}^{C_{H}}$. For the pink block in Fig. 3, we place three unitary
gates on the $n_{\alpha}$ qubits, resulting in 9 trainable parameters
$[cr_{ij}],i,j=1,2,3$. Besides, we add three CNOT gates into this block so as
to produce entanglement between different qubits. This makes the states in
$\mathcal{H}^{\alpha}$ flexible enough to represent different distributions of
6 possible orders, labelled by the first six basic states, from
$\ket{000}^{\mathcal{H}^{\alpha}}$ to $\ket{101}^{\mathcal{H}^{\alpha}}$, in
this space. Denoting $R_{Z}(x_{1})$ as gate 0, $R_{Y}(x_{2})$ as gate 1 and
$U(\phi,\theta,\omega)$ as gate 2, then the sequences of the 6 possible orders
are given by $\\{[0,1,2],[0,2,1],[1,0,2],[1,2,0],[2,0,1],[2,1,0]\\}$.

Figure 3: Circuit diagram for a 3-switch system utilizing 9 qubits. It depicts
a 3-switch circuit for introducing classical control of causal order to actual
gates $U(\phi,\theta,\omega)$, $R_{Y}(x_{2})$, and $R_{Z}(x_{1})$. The circuit
comprises 9 qubits, with 3 qubits ($q_{6},q_{7},q_{8}$) allocated for the
ancillary system $\mathcal{H}^{\alpha}$, 2 qubits ($q_{4},q_{5}$) for the
control system $\mathcal{H}^{c}$, and 4 qubits for the target system
$\mathcal{H}^{t}$ and additional working target system
$\mathcal{H}^{t_{1}t_{2}t_{3}}$. The flexibility in the ancillary system
allows leveraging the superposition of different orders. The red block
represents three unitary gates on the ancillary qubits with 9 trainable
parameters $[cr_{ij}]$. Additionally, CNOT gates induce entanglement between
different qubits in the ancillary system. Internal operations $U_{1}$,
$U_{2}$, $U_{3}$ ,$U_{4}$ (blue blocks) connect the ancillary and control
systems and transfer the control system’s state based on the order state. The
control system’s basic states determine which actual gate is applied. The
yellow block shows three control swap (csw) gates that swap target and
additional target qubit systems based on the control system’s state. Three
control swaps are needed to construct the overall swap operation.

The internal operations $U_{1}$, $U_{2}$, $U_{3}$ and $U_{4}$ in the circuit
diagram are depicted as blue blocks. These operations is used to connect the
ancillary and control systems, and to change the state of the control system
based on the states in the ancillary system. The first three basis states
$\ket{00}^{\mathcal{H}^{c}}$, $\ket{01}^{\mathcal{H}^{c}}$ and
$\ket{10}^{\mathcal{H}^{c}}$ of the control system indicate the actual gate
applied to the target state in the subsequent steps, and the last basis state
$\ket{11}^{\mathcal{H}^{c}}$ is a redundancy. This mechanism allows for the
control of the gate operations based on the specific order being processed.
The yellow block comprises three elementary controlled-swap gates, employed to
swap the target system with one of three additional target qubit systems,
effectively constructing an aforementioned Controlled-SWAP gate.

The variational parameters makes up a 12-dimensional vector
$[\phi,\theta,\omega,\\{cr_{ij}\\}_{i,j=1,2,3}]$. In classical $N$-switch,
different orders exist simultaneously, but there is no coherence between them.
Therefore, the observable is $\sum_{\pi_{i}\in
E}\ket{\pi_{i}}\bra{\pi_{i}}^{\alpha}\otimes
I^{ct_{1}t_{2}t_{3}}\otimes\sigma_{z}^{t}\in\mathcal{H}^{\alpha
ct_{1}t_{2}t_{3}t}$. The output is the linear combination of different orders.
Here, we would like to point out that due to the redundancy of the ancillary
system $\mathcal{H}^{\alpha}$, the final output differs slightly from the
ideal one without the redundancy space. That is, with the final state
$\ket{\psi_{\pi}}^{\alpha}=\sum_{i}c_{i}\ket{\pi_{i}}^{\alpha}$ of
$\mathcal{H}^{\alpha}$ and the observable $\sum_{\pi_{i}\in
E}\ket{\pi_{i}}\bra{\pi_{i}}^{\alpha}$ measured on the effective space $E$,
the ideal state of $\mathcal{H}^{\alpha}$ should be
$\ket{\psi_{\pi}}^{\alpha}_{\text{ideal}}=\gamma\sum_{\pi_{i}\in
E}c_{i}\ket{\pi_{i}}^{\alpha}$ with a normalization factor
$\gamma=\left(\sum_{\pi_{i}\in E}|c_{i}|^{2}\right)^{-1}$. Therefore, this
difference only involves a positive scaling factor $\gamma$ and hence does not
affect the predicted label or the accuracy of the ideal structure.

Figure 4: Possibilities of the final state based on classical $N$-switch. The
first six bases represent different orders. Among these six bases, the
dominant outputs are observed for $\ket{000}$ and $\ket{001}$, resulting in a
final result that is a linear combination of these two orders.

With the classical control of causal order, the final accuracy significantly
improves to $62\%$ with the optimal parameter vector
$[1.7567,2.2360,0.7842,0.9630,0.2881,0.7284,1.8383,\\\
0.8536,-0.0387,0.0011,0.4796,0.7081]$. The learnt classification boundary is
about $x_{2}=-0.75$, i.e., the blue points in the lower edge part are
classified correctly, as shown in Fig. 6(a). This demonstrates that the new
structure has successfully learned a significant portion of the target
pattern. Thus, the enhanced expressivity of the circuit from classical control
of causal order is confirmed.

Figure 5: Circuit with order $[1,0,2]$ and the classification result for two
dimensional binary classification task. (a) The circuit with order $[1,0,2]$.
The overall unitary operator is
$R_{Y}(x_{2})U(\lambda,\theta,\omega)R_{Z}(x_{1})$ (b) The classification
result of 200 randomly selected samples. The wrongly classified samples are
marked with red circles. The accuracy is $50\%$.

As the output is the linear combination of different orders and the
corresponding coefficients are proportional to the possibilities on the basic
states, we project the final state $\ket{\psi}^{\alpha}$ to the bases in the
ancillary system. The possibility distribution is shown in Fig. 4. The result
indicates that the optimal output using the classical $N$-switch occurs when
combining the orders $[0,1,2]$ and $[1,0,2]$ mainly. In line with the
explanation in the fixed order case, the circuit with the order $[0,1,2]$
fails to capture the underlying pattern. Similarly, the circuit with the order
$[1,0,2]$ (shown in Fig. 5) also struggles to recognize the distribution
pattern with the optimal parameters $[1.6623,1.5971,0.7883]$. However, a
linear combination of the two orders demonstrates an improved learning
capability, capturing a significant portion of the target pattern. This
improvement validates the efficacy of the classical control of causal order.

Figure 6: Classification result of 200 randomly selected samples for the
circuits with classical and quantum control of causal order. The wrongly
classified samples are marked with red circles. (a) With the classical control
of causal order, the circuit is able to identify the lower edge part, the
boundary is a line at about $x_{2}=-0.75$ and the accuracy increases to
$62\%$. (b) With the quantum control of causal order, the accuracy increases
to $86\%$. Only some sample points around the classification boundary are
classified wrongly. This implies the learnt boundary becomes the correct
circle boundary almost.

If we integrate the quantum control of causal order into the learning model,
the accuracy can be further improved to a higher level. To that end, we define
our observable as
$\sum_{\pi_{i},\pi_{j}\in\alpha_{E}}\ket{\pi_{i}}\bra{\pi_{j}}^{\alpha}\otimes
I^{ct_{1}t_{2}t_{3}}\otimes\sigma_{z}\in\mathcal{H}^{\alpha
ct_{1}t_{2}t_{3}t}$ which, by construction, can exploit the interference
between different casual orders. In this setup, the term
$\ket{\pi_{i}}\bra{\pi_{j}}^{\alpha}$ with $i\neq j$ represents the coherence
of different order $\pi_{i}$ and $\pi_{j}$, a term absent from classical
control. The diagonal part of $\ket{\pi_{i}}\bra{\pi_{i}}^{\alpha}$, akin to
the classical $N$-switch scenario, is not related to the coherence between
different orders and thus only representing a mixture of different orders.
With the optimal parameters
$[1.6628,1.6813,1.3400,1.4326,1.5209,0.0921,0.5260,\\\
0.9382,1.2003,1.5877,-0.3781,-0.5879]$ from the training, the accuracy
improves further to $86\%$. From the distribution of the classification result
in Fig. 6(b), it can be observed that a few points near the boundary are
misclassified. However, the learned boundary approaches the actual circular
boundary quite closely. As a result, this model has successfully learned the
underlying pattern to a significant extent.

Figure 7: Real and imaginary parts of the ancillary system state matrix using
quantum 3-switch. The color of each square indicates the sign of the
corresponding element, with white representing positive values and black
indicating negative values. The size of each square reflects the absolute
value. The first six bases (highlighted by red lines) are of particular
interest. The analysis reveals a strong coherence among the orders $[0,1,2]$,
$[1,2,0]$, and $[2,1,0]$.

To investigate the coherence among different orders, the state matrix $\rho$
of the ancillary system is presented in Fig 7. The left-hand side displays the
real part of the state matrix, while the right-hand side shows the imaginary
part. The color of each square indicates the sign of the corresponding matrix
element, with white representing positive values and black indicating negative
values. The size of each square reflects the absolute value of the element.
Since the last two bases, $\ket{110}$ and $\ket{111}$, serve as redundant
parts with no specific order, our focus is solely on the first six bases.
Notably, the bases $\ket{000}$, $\ket{011}$, and $\ket{101}$ dominate the
matrix, suggesting that the orders $[0,1,2]$, $[1,2,0]$, and $[2,1,0]$, along
with their coherence, play a decisive role in determining the output. Upon
revisiting the performance with 2 re-uploading layers with fixed order, we
observe an improvement to an accuracy $78\%$, albeit not surpassing the
results obtained with quantum control of causal order. Although this setup
incorporates more gates (six gates in this case), the comparison with the
quantum control case suggests that while expanding the spectrum range with
more layers, the flexibility of the respective coefficients may still
constrain our model from achieving superior learning capabilities. This
observation implies that, in many cases, the frequency spectrum alone may be
adequate, but the restricted flexibility of the coefficients hinders the
improvements in model performance.

Figure 8:  Circuit with a fixed order and 2 re-uploading layers, along with
its classification result. The performance demonstrates improvement compared
to the single layer case. Correct classification is observed for the upper and
lower parts of the blue points, resulting in an accuracy of $78\%$.

Based on the above results, we can observe that as the control of causal order
becomes more complex, the expressivity of a quantum circuit improves
significantly. By controlling the causal order, we can manipulate the flow of
information and the quantum coherence within the circuit, allowing for more
intricate and sophisticated computations. Therefore, the control of causal
order plays a crucial role in harnessing the full potential of a quantum
circuit, enabling it to tackle more intricate tasks and enhance its learning
ability.

##  V conclusion

In this paper, we have investigated enhanced learning ability achieved with
classical order and indefinite causal order, in contrast to the prevailing
fixed-order structure in current quantum machine learning models. Through an
analysis of the output function, we have elucidated that classical control of
causal order only uses a linear combination of different orders. By contrast,
indefinite causal order introduces coherence between different orders,
resulting in more complex and coherent coefficients. These improvements are
further confirmed by two examples, the output function of a 2-switch structure
and the performance of a 3-switch structure in a binary classification task.
With the improvement from quantum causal order having been demonstrated
through simulations on a quantum circuit in this paper, its actual performance
on a real quantum device with different causal orders needs to be confirmed.
Additionally, beyond the $N$-switch structure, the dynamic quantum causal
order structure [48] is more intricate, and hence exploring the effects of
this structure should be a promising avenue for future studies.

## References

  * [1]
  * Lloyd [1996] S. Lloyd, Universal quantum simulators, Science 273, 1073 (1996).
  * DiVincenzo [1995] D. P. DiVincenzo, Quantum computation, Science 270, 255 (1995).
  * Nielsen and Chuang [2002] M. A. Nielsen and I. Chuang, Quantum computation and quantum information (2002).
  * Shor [1999] P. W. Shor, Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer, SIAM review 41, 303 (1999).
  * Grover [1996] L. K. Grover, A fast quantum mechanical algorithm for database search, in  _Proceedings of the twenty-eighth annual ACM symposium on Theory of computing_ (1996) pp. 212–219.
  * Montanaro [2016] A. Montanaro, Quantum algorithms: an overview, npj Quantum Information 2, 1 (2016).
  * Liu  _et al._ [2021] Y. Liu, S. Arunachalam, and K. Temme, A rigorous and robust quantum speed-up in supervised machine learning, Nature Physics 17, 1013 (2021).
  * Peruzzo  _et al._ [2014] A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O’brien, A variational eigenvalue solver on a photonic quantum processor, Nature communications 5, 1 (2014).
  * Kandala  _et al._ [2017] A. Kandala, A. Mezzacapo, K. Temme, M. Takita, M. Brink, J. M. Chow, and J. M. Gambetta, Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets, Nature 549, 242 (2017).
  * Vandersypen  _et al._ [2001] L. M. Vandersypen, M. Steffen, G. Breyta, C. S. Yannoni, M. H. Sherwood, and I. L. Chuang, Experimental realization of shor’s quantum factoring algorithm using nuclear magnetic resonance, Nature 414, 883 (2001).
  * Arute  _et al._ [2019] F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, R. Biswas, S. Boixo, F. G. Brandao, D. A. Buell, _et al._ , Quantum supremacy using a programmable superconducting processor, Nature 574, 505 (2019).
  * Carleo  _et al._ [2019] G. Carleo, I. Cirac, K. Cranmer, L. Daudet, M. Schuld, N. Tishby, L. Vogt-Maranto, and L. Zdeborová, Machine learning and the physical sciences, Reviews of Modern Physics 91, 045002 (2019).
  * Merchant  _et al._ [2023] A. Merchant, S. Batzner, S. S. Schoenholz, M. Aykol, G. Cheon, and E. D. Cubuk, Scaling deep learning for materials discovery, Nature , 1 (2023).
  * Jumper  _et al._ [2021] J. Jumper, R. Evans, A. Pritzel, T. Green, M. Figurnov, O. Ronneberger, K. Tunyasuvunakool, R. Bates, A. Žídek, A. Potapenko, _et al._ , Highly accurate protein structure prediction with alphafold, Nature 596, 583 (2021).
  * Fawzi  _et al._ [2022] A. Fawzi, M. Balog, A. Huang, T. Hubert, B. Romera-Paredes, M. Barekatain, A. Novikov, F. J. R Ruiz, J. Schrittwieser, G. Swirszcz, _et al._ , Discovering faster matrix multiplication algorithms with reinforcement learning, Nature 610, 47 (2022).
  * Biamonte  _et al._ [2017] J. Biamonte, P. Wittek, N. Pancotti, P. Rebentrost, N. Wiebe, and S. Lloyd, Quantum machine learning, Nature 549, 195 (2017).
  * Cong  _et al._ [2019] I. Cong, S. Choi, and M. D. Lukin, Quantum convolutional neural networks, Nature Physics 15, 1273 (2019).
  * Schuld and Killoran [2019] M. Schuld and N. Killoran, Quantum machine learning in feature hilbert spaces, Physical review letters 122, 040504 (2019).
  * McClean  _et al._ [2016] J. R. McClean, J. Romero, R. Babbush, and A. Aspuru-Guzik, The theory of variational hybrid quantum-classical algorithms, New Journal of Physics 18, 023023 (2016).
  * Yuan  _et al._ [2019] X. Yuan, S. Endo, Q. Zhao, Y. Li, and S. C. Benjamin, Theory of variational quantum simulation, Quantum 3, 191 (2019).
  * Goto  _et al._ [2021] T. Goto, Q. H. Tran, and K. Nakajima, Universal approximation property of quantum machine learning models in quantum-enhanced feature spaces, Physical Review Letters 127, 090506 (2021).
  * Mitarai  _et al._ [2018] K. Mitarai, M. Negoro, M. Kitagawa, and K. Fujii, Quantum circuit learning, Physical Review A 98, 032309 (2018).
  * Havlíček  _et al._ [2019] V. Havlíček, A. D. Córcoles, K. Temme, A. W. Harrow, A. Kandala, J. M. Chow, and J. M. Gambetta, Supervised learning with quantum-enhanced feature spaces, Nature 567, 209 (2019).
  * Lloyd  _et al._ [2020] S. Lloyd, M. Schuld, A. Ijaz, J. Izaac, and N. Killoran, Quantum embeddings for machine learning, arXiv preprint arXiv:2001.03622 (2020).
  * Schuld  _et al._ [2020] M. Schuld, A. Bocharov, K. M. Svore, and N. Wiebe, Circuit-centric quantum classifiers, Physical Review A 101, 032308 (2020).
  * Chiribella  _et al._ [2013] G. Chiribella, G. M. D’Ariano, P. Perinotti, and B. Valiron, Quantum computations without definite causal structure, Physical Review A 88, 022318 (2013).
  * Miguel-Ramiro  _et al._ [2023] J. Miguel-Ramiro, Z. Shi, L. Dellantonio, A. Chan, C. A. Muschik, and W. Dür, Enhancing quantum computation via superposition of quantum gates, arXiv preprint arXiv:2304.08529 (2023).
  * Araújo  _et al._ [2014] M. Araújo, F. Costa, and Č. Brukner, Computational advantage from quantum-controlled ordering of gates, Physical review letters 113, 250402 (2014).
  * Salek  _et al._ [2018] S. Salek, D. Ebler, and G. Chiribella, Quantum communication in a superposition of causal orders, arXiv preprint arXiv:1809.06655 (2018).
  * Goswami  _et al._ [2020] K. Goswami, Y. Cao, G. Paz-Silva, J. Romero, and A. White, Increasing communication capacity via superposition of order, Physical Review Research 2, 033292 (2020).
  * Chiribella  _et al._ [2021] G. Chiribella, M. Banik, S. S. Bhattacharya, T. Guha, M. Alimuddin, A. Roy, S. Saha, S. Agrawal, and G. Kar, Indefinite causal order enables perfect quantum communication with zero capacity channels, New Journal of Physics 23, 033039 (2021).
  * Guérin  _et al._ [2016] P. A. 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).
  * Thompson  _et al._ [2018] J. Thompson, A. J. Garner, J. R. Mahoney, J. P. Crutchfield, V. Vedral, and M. Gu, Causal asymmetry in a quantum world, Physical Review X 8, 031013 (2018).
  * Oreshkov  _et al._ [2012] O. Oreshkov, F. Costa, and Č. Brukner, Quantum correlations with no causal order, Nature communications 3, 1092 (2012).
  * Oreshkov [2019] O. Oreshkov, Time-delocalized quantum subsystems and operations: on the existence of processes with indefinite causal structure in quantum mechanics, Quantum 3, 206 (2019).
  * Zhao  _et al._ [2020] X. Zhao, Y. Yang, and G. Chiribella, Quantum metrology with indefinite causal order, Physical Review Letters 124, 190503 (2020).
  * Felce and Vedral [2020] D. Felce and V. Vedral, Quantum refrigeration with indefinite causal order, Physical review letters 125, 070603 (2020).
  * Sazim  _et al._ [2021] S. Sazim, M. Sedlak, K. Singh, and A. K. Pati, Classical communication with indefinite causal order for n completely depolarizing channels, Physical Review A 103, 062610 (2021).
  * Colnaghi  _et al._ [2012] T. Colnaghi, G. M. D Ariano, S. Facchini, and P. Perinotti, Quantum computation with programmable connections between gates, Physics Letters A 376, 2940 (2012).
  * Feix  _et al._ [2015] A. Feix, M. Araújo, and Č. Brukner, Quantum superposition of the order of parties as a communication resource, Physical Review A 92, 052326 (2015).
  * Ebler  _et al._ [2018] D. Ebler, S. Salek, and G. Chiribella, Enhanced communication with the assistance of indefinite causal order, Physical review letters 120, 120502 (2018).
  * Procopio  _et al._ [2019] L. M. Procopio, F. Delgado, M. Enríquez, N. Belabas, and J. A. Levenson, Communication enhancement through quantum coherent control of n channels in an indefinite causal-order scenario, Entropy 21, 1012 (2019).
  * 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).
  * Rubino  _et al._ [2021] G. Rubino, L. A. Rozema, D. Ebler, H. Kristjánsson, S. Salek, P. A. Guérin, A. A. Abbott, C. Branciard, Č. Brukner, G. Chiribella, _et al._ , Experimental quantum communication enhancement by superposing trajectories, Physical Review Research 3, 013093 (2021).
  * Guo  _et al._ [2020] Y. Guo, X.-M. Hu, Z.-B. Hou, H. Cao, J.-M. Cui, B.-H. Liu, Y.-F. Huang, C.-F. Li, G.-C. Guo, and G. Chiribella, Experimental transmission of quantum information using a superposition of causal orders, Physical review letters 124, 030502 (2020).
  * Schuld  _et al._ [2021] M. Schuld, R. Sweke, and J. J. Meyer, Effect of data encoding on the expressive power of variational quantum-machine-learning models, Physical Review A 103, 032430 (2021).
  * Wechs  _et al._ [2021] J. Wechs, H. Dourdent, A. A. Abbott, and C. Branciard, Quantum circuits with classical versus quantum control of causal order, PRX Quantum 2, 030335 (2021).
  * Koska [2021] O. Koska, Simulation of the superposition of multiple temporal gates orders in quantum circuits (2021).
  * Qiskit contributors [2023] Qiskit contributors, Qiskit: An open-source framework for quantum computing (2023).