Introduction

In quantum networks, optical photons are the main carrier of quantum information. The absence of direct interaction between photons and their high excitation energy make them immune to the otherwise pervasive thermal noise. Conversely, the lack of direct interaction creates significant challenges to the use of photons as the substrate for quantum computation, where fast, high-fidelity logic gates between the (photonic) qubits are necessary. Effective interactions derived from measurements1 result in probabilistic gates. Instead, we focus on deterministic gate implementations through coherent photon-photon interactions based on optical nonlinearities. Bulk optical nonlinearities are attractive due to their potential for room-temperature operation2,3,4,5,6, but their strength remains too weak. At cryogenic temperatures, stronger nonlinearities arise by coupling photons to ancillary quantum systems. For instance, strong interactions between photons and two-level emitters (TLEs) have been realized in many physical systems including atoms7,8, quantum dots9,10, molecules11, superconducting circuits12, and ions13. It is widely accepted that passive TLE systems are insufficient to implement high-fidelity controlled-phase gates14,15. Multi-stage approaches including active wave packet control14,16 increase resource overhead and optical loss. Ancillary qubits based on multi-level atomic systems17,18,19 provide added flexibility but at a significant cost in technological complexity. A dynamic cavity control scheme was employed in Refs. 3,4 for bulk nonlinearities, but it remains an open question whether a similar approach works for TLEs. For the χ(2) and χ(3) interactions of refs. 3,4 both one- and two-photon cavity states are straightforwardly coupled out once a π-phase difference between them is achieved3,4. For TLEs, however, a state with n photons has a Rabi frequency proportional to \(\sqrt{n}\) so evacuating the cavity for both n = 1 and n = 2 is nontrivial.

Here, we introduce a single-stage dynamic control scheme for photonic qubits that exploits the strong interactions with a TLE in a multimode cavity. Figure 1 illustrates how photons traveling in wave packets are actively loaded into a resonator where they interact via the TLE and are subsequently released into the same wave packet with transformed photon-number contents. We assume to have control over the detuning between the TLE and cavity mode \(\hat{b}\) such that Ω(t) = ωe − ωb. This provides control over the effective Rabi frequency \(\sqrt{{g}^{2}+\Omega {(t)}^{2}/4}\) (see the supplementary materials) to enable both one- and two-photon input states to be coupled out efficiently. We also assume to have control over the coupling between cavity modes \(\hat{a}\) and \(\hat{b}\) with a rate Λ(t). This can be achieved by three-wave-mixing between the aforementioned two modes and a strong controlled classical pump3,20. Note that Ref. 21 similarly used two cavity modes coupled by a time-independent rate to improve the trade-off between indistinguishability and efficiency of a quantum emitter.

Fig. 1: Schematic representation of the system and steps of the gate protocol.
figure 1

a An incoming wave packet (green) in state \(\sum {c}_{n}\left|n\right\rangle\) is coupled into a cavity mode \(\hat{a}\) (also green). Mode \(\hat{a}\) is coupled to a second available mode \(\hat{b}\) (blue) via an external control field Λi(t) as depicted in the spectrum diagram on the right. This coupling enables the capture of the incoming ωa wave packet into mode \(\hat{b}\). b Mode \(\hat{b}\) is coupled to a two-level emitter (TLE) at vacuum rate g. We control the detuning of the TLE through an external field described by Ω(t). As seen in the energy-level diagram, the cavity-TLE coupling depends on the number of photons in mode \(\hat{b}\), which enables the depicted photon-number-dependent transformation. c Controlled release using a second control pulse, Λo(t). The state of the outgoing packet has undergone phase changes conditioned on the number of photons.

Since the time-dependent cavity-TLE detuning effectively controls the strength of the nonlinearity, the gate duration can be shortened without reducing the fidelity, in contrast to passive nonlinearities3,4. By numerical optimization of Ω(t) and Λ(t), we show that high-fidelity controlled-phase gates are, in fact, possible and further that the gate duration need only exceed the Rabi period at zero-detuning by a factor of 2–3.

This manuscript is organized as follows: In the next section, we derive the general form of the equations of motion for one- and two-photon wave packets incident on the cavity-TLE system. This serves at the basis for our control conditioned on the photon number of the wave packets. These equations are used in the section “Results” to derive control fields that enable a high-fidelity controlled-phase gate as an example of the many logical operations enabled by this design. The section “Discussion” provides a detailed study of the performance of that gate with respect to various hardware parameters. Lastly, we provide an outlook on possible near-term hardware implementations and concluding remarks.

Methods

Equations of motion

Before demonstrating the implementation of a controlled-phase gate, we will describe the general form of the dynamics of capturing (and releasing) a wave packet into our two-mode cavities in the presence of a TLE. The TLE is crucial for the non-Gaussian quantum operations we want to perform. We use the discrete-time formalism developed in Ref. 3 to describe the system in Fig. 1. It involves discretizing the time axis into N bins of width Δt and introducing discrete-time waveguide mode operators

$$\hat{w}({t}_{k})=\hat{w}(k\Delta t)\equiv \frac{{\hat{w}}_{k}}{\sqrt{\Delta t}}\quad {{{\rm{with}}}}\quad [{\hat{w}}_{j},{\hat{w}}_{k}^{{\dagger} }]={\delta }_{jk},$$
(1)

where \(\hat{w}({t}_{k})\) is the continuous-time annihilation operator of the waveguide mode that couples to cavity mode \(\hat{a}\). The input state of a single photon is

$$\left|{\psi }_{{{{\rm{in}}}}}^{(1)}\right\rangle =\int\nolimits_{{t}_{0}}^{{t}_{N}}{\rm{d}}t{\xi }_{{{{\rm{in}}}}}(t){\hat{w}}^{{\dagger} }(t)\left|{{\emptyset}}\right\rangle \approx \mathop{\sum }\limits_{k=1}^{N}\sqrt{\Delta t}{\xi }_{k}^{{{{\rm{in}}}}}{\hat{w}}_{k}^{{\dagger} }\left|{{\emptyset}}\right\rangle ,$$
(2)

where \(\int\nolimits_{{t}_{0}}^{{t}_{N}}| {\xi }_{{{{\rm{in}}}}}(t){| }^{2}=1\) so the state is normalized, \({\xi }_{k}^{{{{\rm{in}}}}}={\xi }_{{{{\rm{in}}}}}({t}_{k})\) describes the shape of the wave packet, and \(\left|{{\emptyset}}\right\rangle\) denotes the vacuum state of the waveguide. To each time bin, n, there is an associated Hamiltonian

$$\frac{{\hat{H}}_{n}}{\hslash }={\Omega }_{n}{\hat{\sigma }}_{ee}+i\sqrt{\frac{{\kappa }_{C}}{\Delta t}}\left({\hat{a}}^{{\dagger} }{\hat{w}}_{n}-\hat{a}{\hat{w}}_{n}^{{\dagger} }\right)+{\Lambda }_{n}^{* }{\hat{a}}^{{\dagger} }\hat{b}+{\Lambda }_{n}\hat{a}{\hat{b}}^{{\dagger} }+g\left({\hat{b}}^{{\dagger} }{\hat{\sigma }}_{-}+\hat{b}{\hat{\sigma }}_{+}\right),$$
(3)

which describes the interaction between the cavity and photons in the waveguide at time tn as well as the internal dynamics of the cavity. The propagation of the wave packet is, thus, handled implicitly (instead of introducing an additional hopping Hamiltonian). The operators describing the TLE in Eq. (3) are \({\hat{\sigma }}_{ee}=\left|e\right\rangle \left\langle e\right|\), \({\hat{\sigma }}_{-}=\left|g\right\rangle \left\langle e\right|\), and \({\hat{\sigma }}_{+}=\left|e\right\rangle \left\langle g\right|\). The coupling rate between cavity mode \(\hat{a}\) and the waveguide is κC, the controllable coupling between modes \(\hat{a}\) and \(\hat{b}\) is Λn, and the coupling rate between the emitter and photons in mode \(\hat{b}\) is g. Note that the Hamiltonian in Eq. (3) corresponds to a rotating frame as described in the supplementary materials. Photons in any time bin only interact with the cavity once and the bins are ordered such that photons in the first bin interact with the cavity first. At a given time step, tn, we therefore denote all photons in bins tk > tn as input photons and write their state as \(\left|{1}_{k}\right\rangle\). Similarly, photons in all bins after the cavity-interaction tktn are denoted output photons and their state is written in bold as \(\left|{{{{\boldsymbol{1}}}}}_{k}\right\rangle\). The state of the cavity-TLE system is \(\left|{n}_{a}{n}_{b}g\right\rangle\) or \(\left|{n}_{a}{n}_{b}e\right\rangle\) when there are na photons in mode \(\hat{a}\) and nb photons in mode \(\hat{b}\) while the TLE is in the ground, \(\left|g\right\rangle\), or excited state, \(\left|e\right\rangle\), respectively.

The flow diagram in Fig. 2 maps out the various paths that two input photons may take while interacting with the system. Each arrow corresponds to a non-zero coupling in the system. We use the diagram as a visual tool to simplify the otherwise tedious job of writing down the dynamical equations. The Schrödinger coefficients corresponding to states with up to two photons remaining on the input side of the cavity at time t are denoted e.g. \({\psi }_{{n}_{a}{n}_{b}g}^{(2)}(t)\), where the superscript denotes the maximum number of input photons. As an example, consider the state if the first photon is absorbed into mode \(\hat{a}\) and subsequently coupled to mode \(\hat{b}\) before the second photon reaches the cavity. The corresponding state is \({\psi }_{01g}^{(2)}(t)\left|01g\right\rangle \left|{1}_{k}\right\rangle\) with tk > t. States with a maximum of one photon remaining on the input side along with an output photon in bin m have Schrödinger coefficients denoted e.g. \({\psi }_{{n}_{a}{n}_{b}g}^{(1)}({t}_{m},t)\). States with no photons on the input side and an output photon in bin m have coefficients \({\psi }_{{n}_{a}{n}_{b}g}^{(0)}({t}_{m},t)\). Finally, coefficients corresponding to states with both photons in the cavity-TLE system are denoted e.g. \({\psi }_{{n}_{a}{n}_{b}g}(t)\) without a superscript.

Fig. 2: All input-output paths for two incident photons.
figure 2

Each photon may be absorbed (green) and re-emitted (red) or bypass the cavity by reflecting off of the left mirror in Fig. 1a at time tm. Inside the cavity, the photons may couple between the cavity modes (black) or between the TLE and mode \(\hat{b}\) (magenta).

We refer to Ref. 3 for details of deriving equations of motion for the Schrödinger coefficients, input-output relations, and inclusion of loss channels. For the coefficients mentioned above, describing the state of the cavity in the aforementioned basis, the master equation results in

$${\dot{\psi }}_{10g}^{(L)}({t}_{m},t)=-\frac{\kappa }{2}{\psi }_{10g}^{(L)}({t}_{m},t)-i\Lambda {(t)}^{* }{\psi }_{01g}^{(L)}({t}_{m},t)+\sqrt{L}\sqrt{{\kappa }_{C}}{\xi }_{{{{\rm{in}}}}}(t)$$
(4a)
$${\dot{\psi }}_{01g}^{(L)}({t}_{m},t)=-\frac{{\kappa }_{l}}{2}{\psi }_{01g}^{(L)}({t}_{m},t)-i\Lambda (t){\psi }_{10g}^{(L)}({t}_{m},t)-ig{\psi }_{00e}^{(L)}({t}_{m},t)$$
(4b)
$${\dot{\psi }}_{00e}^{(L)}({t}_{m},t)=-\left(i\Omega (t)+\frac{{\gamma }_{e}}{2}\right){\psi }_{00e}^{(L)}({t}_{m},t)-ig{\psi }_{01g}^{(L)}({t}_{m},t).$$
(4c)

The first equation describes the capture of an incoming photon in cavity mode \(\hat{a}\) and the interaction between \(\hat{a}\) and \(\hat{b}\). The latter equations introduce the interaction between mode \(\hat{b}\) and the TLE. Note that we included a loss rate, κl, for both cavity modes and a decay rate, γe, from the TLE to the electromagnetic environment. The total intensity decay rate from cavity mode \(\hat{a}\) is κ = κC + κl in Eq. (4a) and L = (0, 1, 2) is the maximum number of photons on the input side as described above. Note that solving Eq. (4) with L = 1 and tm = 0 corresponds to a one-photon input state.

The Schrödinger coefficients corresponding to both photons being in the TLE-cavity system evolve according to

$${\dot{\psi }}_{20g}(t)=-\kappa {\psi }_{20g}(t)-i\sqrt{2}\Lambda {(t)}^{* }{\psi }_{11g}(t)+\sqrt{2{\kappa }_{C}}{\psi }_{10g}^{(2)}(t){\xi }_{{{{\rm{in}}}}}(t)$$
(5a)
$$\begin{array}{rcl}{\dot{\psi }}_{11g}(t)&=&-\displaystyle{\frac{{\kappa }_{C}+2{\kappa }_{l}}{2}{\psi }_{11g}}(t)-i\sqrt{2}\left[\Lambda (t){\psi }_{20g}(t)+\Lambda {(t)}^{* }{\psi }_{02g}(t)\right]\\ &&-ig{\psi }_{10e}(t)+\sqrt{{\kappa }_{C}}{\psi }_{01g}^{(2)}(t){\xi }_{{{{\rm{in}}}}}(t)\end{array}$$
(5b)
$${\dot{\psi }}_{02g}(t)=-{\kappa }_{l}{\psi }_{02g}(t)-i\sqrt{2}\Lambda (t){\psi }_{11g}(t)-i\sqrt{2}g{\psi }_{01e}(t)$$
(5c)
$${\dot{\psi }}_{10e}(t)=-\left(i\Omega (t)+\frac{{\gamma }_{e}+\kappa }{2}\right){\psi }_{10e}(t)-i\Lambda {(t)}^{* }{\psi }_{01e}(t)-ig{\psi }_{11g}(t)+\sqrt{{\kappa }_{C}}{\psi }_{00e}^{(2)}(t){\xi }_{{{{\rm{in}}}}}(t)$$
(5d)
$${\dot{\psi }}_{01e}(t)=-\left(i\Omega (t)+\frac{{\gamma }_{e}}{2}+\frac{{\kappa }_{l}}{2}\right){\psi }_{01e}(t)-i\Lambda (t){\psi }_{10e}(t)-i\sqrt{2}g{\psi }_{02g}(t).$$
(5e)

The initial condition for Eq. (5) is that all coefficients are zero at t = t0. Note that all driving terms in Eqs. (4) and (5) correspond to green arrows in Fig. 2 while all terms proportional to Λ and g correspond to black and magenta arrows, respectively. As such, Fig. 2 provides a convenient tool for verifying that all interactions are included in the dynamical equations.

For L = 2 in Eq. (4), the only required initial condition is \({\psi }_{10g}^{(2)}(0)={\psi }_{01g}^{(2)}(0)={\psi }_{00e}^{(2)}(0)=0\). Those coefficients are therefore only functions of a single variable, t. For L = 1 and L = 0, the equations must be solved for N different initial conditions since tm corresponds to any bin and the coefficients are functions of both tm and ttm.

For L = 1, the dynamics is initiated by either an emission into the waveguide or simply a bypass (the traveling photon passing by the cavity)

$$\left|10g\right\rangle \left|{1}_{k}\right\rangle \to \left|00g\right\rangle \left|{1}_{k}{{{{\boldsymbol{1}}}}}_{m}\right\rangle$$
(6a)
$$\left|00g\right\rangle \left|{1}_{j}{1}_{k}\right\rangle \to \left|00g\right\rangle \left|{1}_{k}{{{{\boldsymbol{1}}}}}_{m}\right\rangle .$$
(6b)

In either case, the initial conditions are: \({\psi }_{10g}^{(1)}({t}_{m},{t}_{m})={\psi }_{01g}^{(1)}({t}_{m},{t}_{m})={\psi }_{00e}^{(1)}({t}_{m},{t}_{m})=0\).

For L = 0, the dynamics is initiated by one of three different emission paths or three different bypass paths

$$\left|10e\right\rangle \left|{{\emptyset}}\right\rangle \to \left|00e\right\rangle \left|{{{{\boldsymbol{1}}}}}_{m}\right\rangle$$
(7a)
$$\left|11g\right\rangle \left|{{\emptyset}}\right\rangle \to \left|01g\right\rangle \left|{{{{\boldsymbol{1}}}}}_{m}\right\rangle$$
(7b)
$$\left|20g\right\rangle \left|{{\emptyset}}\right\rangle \to \left|10g\right\rangle \left|{{{{\boldsymbol{1}}}}}_{m}\right\rangle$$
(7c)
$$\left|00e\right\rangle \left|{1}_{k}\right\rangle \to \left|00e\right\rangle \left|{{{{\boldsymbol{1}}}}}_{m}\right\rangle$$
(7d)
$$\left|01g\right\rangle \left|{1}_{k}\right\rangle \to \left|01g\right\rangle \left|{{{{\boldsymbol{1}}}}}_{m}\right\rangle$$
(7e)
$$\left|10g\right\rangle \left|{1}_{k}\right\rangle \to \left|10g\right\rangle \left|{{{{\boldsymbol{1}}}}}_{m}\right\rangle .$$
(7f)

To understand how to set the initial conditions of Eq. (4) with L = 0 based on the events listed in Eq. (7), we consider the entire paths through the map in Fig. 2. As an example, we consider the top path, which Eq. (7a) is a part of

$$\begin{array}{l}\left|00g\right\rangle \left|{1}_{j}{1}_{k}\right\rangle \to \left|10g\right\rangle \left|{1}_{k}\right\rangle \to \left|10e\right\rangle \left|{{\emptyset}}\right\rangle \to \\ -\sqrt{{\kappa }_{C}\Delta t}{\psi }_{10e}({t}_{m})\left|00e\right\rangle \left|{{{{\boldsymbol{1}}}}}_{m}\right\rangle \to -\sqrt{{\kappa }_{C}\Delta t}{\psi }_{10g}^{(0)}({t}_{m},{t}_{n})\left|00g\right\rangle \left|{{{{\boldsymbol{1}}}}}_{m}{{{{\boldsymbol{1}}}}}_{n}\right\rangle .\end{array}$$
(8)

At each emission or bypass event, we explicitly write out the coefficient of the relevant state and the initial condition of Eq. (4) is therefore \({\psi }_{00e}^{(0)}({t}_{m},{t}_{m})=-\sqrt{{\kappa }_{C}\Delta t}{\psi }_{10e}({t}_{m})\), while the other coefficients are initialized with the value zero. However, since Eq. (4) is linear, we may use the initial value 1 and multiply the contributions to the output state in the end, such that the contribution from the path in Eq. (8) is \({\kappa }_{C}{\psi }_{10e}({t}_{m}){\psi }_{10g}^{(0)}({t}_{m},{t}_{n})\). To distinguish between which of the three coefficients \({\psi }_{00e}^{(0)}\), \({\psi }_{01g}^{(0)}\), or \({\psi }_{10g}^{(0)}\) that is initialized to 1, we define functions {A00e, A01g, A10g}, {B00e, B01g, B10g}, and {C00e, C01g, C10g}, where A corresponds to \({\psi }_{10g}^{(0)}({t}_{m},{t}_{m})=1\), B to \({\psi }_{01g}^{(0)}({t}_{m},{t}_{m})=1\), and C to \({\psi }_{00e}^{(0)}({t}_{m},{t}_{m})=1\). Following all the paths in Fig. 2, the output state is found to consist of the following ten terms

$$\begin{array}{l}{\xi }_{{{{\rm{out}}}}}^{(2)}({t}_{m},{t}_{n})=\frac{{\kappa }_{C}}{\sqrt{2}}\Big[{\psi }_{10e}({t}_{m}){C}_{10}({t}_{m},{t}_{n})+{\psi }_{11g}({t}_{m}){B}_{10}({t}_{m},{t}_{n})+\sqrt{2}{\psi }_{20g}({t}_{m}){A}_{10}({t}_{m},{t}_{n})\\ \,\,\qquad\qquad\qquad -\,\frac{{\xi }_{{{{\rm{in}}}}}({t}_{m})}{\sqrt{{\kappa }_{C}}}\left({\psi }_{00e}^{(2)}({t}_{m}){C}_{10}({t}_{m},{t}_{n})+{\psi }_{01g}^{(2)}({t}_{m}){B}_{10}({t}_{m},{t}_{n})+{\psi }_{10}^{(2)}({t}_{m}){A}_{10}({t}_{m},{t}_{n})\right)\\ \,\,\qquad\qquad\qquad-\frac{{\psi }_{10g}^{(2)}({t}_{m})}{\sqrt{{\kappa }_{C}}}\left({\xi }_{{{{\rm{in}}}}}({t}_{n})-\sqrt{{\kappa }_{C}}{\psi }_{10g}^{(1)}({t}_{m},{t}_{n})\right)+\sqrt{2}{\xi }_{{{{\rm{in}}}}}({t}_{m})\left({\xi }_{{{{\rm{in}}}}}({t}_{n})-\sqrt{{\kappa }_{C}}{\psi }_{10g}^{(1)}({t}_{m},{t}_{n})\right)\Big],\end{array}$$
(9a)

where tmtn. The output state for two-photon inputs is

$$\left|{\psi }_{{{{\rm{out}}}}}^{(2)}\right\rangle =\int\nolimits_{{t}_{0}}^{{t}_{N}}\int\nolimits_{{t}_{0}}^{{t}_{N}}{\rm{d}}{t}_{m}{\rm{d}}{t}_{n}{\xi }_{{{{\rm{out}}}}}^{(2)}({t}_{m},{t}_{n}){\hat{w}}^{{\dagger} }({t}_{m}){\hat{w}}^{{\dagger} }({t}_{n})\left|{{\emptyset}}\right\rangle .$$
(10)

The input-output relation for one-photon inputs is found by considering the two paths starting from the state \(\left|00g\right\rangle \left|{1}_{k}{{{{\boldsymbol{1}}}}}_{m}\right\rangle\), which may be considered the single-photon branch of the map in Fig. 2. The result is

$${\xi }_{{{{\rm{out}}}}}^{(1)}(t)={\xi }_{{{{\rm{in}}}}}(t)-\sqrt{{\kappa }_{C}}{\psi }_{10g}^{(1)}(t),$$
(11)

with a single-photon output state given by

$$\left|{\psi }_{{{{\rm{out}}}}}^{(1)}\right\rangle =\int\nolimits_{{t}_{0}}^{{t}_{N}}{\rm{d}}t{\xi }_{{{{\rm{out}}}}}^{(1)}(t){\hat{w}}^{{\dagger} }(t)\left|{{\emptyset}}\right\rangle .$$
(12)

Controlled-phase gate

Having presented the equations governing the general time-evolution of an input state in product form, we turn to the specific example of implementing a controlled-phase gate on two dual-rail encoded photonic qubits. Other quantum logic operations are in principle possible as well, but the controlled-phase gate is a prototypical example of a low-level two-qubit operation. Together with the available continuous single-qubit gates it completes the requirements for universal quantum circuits. Figure 3 sketches the envisioned photonic integrated circuit implementation. The basic idea is that we arrange our TLE-cavity systems to act as an identity operation on incoming single-photon wave packets (or the vacuum), while at the same time they impart a nontrivial phase to a two-photon wave packet. The dual rail encoding and the beamsplitter ensure that the cavities encounter two-photon wave packets only for the logical \(\left|11\right\rangle\) state, leading to our controlled-phase operation.

Fig. 3: Photonic integrated circuit implementation of a controlled-phase gate.
figure 3

The gate acts on two dual-rail qubits encoded in four waveguides. The top two waveguides serve to encode one qubit. The logical state of that qubit depends on which of the waveguides contains a photon, as labeled on their left end. All four waveguides are terminated by identical one-sided cavities depicted in Fig. 1a. The “0”-arm cavities preserve the relative timing of the photon pulses and need not contain TLEs. The “1”-arm cavities perform the nonlinear phase shift and must contain identical TLEs. A 50/50 beamsplitter between the “1”-arms cause the transformation \(\left|{1}_{w}{1}_{w}\right\rangle \to 1/\sqrt{2}(\left|{2}_{w}{0}_{w}\right\rangle +\left|{0}_{w}{2}_{w}\right\rangle )\) resulting in two photons arriving at one of the TLE cavities if the logical state of the qubits is \(\left|11\right\rangle\) (i.e., a photon in each of the middle two waveguides.). The cavity control is such that they map \(\left|{1}_{w}\right\rangle \mapsto \left|{1}_{w}\right\rangle\), but \(\left|{2}_{w}\right\rangle \mapsto -\left|{2}_{w}\right\rangle\). This extra phase is the crucial component enabling our controlled-phase gate. We use the w subscript to denote physical photon in a waveguide, to avoid confusion with the notation used for the logical states of the dual-rail qubits.

The input state (two arbitrary dual-rail encoded qubits) is15

$$\left|{\psi }_{{{{\rm{sc}}}}}\right\rangle =\left(\alpha \left|{0}_{s}\right\rangle +\beta \left|{1}_{s}\right\rangle \right)\otimes \left(\zeta \left|{0}_{c}\right\rangle +\vartheta \left|{1}_{c}\right\rangle \right)\equiv \alpha \zeta \left|00\right\rangle +\alpha \vartheta \left|01\right\rangle +\beta \zeta \left|10\right\rangle +\beta \vartheta \left|11\right\rangle ,$$
(13)

with α2 + β2 = 1 and ζ2 + ϑ2 = 1. The ideal controlled-phase gate operation is defined by the transformation

$$\hat{{{{\mathcal{C}}}}}\left|{\psi }_{{{{\rm{sc}}}}}\right\rangle \equiv \alpha \zeta \left|00\right\rangle +\alpha \vartheta \left|01\right\rangle +\beta \zeta \left|10\right\rangle -\beta \vartheta \left|11\right\rangle .$$
(14)

We use the “worst-case” gate fidelity as defined in22

$${{{{\mathcal{F}}}}}_{{{{\rm{gate}}}}}\equiv \mathop{\min }\limits_{\left|{\psi }_{{{{\rm{sc}}}}}\right\rangle }\left({{{{\mathcal{F}}}}}_{s}\right),$$
(15)

where the state fidelity, \({{{{\mathcal{F}}}}}_{s}\), is defined as

$${{{{\mathcal{F}}}}}_{s}\equiv {\left|\left\langle {\psi }_{{{{\rm{sc}}}}}\right|{\hat{{{{\mathcal{C}}}}}}^{{\dagger} }\left|{\psi }_{{{{\rm{out}}}}}\right\rangle \right|}^{2}={\left|\left({\left|\alpha \right|}^{2}+{\left|\beta \zeta \right|}^{2}\right){\langle {1}_{w}| {\psi }_{{{{\rm{out}}}}}^{(1)}\rangle }^{2}-{\left|\beta \vartheta \right|}^{2}\langle {2}_{w}| {\psi }_{{{{\rm{out}}}}}^{(2)}\rangle \right|}^{2},$$
(16)

where \(\left|{1}_{w}\right\rangle\) and \(\left|{2}_{w}\right\rangle\) denote, respectively, one or two photons in the waveguide and \(\left|{\psi }_{{{{\rm{out}}}}}^{(1)}\right\rangle\) and \(\left|{\psi }_{{{{\rm{out}}}}}^{(2)}\right\rangle\) denote the emitted state after the absorption of, respectively, one or two incident photons. We use the w subscript to avoid confusion with the dual-rail logical states, like \(\left|1\right\rangle =\left|{0}_{w}{1}_{w}\right\rangle\) and \(\left|0\right\rangle =\left|{1}_{w}{0}_{w}\right\rangle\). The steps in the derivation of Eq. (16) are included in the supplementary materials. Notice the minus sign in the second term, corresponding to the fact that the logical \(\left|11\right\rangle\) state has changed its phase, i.e., that when two photons are absorbed the state gains an additional π phase, unlike when one or zero photons are absorbed. The complex-valued overlap factors in Eq. (16) are given by4

$$\langle {1}_{w}| {\psi }_{{{{\rm{out}}}}}^{(1)}\rangle =\int {\xi }_{{{{\rm{out}}}}}^{(1)}(t){\xi }_{{{{\rm{in}}}}}^{* }(t-T)dt$$
(17a)
$$\langle {2}_{w}| {\psi }_{{{{\rm{out}}}}}^{(2)}\rangle =\int \int {\xi }_{{{{\rm{out}}}}}^{(2)}({t}_{m},{t}_{n}){\xi }_{{{{\rm{in}}}}}^{* }({t}_{n}-T){\xi }_{{{{\rm{in}}}}}^{* }({t}_{m}-T){\rm{d}}{t}_{n}{\rm{d}}{t}_{m},$$
(17b)

where T is the gate duration. Note that the output wave packet of the ideal gate operation is a simple time translation of the input wave packet. This is a critical requirement for enabling quantum circuits with many identical gates, as any subsequent gate would work only if the wave packets carrying the encoded photons are not distorted by the previous gate. The output wave packets described by \({\xi }_{{{{\rm{out}}}}}^{(1)}\) and \({\xi }_{{{{\rm{out}}}}}^{(2)}\) are not normalized due to loss and ψ00e(tN)2≥0. The overlap integrals in Eq. (17) therefore describes gate errors in both amplitude and phase.

For the system considered here, the task is to determine the control fields Λ(t) (the interaction between the cavity modes) and Ω(t) (the detuning between the TLE and cavity mode \(\hat{b}\)) that maximize the gate fidelity. Unity fidelity is achieved if \(\langle {1}_{w}| {\psi }_{{{{\rm{out}}}}}^{(1)}\rangle =1\) and \(\langle {2}_{w}| {\psi }_{{{{\rm{out}}}}}^{(2)}\rangle =-1\) as seen from Eq. (16). This means that a two-photon wave packet captured and then released by the cavity must acquire a different phase than that of a single photon to fulfill the condition \(\arg [{\xi }_{{{{\rm{out}}}}}^{(2)}]-2\arg [{\xi }_{{{{\rm{out}}}}}^{(1)}]=\pi\). The photon-number dependent TLE-cavity coupling illustrated in Fig. 1 causes an an-harmonic energy-ladder that enables this difference in phase-accumulation. However, in Refs. 3,4 we found that the gate fidelity is limited due to interactions between the photons while the wave packet is absorbed and released from the cavity. This fidelity reduction would be particularly detrimental with the large nonlinearity considered here without a method to modify the effective size of the nonlinear coupling rate. Instead of changing g itself, we consider modifying the TLE-cavity detuning, Ω(t). When Ω g, the effective nonlinearity is small and it is maximized when Ω = 0. The gate protocol therefore consists of three stages:

  • Absorption: Λ(t) is adjusted to couple photons from an incident wave packet into mode \(\hat{b}\) while the detuning is held fixed at a large value Ω(t) = Ω0g.

  • Interaction: Ω(t) is adjusted to increase the effective nonlinear coupling rate such that the required phase shift is achieved while the TLE returns to its ground state at the end of the stage for both one- and two-photon inputs.

  • Emission: Λ(t) is turned on again to release the photons into a wave packet with the same shape as the input while Ω(t) = Ω0.

When the TLE and cavity are completely decoupled, the optimum control function that loads a single photon into mode \(\hat{b}\) is 3

$$| {\Lambda }_{i}(t)| =\frac{| {f}_{i}| \exp \left[-\frac{{\kappa }_{l}t}{2}\right]}{| {\xi }_{{{{\rm{in}}}}}| \sqrt{2\int\nolimits_{{t}_{0}}^{t}{f}_{i}(s)ds}}$$
(18a)
$$\arg [{\Lambda }_{i}(t)]=-{\delta }_{b}t-\arg ({\xi }_{{{{\rm{in}}}}}),$$
(18b)
$${f}_{i}(t)=\left(\frac{{\kappa }_{C}}{2}{\xi }_{{{{\rm{in}}}}}-{\dot{\xi }}_{{{{\rm{in}}}}}\right){\xi }_{{{{\rm{in}}}}}^{* }{e}^{{\kappa }_{l}t},$$
(18c)

where δb = 0 and we assumed Λi(t) arises due to three-wave mixing between modes \(\hat{a}\), \(\hat{b}\), and a third mode [not shown in Fig. 1(a)] occupied by a strong classical laser field. In the limit Ω0g, we can adiabatically eliminate \({\psi }_{00e}^{(L)}\) from Eq. (4b) by setting \({\dot{\psi }}_{00e}^{(L)}\approx 0\) in Eq. (4c), leading to

$${\dot{\psi }}_{01g}^{(L)}({t}_{m},t)\approx \left(-\frac{{\kappa }_{l}}{2}+i\frac{{g}^{2}}{{\Omega }_{0}}\right){\psi }_{01g}^{(L)}({t}_{m},t)-i\Lambda (t){\psi }_{10g}^{(L)}({t}_{m},t)$$
(19a)
$${\dot{\psi }}_{00e}^{(L)}({t}_{m},t)\approx -\frac{g}{{\Omega }_{0}}{\psi }_{01g}^{(L)}({t}_{m},t).$$
(19b)

The term g20 therefore corresponds to adding an effective detuning in Eq. (4b) so we add g20t to the phase of Λi(t) when solving for the full dynamics described by Eq. (4). An alternative derivation of this additional phase term is found in the supplementary materials.

The control function that optimally releases a single photon into the wave packet ξout, is3

$$| {\Lambda }_{o}(t)| =\frac{| {f}_{o}| {e}^{-\frac{{\kappa }_{l}t}{2}}}{| {\xi }_{{{{\rm{out}}}}}| \sqrt{{\kappa }_{C}| {\psi }_{01}^{(1)}({t}_{0}){| }^{2}-2\int\nolimits_{{t}_{0}}^{t}{f}_{o}(s){\rm{d}}s}}$$
(20a)
$$\arg \left[{\Lambda }_{o}(t)\right]=-{\delta }_{b}t-\arg ({\xi }_{{{{\rm{out}}}}})-\frac{\pi }{2}$$
(20b)
$${f}_{o}(t)=\left(\frac{{\kappa }_{C}}{2}{\xi }_{{{{\rm{out}}}}}+{\dot{\xi }}_{{{{\rm{out}}}}}\right){\xi }_{{{{\rm{out}}}}}^{* }{e}^{{\kappa }_{l}t}.$$
(20c)

Note there is some additional optimization involved when \({\psi }_{01g}^{(1)}(0,t)\) has not reached a steady-state value at the onset of the release process since it is not obvious how to chose \({\psi }_{01g}^{(1)}({t}_{0})\) in Eq. (20a). Since both Λi and Λo are approximately zero during the interaction stage, we have Λ = Λi + Λo.

Results

Gate performance

To quantify the gate performance that is possible with the system in Figs. 1, 3, we consider Gaussian-envelope wave packets

$${\xi }_{{{{\rm{in}}}}}(t)=\sqrt{\frac{2}{{\tau }_{{{{\mathcal{G}}}}}}}{\left(\frac{\ln (2)}{\pi }\right)}^{\frac{1}{4}}\exp \left(-2\ln (2)\frac{{(t-{T}_{{{{\rm{in}}}}})}^{2}}{{\tau }_{{{{\mathcal{G}}}}}^{2}}\right),$$
(21)

where ξin(t)2 has a full temporal width at half maximum (FWHM) of \({\tau }_{{{{\mathcal{G}}}}}\) and a spectral width of \({\Omega }_{{{{\mathcal{G}}}}}=4\ln (2)/{\tau }_{{{{\mathcal{G}}}}}\). We numerically solved the equations in the section “Equations of motion” using Julia23. The temporal shape of the control field Ω(t) was determined by minimizing the gate error \(1-{{{{\mathcal{F}}}}}_{{{{\rm{gate}}}}}\) using a standard gradient-free optimization method (Nelder-Mead24). Figure 4 shows an example of the gate dynamics for a duration of T = 7/g, Tin = 4.3/g, and \(g=0.4{\Omega }_{{{{\mathcal{G}}}}}\). It is expected that the TLE-cavity detuning becomes small during the interaction stage, t [Tin; Tin + T], since it leads to a larger occupation probability of the TLE and thereby a larger effective nonlinearity . The blue curve in Fig. 4a confirms this expectation and Fig. 4b plots the probability of the TLE being in the excited state for both one- (blue) and two-photon (red) input states. Note that both populations decrease towards zero at the end of the gate sequence as is required for a large gate fidelity. While the TLE-cavity detuning is low, the one- and two-photon states acquire phase at different rates, which is discussed in more detail in the supplementary materials. Figure 4c plots the phase difference

$$\Delta \phi (t)\equiv \arg \left[{\psi }_{02g}(t)\right]-2\arg \left[{\psi }_{01g}^{(1)}(0,t)\right],$$
(22)

which approximates the phase difference between the output wave packets, \(\arg [{\xi }_{{{{\rm{out}}}}}^{(2)}]-2\arg [{\xi }_{{{{\rm{out}}}}}^{(1)}]\). The reason is that the populations ψ02g(t)2 and \(| {\psi }_{01g}^{(1)}(0,t){| }^{2}\) approach one immediately before the emission stage as seen from Fig. 4c.

Fig. 4: Example of gate dynamics.
figure 4

a Control functions, Λ(t) and Ω(t) as a function of time along with the input wave packet and ideal one-photon output wave packet, \({\xi }_{{{{\rm{out}}}}}^{(1)}\). b Probability amplitude of the TLE being excited for a one-photon input, \({\psi }_{00e}^{(1)}(0,t)\), and the probability amplitude of a photon in mode \(\hat{b}\) and an excited TLE for a two-photon input, ψ01e(t). The black curves plot the probability of having absorbed all the input photons [defined in Eq. (23)] for a one- (solid) and two-photon input state (dashed). c Probability that all input photons are in mode \(\hat{b}\) for a one- (blue) and two-photon input state (red) along with the phase difference between the amplitudes of the corresponding Scrödinger coefficients [defined in Eq. (22)] (black). Simulation parameters: \({\kappa }_{C}=6{\Omega }_{{{{\mathcal{G}}}}}\), κl = γe = 0, \(g=0.4{\Omega }_{{{{\mathcal{G}}}}}\), Ω0 = 15g, Tin = 4.3/g, and T = 7/g.

The limitation on gate fidelity imposed by a finite value of Ω0/g is observed in Fig. 4b as a finite absorption probability (black lines). In Fig. 5, we investigate this further by plotting the probability of not absorbing a one- or two-photon input state as a function of Ω0/g. The probabilities are given by

$${{{{\mathcal{P}}}}}_{{{{\rm{load}}}}}^{(1)}(t)={\left|{\psi }_{01g}^{(1)}\left(0,t\right)\right|}^{2}+{\left|{\psi }_{00e}^{(1)}\left(0,t\right)\right|}^{2}$$
(23a)
$${{{{\mathcal{P}}}}}_{{{{\rm{load}}}}}^{(2)}(t)={\left|{\psi }_{02g}\left(t\right)\right|}^{2}+{\left|{\psi }_{01e}\left(t\right)\right|}^{2}.$$
(23b)

The solution for the phase of the control function, Λ(t), uses the term g20t derived in Eq. (19) based on the approximation Ω0g. Figure 5 shows how the error probability increases as this approximation becomes worse for decreasing Ω0/g. Remarkably, the error for both one- and two-photon input states decreases rapidly with increasing Ω0/g and drops to about 10−5 for Ω0 = 15g.

Fig. 5: Probability of failing at photon absorption.
figure 5

Probability not absorbing one- (solid lines) and two-photon (dashed lines) input states as a function the TLE-cavity detuning for different values of \(g/{\Omega }_{{{{\mathcal{G}}}}}\). Simulation parameters: \({\kappa }_{C}=6{\Omega }_{{{{\mathcal{G}}}}}\), κl = γe = 0, Tin = 4.3/g, and T = 7/g.

Our model includes a finite lifetime of cavity modes \(\hat{a}\) and \(\hat{b}\) as well as a decay rate from the TLE into the electromagnetic environment. Figure 6(a) plots the gate error as a function of gate duration for different values of the loss rate, κl. Note that we assumed γe = κl in Fig. 6(a). The control function, Ω(t), was optimized for each parameter configuration. The black line in Fig. 6(a) sets a lower limit on the gate error due to a finite excitation probability of the TLE at tN as well as a finite absorption error, \(1-{{{{\mathcal{P}}}}}_{{{{\rm{load}}}}}\). Compared to Ref. 3, our analysis here studies all three stages of the gate sequence and the gate duration is more than three times shorter (when comparing Fig. 6a here to Fig. 9 in Ref. 3). The dashed lines in Fig. 6a correspond to the conditional fidelity3,4, which is calculated using normalized output states

$$\left|{\overline{\psi }}_{{{{\rm{out}}}}}^{(n)}\right\rangle \equiv \frac{\left|{\psi }_{{{{\rm{out}}}}}^{(n)}\right\rangle }{\sqrt{\langle {\psi }_{{{{\rm{out}}}}}^{(n)}| {\psi }_{{{{\rm{out}}}}}^{(n)}\rangle }},\quad n=\{1,2\}.$$
(24)

It therefore corresponds to a post-selected gate fidelity conditioned on both photons being detected by a perfect detector. As expected, the conditional fidelity coincides with the fidelity in the absence of loss as in the case of χ(2) and χ(3) nonlinearities4.

Fig. 6: Dependence of the gate error on decoherence.
figure 6

a \(1-{{{{\mathcal{F}}}}}_{{{{\rm{gate}}}}}\) as a function of gate duration, T, for different cavity loss rates (legend corresponds to κl/g). b \(1-{{{{\mathcal{F}}}}}_{{{{\rm{gate}}}}}\) as a function of gate duration, T, for different dephasing rates (legend corresponds to γdp/g). In both (a) and (b), the dashed lines plot the error in conditional fidelity. Simulation parameters: \({\kappa }_{C}=6{\Omega }_{{{{\mathcal{G}}}}}\), \(g=0.4{\Omega }_{{{{\mathcal{G}}}}}\), Ω0 = 15g, and Tin = 4.3/g. In (a) we used γdp = 0 and γe = κl ≠ 0 and in (b) we used γe = κl = 0 and γdp ≠ 0.

Introducing control of the TLE-cavity detuning, Ω(t), removes the requirement observed in Ref. 4 to increase the gate duration, T, relative to the wave packet width, \({\tau }_{{{{\mathcal{G}}}}}\), in order to decrease the gate error due to wave packet distortions. Instead, Ω(t) controls the effective nonlinear coupling and the gate error (in the absence of loss) is only limited by the off-state detuning, Ω0/g, and the efficiency of depopulating the TLE for both one- and two-photon inputs despite the difference in Rabi frequency.

Working with solid state quantum emitters introduces other types of error mechanisms in addition to loss. Energy-conserving interactions between the emitter and its environment may lead to dephasing, which means the coherence between the ground and excited state is lost25. Superposition states, \(\alpha \left|g\right\rangle +\beta \left|e\right\rangle\), turn into mixed states when the relative phase between α and β is not conserved. Here, we study this effect by introducing a dephasing rate, γdp, and perform Monte-Carlo simulations to calculate the fidelity as described in the supplementary materials following26,27. Figure 6b plots the gate error as a function of gate duration for different values of γdp while keeping κl = γe = 0.

The result is very similar to that in Fig. 6a, except the dashed and solid lines coincide in Fig. 6(b). Dephasing errors can therefore be considered more severe than loss errors because the post-selected gate fidelity is also affected by dephasing.

Noise in the control fields

In this section, we consider a particular experimental approach to synthesizing the control fields and investigate the effect of noise in the settings of control parameters for Ω(t). A detuning between the emitter and cavity mode \(\hat{b}\) could be controlled via the emitter transition energy, ωe, through AC-Stark shifts. An alternative scheme would be to modulate the cavity resonance, ωb, via e.g. cross-phase modulation. For experimentally demonstrated nonlinear coupling rates of g ~ 40 GHz28, the entire gate duration in Fig. 4 is T ~ 175 ps, which would require very fast electronics. On the other hand, femtosecond-scale resolution in shaping of optical pulses was demonstrated29. Typically, optical pulse shaping is achieved by modifying a finite number of Fourier components of pulses using gratings and spatial light modulators30. To emulate this process, we write the control field as a sum of super-Gaussians with complex amplitudes in the Fourier domain

$$\tilde{\Omega }(\omega )={\Omega }_{0}\delta (\omega )-{{\rm{e}}}^{-{\rm{i}}\omega {T}_{\Omega }}\mathop{\sum }\limits_{m=-{{{\mathcal{N}}}}}^{{{{\mathcal{N}}}}}{\tilde{\Omega }}^{(m)}{{\rm{e}}}^{-{\left(\frac{\omega -m{\Omega }_{{{{\rm{ch}}}}}}{{\Omega }_{{{{\rm{ch}}}}}}\right)}^{6}},$$
(25)

where δ(ω) is the Dirac-delta distribution, \({{{\mathcal{N}}}}=({N}_{{{{\rm{ch}}}}}-1)/2\), and TΩ shifts Ω(t) on the time axis. The number of Fourier components is Nch each having a bandwidth of Ωch. Since Ω(t) is real-valued, the optimization consists of determining TΩ along with \({\tilde{\Omega }}_{R}^{(m)}={{{\rm{Re}}}}\{{\tilde{\Omega }}^{(m)}\}\) and \({\tilde{\Omega }}_{I}^{(m)}={{{\rm{Im}}}}\{{\tilde{\Omega }}^{(m)}\}\) under the constraints \({\tilde{\Omega }}_{R}^{(m)}={\tilde{\Omega }}_{R}^{(-m)}\) and \({\tilde{\Omega }}_{I}^{(m)}=-{\tilde{\Omega }}_{I}^{(-m)}\). Figure 7 shows an example of an optimized control pulse that results in a gate performance similar to the control pulse in Fig. 4a. To see how the gate performance is affected by the number of Fourier components and the channel bandwidth, we plot the minimized gate error as a function of Nch and Ωch in Fig. 8a.

Fig. 7: Example of Fourier domain control function.
figure 7

This particular example leads to a gate error of \(1-{{{{\mathcal{F}}}}}_{{{{\rm{gate}}}}}=4.7\times 1{0}^{-5}\). Parameters: \({\kappa }_{C}=6{\Omega }_{{{{\mathcal{G}}}}}\), γe = κl = 0, \(g=0.4{\Omega }_{{{{\mathcal{G}}}}}\), Ω0 = 15g, T = 7/g, Tin = 4.3/g, Nch = 9, and Ωch/g = 0.14.

Fig. 8: Gate error as a function of control and hardware parameters.
figure 8

a Optimized gate error, \(1-{{{{\mathcal{F}}}}}_{{{{\rm{gate}}}}}\), as a function of the number of Fourier components, Nch, and their bandwidth, Ωch. b Gate error as a function of the noise parameter, σ, using 100 different combinations of random numbers, \({X}_{R/I}^{(m)}\), (black crosses). The red line shows the worst case scenario. Parameters: \({\kappa }_{C}=6{\Omega }_{{{{\mathcal{G}}}}}\), γe = κl = 0, \(g=0.4{\Omega }_{{{{\mathcal{G}}}}}\), Ω0 = 15g, and Tin = 4.3/g.

Experimentally, there is only a finite precision available to determine the shape of the control fields. The Fourier domain implementation enables a direct quantification of the effect on the gate error from noise in the complex amplitudes, \({\tilde{\Omega }}^{(m)}\), of a programmable filter. The noise is included by modifying the optimized real and imaginary control variables as

$${\tilde{\Omega }}_{R/I}^{(m)}\,\to \,{\tilde{\Omega }}_{R/I}^{(m)}+{X}_{R/I}^{(m)}\times \sigma \times \mathop{\max }\limits_{m}\left({\tilde{\Omega }}_{R}^{(m)},{\tilde{\Omega }}_{I}^{(m)}\right).$$
(26)

The size of the noise is represented by σ, \({X}_{R/I}^{(m)}\) is a random number between −1 and 1, and the last factor in Eq. (26) is the maximum of all the optimized variables. Using the maximum in Eq. (26) is motivated by a finite filter setting precision and represents an absolute error rather than a relative error. Adding noise degrades the gate fidelity and Fig. 8b plots the gate error as a function of σ using the same optimized parameters as in Fig. 7. It is observed that errors below 10−4 are required to have a negligible influence on the gate error.

Comparison of nonlinearities

The nonlinearity required to facilitate photon-photon interactions for deterministic quantum logic gates can have different origins. In Refs. 3,4, we proposed protocols based on bulk nonlinearities such as second-harmonic generation (SHG) or self-phase modulation (SPM) in χ(2) and χ(3) materials. By introducing a generalized nonlinear coupling rate, ΓNL, we may write the Hamiltonian describing three different nonlinear effects as3,4

$${\hat{H}}_{{{{\rm{SHG}}}}}=\hslash {{{\Gamma }}}_{{{{\rm{NL}}}}}\left(\hat{c}{\hat{b}}^{{\dagger} }{\hat{b}}^{{\dagger} }+{\hat{c}}^{{\dagger} }\hat{b}\hat{b}\right)$$
(27a)
$${\hat{H}}_{{{{\rm{SPM}}}}}=\hslash {{{\Gamma }}}_{{{{\rm{NL}}}}}\left({\hat{b}}^{{\dagger} }\hat{b}-1\right){\hat{b}}^{{\dagger} }\hat{b}$$
(27b)
$${\hat{H}}_{{{{\rm{TLE}}}}}=\hslash {{{\Gamma }}}_{{{{\rm{NL}}}}}\left({\hat{b}}^{{\dagger} }{\hat{\sigma }}_{-}+\hat{b}{\hat{\sigma }}_{+}\right).$$
(27c)

In Eq. (27a), ΓNLχ(2), in Eq. (27b), ΓNLχ(3), and in Eq. (27c), ΓNL = g as seen from Eq. (3). Note that we absorbed a factor of 1/4 into the definition of ΓNL in Eq. (27b) compared to the definition of the χ3-parameter in equation 2b of Ref. 3 to avoid any numerical pre-factors in Eq. (27). Finding the minimum gate error for each value of κl in Fig. 6a and plotting it as a function of ΓNL/κl shows that the error is approximately inversely proportional to ΓNL/κl, see Fig. 9. We also show the results from Ref. 3 in the same plot for reference [note a rescaling of the red curve to match the definition of ΓNL in Eq. (27b)]. A lower bound on the gate duration (in units of \({{{\Gamma }}}_{{{{\rm{NL}}}}}^{-1}\)) follows from the physical origin of the phase difference between one- and two-photon inputs. For SHG, a full Rabi oscillation between two photons in mode \(\hat{b}\) and one photon in mode \(\hat{c}\) is required, and this Rabi period is given by \((\pi /\sqrt{2}){{{\Gamma }}}_{{{{\rm{NL}}}}}^{-1}\) (this can be seen from equations 57c and 57d in Ref. 4). For SPM, the phase difference is simply acquired at a rate given by 2ΓNLt so the minimum required gate duration is \((\pi /2){{{\Gamma }}}_{{{{\rm{NL}}}}}^{-1}\) (this can be seen from equation 54c in Ref. 4 when accounting for the definition: ΓNL = χ3/4). For TLEs, a bound is not as straightforwardly obtained due to the necessity of a control field to ensure the simultaneous achievement of a π phase difference and depopulating the TLE for both one- and two-photon inputs. However, Fig. 6a shows that a duration of \(\sim\! 5{{{\Gamma }}}_{{{{\rm{NL}}}}}^{-1}\) is sufficient for an error below 1%. These bounds are consistent with the relative positions of the curves in Fig. 9 and shows that using TLEs as the optical nonlinearity comes with a relative small penalty in the required loss rate of a factor of 2–3 compared to χ(2) or χ(3) effects.

Fig. 9: Gate error as a function of the ratio between nonlinear coupling rate and linear loss rate.
figure 9

Calculated for the three types of nonlinearity we have studied here and in previous work. The generalized nonlinear coupling rate, ΓNL, corresponds to g here and to χ2 or χ3/4 from equation 3 in Ref. 4. The vertical dotted lines show state of the art28 and the expected performance by combining g from Ref. 28 and κl from Ref. 47 (green dot). Note that the figure of merit, ΓNL/κl, for bulk nonlinearities are orders of magnitude smaller than for the TLE and therefore not included in this plot.

To evaluate the potential of practical implementations, one must calculate the value of ΓNL/κl. Table 1 lists numbers from the literature including each type of nonlinearity (see the supplementary materials for details on how the relevant metrics were extracted). It shows that interaction volumes achieved for SHG in χ(2)-materials are orders of magnitude larger than those for both SPM in χ(3)-materials and dipole interaction volumes2,31,32,33. The dielectric confinement mechanism employed in refs. 2,31,32,33 was applied to SHG in ref. 34, but more work is necessary to understand its potential for reducing the SHG interaction volume. Using ΓNL/κl as a figure of merit is not generally applicable for SHG since two optical cavity modes are involved (note that we assumed identical loss rates for all modes in ref. 4). In the SHG literature, the conversion efficiency (\({\eta }_{{{{\rm{SHG}}}}}\propto {Q}_{b}^{2}{Q}_{c}\)35,36,37) is often used as a figure of merit, but it appears that \(\min ({Q}_{b},{Q}_{c})\) is the limiting factor in the quantum regime studied here. This difference in scaling of the figure of merit should be considered when designing cavities for few-photon interactions.

Table 1 Comparison of nonlinear coupling rates and linear loss rates.

High confinement cavities have been realized in Si32,33, but measurements of the SPM coupling rate are required to verify their potential. Table 1 clearly illustrates the advantage of two-level emitters compared to bulk nonlinearities in terms of the much larger nonlinear coupling rate.

Discussion

In the introduction, we mentioned a few examples of two-level emitter implementations where strong coupling to an optical mode was already demonstrated. However, there has been a lot of work in recent years on other promising platforms like 1D-38 and 2D materials39,40. Very strong coupling between excitons in 2D materials and plasmonic modes was also experimentally observed41,42,43 and theoretical work suggested how such systems may be described by an effective Jaynes–Cummings model44,45,46. Our focus on InAs quantum dots in GaAs membranes in the previous section and Table 1 is, however, based on our assessment that they represent state-of-the-art owing to their scalability potential and excellent properties resulting from a long history of developing them as single-photon sources. Moving beyond state-of-the-art and into a parameter regime corresponding to ~1% gate error would require the nonlinear coupling rate in Ref. 28 and the linear loss rate in Ref. 47 to be achieved in the same device (illustrated with a green dot in Fig. 9). Surface passivation techniques are being used to address the challenge of achieving large Qs in GaAs cavities both with-48 and without QDs47. Cavities with ultra-small dipole interaction volumes2,31,32,33,34 also represent an interesting approach to increase g. We note, however, that with the parameters used in Fig. 6 and g = 40 GHz and ωa = 2πc/940 nm28, the coupling-Q of mode \(\hat{a}\) is QC = ωa/κC = 530. At the same time, κl/g ~ 10−3Ql/QC = 1.5 × 104 meaning that cavity mode \(\hat{a}\) must be extremely over-coupled to reach the ~ 1% gate error regime. Further increases to g corresponds to an even smaller QC that could pose experimental challenges although nanobeam cavities are well-suited to reach very over-coupled regimes even at large Qs49.

The scheme for dynamic cavity coupling originating from nonlinear mode interactions used here and in recent work3,50,51,52 is compatible with a very small dipole interaction volume of the cavity mode interacting with the TLE. The control pump power may be increased to achieve the required strength of Λ(t) as long as the overlap between the participating modes is large enough to ensure a reasonable nonlinear interaction volume. However, interference-based dynamic cavity coupling53,54 requires the mode to spread out across the interference paths and thereby limits how small the dipole interaction volume can be.

In conclusion, we have shown that a two-level emitter is sufficient to implement high-fidelity logical gates between photonic qubits when time-dependent control of the coupling between cavity modes and the emitter/cavity detuning is possible. Our approach represents a promising alternative to multi-level systems17,18,19 by shifting complexity from the atom-like emitter to the photonic system.

Based on the demonstrated performance and potential for improvement, we consider semiconductor quantum dots to be a very promising hardware platform to implement deterministic quantum logic on photonic quantum states.