Introduction

Quantum computers are widely touted as a new frontier for simulating quantum systems.1,2 The simulation of quantum chemistry,3,4,5,6,7 strongly correlated fermionic systems,8,9,10,11,12 and lattice gauge theories,13,14 are among the crucial applications.15 However, apart from ultracold fermionic atoms, all quantum simulation platforms are based on bosonic/spin degree of freedom. Therefore, one has to encode the fermionic problem into simulation-friendly spin models.

In the literature, there are a number of methods for doing so and we will focus on the methods that require implementing a non-local map, e.g., Jordan–Wigner (JW) or Bravyi–Kitaev (BK) mappings.16 Our approach relies on the use of a cavity–QED system to achieve the non-local coupling directly. This is in contrast to other ideas for improving the non-locality of the fermion-spin mapping, such as direct simplification of the quantum circuit17 or using gate teleportation18 to lower the cost of the Jordan–Wigner and Bravyi–Kitaev schemes. Another alternative to the approach taken here is to introduce additional qubits to achieve improved locality of the spin-representations of fermonic operators.5,19,20 Lastly, we mention a recently introduced technique for quantum simulation using plane waves rather than typical electronic structure basis sets composed of quasi-local Gaussian orbitals.21 The approach taken there has been shown to achieve linear circuit depth for a certain class of electronic systems. We do not pursue subspace encodings and consider arbitary electronic systems with a focus on approaches that directly implement the non-local maps rather than circumventing them.

Here, we present a hardware-efficient scheme to perform digital fermionic simulations on a physical system made of spins. Our approach makes use of cavity–QED physics,22,23,24,25 where one or several ancilla cavity modes are used to encode, simulate the Hamiltonian and measure the desired observables. The selective non-local coupling of ancillae to a qubit string allows for implementation of JW and BK mappings in one shot and reduces the simulation time. More specifically, in exponentiating each term of the Hamiltonian, our scheme reduces the circuit depth of both JW and BK to O(1) operations. This improvement reduces the simulation time, and therefore, mitigates the decoherence effects.

We then present an experimental implementation of our scheme in a circuit-QED platform,26,27,28,29,30,31,32,33,34,35,36,37,38 where experimental progress on fermionic and quantum chemistry simulation has been recently achieved.4,7 In particular, we use dispersive coupling of microwave cavity photons to superconducting qubits30,38 to generate non-local string operations non-perturbatively. This digital approach offers better scaling in the collective gate time than a previous analog scheme where multi-spin interactions are generated perturbatively,39 resulting in an exponential decrease with the number of Pauli operators to be implemented. Moreover, experimental advances have been achieved in probing inhomogeneity in resonate frequencies in the context of both superconducting qubit-array and resonator-lattice,40,41 and hence pave the way for the realization of collective many-body gates. Therefore, our scheme is preferable for implementing large strings, and it also remedies the disadvantage of circuit-QED architecture, i.e. low connectivity, compared to ion trap architectures.42

Furthermore, we compare our scheme to conventional local schemes for various fermionic models, such as Fermi–Hubbard model and generic Coulomb Hamiltonian. In these comparisons, we introduce a parallelization scheme, which further improves the simulation. Specifically, by parametrically coupling multiple cavity modes, we further decrease the circuit depth for each Trotter step by an additional factor of N. This results in an overall O(N2) reduction for Jordan–Wigner and Bravyi–Kitaev transformation in the cases of a Fermi–Hubbard model on an N-by-N lattice and a quantum chemistry problem with N orbitals, implemented on a device with local connectivity.

Results

Fermionic encoding with the non-local cavity–QED interaction

Coulomb Hamiltonian and Fermionic encoding

We consider a generic electronic model with hopping and two-body Coulomb interaction. The form of the Hamiltonian is given by

$$H = \mathop {\sum}\limits_{i,j} {\kern 1pt} \kappa _{ij}\left( {c_i^\dagger c_j + {\mathrm{H}}{\mathrm{.c}}{\mathrm{.}}} \right) + \mathop {\sum}\limits_{i,j,k,l} {\kern 1pt} V_{ijkl}c_i^\dagger c_j^\dagger c_kc_l.$$
(1)

Here, κ ij is the hopping matrix and V ijkl represents the interaction matrix. The indices i, j, k and l can label orbitals either in real-space or the reciprocal-space and can also absorb spin indices.

In order to simulate fermions with qubits, the simplest scheme is the Jordan–Wigner transformation:

$$c_j = \sigma _j^ + \mathop {\prod}\limits_{j^{\prime} < j} {\kern 1pt} \sigma _{j^{\prime}}^z,\,c_j^\dagger = \sigma _j^ - \mathop {\prod}\limits_{j^{\prime} < j} {\kern 1pt} \sigma _{j^{\prime}}^z,$$
(2)

The index j can be used to label sites in any dimension. For example, the string in 2D can be chosen as a ‘self-avoiding snake’ as illustrated by the red string in Fig. 1. In addition to the JW transformation, the Bravyi–Kitaev transformation16 also requires strings of Pauli operators although the form is more complicated (see Supplemental Information VI). The length of Pauli strings are on average logarithmically shorter than JW using the Bravyi–Kitaev transformation. In order to implement the time evolution with such string operators, we will consider using the cavity-assisted conditional string operation in the following sections.

Fig. 1
figure 1

Conditional string operation realized in a cavity–QED system. The Jordan–Wigner string (red) in the 2D qubit lattice can be chosen as a snake shape

Cavity–QED interaction and controlled-string operation

We consider the quantum non-demolition (QND) interaction43 of a cavity–QED system in the dispersive regime:

$$H_{{\rm{QND}}} = \chi a^\dagger a\mathop {\sum}\limits_j {\kern 1pt} \sigma _j^z,$$
(3)

where χ is the dispersive interaction strength.

We prepare the cavity photon state in the restricted subspace n a  = 0, 1. For circuit-QED implementation, the cavity nonlinearity introduced by the qubits are large enough, such that the cavity itself can be operated as a qubit. To collectively manipulate a qubit string, we simply apply the dispersive interaction for a period of τ. The time evolution operator is expressed as

$$U(\tau ) = \left[ {\mathop {\prod}\limits_j \left( {{\rm{cos}}(\chi \tau ) - i{\kern 1pt} {\rm{sin}}(\chi \tau )\sigma _j^z} \right)} \right]^{n_a}.$$
(4)

Here, we used the property that photon and spin operators commute, and the Pauli-matrix property \(\left( {\sigma _j^z} \right)^2 = 1\). If we choose the operation time to be τ = π/(2χ), we end up with

$$U\left( {\frac{\pi }{{2\chi }}} \right) = {\mathbb{1}}_q \otimes \left| 0 \right\rangle \left\langle 0 \right|_a + ( - i)^N\mathop {\prod}\limits_j {\kern 1pt} \sigma _j^z \otimes \left| 1 \right\rangle \left\langle 1 \right|_a.$$
(5)

The additional phase factor (−i)N depends on the length of the string and can be canceled by applying an additional phase gate on the ancilla cavity, and we call the resulting evolution operator \(C_{\overline Z }\), i.e., a conditional-\(\overline Z\) string operator, controlled by the cavity photon state: (1) If n a  = 0, no operation is performed; (2) If n a  = 1, a string operator \(\overline Z = \mathop {\prod}\nolimits_j {\kern 1pt} \sigma _j^z\) is applied. Such a cavity-controlled string operation has also been proposed to manipulate and engineer the topological ground state of the toric-code model.23,44,45

Exponentiation of the string operators, time evolution, and phase estimation

In order to perform digital quantum simulation of a Fermionic Hamiltonian H, one needs to perform Trotter evolution with small time steps,2 i.e., e−iHΔt. After breaking the Hamiltonian down to sub-terms \(H = \mathop {\sum}\nolimits_q {\kern 1pt} h_q\), one exponentiates each of these sub-terms as \({\rm e}^{ - {\rm i}h_q{\rm{\Delta }}t}\). The sub-term h q is composed of a qubit string operator. For example, a hopping term in Eq. (1) is represented by qubit operators under JW encoding as h ij  = \(\kappa _{ij}\left( {\sigma _i^ + \sigma _j^ - + {\mathrm{H}}{\mathrm{.c}}{\mathrm{.}}} \right)\mathop {\prod}\nolimits_{k \in {\rm{string}}} {\kern 1pt} \sigma _k^z\). This can be split into two pieces \(h_{ij}^{(1)} = \frac{1}{2}\kappa _{ij}\sigma _i^x\sigma _j^x\mathop {\prod}\nolimits_{k \in {\rm{string}}} {\kern 1pt} \sigma _k^z\) and \(h_{ij}^{(2)} = \frac{1}{2}\kappa _{ij}\sigma _i^y\sigma _j^y\mathop {\prod}\nolimits_{k \in {\mathrm{string}}} {\kern 1pt} \sigma _k^z\), and will be exponentiated separately. The conventional approach realizes the exponentiation of these string terms by a CNOT ladder (a sequence of nearest-neighbor CNOTs) illustrated in Fig. 2a (upper panel, see Supplemental Information I for details). Here, we present a hardware-efficient quantum circuit which uses the cavity-controlled string operation Eq. (5) as shown in Fig. 2a (lower panel). The essence is to collect the global parity information into the cavity ancilla with a single \(C_{\overline Z }\) gate and another \(C_{\overline Z }\) gate to erase the parity information after the rotation of the ancilla along x-axis by an angle 2Δt. Note that this circuit reduces the number of gates and circuit depth by a factor of N (N being the length of the string) due to its non-local and highly parallel feature, and hence greatly reduces the operation time.

Fig. 2
figure 2

a Arbitrary string operator exponentiated with conventional approach using a CNOT ladder to collect the parity information. The whole process can be performed collectively using cavity–QED approach with conditional string operation to realize the exponentiation of the string operator, which reduces the number of gates and the circuit depth by a factor of 1/N. b Exponentiation of a hopping sub-term with the action of pairs of Hadamard gates on sites i and j. c Exponentiation of an interaction sub-term with the action of pairs of Hadamards on site i, j, k and l. d Exponentiation of a hopping sub-term in the Bravyi–Kitaev encoding. e Measurement of the static correlator \(\left\langle {\psi \left| {\sigma _i^x\sigma _j^x\mathop {\prod}\nolimits_k {\kern 1pt} \sigma _k^z} \right|\psi } \right\rangle\) with a Hadamard-test circuit. The expectation value of the correlator can be extracted from the cavity ancilla readout. f Exponentiation of four hopping terms in parallel with the coupling to four cavity ancillae. In order to switch the “head” and “tail” of each string to Pauli-X operator, we split the strings into \(\overline X\) and \(\overline Z\) parts. The \(C_{\overline X }\) can be implemented with \(C_{\overline Z }\) sandwiched by parallel Hadamards on the qubits. All the gates in the blue-dashed box are implemented in parallel by multi-mode QND interaction Eq. (13)

To derive the properties of the circuit, we start with the conditional string operation \(C_{\overline Z }\), and the rotation of the ancilla

$$R_x(2{\rm{\Delta }}t) = {\mathbb{1}}_q \otimes {\rm e}^{ - {\rm i}{\rm{\Delta }}tX_a} = {\mathbb{1}}_q \otimes \left[ {{\rm{cos}}({\rm{\Delta }}t){\mathbb{1}}_a - i{\kern 1pt} {\rm{sin}}({\rm{\Delta }}t)X_a} \right],$$
(6)

where Xa is the Pauli-X operator of the ancilla photon state. The three successive gates \(C_{\overline Z }R_x(2{\mathrm{\Delta }}t)C_{\overline Z }\) can be expressed as

$$\begin{array}{l}C_{\overline Z }R_x(2{\rm{\Delta }}t)C_{\overline Z } = {\rm{cos}}({\rm{\Delta }}t){\mathbb{1}}_q \otimes {\mathbb{1}}_a - i{\kern 1pt} {\rm{sin}}({\rm{\Delta }}t)\overline Z \otimes X_a\\ = \left( {{\rm e}^{ - {\rm i}{\mathrm{\Delta }}t\overline Z }} \right)^{X_a} = {\rm e}^{ - {\rm i}{\mathrm{\Delta }}t\overline Z } \otimes \left| + \right\rangle \left\langle + \right|_a + {\rm e}^{{\rm i}{\mathrm{\Delta }}t\overline Z } \otimes \left| - \right\rangle \left\langle - \right|_a,\end{array}$$
(7)

where we have used the property \(\overline Z ^2 = {\mathbb{1}}_q\). The final expression represents a conditional evolution with the non-local many-body Hamiltonian \(H_{{\rm{string}}} = \overline Z = \mathop {\prod}\nolimits_{j \in {\rm{string}}} {\kern 1pt} \sigma _j^z\), controlled by the ancilla photon state \(\left| \pm \right\rangle _a\).

In general, arbitrary many-body interactions along the string can be exponentiated, by choosing the proper single-qubit rotations in the beginning and end of the circuit (see Fig. 2a). In Fig. 2b,c, we show explicitly the circuits to implement the exponentiation of the hopping sub-term \(h_{ij}^{(1)} = \frac{1}{2}\kappa _{ij}\sigma _i^x\sigma _j^x\mathop {\prod}\nolimits_{k \in {\rm{string}}} {\kern 1pt} \sigma _k^z\) and the interaction sub-term \(h_{ijkl}^{(1)} = \frac{1}{4}V_{ijkl}\sigma _i^x\sigma _j^x\sigma _k^x\sigma _l^x\mathop {\prod}\nolimits_{m \in {\rm{string}}} {\kern 1pt} \sigma _m^z\) coming from the Coulomb interaction term in Eq. (1), both under JW encoding. Here, we have used Hadamard gates to turn certain σz operators into σx with the identity \({\mathrm{H}}_j\sigma _j^z{\mathrm{H}}_j = \sigma _j^x\). On the other hand, a typical term in the Bravy–Kitaev encoding may involve all types of Pauli operators, e.g., \(\sigma _1^y\sigma _2^x\sigma _3^y\sigma _5^z\). This qubit string can be exponentiated with the circuit in Fig. 2d, where the combined Hadamards and phase gates (S and S) realized with a single pulse turn the σz operators into σy.

If one starts the ancilla in the \(\left| + \right\rangle _a\) (\(\left| - \right\rangle _a\)) state, one only gets forward (backward) evolution after n Trotter steps, e−inΔtH (einΔtH), as suggested by Eq. (7). However, if one starts with the ancilla in state \(\left| 0 \right\rangle _a = \frac{1}{{\sqrt 2 }}\left( {\left| + \right\rangle _a + \left| - \right\rangle _a} \right)\), one gets a conditional evolution CU = \({\rm e}^{ - {\rm i}Ht}\left| + \right\rangle \left\langle + \right|_a + {\rm e}^{{\rm i}Ht}\left| - \right\rangle \left\langle - \right|_a\), where t = nΔt. This property can be applied to quantum phase estimation46,47 for extracting energy spectrum and state preparation (see Supplemental Information VIII for details). Note, after the state preparation, one can extract fermionic correlation function such as \(C_{ij} = \left\langle {\psi \left| {c_i^\dagger c_j} \right|\psi } \right\rangle = \left\langle {\psi \left| {\sigma _i^ + \sigma _j^ - \mathop {\prod}\nolimits_k {\kern 1pt} \sigma _k^z} \right|\psi } \right\rangle\) with conditional string operations. For example, the circuit shown in Fig. 2e implements the xx-part of the correlator, i.e. \(\left\langle {\psi \left| {\sigma _i^x\sigma _j^x\mathop {\prod}\nolimits_k {\kern 1pt} \sigma _k^z} \right|\psi } \right\rangle\), where setting ϕ = 0 (ϕ = π/2) in the phase gate gives the real (imaginary) part. The measurement of dynamical correlator is discussed in Supplemental Information VII.

Parallelizations with multiple ancillary cavity modes

Another advantage of the cavity–QED approach is that one can further parallelize the exponentiation of all the mutually commuting sub-terms h ij using multiple cavity ancillae. This can be realized with multiple cavities or different modes in the same cavity as discussed further in the next section. Parallelization is trivial if the string operators to be exponentiated do not overlap with each other. It is also possible to exponentiate multiple overlapping strings in parallel, namely \(\mathop {\prod}\nolimits_\nu {\kern 1pt} {\rm e}^{{\rm i}\kappa {\rm{\Delta }}t\overline {\cal S} _\nu }\), where ν labels different strings. A concrete example is exponentiating hopping terms between two neighboring rows in parallel which appears in the Hubbard model (illustrated in Fig. 2f). The detailed derivation can be found in section “Methods”.

Implementation with circuit–QED architecture

In this section, we focus on the experimental implementation of the QND interactions of Eq. (3). We also discuss implementation of parallelization with multiple ancilla modes in the same cavity either by higher level contribution or alternatively by periodical modulation of the flux couplers.

Realization with circuit QED

We consider a collection of multi-level superconducting qudits inductively coupled to a single or multiple transmission-line cavities or 3D cavities as shown in Fig. 3a. The simplest case with one cavity mode can be described by a generalized Tavis–Cummings model:48

$$\begin{array}{*{20}{l}} {H_{{\rm{cQED}}}} \hfill & = \hfill & {H_0 + V,\,H_0 = \omega a^\dagger a + \mathop {\sum}\limits_j \mathop {\sum}\limits_l {\kern 1pt} \epsilon _{lj}\left| l \right\rangle \left\langle l \right|_j,} \hfill \\ V \hfill & = \hfill & {\mathop {\sum}\limits_j \mathop {\sum}\limits_{l,l^{\prime}} {\kern 1pt} g_{ll^{\prime}j}\left| l \right\rangle \left\langle {l^{\prime}} \right|_j(a + a^\dagger ).} \hfill \end{array}$$
(8)

Here, a is the annihlation operator for the cavity mode with frequency ω, \(\left| l \right\rangle _j\) represents the lth level of the jth qudit with corresponding energy \(\epsilon _l\), and gll′ = \(g\left\langle {l\left| \phi \right|l^{\prime}} \right\rangle \equiv g\phi _{ll^{\prime}}\) is proportional to the inductive coupling strength g and the phase matrix element (ϕ being the superconducting phase operator). The strength g can be made uniform even in the presence of non-uniform mode function with the flux-tunable inductive coupler,49 as shown in Fig. 3a.

Fig. 3
figure 3

a Schematics of a circuit-QED realization: superconducting qubits coupled to a transmission-line cavity with flux-tunable inductive couplers. In particular, we consider using fluxonium circuit as our qubit, and operate it in the vicinity of half flux quantum into the main loop (the right loop between inductor and junction). b The wavefunction is illustrated for EC = 0.5 GHz, EL = 0.75 GHz, Φext = 0.4Φ0 and tunable EJ. For EJ = 20 GHz (top), the states are trapped deep in the wells corresponding to persistent-current states flowing in opposite directions (with winding numbers m = 0 and m = 1). The inter-well transitions are forbidden (dashed arrow), and only intra-well transitions (such as 0–2 and 1–3) are allowed (solid arrows). For EJ = 4 GHz (bottom), the well is shallow and all transitions are allowed. c Magnitudes of phase matrix elements \(\left| {\phi _{ll^{\prime}}} \right|\) as a function of EJ (tunable by external flux through the junction loop on the left). At large EJ, \(\left| {\phi _{01}} \right|\), \(\left| {\phi _{03}} \right|\) and \(\left| {\phi _{12}} \right|\) (dashed lines) are exponentially suppressed. The parameters are based on ref. 38. d For further parallelization of multiple terms with overlapping strings, qubits are coupled to multiple ancillary cavity modes through periodically modulating the couplers with multiple tones. The qudit transition frequencies \(\epsilon _2\) − \(\epsilon _0\) and \(\epsilon _3\) − \(\epsilon _1\) are up-converted close to multiple cavity frequencies ω ν to induce multiple QND interactions in parallel

In the dispersive regime, namely

$$\sqrt N \left| {g_{ll^{\prime}}} \right| \ll \left| {{\mathrm{\Delta }}_{ll^{\prime}}} \right|,\,{\mathrm{where}}{\kern 1pt} {\mathrm{\Delta }}_{ll^{\prime}} = \epsilon _l - \epsilon _{l^{\prime}} - \omega ,$$
(9)

(N represents the total number of coupled qudits and Δll the detuning), one can adiabatically eliminate the direct inductive coupling V between qudits and the cavity. The effective Hamiltonian after a Schrieffer–Wolff transformation48,50,51 up to second-order is given by

$$\begin{array}{*{20}{l}} {H_{{\mathrm{eff}}}} \hfill & = \hfill & {H_0 + \mathop {\sum}\limits_{j,l} {\kern 1pt} \chi _l{\kern 1pt} a^\dagger a{\kern 1pt} _j\left| l \right\rangle \left\langle l \right|_j + \mathop {\sum}\limits_{j,l} {\kern 1pt} \kappa _{lj}\left| l \right\rangle \left\langle l \right|_j} \hfill \\ {} \hfill & {} \hfill & { + \mathop {\sum}\limits_{j \ne j^{\prime}} \mathop {\sum}\limits_{l \ne l^{\prime}} {\kern 1pt} \mu _{ll^{\prime}j}\left| l \right\rangle \left\langle {l^{\prime}} \right|_{j^{\prime}} + O\left( {g^4} \right).} \hfill \end{array}$$
(10)

Apart from H0, the terms app earing in second-order perturbation have three types: (1) The energy shift of level l is given by: \(\chi _l = \mathop {\sum}\nolimits_{l^{\prime} \ne l} {\kern 1pt} \chi _{ll^{\prime}} = \mathop {\sum}\nolimits_{l^{\prime} \ne l} {\kern 1pt} g_{ll^{\prime}}^2\left( {\frac{1}{{{\mathrm{\Delta }}_{ll^{\prime}}}} - \frac{1}{{{\mathrm{\Delta }}_{l^{\prime}l}}}} \right)\), summed over the contributions χll from virtual transitions to all other levels l′, where the first term is AC Stark and the second term is Bloch–Siegert shift, in the absence of rotating-wave approximation; (2) the Lamb shift \(\kappa _l = \mathop {\sum}\nolimits_{l^{\prime} \ne l} {\kern 1pt} \frac{{g_{ll^{\prime}}^2}}{{{\mathrm{\Delta }}_{ll^{\prime}}}}\) which only renormalizes the qudit energy level: \(\epsilon _l\) → \(\epsilon _l\) + κ l ; (3) the flip–flop interactions between any two qudits mediated by virtual photons with strength \(\mu _{ll^{\prime}} = \mathop {\sum}\nolimits_{l^{\prime \prime} \ne l,l^{\prime}} \frac{{g_{ll^{\prime \prime}}g_{l^{\prime \prime}l^{\prime}}}}{2}\left( {\frac{1}{{{\mathrm{\Delta }}_{ll^{\prime}}}} - \frac{1}{{{\mathrm{\Delta }}_{l^{\prime \prime}l}}} + \frac{1}{{{\mathrm{\Delta }}_{l^{\prime}l^{\prime \prime}}}} - \frac{1}{{{\mathrm{\Delta }}_{l^{\prime \prime}l^{\prime}}}}} \right)\), which we need to cancel out to avoid the induced cross-talk errors in our many-body gates. One can choose specific superconducting circuits, such as fluxonium38,48,52,53 focused here (alternatively flux qubit54 or protected 0-π qubit55,56). In particular, we consider the situation that phase matrix elements obtain selection-rule property38,53,57 at large ratio of Josephson and charging energy EJ/EC (e.g. EJ = 20 GHz, with fixed EC = 0.5 GHz from now on): ϕ01 = ϕ12 = ϕ03 = 0 as shown in Fig. 3c. In the case of fluxonium, this is due to the feature that the ground and excited states are persistent-current states with different winding numbers m, which can be seen from their wavefunctions being trapped in different wells of the Josephson potential −EJ cos ϕ and have negligible overlap (Fig. 3b). Therefore, the contribution from χ01 (as well as any other inter-well virtual transition) is nearly zero (<10−5 at EJ = 20 GHz). A QND interaction \(H_{{\mathrm{QND}}} = \mathop {\sum}\nolimits_j {\kern 1pt} \chi a^\dagger a\sigma _j^z\) arises in second-order perturbation with strength χ = ∑ l (χ0l − χ1l)/2j, while the nonzero contributions are from intra-well virtual transitions to higher levels, such as χ02 and χ13, which has recently been experimentally observed (see ref. 38). On the other hand, the single-excitation flip-flop term \(_j\left| 0 \right\rangle \left\langle 1 \right|_{j^{\prime}}\) disappears (μ01 = 0) due to the forbidden inter-well transitions (g01 = g12 = g03 = 0, etc.), and the lowest-level contribution is from \(_j\left| 0 \right\rangle \left\langle 2 \right|_{j^{\prime}}\). During the simulation process, we only occupy levels 0 and 1 which act as the qubit degree of freedom, therefore the flip–flop process does not play any role and hence will not introduce the unwanted cross-talk error in the many-body \(C\overline Z\) gate. When we need to implement single-qubit Hadamard (H) and phase (S) gates to get Pauli-X and Y (Fig. 2a), we can go to the small-EJ/EC regime (e.g. EJ = 4 GHz) by quasi-adiabatically tuning the flux into the junction loop. In this regime, 0–1 transition can be implemented indirectly via a Raman process (0 → 2 → 1) utilizing the low-lying Λ-structure,57 as shown in Fig. 3b,c. A direct transition is also possible since the 0–1 matrix element is sizable and can be accessed by the classical drive. Alternatively one can stay constantly at an intermediate parameter regime (such as EJ = 10 GHz) so that selection rules hold while the suppressed but still non-vanishing 0–1 transition is enabled by enhancing the power of the classical drive.

Note that due to the condition of dispersive regime Eq. (9), the QND interaction strength χ has to decrease when the number of coupled qubits N increases due to resonance enhancement. According to the constraint \(g{\mathrm{/\Delta }} \ll 1{\mathrm{/}}\sqrt N\) \(\left( {{\mathrm{\Delta }} \equiv {\mathrm{Min}}\left| {{\mathrm{\Delta }}_{ij}} \right|} \right)\), one can fix g and increase the detuning magnitude |Δ| and get the asymptotic scaling \(\chi = g \cdot (g{\mathrm{/\Delta }}) \ll g^2{\mathrm{/}}\sqrt N\). This scaling is exponentially better than a previous scheme where multi-spin interactions are generated perturbatively39 with exponential decreasing interaction strength with the length of the string, i.e., O(gN/|Δ|N−1).

For small N [i.e. O(10)], it is possible to remedy the insignificant decay of maximum interaction strength due to resonance enhancement by varying the parameters (external flux or EJ) of individual fluxoniums such that frequency of different qudits (\(\epsilon _{l,j}\)) are detuned. The QND interaction strength χ will not decrease significantly because it contains contributions from multiple levels χ0l and χ1l. One can then avoid the asymptotic \(1{\mathrm{/}}\sqrt N\) scaling by modular construction of multiple cavities with N ~ O(10) qubits together connected with quantum teleportation as discussed in Supplemental Information IX. Alternatively, instead of obtaining the QND interaction perturbatively as the above scheme, it is in principle possible to directly engineer the QND (cross-Kerr) interaction such as utilizing nonlinear coupling with Josephson junctions.30

Although we focus on fluxonium qubits here, one can generate QND interaction in more general cases for other qubits such as transmons. In those cases, one can detune the qubit frequency to avoid unwanted flip–flop interactions [for N ~ O(10)], or using a balance cavity mode as discussed further in Supplemental Information III.

Coupling to multiple ancillary modes with parametric coupler

In order to gain further parallelizability and shorten the time complexity, one can couple the qubits to multiple ancillary cavity modes as mentioned in the previous section, which certainly poses additional experimental challenges. One first needs to selectively address the qubits on different strings with a certain cavity mode which is usually distributed extensively and touches all the qubits. Second, one needs to couple the qubits dispersively to cavity modes with different frequencies. These two challenges can be solved by one trick, i.e., parametrically modulating the coupling of the qubits to the transmission-line cavity. One option is to periodically modulate the flux in the inductive coupler shown above in Fig. 3b (see e.g. refs. 58,59) with multiple tones, i.e. \(g_j[{\mathrm{\Phi }}(t)]\) = \(\mathop {\sum}\nolimits_\nu {\kern 1pt} \tilde g_{\nu ,j}{\rm{cos}}(f_\nu t)\), where j labels the qubit and f ν represents the modulating frequencies, with f0 = 0 (static coupling). The scheme is illustrated in Fig. 3d.

The multi-tone modulation technique is mature in microwave-engineering and turns out to be a valuable computational resource. The weight \(\tilde g_{\nu ,j}^\prime\) and driving tones f ν are controllable. We choose f ν such that the qubit frequency \(\epsilon\) is up-converted to a frequency close to but still off-resonant with the sideband ancillary tones (f ν ). In this case, they are dispersively coupled by the QND interaction HQND = \(\mathop {\sum}\nolimits_\nu {\kern 1pt} \mathop {\sum}\nolimits_j {\kern 1pt} \tilde \chi _{\nu ,j}a_\nu ^\dagger a_\nu \sigma _j^z\) with strength \(\tilde \chi _{\nu ,j} = \left( {\tilde \chi _{02}^{\nu ,j} - \tilde \chi _{13}^{\nu ,j}} \right){\mathrm{/}}2\), where \(\tilde \chi _{ll^{\prime}}^{\nu ,j} = \tilde g_{\nu ,j}^2{\mathrm{/}}(\epsilon _l - \epsilon _{l^{\prime}} - \omega _\nu + f_\nu )\). Note that f ν can decrease the detuning to make the interaction sizable. We choose \(\tilde g_{\nu ,j}\) such that each qubit is only coupled to the tones of the selected strings, as illustrated in Fig. 3d with multiple colors. As we see, the inductive couplings of qubits 4 and 5 are constant such that the qubits are only dispersively coupled to the fundamental mode a0, while the couplings of qubits 1 and 8 are modulated by three tones and hence connect the qubits to four cavity modes, etc. It is clear that the number of cavity modes one can up-convert (or down-convert) to is limited since the up-converted detuning has to be made different to avoid cross-talking between different ancillae modes, but one should be able to couple 10–20 modes. To couple more ancillae, the solution is again teleportation-based modular architecture discussed in Supplemental Information IX. As we will discuss in the following section, for a Fermi–Hubbard model on a N × N square lattice in real space, the number of modes one needs to couple to is N. Therefore, for a 100-qubit system which can be realized in the near future for a short-circuit algorithm still requiring no quantum error correction, it is possible to realize our parallelization scheme.

Time complexity

In the previous sections, we focused on how to exponentiate a single term h p in the system Hamiltonian H = \(\mathop {\sum}\nolimits_p {\kern 1pt} h_p\). In the following, we compare the time complexity (circuit depth) of our cavity–QED approach with the conventional approach of a single Trotter step e−iHΔt.

Fermi–Hubbard model

As the first example, we consider the spinful 2D Fermi–Hubbard model in real-space and on an N × N square lattice. We use qubits on two sub-lattices to encode fermions with different spin s = ↓ (purple) or s = ↑ (yellow) as shown in Fig. 4. The spinful Fermi–Hubbard model is a restricted form of Eq. (1) given by

$$H_{{\rm{Hubbard}}} = - \kappa \mathop {\sum}\limits_{\left\langle {i,j} \right\rangle ,s} {\kern 1pt} \left( {c_{i,s}^\dagger c_{j,s} + {\mathrm{H}}{\mathrm{.c}}{\mathrm{.}}} \right) + U\mathop {\sum}\limits_j {\kern 1pt} n_{j, \uparrow }n_{j, \downarrow },$$
(11)

where j → (n x , n y ) is a two-component label for the 2D sub-lattice. The first and second terms represent hoppings and on-site Hubbard interaction, respectively. The types of terms and their corresponding time complexity is listed below (for more details see Supplemental Information V).

Fig. 4
figure 4

Types of terms and Jordan–Wigner strings in a 2D spinful Fermi–Hubbard model on an N × N lattice. One can consider it as a checkerboard lattice with two sub-lattices (purple and yellow) representing two spin species (↓ and ↑) respectively. The ‘even’ and ‘odd’ vertical hoppings differs by the location of the strings, which are on the left and right sides, respectively

(1 and 2) On-site Hubbard interaction and Horizontal hopping: translates to ZZ interaction and 2-local flip–flop interaction without string in the qubit representation, both of which have O(1) circuit-depth. (3) Vertical hopping (even and odd): typically contains a “snake-shape” JW string (Fig. 4) and hence dominates the time complexity.

With one transmission-line cavity coupled to each pair of rows, one can parallelize the vertical hopping terms (see Supplemental Information V for details). For the vertical hopping between the same pair of rows, one can exponentiate these terms in series, resulting in the Trotter step circuit depth (time complexity) O(N). With the multi-mode scheme shown in Figs. 2f and 3d, one can exponentiate these terms and reduce the depth to O(1). In contrast, the conventional approach needs O(N2) due to the linear overhead of implementing the CNOT ladder in Table 1.

Table 1 Summary of various properties of six different molecules (operator information based on refs. 6,7)

The generic Coulomb Hamiltonian

For the generic Coulomb Hamiltonian described in Eq. (1), which is the relevant model for quantum chemistry or strongly correlated electronic materials simulated in reciprocal space, the indices i, j, k, and l are typically not neighbors. The type of terms that dominate the computational resource is the four-local interaction term \(V_{ijkl}c_i^\dagger c_j^\dagger c_kc_l\), which requires a sequence of O(N4) unitary transformations for a system with N orbitals (i, j, k, l = 1, 2, …, N) in a single Trotter evolution step due to all possible choices of the four fermion indices. Taking into account the JW string, which has length of O(N), the Trotter step circuit depth of the conventional approach becomes O(N5).60

For our cavity–QED approach, we list the circuit depth for the two approaches. (1) Series: O(N4), due to the reduction of the linear overhead of the Jordan–Wigner string. (2) Parallel: O(N3), assuming N ancilla cavity modes. The remaining O(N3) terms cannot be exponentiated in parallel because they do not commute with each other (e.g. when the first index i coincide, but the remaining three indices j, k, and l are all different). However, note that for an actual quantum chemistry Hamiltonian, although the total number of terms scales as O(N4), a large number of integrals vanish between distant orbitals or due to symmetry. The number of non-commuting terms also scales as O(N3) though similarly sparse. This can be seen from the example molecules discussed in Table 1 (operator information collected from refs. 6,7), which has typically only O(N) to less than O(N2) non-commuting terms (equivalent to the minimum number of commuting groups listed in the table). Therefore, there is a huge potential for parallelization in practice.

Summary of the comparison between cavity–QED and conventional approaches

Here, we summarize and compare the various properties of the cavity–QED scheme versus the conventional scheme, as shown in Table 2.

Table 2 Comparison of the conventional (local) and cavity–QED approaches with Jordan–Wigner and Bravyi–Kitaev encodings

In order to compare both schemes, we first compare their gate time. With the state-of-the-art technology, the second-order QND interaction strength between qubits and cavity with the form \(\chi \mathop {\sum}\nolimits_j {\kern 1pt} a^\dagger a\sigma _j^z\), can typically reach about 50–100 MHz,30 corresponding to gate time of 20–40 ns. On the other hand, the conventional approach needs nearest-neighbor CNOT gates between qubits, coming from the second-order ZZ interaction, \(\frac{{4g^{\prime 2}}}{\eta }\mathop {\sum}\nolimits_{i,j} {\kern 1pt} \sigma _i^z\sigma _j^z\) (e.g. due to the third-level contribution in the context of transmon qubits,61 where η is the nonlinearity of the transmon). The typical strength of the ZZ interaction is around 50 MHz,32 corresponding to a gate time of 40 ns. Since both types of interactions are of perturbative nature (up to second order), the gate time in both cases are of the same order of magnitude. The relevant parameters are summarized in Table 2. We also include the asymptotic prefactor \(\sqrt N\) (reduces to \(\sqrt {{\mathrm{log}}{\kern 1pt} N}\) with the Bravyi–Kitaev encoding) of the cavity–QED gate time due to the dispersive regime condition Eq. (9), which can be remedied by the modular architecture connecting multiple cavities (Supplemental Information IX). The average number of strings (cavity ancilla modes) a single qubit touches simultaneously is of O(10), so one does not need to worry about cross-talk between the ancillae due to frequency crowding in these cases either.

We emphasize that having a scheme with a shorter operation time in each Trotter step enables more evolution steps within the coherence time of the system, and hence increases the precision of the algorithms, such as phase estimation. Besides the cavity–QED scheme presented in this paper, there are some other schemes which can reduce the overhead due to the non-local string operator, such as refs. 17,18. We compare our scheme with theirs in Supplemental Information X.

Another significant advantage of our scheme over the conventional scheme is the gate fidelity, in particular, the fidelity due to the control pulses. In the conventional scheme, in order to implement N CNOTs in the CNOT ladder, one has to send N control pulses. Assuming the fidelity is F for each pulse, the overall fidelity due to imperfect pulse becomes FN as shown in Table 2. On the other hand, in the case of our many-body gate, one can actually just use a single control pulse with error F′ to detune the cavity frequency. In this case, the overall fidelity due to imperfect pulse is just F′, which does not have an exponential decay. Therefore, our collective many-body gate has a significant advantage in terms of quantum control and pulse fidelity.

Numerical simulation in the presence of decoherence

In this section, we numerically simulate and compare different approaches with two simple but representative experiments: (1) a 2D spinful Fermi–Hubbard model on a 2 × 2 lattice (simulated by 8 qubits). (2) A quantum chemistry problem, i.e., the outer shell electrons of a BeH2 molecule (simulated by 6 qubits), which has been simulated with superconducting qubits in a recent experiment.7

The simulation takes into account decoherence of qubits and cavity, represented by the jump operators \(l_j = \tilde l_j\sqrt {{\mathrm{\Gamma }}_j}\), where Γ j is the corresponding decay rate and \(\tilde l_j\) the normalized operator. The types of jump operators of our numerical simulation is listed in the caption of Fig. 5, along with the realistic estimation of experimental parameters chosen according to ref. 31.

Fig. 5
figure 5

Numerical simulation of the measurement protocols for different approaches taking into account dissipation effects (summed over 50 quantum trajectories in each curve), with the following jump operators for qubits and cavity and corresponding decay rate (from ref. 31): \(\sigma _j^ -\) (10 kHz), \(\sigma _j^ +\) (0.05 kHz), \(\sigma _j^z\) (50 kHz), a (5 kHz) and a (~ 0 kHz). a Phase estimation of the 2D Fermi–Hubbard model on a 2 × 2 lattice (simulated by 8 qubits), with the parameter: κ = 0.1, U = 1, and four electrons in total (half-filling). The upper panel shows the time-domain signal of the ancilla expectation value, while the lower panel is the Fourier transform of the upper panel in order to extract the ground-state energy. The actual ground-state energy Eg of this model is shown by vertical dashed lines. Note that all the curves in the lower panel correspond to Fourier transform of the signal in the period 0 ≤ t ≤ 100, while the purple curve corresponds to the ideal case with no dissipation and being transformed over a much longer period 0 ≤ t ≤ 1000 such that the resolution is improved by about 10 times. b The spectral function (extracted from the dynamical correlation function) of the Fermi–Hubbard model. The separation between the hole and particle resonance peaks signals the Mott gap. c Phase estimation of the BeH2 molecule (simulated by 6 qubits). Due to the signal decay of the cavity–QED (series) and local approach, we only perform Fourier transform in the period 0 ≤ t ≤ 10. In the numerical simulation, we first subtract all the diagonal terms in the Hamiltonian and then shift it back to recover the eigenenergy, mimicking the actual experimental process in ref. 32. One can see all but the conventional local approach can locate the ground-state energy Eg (dashed line), while the cavity–QED (parallel) approach has almost a resolution as good as the ideal case with no dissipation, despite the shrink of the peak

In particular, we simulate the Kitaev phase estimation protocol (see Supplemental Information VIII) for both systems and for the Fermi–Hubbard model also the measurement of spectral function A(ω) = −2Im[G(ω)], where G(ω) is extracted from the Fourier transform of the dynamical correlators including \(\left\langle {\psi \left| {{\kern 1pt} c_i(t)c_j^\dagger (0)} \right|\psi } \right\rangle\) (see Supplemental Information VII). Since both measurement protocols involve time evolution U(t), the dissipation of the system will affect the measurement result, as shown in Fig. 5. We compare four different situations: the ideal situation without dissipation, the conventional approach, and the cavity–QED approach in series and in parallel, respectively. Since each approach needs different operation time per Trotter step, the effects of dissipation are different.

For the Fermi–Hubbard model, we use JW encoding in all cases and three transmission line cavities are needed to couple each pair of rows (four rows in total) in parallel. For the BeH2 molecule, we use the modified BK encoding discussed in ref. 7. With this encoding, there are a total of 164 terms, which can be divided into eight groups, where all the terms in the same group commute with each other, as shown in Table 1. In this case, one can reduce the circuit depth to eight by exponentiating all the terms in the same group in parallel with multiple ancilla modes in the same central cavity. This would require about 20 tones in the flux modulation using the trick in Fig. 3d. On the other hand, the series cavity–QED approach will exponentiate all the terms sequentially with a single cavity ancilla.

Regarding to the phase estimation protocol in Fig. 5a,c, the cavity ancilla expectation \(\left\langle {Z_{\rm a}(t)} \right\rangle\) (Pauli-Z) oscillates in time in the ideal case, i.e. \(\left\langle {Z_{\rm a}(t)} \right\rangle = {\rm{cos}}(E_{\rm g}t)\), where Eg is the ground-state energy of the prepared eigenstate. Nevertheless, in the presence of decoherence, the signal decays significantly in time, while the peaks in frequency-space signal \(\left\langle {Z_{\rm a}(\omega )} \right\rangle\) also shrinks due to dissipation. For the Fermi–Hubbard model in (a), we prepare the ground state in the beginning, and one can see that Eg (shown by the dashed line) can be clearly resolved in the biggest peak in \(\left\langle {Z_{\rm a}(\omega )} \right\rangle\) in the blue and purple curves (ideal dissipationless case). The purple curve has a Fourier transform over the period 0 ≤ t ≤ 1000, namely 10 times long as the others, and hence has much better resolution. With dissipation, the signal dies out in a short time. While this peak still has the correct position for the cavity–QED parallel approach (red dashed), it shifts slightly for the series approach (green dashed) and becomes obscured in the conventional approach local (light blue dashed). For the phase estimation in BeH2 molecule in (c), we see that the parallel cavity–QED approach (red dashed) approximates the dissipationless signal (blue) with almost the same resolution of the ground-state energy while the height of the peak is reduced. The series cavity–QED approach (green dashed) has significant broadening in the resolution, while the conventional local approach has all the peaks being smeared out and is hence hard to tell the actual energy.

For the spectral function measurement in panel (b) for Fermi–Hubbard model, we prepare the initial state as the ground state. The two biggest peaks correspond to the hole (left) and particle (right) resonance, and the distance is approximately U, namely the Mott gap. We can see that the dissipation effect leads to the shrinking and asymmetry of the two peaks. The shrinking is proportional to the operation time of different approaches. The asymmetry is due to the fact that the qubit has much larger loss rate than absorption rate as listed in the figure caption. Due to our encoding of 0 (1) electron as spin up (down) of the qubit, the qubit loss induces loss of holes but not particles. Therefore, the hole peak (left) shrinks more than the particle peak. In practice, one could choose two different ways of encoding and average the signal to get rid of this asymmetry.

Conclusion and discussion

In this article, we have shown that, in the context of cavity/circuit-QED architecture, the use of the common cavity modes greatly simplifies the non-local string-like encoding needed for fermionic simulation, such as Jordan–Wigner and Bravyi–Kitaev transforms. In particular, we are able to get rid of a polynomial overhead, i.e., N2 of the Trotter-step circuit depth in the conventional local approach, which reduces the time complexity of the simulation for a given precision and in turn reduces the decoherence effects. The non-local quantum control and parallelization of multiple ancilla-controlled processes developed in this paper may have profound applications in many others areas, such as quantum information processing, lattice gauge theory simulation and measurement of entanglement spectrum in quantum many-body systems.62

Methods

Derivation of parallelizations with multiple ancillae

Here, we show the detailed derivation of multi-ancilae parallelization mentioned above. We use conditional string-\(\overline Z\) operations with multiple cavity ancilla modes, namely

$$\begin{array}{*{20}{l}} {C_{\overline Z _\nu }} \hfill & = \hfill & {{\mathbb{1}}_q \otimes {\mathbb{1}}_{a_1} \otimes {\mathbb{1}}_{a_2} \otimes \cdots \otimes \left| 0 \right\rangle \left\langle 0 \right|_{a_\nu } \otimes {\mathbb{1}}_{a_{\nu + 1}} \otimes \cdots } \hfill \\ {} \hfill & + \hfill & {\mathop {\prod}\limits_j {\kern 1pt} \sigma _{j \in {\mathrm{string}}(\nu )}^z \otimes {\mathbb{1}}_{a_1} \otimes {\mathbb{1}}_{a_2} \otimes \cdots \otimes \left| 1 \right\rangle \left\langle 1 \right|_{a_\nu } \otimes {\mathbb{1}}_{a_{\nu + 1}} \otimes \cdots ,} \hfill \end{array}$$
(12)

where each ancilla mode a ν is dedicated to a particular string ν. This collective gate can be realized by dispersively coupling qubits simultaneously to multiple modes resulting in the QND interaction

$$H_{{\rm{QND}}}^\prime = \mathop {\sum}\limits_\nu \mathop {\sum}\limits_j {\kern 1pt} \tilde \chi _{\nu ,j}a_\nu ^\dagger a_\nu \sigma _j^z.$$
(13)

As explained below, by proper conditional rotations, we can achieve a generic conditional string-\(\bar {\cal S}\) in different Pauli-bases, i.e. \(C_{\bar {\cal S}_\nu }\), where the \(\overline Z _\nu\) string in Eq. (12) is replaced by \(\bar {\cal S}_\nu\). We consider the case where all the strings commute with each other, i.e. \(\left[ {\bar {\cal S}_\nu ,\bar {\cal S}_{\nu ^{\prime}}} \right] = 0\). Thus the conditional-string also commutes, i.e. \(\left[ {C_{\bar {\cal S}_\nu },C_{\bar {\cal S}_{\nu ^{\prime}}}} \right] = 0\). Therefore, following the derivation in Eq. (7), we can reach the identity

$$\begin{array}{l}\mathop {\prod}\limits_\nu {\kern 1pt} C_{\bar {\cal S}_\nu }\mathop {\prod}\limits_{\nu ^{\prime}} {\kern 1pt} R_x^{\nu ^{\prime}}(2\kappa {\mathrm{\Delta }}t)\mathop {\prod}\limits_{\nu {\prime\prime}} {\kern 1pt} C_{\bar {\cal S}_{\nu {\prime\prime}}} = \mathop {\prod}\limits_\nu {\kern 1pt} C_{\bar {\cal S}_\nu }R_x^\nu (2\kappa {\mathrm{\Delta }}t)C_{\bar {\cal S}_\nu }\\ = \mathop {\prod}\limits_\nu {\kern 1pt} \left( {{\rm e}^{{\rm i}\kappa {\mathrm{\Delta }}t\bar {\cal S}_\nu }} \right)^{X_{{\rm a},\nu }},\end{array}$$
(14)

where \(R_x^\nu\) and \(X_{{\rm a},\nu }\) is the x-axis rotation and Pauli-X operator of the ancilla mode ν. If all the ancillae are initiated at \(\left| + \right\rangle _\nu\), the exponentiation of multiple strings is achieved in parallel, i.e. \(\mathop {\prod}\nolimits_\nu {\kern 1pt} {\rm e}^{{\rm i}\kappa {\rm{\Delta }}t\bar {\cal S}_\nu }\).

Now we consider how to convert the conditional-\(\overline Z\) into conditional-\(\bar {\cal S}\). We illustrate the idea with example shown in Fig. 2f]. This involves turning the head and tail of each string into Pauli-X operators. To achieve this, we split the \(C_{\bar {\cal S}_\nu }\) operator into two parts applied sequentially (order is arbitrary): the main \(C_{\overline Z _\nu ^1}\) string and the \(C_{\overline X _\nu ^2}\) part in the ends as shown in the green box in Fig. 2f. To achieve \(C_{\overline X _\nu ^2}\), we just need to sandwich the \(C_{\overline Z _\nu ^2}\) operators with Hadamards H j performed on the qubits in parallel. The application of all the \(C_{\overline Z _\nu }\) gates are performed in parallel with multi-mode QND interaction \(H_{{\rm{QND}}}^\prime\) Eq. (13). Therefore, the overall circuit depth of parallelizing N such hopping terms is of O(1). The generalization to arbitrary type is shown in Supplemental Information II.

Data availability

The data sets generated during and analyzed during the current study are available from the corresponding author on reasonable request.