# Universal time-dependent control scheme for realizing arbitrary linear
bosonic transformations

Ze-Liang Xiang  School of Physics, Sun Yat-sen University, Guangzhou 510275,
China.  Diego González Olivares  Juan José García-Ripoll  Instituto de Física
Fundamental IFF-PCSIC, Calle Serrano 113b, E-28006 Madrid, Spain.  Peter Rabl
Vienna Center for Quantum Science and Technology, Atominstitut, TU Wien,
Stadionallee 2, 1020 Vienna, Austria.

###### Abstract

We study the implementation of arbitrary excitation-conserving linear
transformations between two sets of $N$ stationary bosonic modes, which are
connected through a photonic quantum channel. By controlling the individual
couplings between the modes and the channel, an initial $N$-partite quantum
state in register $A$ can be released as a multiphoton wave packet and,
successively, be reabsorbed in register $B$. Here we prove that there exists a
set of control pulses that implement this transfer with arbitrarily high
fidelity and, simultaneously, realize a prespecified $N\times N$ unitary
transformation between the two sets of modes. Moreover, we provide a numerical
algorithm for constructing these control pulses and discuss the scaling and
robustness of this protocol in terms of several illustrative examples. By
being purely control-based and not relying on any adaptations of the
underlying hardware, the presented scheme is extremely flexible and can find
widespread applications, for example, for boson-sampling experiments,
multiqubit state transfer protocols or in continuous-variable quantum
computing architectures.

Linear unitary transformations between bosonic modes play an integral part in
many quantum information processing applications. For example, by sending a
multimode photonic Fock state through a network of linear optical
elements—thereby implementing such a unitary transformation—the output
distribution of the photons is exponentially hard to predict on a classical
computer [1], but this boson-sampling problem can be simulated efficiently in
a quantum experiment [2, 3, 4, 5, 6, 7, 8, 9]. When combined with single-
photon sources and detectors, the same unitary transformations can be used to
realize a universal quantum computer according to the Knill-Laflamme-Milburn
scheme [10, 11]. Further, by encoding quantum information in continuous-
variable degrees of freedom, one can benefit from efficient bosonic error
correction schemes [12, 13, 14, 15], which is currently explored in
superconducting circuits [16, 17, 18] and trapped ion systems [19]. State
transfer operations between such oscillator-encoded qubits require again the
implementation of unitary transformations between distant bosonic modes.

Figure 1: (a) Sketch of the quantum network considered in this Letter. Two
quantum registers $A$ and $B$, each represented by $N$ bosonic modes, are
connected via a unidirectional waveguide. By controlling the couplings
$g_{A,j}(t)$ and $g_{B,j}(t)$ between the modes and the waveguide, a
multiphoton wave packet can be emitted from register $A$ and successively be
reabsorbed in register $B$. (b) A generic linear unitary transformation $U$
between the modes, which is conventionally implemented by (I) sending photons
through a network of $N(N-1)/2$ beam splitters, can be realized with our
scheme in a time $t_{p}\sim N$ by (II) applying an appropriate set of control
pulses.

In most applications, linear unitary transformations are realized by sending
photons through a network of beam splitters and phase shifters [20], with a
limited amount of tunability. In this Letter, we describe a universal protocol
to achieve the same task through a controlled multiphoton emission and
reabsorption process. The basic idea behind this approach is summarized in
Fig. 1. Two quantum registers $A$ and $B$, which each contain $N$ bosonic
modes, are connected by a unidirectional quantum channel. By controlling the
coupling strength between the channel and each mode, a quantum state stored in
register $A$ is released as a propagating multiphoton wave packet and
reabsorbed in register $B$. Here we demonstrate that, for any given $N\times
N$ unitary matrix $U$, there exists a set of control pulses such that (i) the
reabsorption of the emitted photons can be achieved with arbitrarily high
fidelity and (ii) the whole process implements the transformation

$b_{j}(t_{f})=\sum_{k=1}^{N}U_{jk}a_{k}(t_{0}).$ (1)

Here the $a_{k}(t_{0})$ are the bosonic annihilation operators for the modes
of register $A$ at the initial time $t_{0}$ and the $b_{j}(t_{f})$ are the
corresponding operators for the modes of register $B$ at the final time
$t_{f}$ of the transfer. Moreover, we provide a numerical recipe for
constructing the appropriate control pulses and show that even for completely
random unitaries the overall protocol time, $t_{p}=t_{f}-t_{0}\sim N$, only
scales linearly with the number of modes. Therefore, the current approach
offers an efficient and very flexible way to realize such transformations,
where the targeted operation is fully specified by the shape of the control
pulses and not by the network layout.

_Quantum network dynamics._ —For the following analysis, we focus on the
quantum network in Fig. 1(a), where two sets of $N$ bosonic modes in register
$A$ and register $B$, are coupled to a unidirectional waveguide. For now we
assume that all modes have the same frequency $\omega_{0}$ and that they are
coupled to the waveguide with tunable couplings $g_{A,j}(t)$ and $g_{B,j}(t)$,
respectively, where $j=1,\dots,N$ labels the modes within each register.
Various schemes for realizing such tunable couplings have already been
demonstrated, both in the optical [21, 2, 22, 23] and in the microwave regimes
[25, 26, 3, 28, 29, 30, 4, 32, 33]. When combined with coherent circulators
[8, 9, 10, 11, 12, 7], chiral waveguides [13], or other types of directional
couplers [14, 15, 16] a fully cascaded network, as assumed in this Letter, can
be implemented.

Under the assumption that the spectrum of the waveguide is sufficiently broad
and approximately linear, we can adiabatically eliminate the dynamics of the
propagating photons and derive a set of cascaded quantum Langevin equations
for the register modes [44, 45]. In a frame rotating with $\omega_{0}$, we
obtain

$\displaystyle\dot{c}_{\mu}(t)$ $\displaystyle=$
$\displaystyle-\frac{|g_{\mu}(t)|^{2}}{2}c_{\mu}(t)-g_{\mu}(t)f_{{\rm
in},\mu}(t),$ (2)

together with the input-output relations

$f_{{\rm out},\mu}(t)=f_{{\rm in},\mu}(t)+g_{\mu}^{*}(t)c_{\mu}(t).$ (3)

Here, the index $\mu$ runs over all $2N$ modes and we have made the
identifications $c_{\mu}\equiv a_{\mu}$ and $g_{\mu}\equiv g_{A,\mu}$ for
$\mu=1,\dots,N$ and $c_{\mu}\equiv b_{\mu-N}$ and $g_{\mu}\equiv g_{B,\mu-N}$
for $\mu=N+1,\dots,2N$. The in field $f_{{\rm in},1}(t)\equiv f_{\rm in}(t)$
is a $\delta$-correlated noise operator, which satisfies $[f_{{\rm
in}}(t),f^{\dagger}_{{\rm in}}(t^{\prime})]=\delta(t-t^{\prime})$. All other
in fields are determined by the relation $f_{{\rm in},\mu}(t)=f_{{\rm
out},\mu-1}(t)$, which captures the directional nature of the quantum channel.
By iterating this relation and adopting a vector notation,
$\vec{c}=\left(c_{1},\ldots,c_{2N}\right)^{T}$ and
$\vec{g}=\left(g_{1},\ldots,g_{2N}\right)^{T}$, we obtain

$\dot{\vec{c}}(t)=-\mathcal{M}(t)\vec{c}(t)-\vec{g}(t)f_{{\rm in}}(t),$ (4)

where $\mathcal{M}_{\mu\nu}(t)=g_{\mu}(t)g^{*}_{\nu}(t)\Theta(\mu-\nu)$ and
$\Theta(x)$ is the Heaviside function. Unless stated otherwise, we express
time in units of $\gamma_{\rm max}^{-1}$, where $\gamma_{\rm max}$ denotes the
maximal decay rate into the channel and depends on the specific physical
implementation. With this convention, the couplings $g_{\mu}(t)$ are complex
numbers and constrained to $|g_{\mu}(t)|\leq 1$. A detailed derivation of Eq.
(4) can be found in the Supplemental Material [46].

The general solution of Eq. (4) can be written as

$\vec{c}(t)=\mathcal{G}(t,t_{0})\vec{c}(t_{0})-\int_{t_{0}}^{t}ds\,\mathcal{G}(t,s)\vec{g}(s)f_{{\rm
in}}(s),$ (5)

where the Green’s function $\mathcal{G}(t,t_{0})$ obeys
$\partial_{t}\mathcal{G}(t,t_{0})=-\mathcal{M}(t)\mathcal{G}(t,t_{0})$ and
$\mathcal{G}(t_{0},t_{0})=\mathbbm{1}_{2N}$. The cascaded structure imposed by
the unidirectional waveguide implies that both $\mathcal{M}$ and $\mathcal{G}$
have a lower-triangular form, i.e.,
$\mathcal{M}_{\mu\nu},\mathcal{G}_{\mu\nu}=0$ for $\mu<\nu$. Moreover, each
row $\mu$ of these matrices only depends on the couplings $g_{\nu}(t)$
associated with that and previous modes $\nu\leq\mu$. This allows us to write
the Green’s function as

$\mathcal{G}=\left(\begin{array}[]{cc}G_{AA}&0\\\
G_{BA}&G_{BB}\end{array}\right)\longrightarrow\left(\begin{array}[]{cc}0&0\\\
U&0\end{array}\right),$ (6)

where the expression to the right indicates the targeted evolution at
$t=t_{f}$, as specified in Eq. (1).

_Control pulses._ —To realize the desired dynamics, we first choose a set of
pulse shapes for the couplings $g_{A,j}(t)$ in register $A$. These pulses do
not have to be of any specific shape, but they must be mutually overlapping
and satisfy [46]

$\int_{t_{0}}^{t_{f}}ds\,|g_{A,j}(s)|^{2}\gg 1.$ (7)

This condition ensures that all initial excitations in register $A$ decay into
the waveguide and $G_{AA}(t_{f},t_{0})\simeq 0$ up to exponentially small
corrections.

Next, we must identify a set of control pulses $g_{B,j}(t)$, which achieve the
nontrivial part of the dynamics, $G_{BA}(t_{f},t_{0})\rightarrow U$. To do so,
we assume for now that the whole network is initially prepared in the single
excitation state $|\psi_{\ell}\rangle=\Psi_{\ell}^{\dagger}|{\rm vac}\rangle$,
where $|{\rm vac}\rangle$ is the vacuum state and
$\Psi_{\ell}=\sum_{k=1}^{N}U_{\ell k}a_{k}(t_{0})$. We then define the
amplitudes $F_{j,\ell}(t,t_{0})=\langle{\rm vac}|f_{{\rm
out},N+j}(t)|\psi_{\ell}\rangle$, which represent the field in the channel
right after the $j$th mode of register $B$. We obtain

$F_{j,\ell}(t,t_{0})=\sum_{k=1}^{N+j}g^{*}_{k}(t)\left[\mathcal{G}(t,t_{0})\mathcal{U}^{\dagger}\right]_{k,\ell},$
(8)

where $\mathcal{U}={\rm diag}(U,0_{N})$ is a block-diagonal matrix.

According to Eq. (1), the excitation created by $\Psi^{\dagger}_{\ell}$ is
mapped onto the corresponding excitation of mode $b_{\ell}$ in register $B$.
To achieve this mapping, during the whole protocol, the photon emitted from
state $|\psi_{\ell}\rangle$ must not propagate beyond the $\ell$th node of
register $B$, as otherwise it would be impossible to recapture it at a later
time. Therefore, a necessary requirement for a perfect transfer is that the
dark state condition $F_{\ell,\ell}(t,t_{0})=0$ is satisfied for all times
$t\in[t_{0},t_{f}]$, or equivalently,

$g_{B,\ell}^{*}(t)\left[\mathcal{G}(t,t_{0})\mathcal{U}^{\dagger}\right]_{N+\ell,\ell}=-F_{\ell-1,\ell}(t,t_{0}).$
(9)

For $N=1$ and $U=1$, Eq. (9) reduces to the dark-state condition employed for
identifying control pulses for single-mode quantum state transfer schemes [50,
51, 52, 53, 1, 55, 33] (see also Ref. [56] for a preliminary extension to
multimode setups). In the Supplemental Material [46], we show that satisfying
this generalized set of dark-state conditions for all $\ell=1,\dots,N$ is not
only necessary, but also sufficient to obtain $G_{BA}(t_{f},t_{0})\simeq U$
and $G_{BB}(t_{f},t_{0})\simeq 0$ for sufficiently long $t_{f}$. Moreover, we
show that the implicit equation for $g_{B,\ell}(t)$ in Eq. (9) can be
converted into the following recursive expression:

$g_{B,\ell}(t)=\frac{F^{*}_{\ell-1,\ell}(t,t_{0})}{\sqrt{\int_{t_{0}}^{t}ds\,|F_{\ell-1,\ell}(s,t_{0})|^{2}}}.$
(10)

Because of the cascaded structure of $\mathcal{G}$, the amplitudes
$F_{\ell-1,\ell}(t,t_{0})$ depend on the known control pulses $g_{A,j}(t)$ and
on the previously obtained pulses $g_{B,j}(t)$ for $j<\ell$ only. Therefore,
Eq. (10) can be iteratively applied to compute all control pulses $g_{B,j}(t)$
for register $B$.

Equation (10) proves the existence of a solution to our control problem by an
explicit construction of the coupling pulses, which is the main result of this
Letter. We still need to show, however, that this formal result does not lead
to solutions that violate the constraints $|g_{j}(t)|^{2}\leq 1$, are
unbounded in time, or otherwise unphysical. In the following we achieve this
conclusion by simply applying the protocol for engineering generic $N\times N$
unitary transformations. This approach will also allow us to deduce the
scaling and the robustness of the protocol under realistic conditions.

_Two-by-two unitaries._ —In a first step, we illustrate the application of the
protocol for the simplest nontrivial scenario, $N=2$, shown in Fig. 2(a). For
this setup, we consider the four unitary operations

$\displaystyle U_{T}$ $\displaystyle=$
$\displaystyle\left(\begin{array}[]{cc}1&0\\\ 0&1\end{array}\right),\qquad
U_{S}=\left(\begin{array}[]{cc}0&1\\\ 1&0\end{array}\right),$ (15)
$\displaystyle U_{H}$ $\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2}}\left(\begin{array}[]{cc}1&1\\\
1&-1\end{array}\right),\qquad
U_{C}=\frac{1}{\sqrt{2}}\left(\begin{array}[]{cc}1&i\\\
i&1\end{array}\right).$ (20)

Here, $U_{T}$ corresponds to a simple state transfer between the two
registers, $U_{S}$ additionally swaps the two modes, and the Hadamard
operation $U_{H}$ and the unitary $U_{C}$ create superpositions between the
modes with real and complex coefficients.

To calculate the control pulses for realizing each unitary, we set $t_{0}=0$
and fix the control pulses $g_{A,j}(t)$ to be of the form

$g_{A,j}(t)=\frac{\eta_{j}}{\sqrt{e^{(t_{c}-t)/\tau}+1}},\qquad\eta_{j}=\sqrt{\frac{1+(N-j)\delta}{1+(N-1)\delta}}.$
(21)

The parameters $\delta$, $t_{c}$, and $\tau$ can be used to optimize the
protocol for a given application, but none of the following findings depend
crucially on this specific pulse shape nor on a specific set of parameters.
The pulses $g_{A,j}(t)$ used in the following examples are depicted in Fig.
2(b).

Figure 2: (a) Sketch of the setup for implementing unitary operations between
$N=2$ modes. (b) Shape of the control pulses $g_{A,j}(t)$ as specified in Eq.
(21) and for the parameters $t_{c}=19$, $\delta=2$, and $\tau=1$. The dotted
lines show the shape of the photon wave packet released from register $A$,
$N_{\rm ph}(t)=|\langle{\rm vac}|f_{{\rm out},2}(t)|\psi_{0}\rangle|^{2}$, for
different initial states $|\psi_{0}\rangle=|10\rangle$ and
$|\psi_{0}\rangle=|01\rangle$. (c)–(f) Shapes of the optimal control pulses
$g_{B,j}(t)$ for the unitaries (c) $U_{T}$, (d) $U_{S}$, (e) $U_{H}$, and (f)
$U_{C}$. In all plots, the dashed-dotted lines show the fidelity
$\mathcal{F}$. (f) The solid lines represent the real part and the dashed
lines the imaginary parts of the control pulses.

Given $g_{A,j}(t)$ and $U$, we iteratively solve Eq. (10) numerically to
obtain the control pulses $g_{B,j}(t)$ and evaluate the fidelity of the
operation [57, 58]

$\mathcal{F}(t)=\frac{|{\rm Tr}\\{U^{\dagger}G_{BA}(t,t_{0})\\}|^{2}+{\rm
Tr}\\{G^{\dagger}_{BA}(t,t_{0})G_{BA}(t,t_{0})\\}}{N(N+1)}.$ (22)

It reaches a value of $\mathcal{F}(t_{f})\simeq 1$, if the protocol was
successful. For the examples in Eq. (15), the resulting pulse shapes and
fidelities are plotted in Figs. 2(c)–2(f). We see that in all cases the
algorithm provides the correct control pulses and the unitary transformation
is implemented with close to unit fidelity, as long as the protocol time
$t_{p}=t_{f}-t_{0}$ is long enough. We emphasize that, while the shape of the
wave packet released from register $A$ depends on the initial quantum state
[see Fig. 2(b)], the implemented unitary $U$ is independent of this state.

_Scalability._ —Using the construct from Ref. [20], a sequential combination
of $\mathcal{O}(N^{2})$ of the $2\times 2$ unitary operations demonstrated
above is sufficient to recreate any possible $N\times N$ unitary
transformation $U$ in a time $t_{p}\sim\mathcal{O}(N^{2})$. This strategy is
usually employed for implementing bosonic unitaries with photons or also atoms
[59, 60]. However, in the current approach, already in a single run, each of
the emitted photons interacts with multiple modes in register $B$. This
intrinsic parallelization allows us to improve over the scheme by Reck et al.
[20] and obtain protocol times that only scale linearly with the number of
modes, $t_{p}\sim\mathcal{O}(N)$.

Figure 3: (a) Scaling of the minimal protocol time $t_{\rm min}$ for
implementing different classes of $N\times N$ unitaries with a fidelity
$\mathcal{F}\geq 0.99$. Here, $U_{T}(N)\equiv\mathbbm{1}_{N}$ is the state-
transfer operation, $U_{H}(N)$ is the $N$-dimensional Hadamard transformation
and $U_{R}(N)$ is a random unitary $N\times N$ matrix. In all cases, the
pulses $g_{A,j}(t)$ are specified in Eq. (21) with $\delta=2$ and $\tau=1$.
The results marked by stars show the minimal protocol time for $U_{T}(N)$ for
an optimized parameter $\delta$. (b) Illustration of the numerically
constructed control pulses $g_{B,j}(t)$ for the example $U_{R}(N=8)$. The real
and imaginary parts are shown by the solid and dashed lines, respectively. See
the Suppplemental Material [46] for additional details.

To demonstrate this scaling, we numerically evaluate the minimal protocol time
$t_{\rm min}$ required to implement a given $N\times N$ unitary with a
fidelity of $\mathcal{F}\geq 0.99$. Specifically, we compare the
implementation of the $N$-mode state-transfer operation
$U_{T}(N)=\mathbbm{1}_{N}$, the $N$-dimensional Hadamard transformation
$U_{H}(N)$, and generic complex unitaries $U_{R}(N)$ with randomly drawn
matrix elements. The results are summarized in Fig. 3(a) and demonstrate that
the protocol works perfectly even for a large number of modes and for
arbitrary classes of unitaries. As an illustrative example, Fig. 3(b) shows
the control pulses $g_{B,j}(t)$ for $U_{R}(N=8)$ and qualitatively similar
pulse shapes are obtained for other unitaries as well. See the Supplemental
Material [46] for further details about the numerical procedure that has been
used to obtain these results.

The key observation from Fig. 3(a) is that $t_{\rm min}\sim N$ scales only
linearly with the number of modes, independent of the specific properties of
$U$. This scaling can be roughly understood as follows. Because the maximal
coupling strength is bounded, $|g_{j}(t)|\leq\sqrt{\gamma_{\rm max}}$, the
local modes can emit or absorb photons only on timescales longer than
$\gamma_{\rm max}^{-1}$. Therefore, in order to emit (absorb) photons into
(from) $N$ spatiotemporally distinct modes, the total pulse duration must
increase proportionally to $N$. The prefactor for this scaling is the same for
all the tested unitaries, but it is still a factor of $\sim 3$ higher than
what one would obtain from implementing $N$ times a single-mode transfer. We
attribute this overhead to the nonoptimal choice of control pulses
$g_{A,j}(t)$ in Eq. (21). Indeed, for the transfer unitary $U_{T}(N)$, a
substantial reduction of the protocol times can already be obtained by
optimizing the parameter $\delta$ [46]. This suggests that also for other
unitaries, a similar improvement of the scaling prefactor can be achieved by
using other shapes for the control pulses in register $A$.

_Imperfections._ —For tunable couplers based on Raman or parametric driving
schemes [2, 4, 33, 16], the complex couplings $g_{\mu}(t)\sim\Omega_{\mu}(t)$
are directly proportional to the computer-generated amplitudes of the driving
fields, but in practice experimental uncertainties lead to deviations from
this exact relation and $g_{\mu}(t)=g_{\mu}(t)|_{\rm id}+\delta g_{\mu}(t)$.
To evaluate the impact of such pulse distortions, we assume

$\delta g_{\mu}(t)=\sqrt{\varepsilon\Omega}\int_{-\infty}^{t}
ds\,e^{-\Omega(t-s)/2}\xi_{\mu}(s),$ (23)

where the $\xi_{\mu}(t)$ are independent white noise processes with
$\langle\xi_{\mu}(t)\xi_{\nu}(t^{\prime})\rangle=\delta_{\mu\nu}\delta(t-t^{\prime})$,
and $\varepsilon$ and $\Omega$ determine the strength and the frequency range
of the pulse distortion. From the simulations in Fig. 4(a), we find that the
protocol is surprisingly robust with respect to pulse distortions. The
infidelity $1-\mathcal{F}$ scales sublinearly with the strength of the noise
for rather high values of $\varepsilon$ and fluctuations that are faster than
$\gamma_{\rm max}^{-1}$ are further suppressed. Importantly, as shown in Fig.
4(b), the fidelity of the operation also does not degrade significantly when
the number of modes is increased and again a rather weak dependence on $N$ is
observed.

In [46] we consider also other types of imperfections and show, first of all,
that the protocol works equally well for nonidentical modes with frequencies
$\omega_{\mu}=\omega_{0}+\Delta_{\mu}$, even for detunings
$\Delta_{\mu}\sim\gamma_{\rm max}$. Therefore, no precise fine-tuning of the
local modes is required. Further, the linearity of the transformation makes
the protocol insensitive to input noise, such as residual thermal excitations
in the channel [1, 55]. The effect of losses, however, reduces the fidelity of
the ideal operation $\mathcal{F}_{\rm id}$ to [46]

$\mathcal{F}\approx\mathcal{F}_{\rm id}e^{-\gamma t_{p}}(1-p_{\rm
ch})(1-p_{\circlearrowright})^{2N}.$ (24)

Here, $\gamma$ is the bare decay rate of the local mode, $p_{\rm ch}$ is the
photon loss probability in the channel connecting register $A$ and register
$B$, and $p_{\circlearrowright}$ is the transmission loss of a single
circulator or nonreciprocal coupler. While for large $N$, Eq. (24) places
stringent coherence requirements on all network components, it does not reveal
any unexpected scalings that depend specifically on the current protocol or on
the choice of the unitary transformation. Note, that $\mathcal{F}$ refers to
the fidelity of the unitary transformation, as defined in Eq. (22). The
fidelity of the transformed multiphoton state depends in a more complicated
way on the initial photon numbers in each mode (see, for example, Ref. [1] for
the case $N=1$).

Figure 4: Fidelity of the unitary transformation in the presence of pulse
imperfections $\delta g_{j}(t)$ as defined in Eq. (23). (a) Scaling of the
fidelity for the transformation $U_{H}(N=4)$ as a function of the strength of
the noise $\varepsilon$ and for different bandwidths $\Omega$. The solid lines
show the fidelity averaged over $10^{4}$ noise realizations, with a standard
deviation indicated by the shaded areas. (b) Dependence of the fidelity
(averaged over $400$ noise realizations) on the number of modes $N$ for
different strengths of the noise and for $\Omega=1$. The solid and the dashed
lines show the results as obtained for the state-transfer unitary $U_{T}(N)$
and for the Hadamard transformation $U_{H}(N)$, respectively.

_Conclusions._ —In summary, we have presented a universal protocol for
implementing excitation-conserving linear unitary transformations between $N$
bosonic modes, where, instead of sending photons through a fixed network of
beam splitters and phase shifters, the transformation is implemented through a
multiphoton emission and reabsorption process. Therefore, arbitrary unitaries
can be realized by simply changing the control pulses and without changing the
network configuration. The protocol is robust with respect to the main sources
of imperfections and even for very complex unitaries the protocol time only
increases linearly with the number of modes.

While the protocol can be implemented with various physical platforms, we
envision important near-term applications in the context of circuit QED, where
high-fidelity directional couplers and other network components are currently
developed [46]. Here, the protocol can be used for parallel state-transfer and
entanglement distribution schemes or, when combined with local nonlinearities,
for large-scale quantum computing architectures based on continuous-variable-
encoded qubits.

###### Acknowledgements.

This work was supported by the European Union’s Horizon 2020 research and
innovation program under Grant Agreement No. 899354 (SuperQuLAN), the National
Natural Science Foundation of China (Grant No. 11874432), the National Key R&D
Program of China (Grant No. 2019YFA0308200), Proyecto Sinérgico CAM 2020
Y2020/TCS-6545 (NanoQuCo-CM) and the CSIC Interdisciplinary Thematic Platform
(PTI+) on Quantum Technologies (PTI-QTEP+).

## References

  * [1] S. Aaronson and A. Arkhipov, The Computational Complexity of Linear Optics, Theory of Computing 9, 143 (2013).
  * [2] J. B. Spring, B. J. Metcalf, P. C. Humphreys, W. S. Kolthammer, X.-M. Jin, M. Barbieri, A. Datta, N. Thomas-Peter, N. K. Langford, D. Kundys, et al., Boson sampling on a photonic chip, Science 339, 798 (2013).
  * [3] M. A. Broome, A. Fedrizzi, S. Rahimi-Keshari, J. Dove, S. Aaronson, T. C. Ralph, and A. G. White, Photonic boson sampling in a tunable circuit, Science 339, 794 (2013).
  * [4] M. Tillmann, B. Dakic, R. Heilmann, S. Nolte, A. Szameit, and P. Walther, Experimental boson sampling, Nature Photon. 7, 540 (2013).
  * [5] J. Carolan, J. D. A. Meinecke, P. J. Shadbolt, N. J. Russell, N. Ismail, K. Wörhoff, T. Rudolph, M. G. Thompson, J. L. O’Brien, J. C. F. Matthews, and A. Laing, On the experimental verification of quantum complexity in linear optics, Nature Photon. 8, 621 (2014).
  * [6] N. Spagnolo, C. Vitelli, M. Bentivegna, D. J. Brod, A. Crespi, F. Flamini, S. Giacomini, G. Milani, R. Ramponi, P. Mataloni, R. Osellame, E. F. Galvao, and F. Sciarrino, Experimental validation of photonic boson sampling, Nature Photon. 8, 615 (2014).
  * [7] H. Wang, J. Qin, X. Ding, M.-C. Chen, S. Chen, X. You, Y.-M. He, X. Jiang, L. You, Z. Wang, C. Schneider, J. J. Renema, S. Höfling, C.-Y. Lu, and J.-W. Pan, Boson Sampling with 20 Input Photons and a 60-Mode Interferometer in a $10^{14}$-Dimensional Hilbert Space, Phys. Rev. Lett. 123, 250503 (2019).
  * [8] J. Arrazola, V. Bergholm, K. Bradler, T. Bromley, M. Collins, I. Dhand, A. Fumagalli, T. Gerrits, A. Goussev, L. Helt, et al., Quantum circuits with many photons on a programmable nanophotonic chip, Nature (London) 591, 54 (2021).
  * [9] D. J. Brod, E. F. Galvao, A. Crespi, R. Osellame, N. Spagnolo, and F. Sciarrino, Photonic implementation of boson sampling: a review, Adv. Photon. 1, 034001 (2019).
  * [10] E. Knill, R. Laflamme, and G. J. Milburn, A Scheme for Efficient Quantum Computation with Linear Optics, Nature (London) 409, 46 (2001).
  * [11] P. Kok, W. J. Munro, K. Nemoto, T. C. Ralph, J. P. Dowling, Jonathan, and G. J. Milburn, Linear Optical Quantum Computing with Photonic Qubits, Rev. Mod. Phys. 79, 135 (2007).
  * [12] I. L. Chuang, D. W. Leung, and Y. Yamamoto, Bosonic quantum codes for amplitude damping, Phys. Rev. A 56, 1114 (1997).
  * [13] D. Gottesman, A. Kitaev, and J. Preskill, Encoding a qubit in an oscillator, Phys. Rev. A 64, 012310 (2001).
  * [14] M. Mirrahimi, Z. Leghtas, V. V. Albert, S. Touzard, R. J. Schoelkopf, L. Jiang, and M. H. Devoret, Dynamically protected cat-qubits: a new paradigm for universal quantum computation, New J. Phys. 16, 045014 (2014).
  * [15] M. H. Michael, M. Silveri, R. T. Brierley, V. V. Albert, J. Salmilehto, L. Jiang, and S. M. Girvin, New Class of Quantum Error-Correcting Codes for a Bosonic Mode, Phys. Rev. X 6, 031006 (2016).
  * [16] N. Ofek, A. Petrenko, R. Heeres, P. Reinhold, Z. Leghtas, B. Vlastakis, Y. Liu, L. Frunzio, S. M. Girvin, L. Jiang, M. Mirrahimi, M. H. Devoret, and R. J. Schoelkopf, Extending the lifetime of a quantum bit with error correction in superconducting circuits, Nature (London) 536, 441 (2016).
  * [17] L. Hu, Y. Ma, W. Cai, X. Mu, Y. Xu, W. Wang, Y. Wu, H. Wang, Y. P. Song, C.-L. Zou, S. M. Girvin, L.-M. Duan, and L. Sun, Quantum error correction and universal gate set operation on a binomial bosonic logical qubit, Nature Physics 15, 503 (2019).
  * [18] P. Campagne-Ibarcq, A. Eickbusch, S. Touzard, E. Zalys-Geller, N. E. Frattini, V. V. Sivak, P. Reinhold, S. Puri, S. Shankar, R. J. Schoelkopf, L. Frunzio, M. Mirrahimi, and M. H. Devoret, Quantum error correction of a qubit encoded in grid states of an oscillator, Nature (London) 584, 368 (2020).
  * [19] C. Flühmann, T. L. Nguyen, M. Marinelli, V. Negnevitsky, K. Mehta, and J. P. Home, Encoding a Qubit in a Trapped-Ion Mechanical Oscillator, Nature (London) 566, 513 (2019).
  * [20] M. Reck, A. Zeilinger, H. J. Bernstein, and P. Bertani, Experimental realization of any discrete unitary operator, Phys. Rev. Lett. 73, 58 (1994).
  * [21] M. Keller, B. Lange, K. Hayasaka, W. Lange, and H. Walther, Continuous Generation of Single Photons with Controlled Waveform in an Ion-Trap Cavity System, Nature (London) 431, 1075 (2004).
  * [22] P. B. R. Nisbet-Jones, J. Dilley, D. Ljunggren, and A. Kuhn, Highly Efficient Source for Indistinguishable Single Photons of Controlled Shape, New J. Phys. 13, 103036 (2011).
  * [23] S. Ritter, C. Nolleke, C. Hahn, A. Reiserer, A. Neuzner, M. Uphoff, M. Mucke, E. Figueroa, J. Bochmann, and G. Rempe, An Elementary Quantum Network of Single Atoms in Optical Cavities, Nature (London) 484, 195 (2012).
  * [24] K. Hammerer, A. S. Sørensen, and E. S. Polzik, Quantum interface between light and atomic ensembles, Rev. Mod. Phys. 82, 1041 (2010).
  * [25] Y. Yin, Y. Chen, D. Sank, P. J. J. O’Malley, T. C. White, R. Barends, J. Kelly, E. Lucero, M. Mariantoni, A. Megrant, C. Neill, A. Vainsencher, J. Wenner, A. N. Korotkov, A. N. Cleland, and J. M. Martinis, Catch and Release of Microwave Photon States, Phys. Rev. Lett. 110, 107001 (2013).
  * [26] M. Pierre, I. Svensson, S. R. Sathyamoorthy, G. Johansson, and P. Delsing, Storage and On-Demand Release of Microwaves Using Superconducting Resonators with Tunable Coupling, Appl. Phys. Lett. 104, 232604 (2014).
  * [27] M. Pechal, L. Huthmacher, C. Eichler, S. Zeytinoglu, A. A. Abdumalikov, Jr., S. Berger, A. Wallraff, and S. Filipp, Microwave-Controlled Generation of Shaped Single Photons in Circuit Quantum Electrodynamics, Phys. Rev. X 4, 041010 (2014).
  * [28] E. Flurin, N. Roch, J. D. Pillet, F. Mallet, and B. Huard, Superconducting quantum node for entanglement and storage of microwave radiation, Phys. Rev. Lett. 114, 090503 (2015).
  * [29] R. Andrews, A. Reed, K. Cicak, J. Teufel, and K. Lehnert, Quantum-enabled temporal and spectral mode con- version of microwave signals, Nature Commun. 6, 10021 (2015).
  * [30] F. Wulschner, J. Goetz, F. R. Koessel, E. Hoffmann, A. Baust, P. Eder, M. Fischer, M. Haeberlein, M. J. Schwarz, M. Pernpeintner, E. Xie, L. Zhong, C. W. Zollitsch, B. Peropadre, J.-J. Garcia-Ripoll, E. Solano, K. Fedorov, E. P. Menzel, F. Deppe, A. Marx, and R. Gross, Tunable coupling of transmission-line microwave resonators mediated by an rf squid, EPJ Quantum Technology 3, 10 (2016).
  * [31] W. Pfaff, C. J. Axline, L. D. Burkhart, U. Vool, P. Reinhold, L. Frunzio, L. Jiang, M. H. Devoret, and R. J. Schoelkopf, Controlled release of multiphoton quantum states from a microwave cavity memory, Nature Physics 13, 882 (2017).
  * [32] A. Bienfait, K. J. Satzinger, Y. Zhong, H.-S. Chang, M.-H. Chou, C. R. Conner, É. Dumur, J. Grebel, G. A. Peairs, R. G. Povey, and A. N. Cleland, Phonon-mediated quantum state transfer and remote qubit entanglement, Science 364, 368 (2019).
  * [33] R. Dassonneville, R. Assouly, T. Peronnin, P. Rouchon, and B. Huard, Number-Resolved Photocounter for Propagating Microwave Mode, Phys. Rev. Applied 14, 044022 (2020).
  * [34] K. M. Sliwa, M. Hatridge, A. Narla, S. Shankar, L. Frunzio, R. J. Schoelkopf, and M. H. Devoret, Reconfigurable josephson circulator/directional amplifier, Phys. Rev. X 5, 041020 (2015).
  * [35] J. Kerckhoff, K. Lalumiere, B. J. Chapman, A. Blais, and K. W. Lehnert, On-chip superconducting microwave circulator from synthetic rotation, Phys. Rev. Applied 4, 034002 (2015).
  * [36] B. J. Chapman, E. I. Rosenthal, J. Kerckhoff, B. A. Moores, L. R. Vale, J. A. B. Mates, G. C. Hilton, K. Lalumiere, A. Blais, and K. W. Lehnert, Widely Tunable On-Chip Microwave Circulator for Superconducting Quantum Circuits, Phys. Rev. X 7, 041043 (2017).
  * [37] F. Lecocq, L. Ranzani, G. A. Peterson, K. Cicak, R. W. Simmonds, J. D. Teufel, and J. Aumentado, Nonreciprocal Microwave Signal Processing with a Field-Programmable Josephson Amplifier, Phys. Rev. Appl. 7, 024028 (2017).
  * [38] S. Masuda, S. Kono, K. Suzuki, Y. Tokunaga, Y. Nakamura, and K. Koshino, Nonreciprocal microwave transmission based on Gebhard-Ruckenstein hopping, Phys. Rev. A 99, 013816 (2019).
  * [39] Y.-Y. Wang, S. van Geldern, T. Connolly, Y.-X. Wang, A. Shilcusky, A. McDonald, A. A. Clerk, and C. Wang, Low-Loss Ferrite Circulator as a Tunable Chiral Quantum System, Phys. Rev. Applied 16, 064066 (2021).
  * [40] P. Lodahl, S. Mahmoodian, S. Stobbe, P. Schneeweiss, J. Volz, A. Rauschenbeutel, H. Pichler, and P. Zoller, Chiral quantum optics, Nature (London) 541, 473 (2017).
  * [41] P.-O. Guimond, B. Vermersch, M. L. Juan, A. Sharafiev, G. Kirchmair, and P. Zoller, A unidirectional on-chip photonic interface for superconducting circuits, npj Quantum Inf. 6, 32 (2020).
  * [42] N. Gheeraert, S. Kono, and Y. Nakamura, Programmable directional emitter and receiver of itinerant microwave photons in a waveguide, Phys. Rev. A 102, 053720 (2020).
  * [43] B. Kannan, A. Almanakly, Y. Sung, A. Di Paolo, D. A. Rower, J. Braumüller, A. Melville, B. M. Niedzielski, A. Karamlou, K. Serniak, A. Vepsälïnen, M. E. Schwartz, J. L. Yoder, R. Winik, J. I-J. Wang, T. P. Orlando, S. Gustavsson, J. A. Grover, and W. D. Oliver, On-Demand Directional Photon Emission using Waveguide Quantum Electrodynamics, Nat. Phys., 10.1038/s41567-022-01869-5 (2023).
  * [44] C. W. Gardiner and M. J. Collett, Input and output in damped quantum systems: Quantum stochastic differential equations and the master equation, Phys. Rev. A 31, 3761 (1985).
  * [45] C. W. Gardiner and P. Zoller, Quantum noise, Springer, Berlin (2004).
  * [46] See the Supplementary Material, which includes the additional references [5, 6, 17], for a derivation of the initial model and the main analytic results and for additional details on the numerical simulations.
  * [47] P. Kurpiers, T. Walter, P. Magnard, Y. Salathe, and A. Wallraff, Characterizing the attenuation of coaxial and rectangular microwave-frequency waveguides at cryogenic temperatures, EPJ Quantum Technol. 4, 8 (2017).
  * [48] P. Magnard, S. Storz, P. Kurpiers, J. Schär, F. Marxer, J. Lütolf, T. Walter, J.-C. Besse, M. Gabureac, K. Reuer, A. Akin, B. Royer, A. Blais, and A. Wallraff, Microwave Quantum Link between Superconducting Circuits Housed in Spatially Separated Cryogenic Systems, Phys. Rev. Lett. 125, 260502 (2020).
  * [49] M.-A. Lemonde, S. Meesala, A. Sipahigil, M. J. A. Schuetz, M. D. Lukin, M. Loncar, and P. Rabl, Phonon Networks with Silicon-Vacancy Centers in Diamond Waveguides, Phys. Rev. Lett. 120, 213603 (2018).
  * [50] J. I. Cirac, P. Zoller, H. J. Kimble, and H. Mabuchi, Quantum State Transfer and Entanglement Distribution Among Distant Nodes in a Quantum Network, Phys. Rev. Lett. 78, 3221 (1997).
  * [51] K. Jähne, B. Yurke, and U. Gavish, High-Fidelity Transfer of an Arbitrary Quantum State Between Harmonic Oscillators, Phys. Rev. A 75, 010301(R) (2007).
  * [52] K. Stannigel, P. Rabl, A. S. Sorensen, M. D. Lukin, and P. Zoller, Optomechanical Transducers for Quantum-Information Processing, Phys. Rev. A 84, 042341 (2011).
  * [53] A. N. Korotkov, Flying Microwave Qubits with Nearly Perfect Transfer Efficiency, Phys. Rev. B 84, 014510 (2011).
  * [54] Z.-L. Xiang, M. Zhang, L. Jiang, and P. Rabl, Intracity Quantum Communication via Thermal Microwave Networks, Phys. Rev. X 7, 011035 (2017).
  * [55] B. Vermersch, P. O. Guimond, H. Pichler, and P. Zoller, Quantum state transfer via noisy photonic and phononic waveguides, Phys. Rev. Lett. 118, 133601 (2017).
  * [56] H. Ai, Y. Y. Fang, C. R. Feng, Z. Peng, and Z. L. Xiang, Multinode State Transfer and Nonlocal State Preparation via a Unidirectional Quantum Network, Phys. Rev. Applied 17, 054021 (2022).
  * [57] M. A. Nielsen, A simple formula for the average gate fidelity of a quantum dynamical operation, Phys. Lett. A 303, 249 (2002).
  * [58] L. H. Pedersen, N. M. Møller, and K. Mølmer, Fidelity of quantum operation, Phys. Lett. A 367, 47 (2007).
  * [59] W. Chen, Y. Lu, S. Zhang, K. Zhang, G. Huang, M. Qiao, X. Su, J. Zhang, J. Zhang, L. Banchi, M. S. Kim, and K. Kim, Scalable and Programmable Phononic Network with Trapped Ions, arXiv:2207.06115 (2022).
  * [60] C. Robens, I. Arrazola, W. Alt, D. Meschede, L. Lamata, E. Solano, and A. Alberti, Boson Sampling with Ultracold Atoms, arXiv:2208.12253 (2022).

Supplementary material for:
Universal time-dependent control scheme for realizing arbitrary linear bosonic
transformations

##  I Derivation of the Quantum Langevin Equations

We consider the network shown in Fig. 1 (a) in the main text, which consists
of a set of $2N$ bosonic modes that are weakly coupled to a unidirectional
photonic waveguide. In a frame rotating with the bare oscillator frequency
$\omega_{0}$, the coupling between the local oscillators and the waveguide is
described by the Hamiltonian

$H_{\rm
int}(t)=i\hbar\sum_{\mu=1}^{2N}\left[\tilde{g}_{\mu}^{*}(t)c_{\mu}f^{\dagger}(x_{\mu},t)-\tilde{g}_{\mu}(t)c^{\dagger}_{\mu}f(x_{\mu},t)\right],$
(S1)

where the $x_{\mu}$ denote the positions of the resonators along the waveguide
with $x_{\mu}>x_{\nu}$ for $\mu>\nu$. In Eq. (S1), the bosonic field operator
$f(x,t)$ represents the photons in the waveguide. For a unidirectional channel
with a group velocity $v$, this field operator is given by

$f(x,t)\simeq\frac{1}{\sqrt{2\pi}}\int_{\omega_{0}-B}^{\omega_{0}+B}d\omega\,e^{i\omega_{0}t}e^{-i\omega(t-x/v)}b_{\omega}(t),$
(S2)

where $B$ is the bandwidth of the channel and the $b_{\omega}(t)$ are slowly
varying bosonic operators obeying
$[b_{\omega},b^{\dagger}_{\omega^{\prime}}]=\delta(\omega-\omega^{\prime})$.
Note that with these conventions the couplings $\tilde{g}_{j}$ have dimensions
of $\sqrt{{\rm Hz}}$.

The equations of motion for the Heisenberg operators derived from $H_{\rm
int}(t)$ are

$\displaystyle\dot{c}_{\mu}(t)$ $\displaystyle=$
$\displaystyle-\tilde{g}_{\mu}(t)f(x_{\mu},t),$ (S3)
$\displaystyle\dot{b}_{\omega}(t)$ $\displaystyle=$
$\displaystyle\frac{1}{\sqrt{2\pi}}\sum_{\mu}\tilde{g}_{\mu}^{*}(t)c_{\mu}(t)e^{-i\omega_{0}t}e^{i\omega(t-x_{\mu}/v)}.$
(S4)

The formal solution of the field operator is

$\begin{split}&f(x,t)=\tilde{f}_{0}(x,t)\\\
&+\sum_{\mu}\int_{0}^{t}ds\,\tilde{g}_{\mu}^{*}(s)c_{\mu}(s)\delta_{B}\left(t-s-\frac{x-x_{\mu}}{v}\right)e^{i\omega_{0}(x-x_{\mu})/v}.\end{split}$
(S5)

Here $\tilde{f}_{0}(x,t)$ is the free field operator and we have used

$\int_{\omega_{0}-B}^{\omega_{0}+B}d\omega\,e^{-i(\omega-\omega_{0})(t-s-\tau)}=2\pi\delta_{B}(t-s-\tau),$
(S6)

where $\delta_{B}(t)$ is the $\delta$-function on timescales that are long
compared to the inverse of the channel bandwidth. By reinserting the result
for $f(x,t)$ into the equations of motion for the $c_{\mu}$, we finally obtain

$\begin{split}\dot{c}_{\mu}&=-\tilde{g}_{\mu}(t)\tilde{f}_{0}(x_{\mu},t)-\frac{|\tilde{g}_{\mu}(t)|^{2}}{2}c_{\mu}(t)\\\
&-\sum_{\nu<\mu}\tilde{g}_{\mu}(t)\tilde{g}_{\nu}^{*}(t-\tau_{\mu,\nu})c_{k}(t-\tau_{\mu,\nu})e^{i\omega_{0}\tau_{\mu,\nu}},\end{split}$
(S7)

where $\tau_{\mu,\nu}=(x_{\mu}-x_{\nu})/v$.

In a final step we switch to rescaled units of time, $t\gamma_{\rm
max}\rightarrow t$, where $\gamma_{\rm max}$ is the maximal decay rate, and
define the dimensionless couplings
$g_{\mu}(t)=\tilde{g}_{\mu}(t)/\sqrt{\gamma_{\rm max}}$. We also define
$f_{{\rm in}}(t)=\tilde{f}_{0}(x_{1},t)/\sqrt{\gamma_{\rm max}}$. As a result,
we obtain the quantum Langevin equations from the main text,

$\begin{split}\dot{c}_{\mu}(t)&=-\frac{|g_{\mu}(t)|^{2}}{2}c_{\mu}(t)-g_{\mu}(t)f_{{\rm
in},\mu}(t),\end{split}$ (S8)

together with $f_{\rm in,1}(t)\equiv f_{\rm in}(t)$ and $f_{{\rm
out},\mu}(t)=f_{{\rm in},\mu}(t)+g^{*}_{\mu}(t)c_{\mu}(t)$. Note, however,
that the relation between incoming and outgoing fields,

$f_{{\rm in},\mu}(t)=f_{{\rm
out},\mu-1}(t-\tau_{\mu,\mu-1})e^{i\omega_{0}\tau_{\mu,\mu-1}},$ (S9)

still contains propagation delays, which make the set of differential
equations nonlocal in time. Because of the unidirectional nature of the
channel, these delays can be eliminated by setting $x_{1}=0$ and defining the
time-advanced operators and couplings,

$\displaystyle\bar{c}_{\mu}(t)$ $\displaystyle=$ $\displaystyle
e^{-i\omega_{0}x_{\mu}/v}c_{\mu}(t+x_{\mu}/v),$ (S10)
$\displaystyle\bar{g}_{\mu}(t)$ $\displaystyle=$ $\displaystyle
g_{\mu}(t+x_{\mu}/v).$ (S11)

As a result we obtain the set of equations given in Eq. (2) and Eq. (3) in the
main text, where we omitted the bar on top of the operators and the couplings
for simplicity.

##  II Control pulses

In this section we present a step-by-step derivation of Eq. (10) in the main
text. This equation provides an explicit solution for the control pulses
$g_{B,j}(t)$, which implement a given unitary transformation $U$ for a given
set of control pulses $g_{A,j}(t)$.

###  II.1 Control pulses for emission

As a first step in the protocol, we must choose a set of control pulses
$g_{A,j}(t)$ for the modes in register $A$. These pulses do not have to be of
any specific shape, but for the implementation of a generic unitary
transformation the following three conditions must be satisfied:

  1. 1.

The pulses $g_{A,j}(t)$ have a sufficiently large pulse area,

$\int_{t_{0}}^{t_{f}}ds\,|g_{A,j}(s)|^{2}\gg 1.$ (S12)

  2. 2.

The pulses $g_{A,j}(t)$ are mutually overlapping,

$\int_{t_{0}}^{t_{f}}ds\,g_{A,j}(s)g_{A,k}(s)\neq 0.$ (S13)

  3. 3.

The pulses $g_{A,j}(t)$ are nonidentical.

As already mentioned in the main text, the first condition ensures that all
the initial excitations in register $A$ decay up to exponentially small
corrections. For example, for the first mode we find

$\langle a_{1}^{\dagger}a_{1}\rangle(t_{f})=\langle
a_{1}^{\dagger}a_{1}\rangle(t_{0})e^{-\int_{t_{0}}^{t_{f}}ds\,|g_{A,1}(s)|^{2}}.$
(S14)

For the successive modes the dynamics is more complicated, but the
unidirectional propagation of the emitted photons ensures that all the initial
excitations eventually leave register A, as long as all the couplings
$g_{A,j}(t)$ are switched on for a sufficiently long time.

The second condition is necessary to implement unitary transformations where,
for example, a superposition of two or more modes in register A is mapped onto
a single mode in register B. This is not possible when the emitted photons
have no overlap.

The third condition of non-identical initial pulses is not strictly necessary,
but it is included for practical reasons. When applying the numerical
algorithm for calculating the optimal pulse shapes as described below, we
typically find that non-identical pulses lead to shorter overall protocol
times. Also when using identical pulses it is more likely to obtain unphysical
oscillations due to numerical errors.

###  II.2 Generalized dark state conditions

To construct the control pulses $g_{B,j}(t)$, we proceed as outlined in the
main text and assume that the whole network is initially prepared in the
single excitation state $|\psi_{\ell}\rangle=\Psi_{\ell}^{\dagger}|{\rm
vac}\rangle$. Here $|{\rm vac}\rangle$ is the $2N$-mode vacuum state and

$\Psi_{\ell}=\sum_{k=1}^{N}U_{\ell k}a_{k}(t_{0}).$ (S15)

This approach has the conceptual advantage that the whole transfer process can
be divided into individual processes, where in each step an initial excitation
$|\psi_{\ell}\rangle$ is mapped onto the single-photon state
$b_{\ell}^{\dagger}|{\rm vac}\rangle$ at the end of the protocol. From a
physical perspective it is then clear that this specific process must only
involve excitations of the first $N$ modes in register $A$ and the first
$\ell$ modes of register $B$. Mathematically, this can be expressed as

$P_{\ell}(t)=\sum_{\mu=1}^{N+\ell}\left|\left[\mathcal{G}(t,t_{0})\mathcal{U}^{\dagger}\right]_{\mu,\ell}\right|^{2}=1,$
(S16)

where

$\mathcal{U}=\left(\begin{array}[]{cc}U&0_{N}\\\
0_{N}&0_{N}\end{array}\right).$ (S17)

Eq. (S16) follows from the fact that, given the initial state
$|\psi_{\ell}\rangle$, the population of the $\mu$-th mode of the whole
network can be expressed in terms of the Green’s function as $\langle
c_{\mu}^{\dagger}c_{\mu}\rangle(t)=|\left[\mathcal{G}(t,t_{0})\mathcal{U}^{\dagger}\right]_{\mu,\ell}|^{2}.$

The constraint on the excitation probability given in Eq. (S16) can also be
rewritten in a differential form as a conservation law,

$\dot{P}_{\ell}(t)=-|\tilde{F}_{N+\ell,\ell}(t,t_{0})|^{2}=0.$ (S18)

Note that compared to the out-field amplitudes defined in the main text, we
use here the slightly different convention

$\begin{split}\tilde{F}_{\mu,\ell}(t,t_{0})=\,&\langle{\rm vac}|f_{{\rm
out},\mu}(t)|\psi_{\ell}\rangle\\\
=\,&\sum_{\nu=1}^{\mu}g^{*}_{\nu}(t)\left[\mathcal{G}(t,t_{0})\mathcal{U}^{\dagger}\right]_{\nu,\ell},\end{split}$
(S19)

such that the first index can assume any value $\mu=1,\dots,2N$. The result in
Eq. (S18) can be verified by evaluating both sides of the equation. This is
most conveniently done by making use of the relation (omitting the time
variables)

$\left[\dot{\mathcal{G}}\mathcal{U}^{\dagger}\right]_{\mu,\ell}=-g_{\mu}\left(\frac{g^{*}_{\mu}}{2}\left[\mathcal{G}\mathcal{U}^{\dagger}\right]_{\mu,\ell}+\tilde{F}_{\mu-1,\ell}\right).$
(S20)

Therefore, keeping in mind that
$\tilde{F}_{N+\ell,\ell}(t,t_{0})=F_{\ell,\ell}(t,t_{0})$, the dark state
condition stated in Eq. (9) in the main text can be directly derived from the
conservation of the excitation probability within the first $N+\ell$ modes of
the network.

###  II.3 Sufficiency of the dark state conditions

While we have argued that it is necessary to obey the set of dark state
conditions $\tilde{F}_{N+\ell,\ell}(t,t_{0})=0$ at any time during the
protocol, we now demonstrate that this is even a sufficient requirement for
implementing the correct unitary operation. To do so we rearrange Eq. (S16)
and show that

$\left|\left[\mathcal{G}(t_{f},t_{0})\mathcal{U}^{\dagger}\right]_{N+\ell,\ell}\right|^{2}=1-\sum_{\mu=1}^{N+\ell-1}\left|\left[\mathcal{G}(t_{f},t_{0})\mathcal{U}^{\dagger}\right]_{\mu,\ell}\right|^{2}=1.$
(S21)

For $\ell=1$ this result simply follows from the fact that
$G_{AA}(t_{f},t_{0})=0$ for sufficiently long pulses. Given that
$|\left[\mathcal{G}(t_{f},t_{0})\mathcal{U}^{\dagger}\right]_{N+1,1}|=1$ and
$U$ is unitary, it follows that
$\left[\mathcal{G}(t_{f},t_{0})\mathcal{U}^{\dagger}\right]_{N+1,2}=0$, since
the norm of each row of $\mathcal{G}$ is bounded, i.e.,
$\sum_{\nu=1}^{2N}|\mathcal{G}_{\mu,\nu}|^{2}\leq 1$. This result then implies
that Eq. (S21) holds also for $j=2$, and so on. Therefore, as long as the
control pulses $g_{A,j}(t)$ satisfy Eqs. (S12)-(S13) and the set of dark state
conditions in Eq. (S18) is fulfilled during the whole duration of the
protocol, $t\in[t_{0},t_{f}]$, and for all $j=1,\dots,N$, we obtain

$[G_{BA}(t_{f},t_{0})U^{\dagger}]_{\ell,\ell}=e^{i\theta_{\ell}}.$ (S22)

The remaining phases can be eliminated by simple rotations of the pulses,
$g_{B,\ell}(t)\rightarrow e^{-i\theta_{\ell}}g_{B,\ell}(t)$, which leave the
dark state conditions invariant. After this adjustment we obtain the desired
result, $G_{BA}(t_{f},t_{0})=U$.

###  II.4 Implicit and explicit constructions of the control pulses

The arguments above show that the targeted unitary transfer operation can be
implemented by imposing the set of generalized dark state conditions (S18) at
all times, but they do not provide a way to construct the required pulses
$g_{B,j}(t)$ yet. To show how this can be done, we first use the input-output
relation $f_{{\rm out},N+\ell}(t)=f_{{\rm
out},N+\ell-1}(t)+g_{B,\ell}^{*}(t)b_{\ell}(t)$ to rewrite the dark state
condition $\tilde{F}_{N+\ell,\ell}(t,t_{0})=0$ as

$g_{B,\ell}^{*}(t)=-\frac{\tilde{F}_{N+\ell-1,\ell}(t,t_{0})}{\left[\mathcal{G}(t,t_{0})\mathcal{U}^{\dagger}\right]_{N+\ell,\ell}}.$
(S23)

This is still an implicit equation for the control pulses, since
$\left[\mathcal{G}(t,t_{0})\mathcal{U}^{\dagger}\right]_{N+\ell,\ell}$ depends
on $g_{B,\ell}(t)$ as well. To turn Eq. (S23) into an explicit equation for
the $g_{B,\ell}(t)$, we take its time-derivative and make again use of Eq.
(S20) and Eq. (S23) to simplify the result. After some manipulations we obtain
the differential equation

$\frac{d}{dt}g_{B,\ell}(t)=g_{B,\ell}(t)\left[\frac{d}{dt}\log\tilde{F}^{*}_{N+\ell-1,\ell}(t,t_{0})-\frac{1}{2}|g_{B,\ell}(t)|^{2}\right],$
(S24)

with a nontrivial solution

$g_{B,\ell}(t)=\frac{\tilde{F}^{*}_{N+\ell-1,\ell}(t,t_{0})}{\sqrt{\int_{t_{0}}^{t}ds\,|\tilde{F}_{N+\ell-1,\ell}(s,t_{0})|^{2}}}.$
(S25)

This is the result given in Eq. (10) in the main text.

##  III Numerics

In this section we provide a more detailed description of the numerical
methods that have been used to calculate the control pulses $g_{B,j}(t)$ for
all the examples discussed in the main text.

###  III.1 Control pulses for register A

As pointed out above, as long as the initial control pulses $g_{A,j}(t)$
satisfy a few basic requirements, their precise shape is not important for the
protocol to work. For all our examples in this work we use the pulses

$g_{A,j}(t)=\frac{\eta_{j}}{\sqrt{e^{-(t-t_{c})/\tau}+1}},$ (S26)

where

$\eta_{j}=\sqrt{\frac{1+(N-j)\delta}{1+(N-1)\delta}}.$ (S27)

###  III.2 Explicit method

The explicit expression for the control pulses given in Eq. (S25) is in
principle enough to calculate all the $g_{B,j}(t)$ through numerical
integration. To do so, one first solves the Green’s function $G_{AA}(t,t_{0})$
(using, for example, a Runge-Kutta method), which only depends on the known
control pulses $g_{A,j}(t)$. With $G_{AA}(t,t_{0})$ known, we obtain the out-
field amplitude $\tilde{F}_{N,1}(t,t_{0})$ from Eq. (S19) and the control
pulse for the first mode in register B,

$g_{B,1}(t)=\frac{\tilde{F}_{N,1}^{*}(t,t_{0})}{\sqrt{\int^{t}_{t_{0}}ds|\tilde{F}_{N,1}(s,t_{0})|^{2}}}.$
(S28)

The knowledge of $g_{B,1}(t)$ can then be used to obtain
$\tilde{F}_{N+1,2}(t,t_{0})$ and $g_{B,2}(t)$, etc. However, in practice this
method is rather slow for large $N$ as it involves many numerical integrations
of the Green’s function.

###  III.3 Implicit method

As an alternative approach to calculate the pulses $g_{B,j}(t)$, we can simply
make use of the fact that the set of dark state conditions in Eq. (S18) must
be satisfied at each point in time. This determines the value of the control
pulses through the implicit relation in Eq. (S23).

In this method, in a first step we evaluate again the known Green’s function
$G_{AA}(t_{n},t_{0})$ and the out-field amplitude $\tilde{F}_{N,\ell}(t_{n})$
on a grid of time points $t_{n}$ with spacing $\Delta t$. The unknown
couplings $g_{B,1}(t_{n})$ and the unknown elements
$\mathcal{G}_{N+1,\mu}(t_{n},t_{0})$ of the Green’s function can then be
obtained via Euler integration, using Eq. (S23) to determine the value of
$g_{B,1}(t_{n+1})$ for the next time step. Once the values for
$g_{B,1}(t_{n})$ are known, the same procedure can be iterated to obtain
$g_{B,2}(t_{n})$, etc.

###  III.4 Initial conditions

A remaining issue for both the explicit and the implicit method is that at the
beginning of the protocol the control pulses $g_{B,j}(t)$ are undetermined or
can become very large. This arises from the fact that at $t=t_{0}$ there is a
finite out-field from register A, but the population of the $b_{1}$ mode is
still vanishingly small. Therefore, the dark state condition can only be
satisfied by a correspondingly large (diverging) coupling.

Figure S1: Details of the numerical procedure to obtain control pulses
$g_{B,j}(t)$ illustrated for the example $U_{T}(N=2)$ shown in Fig. 2 (c) in
the main text. Upper panel: Starting with the control pulses $g_{A,j}(t)$
(dotted lines) the control pulses $g_{B,j}(t)$ are calculated using either the
explicit or implicit method for $t_{0}^{\prime}=0$ and $t_{f}^{\prime}=48$ and
enforcing the bound in Eq. (S29) at the initial stage. Lower panel: In a
second step, keeping the same control pulses, the actual initial time $t_{0}$
is increased and the final time $t_{f}$ is decreased (yellow dashed lines) to
avoid the initial non-analytic part of the control pulses and set the total
protocol time to $t_{p}=t_{f}-t_{0}=40$. To find the minimal time $t_{\rm
min}$ plotted in Fig. 3 of the main text, $t_{0}$ and $t_{f}$ are further
adjusted (purple dashed lines) up to the point where the fidelity drops below
a value of $\mathcal{F}=0.99$.

To deal with this complication in both protocols, whenever $|g_{B,\ell}(t)|>1$
we set the control pulses to a fixed value of

$g_{B,\ell}(t)\,\,\rightarrow\,\,\frac{\tilde{F}_{N,\ell}^{*}(t_{0},t_{0})}{|\tilde{F}_{N,\ell}(t_{0},t_{0})|}.$
(S29)

Although in this case the dark state condition is no longer fulfilled exactly,
this occurs only in the very beginning of the protocol and only causes an
exponentially small error for the whole transfer. In the actual numerical
simulations, smooth and well-behaved control pulse are obtained as follows:
First, by choosing an initial time $t_{0}^{\prime}$ and a sufficiently large
final time $t_{f}^{\prime}$, such that $t_{f}^{\prime}-t_{0}^{\prime}>t_{p}$,
the control pulses are evaluated according to the prescription in Eq. (S29).
Then, keeping this set of control pulses fixed, the actual initial time
$t_{0}>t_{0}^{\prime}$ and the actual final time $t_{f}<t_{f}^{\prime}$ are
chosen such that within the new time window all the pulses are well-behaved,
while still reaching the targeted value of the fidelity. This whole procedure
is illustrated in Fig. S1 for the example shown in Fig. 2 (c) in the main
text.

###  III.5 Optimized protocol time

In Fig. 3 in the main text we evaluate the minimal protocol time $t_{\rm min}$
that is required to achieve a fidelity of $\mathcal{F}\geq 0.99$. To do so, we
use the implicit method described above and the parameters $\delta=2$,
$\tau=1$ and $t_{c}=t_{f}/2$ for $t_{0}^{\prime}=0$ and an initial protocol
time of $t_{f}^{\prime}\approx 20\times[1+(N-1)\delta]$. This results in
fidelities of $\mathcal{F}>0.99$ for all examples. Successively, we run the
algorithm for a gradually adjusted $t_{0}$ and $t_{f}$, as described above,
until the fidelity drops below the threshold (see Fig. S1 for an illustrative
example).

In the case of the transfer operation $U_{T}(N)$ we repeat this search for the
minimal time $t_{\rm min}$ for different parameters $\delta$. The minimal
value of $t_{\rm min}$ obtained in this way, which, for example is reached at
$\delta\approx 0.41$ for $N=32$, is marked by the stars in Fig. 3.

##  IV Imperfections

In this section we will discuss in more detail the performance of the protocol
in the presence of some of the main imperfections that will be encountered in
real experiments. These include:

  * •

A static detuning $\Delta_{\mu}$ of each bosonic mode from the common
frequency $\omega_{0}$.

  * •

The decay of each boson mode with rate $\gamma$ into a local reservoir
different from the waveguide.

  * •

Propagation losses of photons in the channel connecting register A and
register B with probability $p_{\rm ch}$.

  * •

Photon losses in each circulator or non-reciprocal coupler with probability
$p_{\circlearrowright}$.

In addition, static or time-dependent pulse imperfections, $\delta
g_{\mu}(t)$, may arise during the conversion of the computer-generated ideal
control-pulses into the actual physical couplings. These effects are already
discussed in Fig. 4 in the main text.

Figure S2: Illustration of the losses considered in the analysis in Sec. IV
for the case $N=1$. Every local bosonic mode decays with a rate $\gamma$ and
propagation losses between the two registers reduce the field amplitude by
$\varepsilon_{\rm ch}=\sqrt{1-p_{\rm ch}}$, i.e. $f_{{\rm
in},2}(t)=\varepsilon_{\rm ch}f_{{\rm out},1}(t)$. In addition, whenever
fields propagate between two arms of the circulator the amplitudes are reduced
by a factor $\varepsilon_{\circlearrowright}=\sqrt{1-p_{\circlearrowright}}$.

To account for the other imperfections, we consider a network model as
illustrated in Fig. S2. This results in modifications of the quantum Langevin
equations and input-output relations given in Eq. (2) and Eq. (3) in the main
text and we obtain instead

$\begin{split}\dot{c}_{\mu}(t)=&\left(-i\Delta_{\mu}-\frac{\gamma}{2}
-\frac{|g_{\mu}(t)|^{2}}{2}\right)c_{\mu}(t)\\\
&-\sqrt{1-p_{\circlearrowright}}\,g_{\mu}(t)f_{{\rm in},\mu}(t)\end{split}$
(S30)

and

$f_{{\rm out},\mu}(t)=(1-p_{\circlearrowright})f_{{\rm
in},\mu}(t)+\sqrt{1-p_{\circlearrowright}}g^{*}_{\mu}(t)c_{\mu}(t).$ (S31)

In addition, we model the propagation between the two registers by

$f_{{\rm in},N+1}(t)=\sqrt{1-p_{\rm ch}}f_{{\rm out},N}(t),$ (S32)

to account for channel losses. Note that in those modified equations we have
omitted all noise operators associated with the additional decay processes.
This is valid as long as thermal excitations of these other baths can be
neglected.

When including these modifications, we obtain a new evolution equation for the
Green’s function,
$\partial_{t}\mathcal{G}(t,t_{0})=-\mathcal{M}(t)\mathcal{G}(t,t_{0})$, where
the matrix elements of $\mathcal{M}(t)$ are given by

$\begin{split}&\mathcal{M}_{\mu\nu}(t)=\left(i\Delta_{\mu}+\frac{\gamma}{2}\right)\delta_{\mu\nu}\\\
&\+ g_{\mu}(t)g^{*}_{\nu}(t)(1-p_{\circlearrowright})^{\mu-\nu}\sqrt{(1-p_{\rm
ch})^{\sigma(\mu,\nu)}}\Theta(\mu-\nu).\end{split}$ (S33)

Here, $\sigma(\mu,\nu)=1$ for $\mu>N$ and $\nu\leq N$ and $\sigma(\mu,\nu)=0$
otherwise.

###  IV.1 Frequency shifts

We first consider the case where losses are negligible, but where each bosonic
mode has a different resonance frequency
$\omega_{\mu}=\omega_{0}+\Delta_{\mu}$. This means that the relative phases
between the modes and also the phases of the emitted photons evolve over time.
However, as already shown in Ref. [1] for the case of a simple state transfer
operation between two modes, i.e., $N=1$, this phase is deterministic and can
be compensated by adjusting the phase of the couplings correspondingly. To
demonstrate that this strategy works as well for the multi-mode case, we
illustrate in Fig. S3 the implementation of the Hadamard unitary $U_{H}(N=4)$
for the case where the $\Delta_{\mu}$ are randomly chosen from an interval
$[-0.5,0.5]$. This plot then shows a set of computer-generated complex control
pulses, which implement the operation with the same fidelity as for
$\Delta_{\mu}=0$ and on a similar timescale. We have repeated these
simulations for other random unitaries and larger detunings and reached the
same performance.

Figure S3: Plot of the control pulses $g_{B,j}(t)$ for implementing the
Hadamard unitary $U_{H}(N=4)$ between four modes. For this plot, the detunings
$\Delta_{\mu}$ of all modes have been randomly chosen from the interval
$[-0.5,0.5]$. The solid and the dashed lines show the real and the imaginary
parts of the numerically generated pulses $g_{B,j}(t)$, respectively. The
control pulse $g_{A,j}(t)$ are the same as in all other numerical examples.
The fidelity of the operation is indicated by the dashed-dotted line a reaches
a value of $\mathcal{F}\simeq 0.999$, which was the targeted accuracy in this
simulation.

In conclusion, we find that for fixed detunings $\Delta_{\mu}\sim\gamma_{\rm
max}$, the protocol works equally well and there is no need to have exact
frequency matching between the modes. In general, for detuned modes, the
resulting control pulses will be complex, even when the unitary operation has
only real entries. This is not a problem for Raman-type coupling schemes [2,
3] or schemes based on three-wave mixing [4], where the phase of the coupling
is simply given by the phase of the control field. For much larger detunings,
$\Delta_{\mu}\gg\gamma_{\rm max}$, we can move to a rotating frame,

$c_{\mu}(t)\rightarrow c_{\mu}(t)e^{-i\Delta_{\mu}t},$ (S34)

and make the ansatz $g_{\mu}(t)={\rm g}_{\mu}(t)e^{-i\Delta_{\mu}t}$ to remove
all fast rotating terms. In this way, we can control the slowly varying pulses
${\rm g}_{\mu}(t)$ instead, which simplifies the numerics and the
implementation of the control. This procedure works as long as
$|\Delta_{\mu}|\ll B$, which is assumed in the derivation of the quantum
Langevin equations in Sec. I. Therefore, the protocol can also be implemented
with far-detuned modes to avoid frequency crowding and unwanted cross-talks
between the modes in the same register.

###  IV.2 Local decay and channel losses

Under the assumption of similar local loss rates and a waveguide loss that is
relevant only between the two registers, the combined effect of these two
dissipation sources is given by

$G_{BA}(t)=e^{-\frac{\gamma t}{2}}\sqrt{(1-p_{\rm
ch})}\left.G_{BA}(t)\right|_{\rm ideal}.$ (S35)

Assuming that $\left.G_{BA}(t_{p})\right|_{\rm ideal}=U$, the resulting loss-
induced reduction of the fidelity $\mathcal{F}$, as defined in Eq. (13) in the
main text, is

$\mathcal{F}=e^{-\gamma t_{p}}(1-p_{\rm ch}).$ (S36)

Although this results still depends on the number of modes via the total
protocol time, $t_{p}\sim N$, there are no additional, protocol-specific
decoherence effects.

###  IV.3 Circulator losses

Figure S4: Plot of the fidelity of (a) the Hadamard unitary $U_{H}(N)$ and (b)
the swap operation $U_{S}(N)$, when taking circulator losses with varying
$p_{\circlearrowright}$ into account. For these plots, a maximal fidelity of
$\mathcal{F}|_{p_{\circlearrowright}=0}=0.999$ and otherwise ideal conditions
have been assumed. The dashed lines show the approximate analytic results
given in Eq. (S38), which for $p_{\circlearrowright}=0.002$ overlaps with the
numerical results.

In a next step we assume $\gamma=p_{\rm ch}=0$ and focus solely on the losses
induced by the circulators. In this case the resulting fidelity will in
general depend on the choice of the unitary transformation. However, for a
simple analytic estimate we can consider the state transfer operation
$U=\mathbbm{1}$, in which case each photon passes through the same amount of
circulators. Therefore, we obtain

$G_{BA}(t)=(1-p_{\circlearrowright})^{N}\mathbbm{1},$ (S37)

and a reduced fidelity of

$\mathcal{F}=(1-p_{\circlearrowright})^{2N}.$ (S38)

As expected, we see that in this case the fidelity depends explicitly on the
number of modes, since each node introduces loss for all the photons that pass
through it. To confirm this scaling for more general unitaries, we plot in
Fig. S4 (a) and (b) the scaling of $\mathcal{F}$ as a function of $N$ for the
Hadamard unitary $U_{H}(N)$ and the swap unitary $U_{S}(N)$, respectively. We
find that also for these transformations, Eq. (S38) provides a very accurate
estimate. Therefore, to capture the combined effect of all the considered
dissipation sources, we can simply multiply the expressions in Eq. (S36) and
Eq. (S38), which is the result given in Eq. (15) in the main text.

###  IV.4 Discussion

While the importance of different loss channels depends on the specific
implementation, a relevant platform for the proposed protocol are
superconducting quantum networks. In this case propagation losses can be
negligibly small ($<0.01$ dB/m [5]), but the use of typical commercial ferrite
circulators with $p_{\circlearrowright}\approx 5-10\%$ still represents a
major limitation for current superconducting quantum networks [6]. Note that
in our convention $p_{\circlearrowright}$ denotes the loss probability when
passing between two neighboring legs of a three-port circulator, which matches
the single-pass (insertion) losses usually cited in this context. Therefore,
Eq. (S38) implies that an implementation of a cascaded quantum network using
such circulators would be limited to $N\approx 2-4$ nodes, before the fidelity
drops below 50%.

This estimate, however, represents a worst-case scenario and there are several
aspects to keep in mind. First of all, in order to overcome losses in existing
circulators, a considerable effort is currently placed on the development of
non-reciprocal microwave devices with much better performance. For example,
although not tested at the quantum level yet, commercial ferrite circulators
already achieve insertion losses as low as 0.1 dB ($\sim 2\%)$ and with
further optimization losses below $1\%$ are possible [7]. In addition, there
are several schemes for realizing magnetic-free circulators using, e.g.,
parametric Josephson amplifiers [8, 9, 10, 11, 12]. Currently, these devices
are still at a proof-of-concept level, but by relying on low-loss and non-
magnetic components only, their performance can reach similar levels as other
superconducting circuit components, i.e., $p_{\circlearrowright}\lesssim
10^{-3}$.

Second, while circulators are a conceptually simple way to model cascaded
networks, the actual requirement assumed in our analysis is a non-reciprocal
resonator-waveguide coupling. For example, in the optical domain, such chiral
couplings can be achieved even without circulators by making use of the
polarization properties of confined optical beams [13]. Similar type of
interactions can be engineered in the microwave regime using non-local
couplings [14, 15]. Using this approach, a directional emission of a single
photon state with a fidelity $>0.95$ has been demonstrated in Ref. [16]. Based
on the parameters cited on this work, the residual error in this setup seems
to be dominated by local decay and consistent with
$p_{\circlearrowright}<1\%$.

Finally, let us point out that in the derivation of the optimal pulse shapes
we have only used the fact that all the photons emitted from register A
propagate toward register B. This can be achieved even without circulators by
simply reflecting the photons from the left end of the waveguide. This changes
the shape of the outgoing wavepackets $\sim\tilde{F}_{N,\ell}(t,t_{0})$, but
does not affect the numerical algorithm otherwise (see, for example, Ref. [17]
for a related discussion about single-qubit state-transfer protocols in a
bidirectional waveguide). Therefore, one can simply omit the circulators in
register A, which will improve the overall fidelity by another factor of $\sim
2$. However, to be consistent with our original setting, we do not make this
change here.

## References

  * [1] Z.-L. Xiang, M. Zhang, L. Jiang, and P. Rabl, Intracity Quantum Communication via Thermal Microwave Networks, Phys. Rev. X 7, 011035 (2017).
  * [2] K. Hammerer, A. S. Sørensen, and E. S. Polzik, Quantum interface between light and atomic ensembles, Rev. Mod. Phys. 82, 1041 (2010).
  * [3] M. Pechal, L. Huthmacher, C. Eichler, S. Zeytinoglu, A. A. Abdumalikov, Jr., S. Berger, A. Wallraff, and S. Filipp, Microwave-Controlled Generation of Shaped Single Photons in Circuit Quantum Electrodynamics, Phys. Rev. X 4, 041010 (2014).
  * [4] W. Pfaff, C. J. Axline, L. D. Burkhart, U. Vool, P. Reinhold, L. Frunzio, L. Jiang, M. H. Devoret, and R. J. Schoelkopf, Controlled release of multiphoton quantum states from a microwave cavity memory, Nature Physics 13, 882 (2017).
  * [5] P. Kurpiers, T. Walter, P. Magnard, Y. Salathe, and A. Wallraff, Characterizing the attenuation of coaxial and rectangular microwave-frequency waveguides at cryogenic temperatures, EPJ Quantum Technol. 4, 8 (2017).
  * [6] P. Magnard, S. Storz, P. Kurpiers, J. Schär, F. Marxer, J. Lütolf, T. Walter, J.-C. Besse, M. Gabureac, K. Reuer, A. Akin, B. Royer, A. Blais, and A. Wallraff, Microwave Quantum Link between Superconducting Circuits Housed in Spatially Separated Cryogenic Systems, Phys. Rev. Lett. 125, 260502 (2020).
  * [7] Y.-Y. Wang, S. van Geldern, T. Connolly, Y.-X. Wang, A. Shilcusky, A. McDonald, A. A. Clerk, and C. Wang, Low-Loss Ferrite Circulator as a Tunable Chiral Quantum System, Phys. Rev. Applied 16, 064066 (2021).
  * [8] K. M. Sliwa, M. Hatridge, A. Narla, S. Shankar, L. Frunzio, R. J. Schoelkopf, and M. H. Devoret, Reconfigurable josephson circulator/directional amplifier, Phys. Rev. X 5, 041020 (2015).
  * [9] J. Kerckhoff, K. Lalumiere, B. J. Chapman, A. Blais, and K. W. Lehnert, On-chip superconducting microwave circulator from synthetic rotation, Phys. Rev. Applied 4, 034002 (2015).
  * [10] B. J. Chapman, E. I. Rosenthal, J. Kerckhoff, B. A. Moores, L. R. Vale, J. A. B. Mates, G. C. Hilton, K. Lalumiere, A. Blais, and K. W. Lehnert, Widely Tunable On-Chip Microwave Circulator for Superconducting Quantum Circuits, Phys. Rev. X 7, 041043 (2017).
  * [11] F. Lecocq, L. Ranzani, G. A. Peterson, K. Cicak, R. W. Simmonds, J. D. Teufel, and J. Aumentado, Nonreciprocal Microwave Signal Processing with a Field-Programmable Josephson Amplifier, Phys. Rev. Appl. 7, 024028 (2017).
  * [12] S. Masuda, S. Kono, K. Suzuki, Y. Tokunaga, Y. Nakamura, and K. Koshino, Nonreciprocal microwave transmission based on Gebhard-Ruckenstein hopping, Phys. Rev. A 99, 013816 (2019).
  * [13] P. Lodahl, S. Mahmoodian, S. Stobbe, P. Schneeweiss, J. Volz, A. Rauschenbeutel, H. Pichler, and P. Zoller, Chiral quantum optics, Nature (London) 541, 473 (2017).
  * [14] P.-O. Guimond, B. Vermersch, M. L. Juan, A. Sharafiev, G. Kirchmair, and P. Zoller, A unidirectional on-chip photonic interface for superconducting circuits, npj Quantum Inf. 6, 32 (2020).
  * [15] N. Gheeraert, S. Kono, and Y. Nakamura, Programmable directional emitter and receiver of itinerant microwave photons in a waveguide, Phys. Rev. A 102, 053720 (2020).
  * [16] B. Kannan, A. Almanakly, Y. Sung, A. Di Paolo, D. A. Rower, J. Braumüller, A. Melville, B. M. Niedzielski, A. Karamlou, K. Serniak, A. Vepsälïnen, M. E. Schwartz, J. L. Yoder, R. Winik, J. I-J. Wang, T. P. Orlando, S. Gustavsson, J. A. Grover, and W. D. Oliver, On-Demand Directional Photon Emission using Waveguide Quantum Electrodynamics, Nat. Phys., 10.1038/s41567-022-01869-5 (2023).
  * [17] M.-A. Lemonde, S. Meesala, A. Sipahigil, M.J.A. Schuetz, M.D. Lukin, M. Loncar, and P. Rabl, Phonon Networks with Silicon-Vacancy Centers in Diamond Waveguides, Phys. Rev. Lett. 120, 213603 (2018).