Device fabrication and parameters

The device is fabricated on a 720-μm-thick Si substrate. The superconducting CPW resonators, the qubit capacitors and coupling capacitors are defined in the same step via optical lithography. Reactive ion etching of a sputtered 200-nm-thick Nb film is used to make this layer. The Josephson junctions, patterned via electron beam lithography, are made by double-angle deposition of Al (layer thicknesses of 35 and 85 nm) followed by a liftoff process. The chip is mounted on a printed circuit board and wirebonded for signal delivery and crosstalk mitigation.

The four-qubit transition frequencies are ω i /2π={5.303,5.101,5.291,5.415} GHz with i∈{1,2,3,4}. The readout resonator frequencies are ω Ri /2π{6.494,6.695,6.491,6.693} GHz, while the four bus resonators, unmeasured, are designed to be at ω Bii /2π={8,7.5,8,7.5} GHz for ij∈{12,23,34,41}. All qubits show around 330 MHz anharmonicity, with energy relaxation times T 1(i) ={33,36,31,29} μs and coherence times μs. The dispersive shifts and line widths of the readout resonators are measured to be 2χ i /2π={−3.0,−2.0,−2.5,−2.8} MHz and κ i /2π={615,440,287,1210} kHz, respectively.

Gate calibration and characterization

Single-qubit gates are 53.3-ns long Gaussian pulses with width σ=13.3 ns. We use single-sideband modulation to avoid mixer leakage at the qubit frequencies in between operations. The sideband frequencies, which are chosen taking into account all qubit frequencies and anharmonicities, are +60, −80, +180 and +100 MHz for Q 1 , Q 2 , Q 3 and Q 4 , respectively. Every single-qubit pulse is accompanied by a scaled Gaussian derivative in the other quadrature to minimize the effect of leakage of information into higher qubit energy levels28. All microwave mixers are independently calibrated at the operational frequencies to minimize carrier leakage as well as to ensure orthogonality of the quadratures. Following these calibrations, the single-qubit rotations are tuned by a series of repeated rotations described elsewhere29.

Randomized benchmarking (RB) of single-qubit gates30 is performed for all four qubits independently and in all possible simultaneous configurations (Table 1). This allows us to establish the degree of addressability error23 present in our system. Comparing the individual and simultaneous RB experiments, we can see that the addressability error is 0.001 or lower in all cases.

Table 1 Summary of simultaneous single-qubit RB. Full size table

The two-qubit ECR gates consist of two cross-resonance pulses of different signs, each of duration τ, separated by a π rotation in the control qubit. This sequence selectively removes the IX part of the Hamiltonian while enhancing the ZX term22. Each cross-resonance pulse has a Gaussian turn-on and off of width 3σ with σ=24 ns, included in τ. The gates ECR12, ECR23, ECR34 and ECR41, where ECRij is the ECR gate between Q i (control) and Q j (target), had τ of 400, 360, 440 and 190 ns, respectively, for a total gate time of 2 × τ+53.3 ns. We also characterise the two-qubit gates via Clifford RB22. Figure 5 shows the RB decays for each of the four gates, yielding an error per two-qubit Clifford gate of 0.0604±0.0006, 0.0631±0.0007, 0.0569±0.0015 and 0.0353±0.0015 for ECR12, ECR23, ECR34 and ECR41, respectively.

Figure 5: Two-qubit randomized benchmarking. Average population of the ground state of the target qubit, P 0 , versus number of two-qubit Cliffords generated via ECR gates between (a) Q 1 and Q 2 , (b) Q 2 and Q 3 , (c) Q 3 and Q 4 , and (d) Q 4 and Q 1 . Each RB experiment is averaged over 50 different sequences. Fits to the experiments are shown as solid lines and yield average errors per two-qubit Clifford of (a) 0.0604±0.0006, (b) 0.0631±0.0007, (c) 0.0569±0.0015 and (d) 0.0353±0.0015. Inset shows ZX oscillations22 of the target qubit state population as a function of the cross-resonance drive length when the control qubit is in the ground (blue) or in the excited (red) state. Full size image

Experimental setup

We cool our device to 15 mK in an Oxford Triton dilution refrigerator. Figure 6 shows a full schematic of the measurement setup. We achieve independent single-shot readout for each qubit using a high-electron-mobility transistor (HEMT) amplifier following a JPA (provided by UC Berkeley) in each readout line. The device is protected from environmental radiation by an Amuneal cryoperm shield with an inner coat of Emerson & Cuming CR-124 Eccosorb. All qubit control lines are heavily attenuated at different thermal stages and home-made Eccosorb microwave filters are added at the coldest refrigerator plate. Figure 7 shows the circuit schematic at chip level, including the design of the qubit capacitance and coupling lines.

Figure 6: Experimental setup. Detailed wiring scheme for all room temperature control electronics and internal configuration of the Oxford Instruments Triton dilution refrigerator. Full size image

Figure 7: Device and circuit schematic and qubit geometry. The optical image shows all components of the device, including the four qubits, Q 1 –Q 4 , the four readout resonators R 1 –R 4 and the four coupling buses B 12 , B 23 , B 34 and B 41 . The readout resonators also serve as qubit control lines, with single- and two-qubit gates applied at frequencies ω i with i∈{1,2,3,4}. Readout is performed at the resonator frequency ω Mi . Each readout signal is reflected off a JPA, pumped at frequency ω Pi , before being sent to a HEMT amplifier at 4 K. A blowup of one of the qubits is also shown, depicting the capacitor geometry as well as the coupling lines to the readout resonator (green coupler) and to the buses (red couplers). The black scale bar represents a length of 100 μm. Full size image

Single-qubit and two-qubit control pulses as well as resonator readout pulses are generated using single-sideband modulation. The modulating tones are produced by Tektronix arbitrary waveform generators (model AWG5014) for qubit operations. Modulating shapes for readout are produced by Arbitrary Pulse Sequencers from Raytheon BBN Technologies. We either use external Marki I/Q mixers with a Holzworth microwave generator or an Agilent vector signal generator (E8257D) as depicted in Fig. 6. For data acquisition, we use two AlazarTech two-channel digitizers (ATS9870) and the single-shot readout time traces are processed with an optimal quadrature rotation filter27.

Circuit gate decomposition

The circuit in Fig. 1c calls for four two-qubit gates. In addition, the code qubits Q 1 and Q 3 need to be prepared in an entangled state. Since these qubits are not nearest neighbours and there is no provision for interaction between them—a key feature of the SC—we first entangle Q 1 and Q 2 and then perform a swap operation between Q 2 and Q 3 (Fig. 8a). A SWAP gate operation is equivalent to three CNOT gates alternating direction (Fig. 8b). Since two consecutive identical CNOT gates are equal to the identity operation and Q 3 starts from the ground state, the red shadowed regions in Fig. 8 can be omitted. The actual circuit implemented in our experiments is shown in Fig. 8c, where the Bell state preparation and the ZZ encoding have been combined.

Figure 8: Quantum circuit and CNOT gate decomposition. The ZZ and XX parity checks are performed on a pair of maximally entangled qubits. This entanglement is achieved in our architecture with one CNOT and one SWAP gate (a). The three CNOTs that define the SWAP gate can be combined with the following ZZ parity check operation to simplify the circuit and three CNOT gates can be eliminated (b). The final circuit implemented in our experiments has a total of five CNOT gates (c). We implement our CNOT gates using a simplified version of the gate, ECRij, consisting of two cross-resonance pulses of different sign separated by a π rotation in the control qubit. With that definition, a CNOT gate can be obtained with four single-qubit rotations plus a ECRij operation. An example, not unique, of such decomposition is shown in d. The complete gate sequence in our error detection experiments is presented in e, where the dark boxes indicate refocus pulses during every two-qubit gate on the two qubits not involved on it. Full size image

Our CNOT operations require an entangling gate between the control and the target qubits. We use the ECRij as our CNOT genesis. The ECRij gate plus four single-qubit rotations as depicted in Fig. 8c correspond to a CNOT operation between Q i and Q j in our device.

Tracking bit- and phase-flip errors

As introduced in the main text (Fig. 3), we can measure the magnitude of the error ɛ from the correlated single-shot traces of the syndrome qubits. Here we show the figures complementing Fig. 3 in the main text, corresponding to pure bit-flip error (Fig. 9a) and pure phase-flip error (Fig. 9b). We attribute the increased loss of contrast in the phase-flip error detection (Fig. 9b) to the order of the stabilizer encoding in our circuit, which makes our error detection protocol less sensitive to phase-flip errors.

Figure 9: Continuous tracking of pure bit- and phase-flip errors. Errors of ɛ=X θ (a) and ɛ=Z θ (b) with θ∈[−π,π] are applied to the code qubit Q 1 . The syndrome qubit states {M 2 ,M 4 }={0,+} (black), {M 2 ,M 4 }={0,−} (green), {M 2 ,M 4 }={1,+} (red) and {M 2 ,M 4 }={1,−} (blue) indicate the magnitude and nature of the error ɛ. Since the ZZ and XX parities are encoded into Q 2 and Q 4 , respectively, pure bit-flip errors are detected by Q 2 , whereas pure phase-flip errors are detected by Q 4 . Full size image

Error propagation and syndromes

After the SWAP gate and error in the circuit in Fig. 8a, the state of the code qubits is given by , where ɛ is some unitary operator acting on the first-code qubit. We will find how the different Pauli errors propagate through the rest of the circuit to produce the different error syndromes.

First, suppose ɛ is the bit-flip operation on the first-code qubit C 1 . In this case,

where the sub-indexes S 1 and S 2 refer to the Z- and X-syndrome qubits, Q 2 and Q 4 in our experiment, respectively. Similarly for the phase-flip operation ,

and for

Since the state after the SWAP gate is (the qubits are ordered and Q 1 , Q 3 are the code qubits), the error syndromes are given by

Hence, if the error is a general single-qubit unitary operation

the different error syndromes have the following probabilities of occurring

where n i is the ith component of the unit vector.

Readout characterization

To characterize each readout, we create the 24=16 standard computational basis (calibration) states and record the full time-dependent trajectory of the state of the cavity over a measurement integration time of 3 μs. This process is repeated 19,200 times to gather sufficient statistics. Integrating kernels are obtained for each measurement channel, which extract the full time-dependent readout information27. Histograms are fitted to the integrated shots and thresholds for each channel are set at the point of maximum distance between cumulative distributions of the histograms.

The assignment fidelity of each channel is calculated according to the standard formula

where P(0|1) (P(1|0)) is the probability of obtaining ‘0’ (‘1’) when state ( ) is created. The assignment fidelities are given in Supplementary Table 1.

State tomography

The conditional states of the code qubits (Q 1 and Q 3 ) for the different error types (I, X, Y and Z) were reconstructed by applying the complete set of 36 unitary rotations to the state of code qubits to attain a complete set of measurement operators. The fundamental measurement observables that are rotated by elements of are constructed from the calibration states by first normalizing the shots for each of the code qubit channels to lie in [−1,1] and then correlating the shots. Note that if the calibrations were perfect, then are equal to ZI, IZ and ZZ.

For each of the 36 different measurement settings, we bin each shot according to the measurement results of the syndrome qubits Q 2 and Q 4 . As there are two syndrome qubits, there are four bins labelled by down–down, down–up, up–down and up–up. Denoting the conditional states ρdd, ρdu, ρud and ρuu and we have full tomographic information of the state of the code qubits for each of the four bins. The shots are correlated to create the expectation values of each conditional state. Hence, for each , label ab, and observable , we have an estimate of trace .

For each label ab, we have a measurement vector mab of length 108 (36 unitary rotations × 3 fundamental observables). Choosing any representation xab of ρab in some operator basis allows us to write

where M is a constant matrix whose entries depend only on the choice of operator basis. We choose to use the standard Pauli basis to represent ρab,

which implies M is a 108 × 16 matrix. Enforcing ρab to be trace 1 sets x 0 =1/4.

xab can be solved for in a variety of ways, the most straightforward of which is linear inversion via computing the pseudoinverse of M. While linear inversion provides a valid statistical estimator, it does not enforce positivity of the state. Alternatively, one can maximize the likelihood function for the measurement results under the assumption of Gaussian noise29 and solve the following constrained quadratic optimization problem

to obtain a physically valid state. Here Vab is the variance matrix of the measurement matrix. When only Gaussian noise is present, solving this optimization problem is equivalent to finding the closest physical state to the linear inversion estimate31.

We quantify the state reconstruction via the state fidelity between ρ noisy =ρab and the ideal target state ;

where, as mentioned in the main text, the ideal states for the different syndrome results are given by

The results are contained in Supplementary Table 2. The variance in the state fidelity is computed via a bootstrapping protocol described in ref. 29 and the physicality is the sum of the negative eigenvalues of the linear inversion estimate. We see that linear inversion produces physical estimates in all cases and there is negligible difference between the fidelities of the physical and linear inversion estimates.

Insensitivity to state-preparation errors

Since we are conditioning on the measurement results of the syndrome qubits, the error detection circuit has the useful feature that rotation errors on the prepared (encoded) two-qubit state correspond only to decreasing the success probability of preserving the desired state. From a tomographic standpoint, we can accurately reconstruct the conditioned state as long as the total number of shots is large relative to the error syndrome probability, so that sufficient measurement statistics are available.

To make this precise, suppose that the ideal initial state is rotated via some error operator E to the state

This gives the following syndrome probabilities:

and so the probability of successfully obtaining the correct state is |a|2. Since the shots producing the error syndromes are evenly distributed throughout the different unitary rotation pulses on the code qubits, the effect on the code state is to reduce the number of shots by a factor of |a|2, which can also be thought of as a rescaling of the measurement variances by . Hence, for each of the 108 different measurement observables , has a single-shot variance that scales as . This implies we expect that, to first order in θ, state tomography is robust to over-under rotation errors.

We can model and verify this effect by directly applying a unitary error of varying strength on the first-code qubit. The general unitary Kraus operator is and the probabilities for the different syndromes are given by equation (6). For simplicity, we chose a purely X rotation so ɛ=cos(θ)I−i sin(θ)X and varied the size of the angle in 30 steps from −π to π. The state fidelity as a function of θ is shown in Supplementary Fig. 1. As expected, the first derivative appears to smoothly converge to 0 as θ converges to 0 and the loss in fidelity is a result of insufficient statistics for the 00-syndrome state.

This discussion also allows us to more accurately predict the output conditional state fidelities. As demonstrated, we can effectively ignore coherent errors in the first two CNOT gates, since they are used for state preparation and errors in these operations show up as a reduction in the number of shots available for tomography. Assuming the number of shots is large enough, and ignoring single-qubit errors, we are only concerned with errors in the final three CNOT gates. From two-qubit RB, the average gate fidelity of our CNOT gates is ∼0.94. Hence, assuming depolarizing errors, we can obtain an approximate gate fidelity for the comprised circuit of ∼0.943=0.83 and state fidelities with similar values, which is consistent with our obtained fidelities in Supplementary Table 2.