Introduction

Quantum annealing (QA) attempts to exploit quantum fluctuations to solve computational problems faster than it is possible with classical computers.17 As an approach designed to solve optimisation problems, QA is a special case of adiabatic quantum computation (AQC),8 a universal model of quantum computing.912 In AQC, a system is designed to follow the instantaneous ground state of a time-dependent Hamiltonian whose final ground state encodes the solution to the problem of interest. This results in a certain amount of stability, as the system can thermally relax to the ground state after an error, as well as resilience to errors, as the presence of a finite energy gap suppresses thermal and dynamical excitations.1318

Despite this inherent robustness to certain forms of noise, AQC requires error correction to ensure scalability, just like any other form of quantum information processing.19 Various error-correction proposals for AQC and QA have been made,2033 but an accuracy-threshold theorem for AQC is not yet known, unlike in the circuit model (e.g., ref. 34). A direct AQC simulation of a fault-tolerant quantum circuit leads to many-body (high weight) operators that are difficult to implement23,24 or myriad other problems.12 Nevertheless, a scalable method to reduce the effective temperature would go a long way towards approaching the ideal of closed-system AQC, where quantum speedups are known to be possible.9,3537

Motivated by the availability of commercial QA devices featuring hundreds of qubits,3841 we focus on error correction for QA. There is a consensus that these devices are significantly and adversely affected by decoherence, noise and control errors,4249 which makes them particularly interesting for the study of tailored, practical error-correction techniques. Such techniques, known as quantum annealing correction (QAC) schemes, have already been experimentally shown to significantly improve the performance of quantum annealers,26,3032 and they are theoretically analysed using a mean-field approach.33 However, these QAC schemes are not easily generalisable to arbitrary optimisation problems, as they induce an encoded graph that is typically of a lower degree than the qubit-connectivity graph of the physical device. Moreover, they typically impose a fixed code distance, which limits their efficacy.

To overcome these limitations, here we present a family of error-correcting codes for QA, based on a ‘nesting’ scheme, that has the following properties: (1) it can handle arbitrary Ising model optimisation problem; (2) it can be implemented on present-day QA hardware; and (3) it is capable of an effective temperature reduction controlled by the code distance. Our ‘nested quantum annealing correction’ (NQAC) scheme thus provides a very general and practical tool for error correction in quantum optimisation.

We test NQAC by studying antiferromagnetic complete graphs numerically, as well as on a D-Wave Two (DW2) processor featuring 504 flux qubits connected by 1,427 tunable composite qubits acting as Ising-interaction couplings, arranged in a non-planar Chimera-graph lattice50 (complete graphs were also studied for a spin glass model in ref. 51). We demonstrate that our encoding schemes yield a steady improvement for the probability of reaching the ground state as a function of the nesting degree, even after minor-embedding the complete graph onto the physical graph of the quantum annealer. We also demonstrate that NQAC outperforms classical repetition code schemes that use the same number of physical qubits.

Results

Nested quantum annealing correction

In QA, the system undergoes an evolution governed by the following time-dependent, transverse-field Ising Hamiltonian:

(1) H ( t ) = A ( t ) H X + B ( t ) H P , t [ 0 , t f ] ,

with, respectively, monotonically decreasing and increasing ‘annealing schedules’ A(t) and B(t). The ‘driver Hamiltonian’ H X = i σ i x is a transverse field whose amplitude controls the tunnelling rate. The solution to an optimisation problem of interest is encoded in the ground state of the Ising-problem Hamiltonian HP, with

(2) H P = i V h i σ i z + ( i , j ) ε J i j σ i z σ j z ,

where the sums run over the weighted vertices V and edges ε of a graph G = ( V , ε ) , and σ i x , z denotes the Pauli operators acting on qubit i. The D-Wave devices use an array of superconducting flux qubits to physically realise the system described in Equations (1) and (2) on a fixed ‘Chimera’ graph (Figure 1) with programmable local fields {hi}, couplings {Jij} and annealing time tf.3941

Figure 1
figure 1

Illustration of the nesting scheme. In the left column, a C-degree nested graph is constructed by embedding a KN into a KC×N, with N=4 and C=1 (a and b) and C=4 (c and d). Red, thick couplings are energy penalties defined on the nested graph between the (i, c) nested copies of each logical qubit i. The right column shows the nested graphs after ME on the DW2 Chimera graph. Brown, thick couplings correspond to the ferromagnetic chains introduced in the process.

For closed systems, so-called eigenstate steering52 or shortcuts to adiabaticity53 can keep a system in its ground state, but they typically require either knowledge of the final ground state or the addition of auxiliary counterdiabatic fields whose determination may be overly complicated. The adiabatic theorem for closed systems54,55 guarantees that if the system is initialised in the ground state of H(0)=A(0)HX, a sufficiently slow evolution relative to the inverse minimum gap of H(t) will take the system with high probability to the ground state of the final Hamiltonian H(tf) =B(tf)HP. Dynamical errors then arise because of diabatic transitions, but they can be made arbitrarily small via boundary cancellation methods that control the smoothness of A(t) and B(t), as long as the adiabatic condition is satisfied.5658 Specifically, it was shown in ref. 58 that for annealing functions with infinite smoothness (belonging to the so-called Gevrey class) the error can be made exponentially small in the total runtime tf. This means that in particular the probability of Landau–Zener transitions is exponentially suppressed, although of course tf is still controlled by an inverse (cubic) power of the minimum gap. We shall assume that the problem of Landau–Zener transitions is addressed by such boundary cancellation methods (although the experiments we describe below do not include such methods, as we had no control over the smoothness of A(t) and B(t)) and focus here on addressing the errors that occur in open systems. For the latter, specifically a system that is weakly coupled to a thermal environment, the final state is a mixed-state ρ(tf) that is close to the Gibbs state associated with H(tf) if equilibration is reached throughout the annealing process.18,59,60 In the adiabatic limit, the open-system QA process is thus better viewed as a Gibbs distribution sampler. The main goal of QAC is to suppress the associated thermal errors and to restore the ability of QA to act as a ground-state solver. In addition, QAC should suppress errors due to noise-driven deviations in the specification of HP.25

Error correction is achieved in QAC by mapping the logical Hamiltonian H(t) to an appropriately chosen encoded Hamiltonian H ¯ ( t ) :

(3) H ¯ ( t ) = A ( t ) H X + B ( t ) H ¯ P , t [ 0 , t f ] ,

defined over a set of physical qubits N ¯ larger than the number of logical qubits N = | V | . Note that H ¯ P also includes penalty terms, as explained below. The logical ground state of HP is extracted from the encoded system’s state ρ ¯ ( t f ) through an appropriate decoding procedure. A successful error-correction scheme should recover the logical ground state with a higher probability than a direct implementation of HP or with a higher probablilty than a classical repetition code using the same number of physical qubits N ¯ . Because of practical limitations of current QA devices that prevent the encoding of HX, only HP is encoded in QAC. In the future, it may be possible to circumvent this limitation using coupling to ancilla qubits.61 At present, it results in a tradeoff, as it requires us to optimise the penalty strength, and may also result in a need to optimise the nesting degree, as without encoding HX the minimum gap may shrink relative to the unencoded problem.

To allow for the most general N-variable Ising optimisation problem, we now define an encoding procedure for problem Hamiltonians HP supported on a complete graph KN. The first step of our construction involves a ‘nested’ Hamiltonian H ˜ P that is defined by embedding the logical KN into a larger KC×N. The integer C is the ‘nesting degree’, and it controls the amount of hardware resources (qubits, couplers and local fields) used to represent the logical problem. H ˜ P is constructed as follows. Each logical qubit i (i=1, …, N) is represented by a C-tuple of encoded qubits (i, c), with c=1, …, C. The ‘nested’ couplings J ˜ ( i , c ) , ( j , c ) and local fields h ˜ ( i , c ) are then defined as follows:

(4a) J ˜ ( i , c ) , ( j , c ) = J i j , c , c , i j ,
(4b) h ˜ ( i , c ) = C h i , c , i ,
(4c) J ˜ ( i , c ) , ( i , c ) = γ , c c .

This construction is illustrated in the left column of Figure 1. Each logical coupling Jij has C2 copies J ˜ ( i , c ) , ( j , c ) , thus boosting the energy scale at the encoded level by a factor of C2. Each local field hi has C copies h ˜ ( i , c ) ; the factor C in Equation (4b) ensures that the energy boost is equalised with the couplings. For each logical qubit i, there are C (C−1)/2 ferromagnetic couplings J ˜ ( i , c ) , ( i , c ) of strength γ>0 (to be optimised), representing energy penalties that promote agreement among the C encoded qubits, i.e., that bind the C-tuple as a single logical qubit i.

The second step of our construction is to implement the fully connected problem H ˜ P on the given QA hardware, with a lower-degree qubit-connectivity graph. This requires a minor embedding (ME).6266 The procedure involves replacing each qubit in H ˜ P by a ferromagnetically coupled chain of qubits, such that all couplings in H ˜ P are represented by inter-chain couplings. The intra-chain coupling represents another energy penalty that forces the chain qubits to behave as a single logical qubit. The physical Hamiltonian obtained after this ME step is the final encoded Hamiltonian H ¯ P . We can minor-embed a KC×N nested graph representing each qubit (i, c) as a physical chain of length L = C N / 4 + 1 on the Chimera graph.62 This is illustrated in the right column of Figure 1. The number of physical qubits necessary for a ME of a KC×N is N C phys = C N L C 2 N 2 / 4 .

At the end of a QA run implementing the encoded Hamiltonian H ¯ P and a measurement of the physical qubits, a decoding procedure must be used to recover the logical state. For the sake of simplicity, we only consider majority vote decoding over both the length-L chain of each encoded qubit (i, c) and the C-encoded qubits comprising each logical qubit i (decoding over the length-L chain first, and then over the C-encoded qubits, does not affect performance; Supplementary Information S1). The encoded and logical qubits can thus be viewed as forming repetition codes with, respectively, distance L and C. Other decoding strategies are possible wherein the encoded or logical qubits do not have this simple interpretation: e.g., energy minimisation decoding, which tends to outperform majority voting.31 In the unlikely event of a tie, we assign a random value of +1 or −1 to the logical qubit.

Free energy

Using a mean-field analysis that reduces the model to an equivalent classical one by using the Suzuki-Trotter formula (see refs 67,68 for an early similar analysis of the Sherrington–Kirkpatrick model in a transverse field), and similar to the approach pursued in ref. 33 we can compute the partition function associated with the nested Hamiltonian A ( t ) H X + B ( t ) H ˜ P for the case with uniform antiferromagnetic couplings. This leads to the following free-energy density in the low temperature and thermodynamic limits (Supplementary Information S2):

(5) β F = C 2 β ( [ A ( t ) / C ] 2 + [ 2 γ B ( t ) m ] 2 γ B ( t ) m 2 )

where m is the mean-field magnetisation. There are two key noteworthy aspects of this result. First, the driver term is rescaled as A ( t ) C 1 A ( t ) . This shifts the crossing between the A and B annealing schedules to an earlier point in the evolution and is related to the fact that QAC encodes only the problem Hamiltonian term proportional to B(t). Consequently, the quantum critical point is moved to earlier in the evolution, which benefits QAC, as the effective energy scale at this new point is higher.33 Second, the inverse temperature is rescaled as β C 2 β . This corresponds to an effective temperature reduction by C2, a manifestly beneficial effect. The same conclusion, of a lower effective temperature, is reached by studying the numerically computed success probability associated with thermal distributions (Supplementary Information S3). We shall demonstrate that this prediction is born out by our experimental results, although it is masked to some extent by complications arising from the ME and noise.

NQAC results

The hardness of an Ising optimisation problem, using a QA device, is controlled by its size N, as well as by an overall energy scale α.45 The smaller this energy scale, the higher the effective temperature and the more susceptible QA becomes to (dynamical and thermal) excitations out of the ground state and misspecification noise on the problem Hamiltonian. This provides us with an opportunity to test NQAC. As in our experiments we were limited by the largest complete graph that can be embedded on the DW2 device, a K32 (see Supplementary Information S4 for details), we tuned the hardness of a problem by studying the performance of NQAC as a function of α via H P α H P , with 0<α1. Note that we did not rescale γ; instead, γ was optimised for optimal post-decoding performance (see Supplementary Information S5). It is known that, for the DW2, intrinsic coupler control noise can be taken to be Gaussian with s.d. σ~0.05 of the maximum value for the couplings.48 Thus, we may expect that, without error correction, Ising problems with α 0.05 are dominated by control noise.

We applied NQAC to completely antiferromagnetic (hi=0 i) Ising problems over K4 (Jij=1 i, j), and K8 (random Jij[0.1, 1] with steps of 0.1) with nesting up to C=8 and C=4, respectively. We denote by PC(α) the probability to obtain the logical ground state at energy scale α for the C-degree nested implementation (see Supplementary Information S1 for the data collection methods). The experimental QA data in Figure 2 (left) shows a monotonic increase of PC(α) as a function of the nesting degree C over a wide range of energy scales α. As expected, PC(α) drops from PC(1) =1 (solution always found) to PC(0)=6/16 (random sampling of 6 ground states, where 4 out of the 6 couplings are satisfied, out of a total of 16 states).

Figure 2
figure 2

Experimental and numerical results for the antiferromagnetic K4, after encoding, followed by ME and decoding. Left: DW2 success probabilities PC(α) for eight nesting degrees C. Increasing C generally increases PC(α) at fixed α. Middle: rescaled PC(αμC) data, exhibiting data collapse. Right: scaling of the energy boost μC versus the maximal energy boost µ C max , for both the DW2 and SQA. Purple circles: DW2 results. Blue stars: SQA for the case of no ME (i.e., for the problem defined directly over KC×N and no coupler noise). Red up-triangles: SQA for the Choi ME62 (for a full Chimera graph), with σ=0.05 Gaussian noise on the couplings. Yellow right-triangles: SQA for the DW2 heuristic ME63,64 (applied to a Chimera graph with eight missing qubits) with σ=0.05 Gaussian noise on the couplings. The flattening of μC suggests that the energy boost becomes less effective at large C. However, this can be remedied by increasing the number of SQA sweeps (Supplementary Information S3), fixed here at 104. Thus, the lines represent best fits to only the first four data points, with slopes 0.98, 0.91, 0.62 and 0.69, respectively. In all panels, Nphys[8,288].

Note that P1(α) (no nesting) drops by ~50% when α~0.1, which is consistent with the aforementioned σ~0.05 control noise level, whereas P8(α) exhibits a similar drop only when α~0.01. This suggests that NQAC is particularly effective in mitigating the two dominant effects that limit the performance of quantum annealers: thermal excitations and control errors. To investigate this more closely, the middle panel of Figure 2 shows that the data from the left panel can be collapsed via P C ( α ) P C ( α / µ C ) , where μC is an empirical rescaling factor discussed below (see also Supplementary Information S6). This implies that P1(μCα)≈PC(α), and hence that the performance enhancement obtained at nesting degree C can be interpreted as an energy boost α µ C α with respect to an implementation without nesting.

The existence of this energy boost is a key feature of NQAC, as anticipated above. Recall (Equations (4a),(4b),(4c)) that a nested graph KC×N contains C2 equivalent copies of the same logical coupling Jij. Hence, a degree-C nesting before ME can provide a maximal energy boost µ C max = C η max , with ηmax=2. This simple argument agrees with the reduction of the effective temperature by C2 based on the calculation of the free energy (Equation (5)). The right panel of Figure 2 shows μC as a function of µ C max , yielding μC~Cη with η≈1.37 (purple circles). To understand why η<ηmax, we performed simulated quantum annealing (SQA) simulations (see Supplementary Information S7 for details). We observe in Figure 2 (right) that without ME and control errors the boost scaling matches µ C max (blue stars). When including ME and control errors, a performance drop results (red triangles). Both factors thus contribute to the sub-optimal energy boost observed experimentally. However, the optimal energy boost is recovered for a fully thermalised state with a sufficiently large penalty (see Supplementary Information S3). To match the experimental DW2 results using SQA, we replace the Choi ME designed for full Chimera graphs62 by the heuristic ME designed for Chimera graphs with missing qubits,63,64 and achieve a near match (yellow triangles) (see Supplementary Information S4 for more details on ME).

Performance of NQAC versus classical repetition

Recall that N C phys = C N L is the total number of physical qubits used at nesting degree C; let Cmax denote the highest nesting degree that can be accommodated on the QA device for a given KN—i.e., CmaxNLNtot<(Cmax+1)NL, where Ntot is the total number of physical qubits (504 in our experiments). Then, M C = N C max phys / N C phys is the number of copies that can be implemented in parallel. For NQAC at degree C to be useful, it must be more effective than a classical repetition scheme in which MC copies of the problem are implemented in parallel. If a single implementation has success probability PC(α), the probability to succeed at least once with MC statistically independent implementations is P C ( α ) = 1 [ 1 P C ( α ) ] M C . It turns out that the antiferromagnetic K4 problem, for which a random guess succeeds with probability 6/16, is too easy (i.e., P C ( α ) approaches 1 too rapidly), and we therefore consider a harder problem: an antiferromagnetic K8 instance with couplings randomly generated from the set Jij{0.1,0.2,…,0.9,1} (see Supplementary Information S5 for more details and the data on this and additional instances). Problems of this type turn out to have a sufficiently low success probability for our purposes, and can still be nested up to C=4 on the DW2 processor.

Results for PC(α) are shown in Figure 3 (left), and again increase monotonically with C, as in the K4 case. For each C, PC(α) peaks at a value of α, for which the maximum allowed strength of the energy penalties γ=1 is optimal (γ>1 would be optimal for larger α, as shown in Supplementary Information S5; the growth of the optimal penalty with problem size, and hence chain length, is a typical feature of minor-embedded problems51). An energy-boost interpretation of the experimental data of Figure 3 is possible for α values to the left of the peak; to the right of the peak, the performance is hindered by the saturation of the energy penalties.

Figure 3
figure 3

Random antiferromagnetic K8: experimental and numerical results. Left: success probabilities PC(α) for four nesting degrees. Middle: success probabilities P C ( α ) adjusted for classical repetition. Right: numerical results for SQA simulations with 20,000 sweeps, σ=0.05 Gaussian noise on the couplings and with the Choi embedding, showing five nesting degrees. Inset: scaling of the energy boost μC versus the maximal energy boost µ C max , for both the DW2 and SQA. Yellow circles: DW2 results. Blue crosses and red up-triangles: SQA for the Choi ME with 10,000 (crosses) and 20,000 (up-triangles) sweeps, and with σ=0.05 Gaussian noise on the couplings. The flattening of μC for C>4 suggests that the energy boost becomes less effective at large C, but increasing the number of sweeps recovers the effectiveness. The lines represent best fits to only the first four data points, with respective slopes η/2=0.65, 0.75 and 0.85.

Figure 3 (middle) compares the success probabilities P C ( α ) adjusted for classical repetition, where we have set Cmax=4, and it shows that P 2 ( α ) > P 1 ( α ) —i.e., even after accounting for classical parallelism, C=2 performs better than C=1. However, we also find that P 4 ( α ) < P 3 ( α ) P 2 ( α ) , and thus no additional gain results from increasing C in our experiments. This can be attributed to the fact that even the K8 problem still has a relatively large P1(α). Experimental tests on QA devices with more qubits will thus be important to test the efficacy of higher nesting degrees on harder problems.

To test the effect of increasing C, and also to study the effect of varying the annealing time, we present in Figure 3 (right) the performance of SQA on a random K8 antiferromagnetic instance with the Choi ME. The results are qualitatively similar to those observed on the DW2 processor with the heuristic ME (Figure 3 (left)). Interestingly, we observe a drop in the peak performance at C=5 relative to the peak observed for C=4. We attribute this to both a saturation of the energy penalties and a sub-optimal number of sweeps. The latter is confirmed in Figure 3 (right, inset), where we observe that the scaling of μC with C is better for the case with more sweeps—i.e., again μC~Cη, and η increases with the number of sweeps.

Discussion

Nested QAC offers several significant improvements over previous approaches to the problem of error correction for QA. It is a flexible method that can be used with any optimisation problem, and it allows the construction of a family of codes with arbitrary code distance. We have given experimental and numerical evidence that nesting is effective by performing studies with a D-Wave QA device and numerical simulations. We have demonstrated that the protection from errors provided by NQAC can be interpreted as arising from an increase (with nesting degree C) in the energy scale at which the logical problem is implemented. This represents a very useful tradeoff: the effective temperature drops as we increase the number of qubits allocated to the encoding, and thus that these two resources can be traded. Thus, NQAC can be used to combat thermal excitations, which are the dominant sources of errors in open-system QA, and are the bottleneck for scalable QA implementations, assuming that closed-system Landau–Zener transitions have been suppressed using other methods. We have also demonstrated that an appropriate nesting degree can outperform classical repetition with the same number of qubits, with improvements to be expected when next-generation QA devices with larger numbers of physical qubits become available. We, therefore, believe that our results are of immediate and near-future practical use, and constitute an important step towards scalable QA.

Methods

For more details on the experimental and numerical methodologies used, as well as for details on the mean-field calculation of the free energy as in Equation 5; see Supplementary Information.