Readout Rebalancing for Near Term Quantum Computers
Total Page:16
File Type:pdf, Size:1020Kb
Readout Rebalancing for Near Term Quantum Computers Rebecca Hicks,1, ∗ Christian W. Bauer,2, † and Benjamin Nachman2, ‡ 1Physics Department, University of California, Berkeley, Berkeley, CA 94720, USA 2Physics Division, Lawrence Berkeley National Laboratory, Berkeley, CA 94720, USA (Dated: October 16, 2020) Readout errors are a significant source of noise for near term intermediate scale quantum computers. Mismeasuring a qubit as a |1i when it should be |0i occurs much less often than mismeasuring a qubit as a |0i when it should have been |1i. We make the simple observation that one can improve the readout fidelity of quantum computers by applying targeted X gates prior to performing a measurement. These X gates are placed so that the expected number of qubits in the |1i state is minimized. Classical post processing can undo the effect of the X gates so that the expectation value of any observable is unchanged. We show that the statistical uncertainty following readout error corrections is smaller when using readout rebalancing. The statistical advantage is circuit- and computer-dependent, and is demonstrated for the W state, a Grover search, and for a Gaussian state. The benefit in statistical precision is most pronounced (and nearly a factor of two in some cases) when states with many qubits in the excited state have high probability. I. INTRODUCTION the simple observation that one can improve the readout fidelity of quantum computers by applying targeted X Quantum computers hold great promise for a variety of gates prior to performing a measurement. These X gates scientific and industrial applications. However, existing are placed so that the expected number of qubits in the noisy intermediate-scale quantum (NISQ) computers [1] |1i state is minimized. Classical post processing can undo introduce significant errors that must be mitigated before the effect of the X gates so that the expectation value of achieving useful output. Error mitigation on a quantum any observable is unchanged. This Readout Rebalancing computer [2–6] is significantly different than classical er- must be combined with additional readout corrections to ror mitigation because quantum bits (‘qubits’) cannot be unfold the migrations. Previous studies have proposed copied [7–9]. Full quantum error correction requires sig- symmetrizing the readout with targeted X gates [44, 45], nificant overhead in the additional number of qubits and but we are unaware of any proposal to introduce asym- gates. This has been demonstrated for simple quantum metric rebalancing. Symmetrizing has the advantage that circuits [10–19], but is infeasible on NISQ hardware due it is independent of the measured state and improves to limited qubit counts and circuit depths. Instead, a va- the fidelity of qubits that are more often in the |1i state. riety of schemes have been proposed to mitigate – without However, symmetrizing will necessarily reduce the fidelity completely eliminating – errors. There are two types of er- for qubits that are more often in the |0i state (this is a rors that are targeted by these schemes: those that affect state-dependent statement). the preparation of the quantum state [20–25] and those This paper is organized as follows. SectionII introduces that affect the measurement of the prepared state [26–43]. readout rebalancing and briefly reviews readout error This paper focuses on the latter type – called readout mitigation. Numerical results are presented in Sec. III and errors – and how one can modify the quantum state prior the paper ends with conclusions and outlook in Sec.IV. to readout in order to reduce these errors. Readout errors typically arise from two sources: (1) measurement times are significant in comparison to de- II. METHOD coherence times and thus a qubit in the |1i state1 can decay to the |0i state during a measurement, and (2) To motivate the rebalancing technique, we start with arXiv:2010.07496v1 [quant-ph] 15 Oct 2020 probability distributions of measured physical quantities that correspond to the |0i and |1i states have overlapping an illustrative example. Suppose that there is a two qubit support and there is a small probability of measuring system with measurement errors Pr(|0ii → |1ii) = 0 and the opposite value. The first of these sources results in Pr(|1ii → |0ii) = qi for i ∈ {0, 1} with no nontrivial asymmetric errors: mismeasuring a qubit as a |1i when it multiqubit readout errors. When qi → 0, there are no should be |0i occurs much less often than mismeasuring readout errors. For simplicity, assume that qi 1 so that 2 a qubit as a |0i when it should have been |1i. We make terms of O(qi ) can be neglected. Suppose that simple matrix inversion is used to correct readout errors and that the state is measured N times. Define N|iji as the number of true counts in state |iji and Nˆ is the number ∗ [email protected] |iji † [email protected] of reconstructed counts in state |iji following readout ‡ [email protected] error corrections. The readout corrections are estimated 1 We consider two-state systems and denote the excited state as by inverting the 4 × 4 matrix encoding the transition |1i and the ground state as |0i. probabilities between any possible true state and any 2 ˆ possible observed state. By construction, E[N|iji] = N|iji. One can show that the variance of the counts after readout |0i correction are given by (for details, see AppendixA) |0i ˆ N|iji ˆ Var[N|iji] = N|iji 1 − + ∆Var[N|iji] (1) |0i N −1 Ucircuit R |0i with |0i ˆ 2 ∆Var[N|00i] = q0N|10i + q1N|01i + O(q ) ˆ 2 |0i ∆Var[N|11i] = (q0 + q1) N|11i + O(q ) (2) y In particular, if N = N|11i (i.e. the other states have zero |0i X X true counts), one finds Var[Nˆ ] = 0, while Var[Nˆ ] 6= |00i |11i |0i 0, for non-vanishing qi. On the other hand, if N = ˆ ˆ N|00i, both Var[N|00i] = 0 and Var[N|11i] = 0 vanish. |0i This suggests that if one is trying to measure a state −1 Ucircuit R dominated by |11i, it would be more effective to first |0i invert 0 ↔ 1, perform the measurement, and then swap back the classical bits afterward. |0i X X The readout rebalancing protocol is illustrated in Fig.1. First, the probability mass function over states p(x) is |0i estimated using a small fraction of the total number of intended measurements. Then, a rule is used to determine FIG. 1. An illustration of the Readout Rebalancing protocol. which qubits should be flipped prior to being measured, Here Ucircuit represents the state preparation that must hap- with the goal of switching those qubits that are predomi- pen for each measurement, and the readout error mitigation nantly in the |1i state. There are multiple possible rules, represented by an inverted response matrix R−1 (in practice, and in this paper we use a simple and effective approach. a more sophisticated readout error mitigation scheme may be used) is performed on an ensemble of measured states. From In this approach one first computes hqii, the average value for each qubit i. If this value is greater than 0.5, the qubit the measured values of the qubits of the first circuit which i is set to be flipped and otherwise it is untouched. A uses a small fraction of the total number of runs one then determines which qubits have hq i > 0.5 and should therefore modified circuit is then prepared where single qubit X i be flipped (the first and fifth in our example). One then runs gates are applied at the end of the circuit to the qubits the remaining large fraction of the runs on the modified second set to be flipped. Using this modified circuit one then circuit. performs the intended measurements. These data are corrected for readout errors (more on this below) and then post-processed with classical X gates to undo the quantum X gates. estimate of the response matrix. The simplest readout ˆ −1 As stated earlier, the reason that the readout rebal- error correction approach is simply tmatrix = R t. For a ancing protocol is expected to be effective is that errors variety of reasons, this may be suboptimal and so multi- are asymmetric. While we are not aware of other pro- ple alternative methods have been proposed [39, 47, 48]. posals for biased (circuit-specific) rebalancing, Google In this paper, we will use Iterative Bayesian Unfolding (IBU) [49–51] as described in the context of quantum AI Quantum [44] (through its software Cirq [46]) and Rigetti (through its software pyQuil [45]) have proposed computing in Ref. [39]. This iterative procedure starts ˆ0 nqubits symmetric rebalancing whereby the result from a circuit with ti = Pr(m = i) = 1/2 and then is averaged with a version of its complement that uses some pre-determined (non-state-specific) set of X gates. n+1 X tˆ = Pr(t = i|m = j) × mj (3) This approach improves the fidelity of qubits that are i j mostly in the one state, but it degrades the performance ˆn of measuring states where a qubit is mostly in the zero X Rjiti = × mj. (4) P R tˆn state. We will compare to a version of symmeterized read- h k jk k out where measurements are averaged using a nominal circuit and a circuit with all X gates. ˆ ˆ100 There are many options for readout error corrections, We will use 100 iterations and label t ≡ t , but the indicated by R−1 in Fig.1. Let m and t represent the results do not depend strongly on this number.