## Abstract

Multiqubit parity measurements are essential to quantum error correction. Current realizations of these measurements often rely on ancilla qubits, a method that is sensitive to faulty two-qubit gates and that requires notable experimental overhead. We propose a hardware-efficient multiqubit parity measurement exploiting the bifurcation dynamics of a parametrically driven nonlinear oscillator. This approach takes advantage of the resonator’s parametric oscillation threshold, which depends on the joint parity of dispersively coupled qubits, leading to high-amplitude oscillations for one parity subspace and no oscillation for the other. We present analytical and numerical results for two- and four-qubit parity measurements, with high-fidelity readout preserving the parity eigenpaces. Moreover, we discuss a possible realization that can be readily implemented with the current circuit quantum electrodynamics (QED) experimental toolbox. These results could lead to substantial simplifications in the experimental implementation of quantum error correction and notably of the surface code.

## INTRODUCTION

Quantum error correction (QEC) protects fragile quantum information from decoherence and will play a vital role in large-scale quantum computations. Typical QEC codewords are defined in a given eigenspace of multiple parity operators. When an error occurs, the state of the qubits leaves the codespace, something that is revealed by measuring the parity operators. Because these measurements have to be performed repeatedly, it is crucial that they be of high fidelity. Moreover, to avoid introducing errors, these measurements should leave the parity subspaces intact, that is, states within a given parity subspace should remain unperturbed by the measurement.

In practice, parity measurement strategies can be broadly classified as direct or indirect. The latter approach, used in recent experimental demonstrations of small-scale error correction (*1*–*3*), relies on a series of two-qubit entangling gates between the data qubits and an additional ancilla qubit that is subsequently measured (*1*–*7*). Drawbacks of this strategy are the accumulation of errors due to faulty two-qubit gates and the experimental overhead that could become an impediment to the implementation of larger QEC codes.

Faulty gates and overhead issues can be addressed by using direct parity measurements. The central idea there is to map the parity information onto the state of a common mode coupled to the data qubits and which is then measured. For example, a possible strategy to realize direct measurements of two-qubit parity in circuit quantum electrodynamics (QED) is to monitor the response of a resonator dispersively coupled to the qubits. In this situation, the frequency of the oscillator, and therefore its response to a drive, becomes dependent on the joint-qubit parity (*8*–*10*). A challenge with this method is to design and implement a protocol that preserves the parity eigenspaces. In other words, in an ideal parity measurement, the common mode and its environment should gain information only about which parity subspace (even or odd) the qubit state belongs to. Possible improvements to overcome this eigenspace dephasing were introduced in (*11*–*14*) but require quantum-limited amplifiers with unit efficiency (*11*, *12*) or high-efficiency single microwave photon detectors (*13*, *14*).

Here, we introduce a scheme for direct, high-fidelity parity measurements that leaves the parity subspaces intact. Our approach is based on dispersively coupling multiple qubits to a nonlinear resonator driven by a two-photon parametric pump. This situation leads to a qubit parity–dependent parametric oscillation threshold. When the qubits are in the even subspace, the amplitude of the two-photon drive is below the parametric oscillation threshold and the resonator state remains close to vacuum. On the other hand, in the odd subspace, the parametric drive is above threshold and the resonator bifurcates to a high-amplitude state. We show that, by monitoring the amplitude of the resonator output field with standard homodyne detection, it is possible to infer the parity of the qubit ensemble with high fidelity while preserving both even and odd parity subspaces. We show that the photon number in the high-amplitude state can be increased by reducing the resonator nonlinearity, leading to an increased signal-to-noise ratio (SNR) at constant eigenspace dephasing. These ideas are generalized to more than two qubits by using a multitone parametric drive targeting the multiple dispersive shifts corresponding to the same parity subspace.

These ideas can be applied to different types of qubits coupled to oscillators. For concreteness, here, we present a circuit QED implementation (*15*, *16*) based on transmon qubits (*17*) that can easily be implemented with the current circuit QED toolbox (*18*, *19*).

## RESULTS AND DISCUSSION

### Parametrically driven nonlinear resonator

Before introducing our proposal for multiqubit parity measurements, we present its main component: a resonator of frequency ω_{r} and Kerr nonlinearity *K*. In the presence of a resonant parametric two-photon drive of frequency ω_{p} = 2ω_{r} and in a frame rotating at ω_{r}, this system is described by the Hamiltonian (*ℏ* = 1)(1)where *â* and *â*^{†} denote the resonator’s annihilation and creation operators, respectively. When the drive is turned off, = 0, the steady state of the system is the vacuum state. Below the parametric oscillation threshold, < κ/2, with κ the single-photon loss rate of the resonator, this system corresponds to the widely used Josephson parametric amplifier (JPA) (*19*) with a vacuum-squeezed steady state. Above > κ/2, this system bifurcates into one of two states of equal amplitude but opposite phases characterized by 〈*â*〉_{ss} = ± α_{o} with (*20*, *21*)(2)(3)

Because both the Hamiltonian *Ĥ*_{R} and the dissipation are symmetric under the transformation *â* → − *â* (see Methods), in steady state, the resonator occupies either of the two states with equal probability, leading to a null average displacement of the resonator field. However, a single shot homodyne measurement of the resonator steady state will always reveal a large amplitude |α_{o}|. Once the resonator has latched onto one of its two steady states, tunneling to the other is highly suppressed for large values of |α_{o}| (*21*–*23*). In the limit where the two-photon drive is well above the parametric oscillation threshold ≫ κ/2, the two steady states are coherent states.

If the parametric drive is detuned such that ω_{r} − ω_{p}/2 = δ, the system Hamiltonian becomes(4)

At large detunings , the vacuum-squeezed state is a steady state of the system, with the squeezing axis governed by the sign of the detuning δ (*21*). The degree of squeezing decreases as the ratio |δ|/ increases and, for |δ| ≫ , the steady state is very close to the vacuum state.

### Two-qubit parity measurement

We now turn to the core of our proposal, first considering two-qubit parity measurements. More precisely, we aim to distinguish the odd subspace spanned by the two-qubit states {|01〉, |10〉} from the even subspace spanned by {|00〉, |11〉}. To this end, we take two qubits dispersively coupled with equal strength χ to the parametrically driven nonlinear resonator. In a frame rotating at ω_{r}, this system is described by the Hamiltonian(5)where is the Pauli Z operator for the *i*th qubit. Under this dispersive coupling, the resonator frequency becomes qubit state dependent. We note that single-qubit readout in a similar setup was proposed in (*20*) and experimentally demonstrated in (*18*).

The above Hamiltonian, combined with the discussion of the previous section, immediately suggests an approach for multiqubit parity measurement. In Eq. 5, the qubits induce a dispersive shift of the resonator frequency that will change the parametric oscillation threshold of the two-photon pump in a parity-dependent manner. More precisely, if the state of the qubit lies in the odd subspace, |ψ_{o}〉 = *c*_{01}|01〉 + *c*_{10}|10〉, the two dispersive shifts cancel, as illustrated in Fig. 1A. With δ_{o} = 0, the system then behaves as a resonantly driven nonlinear resonator. Consequently, in the odd subspace, the resonator bifurcates to a large-amplitude state, as illustrated in Fig. 1B. The combined qubit-resonator system thus evolves from the initial state, |Ψ(0)〉 = |ψ_{o}〉 ⊗ |0〉, to one of the two steady states |Ψ(*t*)〉 = |ψ_{o}〉 ⊗ | ± α_{o}〉. The phase of the oscillations, Arg[〈*â*〉_{o}] = θ_{o}, θ_{o} + π, is independent of the state of the qubits within the odd subspace. In this situation, monitoring the output field of the resonator using standard homodyne measurement of the quadrature reveals a large photon population in the resonator, |〈*â*〉_{o}|^{2} = |α_{o}|^{2}. Note that during the homodyne measurement, the field can, in principle, switch between the two steady states ± α_{o}, something that can reduce the measurement fidelity. However, these switching events are rare for large |α_{o}| (*21*–*23*).

On the contrary, in the even subspace, |ψ_{e}〉 = *c*_{00}|00〉 + *c*_{11}|11〉, the dispersive shifts of the two qubits add up and the two-photon drive is off-resonant by δ_{e} = ± 2χ. For dispersive shifts (*20*), the vacuum state remains a stable steady state even after activation of the two-photon drive, as schematically depicted in Fig. 1B. That is, the system remains in the initial state, |ψ_{e}〉 ⊗ |0〉. In this case, tracking the output of the resonator with homodyne measurement results in a null amplitude |〈*â*〉_{e}| = 0.

In practice, because the dispersive shifts are finite, the resonator state will deviate from vacuum when the qubits are in the even subspace and will become slightly vacuum squeezed under the action of the off-resonant two-photon drive. The axis of squeezing, schematically represented in the inset of Fig. 1B, depends on the sign of the parametric pump detuning and is therefore different for the two even states |00〉 and |11〉. This results in slow dephasing within the even parity subspace at rate γ_{e} = κ(/2χ)^{2} (see Methods). This dephasing can be made small by limiting the amplitude of the two-photon drive /2χ ≪ 1. Crucially, this does not limit the SNR of the measurement because |α_{o}| can be made large by reducing the resonator nonlinearity, *K*, as shown by Eq. 2. In other words, the measurement SNR and the eigenspace dephasing rate γ_{e} can be optimized separately. This is in stark contrast with schemes based on coherent drives where, for a fixed dispersive coupling χ, the eigenspace dephasing increases with the SNR (*8*, *9*, *11*).

To numerically evaluate the performance of this measurement scheme, we simulate the evolution generated by Eq. 5 under a stochastic master equation (see Methods) (*24*), which implicitly includes switching events between the two resonator steady states in the odd qubit parity subspace. We first compute 2000 trajectories where the qubits are initialized in the odd (even) subspace. For each trajectory, we integrate the resulting homodyne current and categorize it as odd (even) if the absolute value of the signal is above (below) an optimized threshold value. The resulting measurement fidelity F_{m}(τ) = 1/2[*P*(e|e) + *P*(o|o)] is shown as a function of time in Fig. 2A. Starting at F_{m}(0) = 0.5 corresponding to a random parity guess, the fidelity steadily increases toward 1. For the realistic parameters *K*/κ = 0.175, χ/κ = 25, /κ = 2.5, and τ = 5/κ, we find a large measurement fidelity F_{m} = 99.9%. In these simulations, the steady-state photon number (in the odd subspace) is set to |α_{o}|^{2} ≈ 14, leading to a high SNR once the resonator reaches steady state. For these parameters, we observed no switching events between ±α_{o} and, consequently, the measurement time is limited by the bifurcation time to the steady state, which scales as ~ 1/( − κ/2) (see Methods). This could potentially be shortened by shaping the two-photon pulse (*t*) or with further parameter optimization. Moreover, the measurement fidelity might be improved further by using more sophisticated signal analysis methods such as machine learning (*25*).

Starting with an unentangled superposition of the odd and even states, this parity measurement collapses the qubits to an entangled Bell state within one of the two subspaces. To study the creation of entanglement and assess eigenspace dephasing, we initialize the system in an unentangled state with both qubits in the +1 eigenstate of and the resonator in the vacuum state, | + + 〉 ⊗ |0〉. We again compute 2000 realizations of the evolution and register the qubit state conditioned on the measurement record, ρ_{c}. Figure 2B shows the concurrence of ρ_{c} as a function of the measurement time τ. From the initial unentangled state, the qubits are rapidly projected on one of the two parity subspaces, leading to a high concurrence at moderate times. At longer times, the concurrence conditioned on an odd parity measurement approaches unity and, in the even subspace, it slowly decreases due to the slow dephasing γ_{e} (not apparent on the scale of Fig. 2B). To study the properties of the measurement process only, we considered ideal qubits (*T*_{1}, *T*_{2} → ∞) and perfectly matched dispersive shifts. In practice, these imperfections will cause the concurrence to slowly decrease and, in the case of relaxation errors during the measurement (*T*_{1}), will decrease the measurement fidelity . Using realistic relaxation times for the qubits, *T*_{1} = 50 μs, we compute a measurement fidelity of 98.2% in τ = 1.56 μs (see the Supplementary Materials).

After the measurement, the resonator is reset by turning off the two-photon drive and waiting for a few resonator lifetimes 1/κ or, alternatively, by adiabatically ramping down the parametric drive (*21*). Because the resonator ends up in a state close to a coherent state, this process can also be sped up using active reset techniques (*26*–*28*).

### Four-qubit parity measurement

We now turn to a generalization of the above approach to four qubits. This is motivated by the many QEC codes that require frequent parity measurements of more than two qubits. This is the case, for example, of the surface code that relies on four-qubit parity measurements (*29*). Because of the larger Hilbert space, it is now challenging to extract the measurement fidelity and study the entangle creation from numerical simulations. As a result, in this section, we focus on the underlying concepts and on analytical results.

Building on the results for the two-qubit scenario presented above, we now consider four qubits dispersively coupled to a single nonlinear resonator, where we aim to distinguish between two parity subspaces that are eightfold degenerate. In the even subspace, the dispersive shift can take three different values δ_{e} = 0, ± 4χ (blue Lorentzians), while in the odd subspace it can take two different values δ_{o} = ± 2χ (red Lorentzians), as schematically illustrated in Fig. 3A. Accordingly, a naive generalization of the two-qubit scheme presented above is to excite the resonator with a two-tone two-photon drive at frequencies 2(ω_{r} ± 2χ), as shown by the two sets of orange double arrows in Fig. 3A. As in the two-qubit case, this two-tone drive leads to a situation where the parity information is encoded in the amplitude of the resonator field: A high amplitude corresponds to the odd subspace, and a null amplitude corresponds to the even subspace. When the two tones of the two-photon drive are of equal amplitude, the amplitude of the output field does not depend on the two possible dispersive shifts within the odd subspace δ_{o} = ± 2χ. However, the frequency of the output field directly depends on δ_{o}, leading to fast dephasing inside the odd parity subspace at a rate γ_{o} = κ|α_{o}|^{2}. A possible solution introduced for linear drive schemes (*13*) and also applicable here is to use such a two-tone drive in combination with a detector that is sensitive exclusively to the amplitude of the output field, that is, a broadband, high-efficiency photon detector. However, the realization of this type of detector in the microwave domain remains challenging. Alternative proposals also offer solutions to this frequency distinguishability problem but at the cost of higher experimental complexity (*13*, *30*–*33*).

Here, we introduce a simpler, hardware-efficient approach to four-qubit parity measurements where the nonlinear resonator is coupled to a low-Q “filter” resonator of frequency ω_{f} through a tunable coupling element. As we show, this effectively implements a “frequency erasure” channel that converts resonator photons at ω_{r} ± 2χ to a single frequency ω_{f}. As a result, only the parity information remains in the output field, that is, the output field contains no information about the different dispersive shifts δ_{o} within the odd subspace. Crucially, this allows us to infer multiqubit parity using standard homodyne detection without inducing dephasing within that subspace.

To implement this frequency erasure channel, we consider a two-tone modulation *g*^{(2ω)} of the resonator-filter coupling at frequencies Δ_{f} ± 2χ, where Δ_{f} ≡ ω_{r} − ω_{f}. This multitone coupling modulation is schematically illustrated in Fig. 3A (dark green arrows), where one modulation tone (full lines) brings the δ = ± 2χ resonator peaks (blue) in resonance with the filter mode (purple), while the other coupling modulation tone (dashed lines) is off-resonant by ∓ 4χ and has only a small effect. Irrespective of the dispersive shift δ = ± 2χ, resonator photons are then converted to a single frequency ω_{f}. In a frame rotating at ω_{r} ± 2χ for the resonator, ω_{f} for the filter resonator and neglecting for now off-resonant terms, the above situation is described by the Hamiltonian (see Methods)(6)where and denote the annihilation and creation operators, respectively, of the filter mode.

Equation 6 crucially shows that the resonators’ dynamics does not depend on the state of the qubits within the odd qubit subspaces, δ_{o} = ± 2χ. Consequently, similar to the two-qubit case, four-qubit parity information can be inferred without eigenspace dephasing by monitoring the amplitude of the output field of the filter mode using homodyne detection.

Expanding further the simple analysis leading to Eq. 6 reveals that, in the odd parity subspace, the filter also emits in a qubit state–dependent sideband ω_{f} ± 4χ, as illustrated by the dark green dashed lines in Fig. 3A. Consequently, a small portion of the “which-frequency” information is present in the output field, causing a slow dephasing at a rate inside the odd subspace where κ_{eff} = *g*^{2}/κ_{f} (see Methods). Taking a measurement time κ_{eff}τ = 5, a steady-state photon number |α_{o}|^{2} = 10, and a ratio χ/κ_{f} = 20, this leads to an approximate error probability , which is below the threshold for QEC with the surface code (*34*). Internal photon loss of the nonlinear resonator at a rate κ_{int} will also induce dephasing inside the odd subspace at a rate , something that should ideally be minimized.

The mechanism responsible for this frequency erasure is the alignment of one nonlinear resonator sideband with the filter frequency for all odd parity qubit states. In the approach described above, we proposed to activate these sidebands via a multitone modulation of the coupling between the nonlinear resonator and the filter. An alternative approach is to modulate the nonlinear resonator frequency. This leads to FM (frequency modulation) sidebands that can be used, for example, to perform entangling gates between superconducting qubits (*35*). Moreover, we considered above that all qubits had the same dispersive coupling χ to the nonlinear resonator. As long as the absolute value of the dispersive coupling stays homogeneous, its sign could vary among the qubits, χ → − χ, with sole consequence to exchange even and odd in the discussion above. Last, an added advantage of introducing the filter mode is that it acts naturally as a Purcell filter for the qubits (*36*).

### Circuit QED implementation

Realization of the above ideas is natural in different quantum systems, and as a concrete example, we now describe a possible circuit QED (*15*, *16*) implementation with transmon qubits (*17*). Figure 1C shows the circuit for a two-qubit parity measurement, where two transmon qubits (red) are capacitively coupled to a nonlinear quarter-wavelength resonator (green). Taking the transmons to be far detuned from the resonator, the qubit-resonator coupling takes the dispersive character shown in Eq. 5. The dispersive couplings χ are adjusted to be of equal magnitude, and we assume the transmon qubits to be detuned from each other to avoid qubit-qubit interaction mediated by the resonator. The resonator nonlinearity *K* is induced, in part, by a superconducting quantum interference device (SQUID) located at the end of the resonator and, in part, by the qubits. The two-photon drive is induced by modulating the SQUID’s flux at twice the resonator frequency (orange). In short, the circuit that we propose consists of two transmon qubits dispersively coupled to a JPA parametrically driven above threshold and is well within reach of current experimental capabilities. Alternatively, the need for flux modulation can be removed by replacing the SQUID by a three-wave mixing element (*37*).

Figure 3B shows a possible implementation of the four-qubit parity measurement. Similarly to the two-qubit version, it consists of a nonlinear, quarter-wavelength coplanar resonator (green) capacitively coupled now to four transmon qubits (red). To erase the which-frequency information, the nonlinear resonator is coupled to a linear filter resonator (purple) by a tunable coupling element (dark green). Multiple circuits can be used to generate the necessary coupling modulation (*38*–*41*), and here, we follow (*41*). With this approach, the two-tone coupling modulation *g*^{(2ω)} is activated by driving the linear resonator (purple) with a three-tone coherent drive on the filter mode (dark green).

### Surface code implementation

Figure 4 shows a schematic representation of what our proposed hardware-efficient implementation of the surface code could look like, here shown for nine qubits. Red circles represent data qubits, and nonlinear resonators are implemented using the circuit of Fig. 3B. Out-of-plane interconnects, represented by squares, allow us to address all elements in this planar architecture. Single-qubit readout is performed through the yellow resonators, and single-qubit control is performed through the brown lines. Light gray regions represent measurement of error syndromes, while dark gray regions represent measurement of error syndromes. The latter are realized by applying Hadamard gates before and after the parity measurement. In contrast to architectures based on indirect parity measurements requiring 17 qubits, only 9 data qubits are necessary here.

To summarize, we have introduced a scheme for qubit parity readout exploiting the bifurcation dynamics of a nonlinear oscillator. For two qubits, this leads to a high-fidelity readout that preserves the parity eigenspaces. We also presented an extension of this scheme to the parity readout of four qubits using a multitone parametric drive in combination with a multitone modulation of the coupling between a nonlinear resonator and a filter mode. Both schemes have a simple circuit QED implementation that could be realized with current devices. This work paves the way for a hardware-efficient implementation of QEC codes such as the surface code in circuit QED.

## METHODS

### Stability of resonator vacuum state

When parametrically driven on resonance, the classical equations of motion for the field quadratures of the nonlinear resonator *x* = 〈*â* + *â*^{†}〉/2 and *y* = − *i*〈*â* − *â*^{†}〉/2 are given by(7)(8)

Computing the eigenvalues of the evolution matrix linearized around vacuum (*x*, *y*) = (0, 0), we obtained λ_{±} = ± − κ/2. Small fluctuations around vacuum will thus make the system leave this unstable point on a time scale given by .

### Dephasing in the two-qubit parity measurement

In the odd qubit subspace, the dispersive shifts shown in Eq. 5 cancel out and the qubits decouple from the resonator. Consequently, there is no dephasing in that subspace. On the other hand, in the even subspace, the two-photon parametric drive leads to a qubit state–dependent resonator field. More precisely, and as schematically illustrated in the inset of Fig. 1B, when the dispersive shifts are much larger than the two-photon drive and the resonator decay rate, 4χ ≫ , κ, the resonator field is in the slightly squeezed state |*r*e^{iθ}〉. The squeezing parameter is *r* ≈ /4χ, and the squeezing angle θ ≈ 0 or π/2 is qubit state dependent (*19*). The overlap of these squeezed pointer states is . The corresponding measurement-induced dephasing in this subspace is then roughly given by γ_{e} ~ κ(1 − 〈*r*|*r*e^{iπ/2}〉) ~ κ(/4χ)^{2} for small *r*. A more rigorous derivation of this rate can be found in the Supplementary Materials.

### Simulations

To model the back action of the homodyne measurement chain, we simulated multiple realizations of the evolution of the system under the stochastic master equation (*24*)(9)where is the dissipation superoperator and is the homodyne measurement back-action superoperator. Moreover, *dW* is a Wiener increment, which has statistical properties *E*[*dW*] = 0, *E*[*dW*^{2}] = *dt*, with *E*[•] denoting the ensemble average. The results of Fig. 2 were obtained using Eq. 9 with the Hamiltonian Eq. 5. Equation 9 shows that the Hamiltonian and dissipation (first two terms) are symmetric under the transformation *â* → − *â*. This symmetry is broken by the homodyne measurement back action (last term), that is, by conditioning the state on the measurement record. In other words, although the average displacement of the resonator is null, conditioning the state on the measurement record makes it collapse onto ± α_{o}.

The homodyne current resulting from the stochastic master equation is given by . For a given measurement time τ, the dimensionless integrated signal is given by .

To focus solely on the measurement scheme itself, we considered a homodyne measurement chain with unit efficiency. Because of the large number of photons in steady state, |α_{o}|^{2}, the measurement time and fidelity are mostly limited by the bifurcation time. As a result, adding imperfections to the measurement line affects the measurement time in a negligible manner. Moreover, for the parameters considered in the main text, the output power to amplify is below the 1-dB compression point for state-of-the-art amplifiers (*42*).

### Effective four-qubit Hamiltonian

As mentioned in the main text, we consider four qubits dispersively coupled to a nonlinear resonator under a two-tone two-photon drive . Coupling the nonlinear resonator to a harmonic filter through a two-tone modulation *g*^{(2ω)} = *g* cos[(Δ_{f} + 2χ)*t*] + *g* cos[(Δ_{f} − 2χ)*t*], this system is described by the Hamiltonian(10)

For the circuit of Fig. 3, this two-tone coupling modulation is obtained by driving the filter mode with a three-tone linear drive at frequencies ω_{d1}, ω_{d2}, ω_{d3}. Setting ω_{d1} − ω_{d2} = Δ_{f} − 2χ and ω_{d1} − ω_{d3} = Δ_{f} + 2χ results in the desired two-tone modulation as well as AC-Stark shifts of the resonator and filter mode frequencies (see the Supplementary Materials).

To go from Eq. 9 to Eq. 6 of the main text, we restrict the qubit state to the one-excitation subspace spanned by {|0001〉, |0010〉, |0100〉, |1000〉}, leading to a dispersive shift δ_{o} = − 2χ. We then go to a frame rotating at ω_{r} − 2χ for the nonlinear resonator and at ω_{f} for the filter mode, and neglecting fast-rotating terms, *Ĥ*_{4qb} takes the form(11)

The first two terms correspond to the effective Hamiltonian Eq. 6. The third term is the off-resonant two-photon drive tone and has a small effect on the resonator. The fourth and final term leads to a small photon emission in the filter sideband ω_{f} − 4χ and, consequently, to a dephasing rate *κ*_{eff}|α_{o}|^{2}/(1 + (8χ/κ_{f})^{2}) (see the Supplementary Materials). The effective Hamiltonian in the three-excitation subspace with dispersive shift δ_{o} = 2χ is obtained in the same way.

## SUPPLEMENTARY MATERIALS

Supplementary material for this article is available at http://advances.sciencemag.org/cgi/content/full/4/11/eaau1695/DC1

Supplementary Text

Fig. S1. Schematic representation of the steady state of a parametrically driven nonlinear resonator in parameter space.

Fig. S2. Illustration of the resonator phase space when the qubits are in the even subspace.

Fig. S3. Illustration of the resonator phase space when the qubits are in the odd subspace.

Fig. S4. Possible circuit QED implementation of the two-qubit parity measurement.

Fig. S5. A possible circuit QED implementation for the four-qubit parity measurement.

Fig. S6. Fidelity of the two-qubit parity measurement as a function of measurement time for different decay times of the qubits.

This is an open-access article distributed under the terms of the Creative Commons Attribution-NonCommercial license, which permits use, distribution, and reproduction in any medium, so long as the resultant use is **not** for commercial advantage and provided the original work is properly cited.

## REFERENCES AND NOTES

**Acknowledgments:**We thank A. Wallraff for discussions on Fig. 4.

**Funding:**This research was undertaken thanks, in part, to funding from NSERC, the Canada First Research Excellence Fund, and the Vanier Canada Graduate Scholarships. S.P. acknowledges financial support by the National Science Foundation under grant no. DMR-1609326 and Army Research Office under grant no. W911NF1410011.

**Author contributions:**B.R. performed the numerical simulations and analytical calculations with inputs from S.P. and A.B. B.R. wrote the manuscript with contributions from S.P. and A.B. A.B. supervised the work.

**Competing interests:**The authors declare that they have no competing interests.

**Data and materials availability:**All data needed to evaluate the conclusions in the paper are present in the paper and/or the Supplementary Materials. Additional data related to this paper may be requested from the authors.

- Copyright © 2018 The Authors, some rights reserved; exclusive licensee American Association for the Advancement of Science. No claim to original U.S. Government Works. Distributed under a Creative Commons Attribution NonCommercial License 4.0 (CC BY-NC).