Patent Publication Number: US-11645570-B1

Title: Preparation of qunaught states for a surface GKP code using a three (or higher) level ancilla system

Description:
This application claims benefit of priority to U.S. Provisional Application Ser. No. 63/157,593, entitled “Fault-Tolerant Quantum Error Correction with the Surface GKP Code”, filed Mar. 5, 2021, and which is incorporated herein by reference in its entirety. 
    
    
     BACKGROUND 
     Quantum computing utilizes the laws of quantum physics to process information. Quantum physics is a theory that describes the behavior of reality at the fundamental level. It is currently the only physical theory that is capable of consistently predicting the behavior of microscopic quantum objects like photons, molecules, atoms, and electrons. 
     A quantum computer is a device that utilizes quantum mechanics to allow one to write, store, process and read out information encoded in quantum states, e.g. the states of quantum objects. A quantum object is a physical object that behaves according to the laws of quantum physics. The state of a physical object is a description of the object at a given time. 
     In quantum mechanics, the state of a two-level quantum system, or simply, a qubit, is a list of two complex numbers whose squares sum up to one. Each of the two numbers is called an amplitude, or quasi-probability. The square of an amplitude gives a potentially negative probability. Hence, each of the two numbers correspond to the square root that event zero and event one will happen, respectively. A fundamental and counterintuitive difference between a probabilistic bit (e.g. a traditional zero or one bit) and the qubit is that a probabilistic bit represents a lack of information about a two-level classical system, while a qubit contains maximal information about a two-level quantum system. 
     Quantum computers are based on such quantum bits (qubits), which may experience the phenomena of “superposition” and “entanglement.” Superposition allows a quantum system to be in multiple states at the same time. For example, whereas a classical computer is based on bits that are either zero or one, a qubit may be both zero and one at the same time, with different probabilities assigned to zero and one. Entanglement is a strong correlation between quantum particles, such that the quantum particles are inextricably linked in unison even if separated by great distances. 
     A quantum algorithm is a reversible transformation acting on qubits in a desired and controlled way, followed by a measurement on one or multiple qubits. For example, if a system has two qubits, a transformation may modify four numbers; with three qubits this becomes eight numbers, and so on. As such, a quantum algorithm acts on a list of numbers exponentially large as dictated by the number of qubits. To implement a transform, the transform may be decomposed into small operations acting on a single qubit, or a set of qubits, as an example. Such small operations may be called quantum gates and the arrangement of the gates to implement a transformation may form a quantum circuit. 
     There are different types of qubits that may be used in quantum computers, each having different advantages and disadvantages. For example, some quantum computers may include qubits built from superconductors, trapped ions, semiconductors, photonics, etc. Each may experience different levels of interference, errors and decoherence. Also, some may be more useful for generating particular types of quantum circuits or quantum algorithms, while others may be more useful for generating other types of quantum circuits or quantum algorithms. Also, costs, run-times, error rates, availability, etc. may vary across quantum computing technologies. 
     For some types of quantum computations, such as fault tolerant computation of large scale quantum algorithms, overhead costs for performing such quantum computations may be high. For example for types of quantum gates that are not naturally fault tolerant, the quantum gates may be encoded in error correcting code, such as a surface code. However this may add to the overhead number of qubits required to implement the large scale quantum algorithms. Also, performing successive quantum gates, measurement of quantum circuits, etc. may introduce probabilities of errors in the quantum circuits and/or measured results of the quantum circuits. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG.  1    illustrates an example surface code comprising Gottesman Kitaev Preskill (GKP) qubits, according to some embodiments. 
         FIG.  2    illustrates an example teleportation-based GKP error correction protocol, according to some embodiments. 
         FIG.  3    illustrates additional details for the example teleportation-based GKP error correction protocol, according to some embodiments. 
         FIG.  4 A  illustrates shift propagation in the example teleportation-based GKP error correction protocol, according to some embodiments. 
         FIG.  4 B  illustrates a simplified model of the teleportation-based GKP error correction protocol wherein the noisy teleportation-based GKP error correction is understood as an ideal GKP error correction preceded by and followed by extra random shift errors, according to some embodiments. 
         FIG.  4 C  illustrates the simplified model applied for a CNOT gate, according to some embodiments. 
         FIG.  4 D  illustrates the simplified model applied for a CZ gate, according to some embodiments. 
         FIG.  5 A  illustrates probability densities of shift errors resulting from correlations between qubits operated on by a logical gate, wherein the correlations and/or probability densities may be used to determine maximum likelihood decision boundaries, according to some embodiments. 
         FIG.  5 B  illustrates decision boundaries determined for a closest integer decoding, according to some embodiments. 
         FIG.  5 C  illustrates decision boundaries determined for a maximum likelihood decoding, according to some embodiments. 
         FIG.  6 A  illustrates a two-dimensional matching graph for X-type stabilizer measurement outcomes of the surface code for a surface code of size d x =d z =7, wherein the different labels indicate different types of edges used in the decoding protocol, according to some embodiments. 
         FIG.  6 B  illustrates the two-dimensional matching graph as shown in  FIG.  6 A  with vertical and space-time correlated edges connecting between adjacent two-dimensional layers, according to some embodiments. 
         FIG.  6 C  illustrates a two-dimensional matching graph for Z-type stabilizer measurement outcomes of the surface code for a surface code of size d x =d z =7, wherein the different labels indicate different types of edges used in the decoding protocol, according to some embodiments. 
         FIG.  6 D  illustrates the two-dimensional matching graph as shown in  FIG.  6 C  with vertical and space-time correlated edges connecting between adjacent two-dimensional layers, according to some embodiments. 
         FIG.  7 A  illustrates a two-level ancilla system (e.g., lowest two levels of a transmon), according to some embodiments. 
         FIG.  7 B  illustrates a three-level ancilla system (e.g., lowest three levels of a transmon), according to some embodiments. 
         FIG.  7 C  illustrates achieved squeezing verses targeted squeezing for different types of ancilla systems (e.g., transmon), according to some embodiments. 
         FIG.  8    is a block diagram illustrating an example computing device that may be used in at least some embodiments. 
     
    
    
     While embodiments are described herein by way of example for several embodiments and illustrative drawings, those skilled in the art will recognize that embodiments are not limited to the embodiments or drawings described. It should be understood, that the drawings and detailed description thereto are not intended to limit embodiments to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope as defined by the appended claims. The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description or the claims. As used throughout this application, the word “may” is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). Similarly, the words “include,” “including,” and “includes” mean including, but not limited to. When used in the claims, the term “or” is used as an inclusive or and not as an exclusive or. For example, the phrase “at least one of x, y, or z” means any one of x, y, and z, as well as any combination thereof. 
     DETAILED DESCRIPTION 
     The present disclosure relates to methods and apparatus for implementing a quantum error correction with a surface code comprising Gottesman Kitaev Preskill (GKP) qubits that efficiently uses resources, such as qubits. 
     Fault tolerant quantum error correction techniques are needed for executing quantum algorithms intractable by classical computers, such as integer factorization and the simulation of real-time dynamics of large quantum systems. One approach towards fault-tolerant quantum computing is to implement a surface code (or its variants) using bare qubits such as transmons or internal states of trapped ions. However, bosonic qubits (error corrected via bosonic quantum error correction) provide unique advantages that are not available to bare qubits. For example, two component cat codes (consisting of two coherent states |±α  naturally realize noise-biased qubits whose bit-flip error rate is exponentially suppressed in the size of the code |α| 2 , whereas the phase-flip error rate increases only linearly in |α| 2 . Also, a CNOT gate between these two noise-biased cat qubits can be performed in a bias-preserving way, e.g., high noise bias (towards phase-flip errors) can be maintained during the entire execution of the CNOT gate through a suitably designed control scheme. Additionally, a bias-preserving CNOT gate is not possible with strictly two-dimensional bare qubits. However, a unique noise-bias feature of bosonic cat qubits can be utilized to significantly reduce the required resource overheads for implementing fault-tolerant quantum computation. 
     For example, Gottesman Kitaev Preskill (GKP) qubits are another example of bosonic qubits which enjoy unique advantages unavailable to bare two-dimensional qubits. For example if GKP qubits are used to implement a next-level error-correcting code (e.g., the surface code), extra analog information gathered from GKP error correction can be used to inform which GKP qubits are more likely to have had an error. Thus, by incorporating the extra analog information and providing it to the decoder of a next level code (such as the surface code), the performance of the next level error correction code (e.g. the surface code comprising GKP qubits) can be boosted. 
     Surface Code Comprising GKP Qubits 
     In some embodiments, a surface-GKP code may comprise concatenation of the GKP code with the surface code, for example as shown in  FIG.  1   , wherein the surface code, implemented using quantum hardware comprising physical elements used to implement qubits, comprises data GKP qubits and ancilla GKP qubits. Note as shown in the right hand portion of  FIG.  1   , each of the GKP data qubits and ancilla qubits may have associated auxiliary modes (e.g. qunaught states) that are prepared using an auxiliary qubit associated with the GKP qubit (e.g. data or ancilla GKP qubit). 
     In some embodiments, GKP error correction is performed four times for each surface code stabilizer measurement. 
     A surface code lattice for a distance d x =d z =7 surface code (encoding one logical qubit) is illustrated in  FIG.  1   . Lightly colored vertices  102  correspond to data qubits where the logical information is stored, and more darkly colored vertices  104  correspond to ancilla qubits used to measure the surface code stabilizers. The X-type stabilizers are represented by lightly colored-plaquettes  106  and detect Z errors whereas Z-type stabilizers are represented by more darkly colored plaquettes  108  and detect X errors. The logical  X  operator has minimum support on d x  qubits along each column of the lattice. The logical Z operator has minimum support on d z  qubits along each row of the lattice. It can be assumed that the data qubits are encoded in a square-lattice GKP qubit (square and rectangular-lattice GKP qubits are further discussed below). In some embodiments, noise-biased rectangular-lattice GKP qubits (e.g., 0.8≤λ≤1.2) are used for the ancilla qubits. All ancilla qubits  104  in the lattice of  FIG.  1    are prepared in the |+ 80       state and measured in the X basis via a momentum homodyne measurement. The numbers adjacent to the CNOT gates ( 110 ) and CZ gates ( 112 ) indicate the time step at which such gates are applied. In some embodiments, a two-qubit gate scheduling is used. 
     In some embodiments, (teleportation-based) GKP error correction is applied at the end of each CNOT or CZ gate. That is, each CNOT (or CZ) gate is an error-corrected logical CNOT (or CZ) gate between two GKP qubits as described in more detail below with regard to teleportation-based GKP error correction. Also importantly, since GKP error correction is performed after every two-qubit gate, extra analog information is gathered from the GKP error correction for each two-qubit gate. This analog information can then be used to compute conditional probabilities of Pauli error rates for each error-corrected CNOT or CZ gate between two GKP qubits. The same applies to the ancilla state preparation, idling, and measurements as well. Note that due to the need to implement the GKP error correction to all GKP qubits, each GKP qubit may be assisted by two auxiliary modes (white vertices  114  in  FIG.  1   ) that host two GKP qunaught states and one auxiliary qubit (white square  116  in  FIG.  1   ) used to prepare the GKP qunaught states. In some embodiments, maximum likelihood decoding (as further described below, for example in regard to  FIG.  5 C ) is used instead of the simple closest-integer decoding to correct for shift errors in error-corrected CNOT and CZ gates between two GKP qubits. 
     In order to ensure a fault-tolerant error correction protocol, measurements of the stabilizers may be repeated at least d=max {d x , d z } times. Errors are then corrected using a Minimum Weight Perfect Matching (MWPM) decoder applied to three-dimensional matching graphs (for example as shown in  FIGS.  6 A- 6 D ) with weighted edges which incorporate the conditional probabilities of the GKP error correction for the entire syndrome history. For example, the matching graphs for X and Z-type stabilizers in  FIGS.  6 A- 6 D  show how edge weights can be computed dynamically using analog information from the GKP error correction, with matching graphs for X-type stabilizers shown in  FIGS.  6 A- 6 B  and Z-type stabilizers shown in  FIGS.  6 C- 6 D . It may be noted that when using the analog information for computing edge weights in the matching graphs, at every time step and in each syndrome measurement round, every fault location (which includes two-qubit gates, idle, state-preparation and ancilla measurements) can have different conditional probabilities associated with a particular Pauli error at the given location. As such, edge weights are not precomputed and are instead updated dynamically. 
     In some embodiments, using the analog information in the GKP decoding scheme results in smaller logical failure rates by several orders of magnitude (in comparison to a case where analog information is not used for decoding). For instance, for d=9 and σ gkp   (dB) =11 dB, without the analog information the logical failure rate is found to be 6.72×10 −3  compared to 1.94×10 −6  when using the analog information, an improvement by a factor of ˜3461. Such a large improvement is possible since all edge weights of the matching graphs used by the minimum weight perfect matching (MWPM) decoder are determined based on the conditional probabilities of all types of errors in the full history of syndrome measurement rounds given the extra analog information. If GKP qubits are sufficiently squeezed (e.g. σ gkp   (dB) ≥9 dB), a Pauli error on GKP qubits occurs due to a shift that is barely larger than the largest correctable shift (e.g., √{square root over (π)}/2) in the case of an idling square-lattice GKP qubit). Hence, most Pauli errors on GKP qubits occur near the decision boundary of a GKP error correction and hence come with a high conditional probability because decisions made near the decision boundary are less reliable than the ones made deep inside the decision boundary. 
     For instance, in the case of the distance-three surface code, there are many cases where two faults happen during the three syndrome measurement rounds. These two faults come with high conditional probabilities as they are caused by shifts close to the decision boundary. If this extra analog information (e.g. high conditional probabilities) are not taken into account, the MWPM decoder will choose a wrong path consistent with the syndrome history when pairing highlighted vertices. The correction will then result in a logical Pauli error in the surface-GKP code. However, since the two faults that did happen are likely to have high conditional probabilities, the paths correcting the resulting errors are favored by the MWPM decoder when the analog information is incorporated in the decoding protocol. Thus, even though the distance of the surface code is only three (and hence can only correct at most one fault in the standard surface code setting with bare two-dimensional qubits), many two-fault events are correctable in the surface-GKP code setting with the help of the extra analog information. 
     It is also pointed out that, the opposite can also be true in principle. That is, there may be cases where only a single fault occurred but two other candidate fault locations have much higher conditional probabilities despite the fact that no errors were introduced at these other two locations (i.e., false alarms). In this case, the MWPM decoder favors edges of two data qubits not afflicted by an error (due to the large conditional probabilities). The applied correction would then result in a logical Pauli error for the surface-GKP code even though only one fault actually happened. Such possibilities might seem problematic from a fault-tolerance perspective. However, such events occur with very small probability (smaller than the computed logical failure rates) and the benefit of using the extra analog information strongly outweighs the side effects due to false alarms. In some embodiments, threshold σ gkp   (dB) ≈9.9 dB is used. 
     Rectangular-lattice GKP code states are stabilized by two commuting displacement operators 
     
       
         
           
             
               
                 
                   S 
                   ˆ 
                 
                 
                   q 
                   , 
                   λ 
                 
               
               = 
               
                 exp 
                 [ 
                 
                   i 
                   ⁢ 
                   
                     
                       2 
                       ⁢ 
                       
                         π 
                       
                     
                     λ 
                   
                   ⁢ 
                   
                     q 
                     ˆ 
                   
                 
                 ] 
               
             
             , 
               
             
               
                 
                   S 
                   ˆ 
                 
                 
                   p 
                   , 
                   λ 
                 
               
               = 
               
                 
                   exp 
                   [ 
                   
                     i 
                     ⁢ 
                     2 
                     ⁢ 
                     
                       π 
                     
                     ⁢ 
                     λ 
                     ⁢ 
                     
                       p 
                       ˆ 
                     
                   
                   ] 
                 
                 . 
               
             
           
         
       
     
     Note that the λ=1 case corresponds to the square lattice GKP code and as will be made clear shortly, the parameter λ determines the aspect ratio of the underlying rectangular lattice. The logical Pauli operators are given by: 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                   
                                     | 
                                     
                                       0 
                                       λ 
                                     
                                   
                                   〉 
                                 
                                 ∝ 
                                 
                                   ∑ 
                                   
                                     n 
                                     ∈ 
                                     ℤ 
                                   
                                 
                               
                               | 
                               
                                 q 
                                 ˆ 
                               
                             
                             = 
                             
                               2 
                               ⁢ 
                               n 
                               ⁢ 
                               
                                 π 
                               
                               ⁢ 
                               λ 
                             
                           
                           〉 
                         
                         ⁢ 
                           
                         
                           | 
                           
                             1 
                             λ 
                           
                         
                       
                       〉 
                     
                     ∝ 
                     
                       ∑ 
                       
                         n 
                         ∈ 
                         ℤ 
                       
                     
                   
                   | 
                   
                     q 
                     ˆ 
                   
                 
                 = 
                 
                   
                     ( 
                     
                       
                         2 
                         ⁢ 
                         n 
                       
                       + 
                       1 
                     
                     ) 
                   
                   ⁢ 
                   
                     π 
                   
                   ⁢ 
                   λ 
                 
               
               〉 
             
             . 
           
         
       
     
     Also, the logical states in the complimentary basis (eigenstates of {circumflex over (X)} λ ) are given by: 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                   
                                     | 
                                     
                                       + 
                                       λ 
                                     
                                   
                                   〉 
                                 
                                 ∝ 
                                 
                                   ∑ 
                                   
                                     n 
                                     ∈ 
                                     ℤ 
                                   
                                 
                               
                               | 
                               
                                 p 
                                 ˆ 
                               
                             
                             = 
                             
                               2 
                               ⁢ 
                               n 
                               ⁢ 
                               
                                 π 
                               
                               ⁢ 
                               λ 
                             
                           
                           〉 
                         
                         ⁢ 
                           
                         
                           | 
                           
                             - 
                             λ 
                           
                         
                       
                       〉 
                     
                     ∝ 
                     
                       ∑ 
                       
                         n 
                         ∈ 
                         ℤ 
                       
                     
                   
                   | 
                   
                     p 
                     ˆ 
                   
                 
                 = 
                 
                   
                     ( 
                     
                       
                         2 
                         ⁢ 
                         n 
                       
                       + 
                       1 
                     
                     ) 
                   
                   ⁢ 
                   
                     π 
                   
                   ⁢ 
                   λ 
                 
               
               〉 
             
             . 
           
         
       
     
     Note that the position and momentum quadratures of the logical states sit on a rectangular lattice {n q √{square root over (π)}λ, n p √{square root over (π)}/λ|n q , n p ∈ }. Thus, compared to the square-lattice case (i.e., λ=1), the spacing in the position quadrature is elongated by a factor of λ and the spacing in the momentum quadrature is contracted by the same factor. In terms of the error-correcting capability, this means that the rectangular-lattice GKP code can correct any small shift error exp[i(ξ p {circumflex over (q)}−ξ q {circumflex over (p)})] with 
     
       
         
           
             
               
                 
                   
                     
                       
                         ❘ 
                         &#34;\[LeftBracketingBar]&#34; 
                       
                       
                         ξ 
                         q 
                       
                       
                         ❘ 
                         &#34;\[RightBracketingBar]&#34; 
                       
                     
                     &lt; 
                     
                       
                         
                           π 
                         
                         ⁢ 
                         λ 
                       
                       2 
                     
                   
                   , 
                 
               
               
                 
                   
                     
                       ❘ 
                       &#34;\[LeftBracketingBar]&#34; 
                     
                     
                       ξ 
                       p 
                     
                     
                       ❘ 
                       &#34;\[RightBracketingBar]&#34; 
                     
                   
                   &lt; 
                   
                     
                       
                         π 
                       
                       
                         2 
                         ⁢ 
                         λ 
                       
                     
                     . 
                   
                 
               
             
           
         
       
     
     As a result, choosing λ&gt;1 and assuming that noise is symmetric in both the position and the momentum quadratures (which is typically the case), the rectangular-lattice GKP code has a higher chance of having a logical Z error than a logical X error. The opposite is true for λ&lt;1. 
     Regardless of the underlying lattice structure of the GKP code, logical Clifford operations of the GKP code can be performed by using a Gaussian operation (or a quadratic Hamiltonian in the quadrature operators). The most relevant Clifford operations to the implementation of the surface code are the CNOT and the CZ gates. In the surface code architecture described herein, a hybrid code is considered where the ancilla qubits of the surface code are encoded in a rectangular-lattice GKP code but the data qubits are encoded in the square-lattice GKP code. Thus, it can be assumed that the control qubit of the CNOT gate is a rectangular-lattice GKP qubit with 0.8≤λ≤1.2 and the target qubit is a square-lattice GKP qubit with λ=1. Such a CNOT gate can be implemented by using a rescaled SUM gate (or a qp coupling) 
                 CNOT     j   →   k       =     exp   [       -     i   λ       ⁢       q   ^     j     ⁢       p   ^     k       ]       ,         
where j is the control qubit and k is the target qubit. Similarly, the CZ gate between a rectangular-lattice GKP qubit and a square-lattice GKP qubit can be realized via a qq coupling:
 
                 CZ     j   ,   k       =     exp   [       i   λ     ⁢       q   ^     j     ⁢       q   ^       k             ]       ,         
where the qubit j is encoded in a rectangular-lattice GKP code and the qubit k is encoded in the square-lattice GKP qubit.
 
     Additionally, the Z-basis measurement (distinguishing |0 λ    from |1 λ   ) can be performed by a position homodyne measurement. More specifically, if the position homodyne measurement outcome is in the range {q m |(n q −1/2)√{square root over (π)}λ&lt;q m &lt;(n q +1/2)√{square root over (π)}λ} for an even (odd) n q , it can be inferred that the state is in |0 λ   (|1 λ   ). Similarly, the X-basis measurement can be done by a momentum homodyne measurement: if the measurement outcome p m  is in the range 
                     {     p   m         ❘   &#34;\[RightBracketingBar]&#34;       ⁢     (       n   p     -     1   2       )     ⁢     π     /   λ     &lt;   p   &lt;       (       n     p           +     1   2       )     ⁢     π     /   λ       }         
for an even (odd) n p , it can be inferred that the state is in |+ λ   (|− λ   ).
 
     Recall that one can change the aspect ratio of the ancilla GKP qubit (i.e., X) to bias the noise towards a certain Pauli error. When λ&gt;1, the two-qubit gates in the surface code lattice of  FIG.  1    introduce Z errors on the ancilla qubits with higher probability resulting in increased measurement error rates, while simultaneously reducing the probability of X errors on the ancilla qubits thus reducing the rate of space-time correlated errors (a subset of which are hook errors). The opposite is true for λ&lt;1. 
     In some embodiments, shift errors in each GKP qubit are constantly corrected by a teleportation-based GKP error correction protocol. Note that two fresh GKP qunaught states ( 114  in  FIG.  1   ) are supplied to realize the teleportation-based GKP error correction. Thus, each data or ancilla GKP qubit ( 102  or  104 ) requires one mode to encode the quantum information and, assuming no multiplexing, two auxiliary modes (represented by white vertices  114  in  FIG.  1   ) are needed to provide fresh GKP qunaught states for the GKP error correction. In this case, the number of required oscillator modes is three times the number of GKP qubits. Moreover, for each GKP qubit, one auxiliary qubit is needed to prepare the GKP qunaught states in the auxiliary modes. Such auxiliary qubits are represented by white squares  116  in  FIG.  1   . Hence, in some embodiments, the surface-GKP code requires a total of 291 physical modes, 97 qubits and hardware elements to support these modes. Note that if the GKP qunaught states are supplied in a multiplexed fashion, the extra overhead associated with the GKP error correction may be further reduced. However, despite the extra two auxiliary modes and one auxiliary qubit for each surface code qubit, the surface-GKP code requires fewer physical elements than the standard surface code consisting of bare qubits. 
     In some embodiments, data GKP qubits may be implemented using square lattices, whereas ancilla GKP qubits may be implemented using rectangular lattices. 
     Teleportation-Based GKP Error Correction 
     To correct for the shift errors with the GKP code, quadrature operators modulo are non-destructively measured at an appropriate spacing (e.g., momentum {circumflex over (q)} modulo √{square root over (π)}λ and position {circumflex over (p)} modulo √{square root over (π)}λ in the case of the rectangular lattice GKP code, or momentum {circumflex over (q)} modulo √{square root over (π)} and position {circumflex over (p)} modulo √{square root over (π)} in the case of a square lattice GKP code). In some embodiments, a teleportation-based GKP error correction method may be used, which requires two identical ancilla GKP states |Ø λ     109  , beam-splitter interactions, and homodyne measurements (see  FIG.  2   ). 
     One of the advantages of the teleportation-based GKP error correction, is that it works with beam-splitter interactions and does not require any online squeezing operations. On the other hand, the Steane-type GKP error correction is based on the SUM gate and its inverse which do require squeezing operations in addition to beam-splitter interactions. The absence of squeezing operations in the teleportation-based method is especially convenient for optical systems since beam-splitter interactions are easier to realize than squeezing operations in the optics setting. 
     In some embodiments, performing the teleportation based error correction comprises initializing two ancilla GKP qubits for a given square data GKP qubit to be measured, wherein the two ancilla GKP qubits are initialized in a qunaught state (|Ø ) that carries no quantum information. The method of performing the teleportation based error correction further comprises applying a balanced beam-splitter interaction between the qunaught states of the ancilla GKP qubits to generate an encoded GKP-Bell state. 
     Once the GKP-Bell state is prepared, the beam-splitter interaction is applied between the modes 1 and 2 which is then followed by homodyne measurements of the quadrature operators {circumflex over (q)} 1  and {circumflex over (p)} 1 . Such a measurement is the continuous-variable analog of the Bell measurement. Thus, the circuit in  FIG.  2    implements quantum teleportation from the mode 1 to mode 3. This is why it is called a teleportation-based GKP error correction scheme. As a result, conditioned on the measurement outcomes q m  and p m , the output state is given by
 
|ψ( q   m   ,p   m )   Teleport ∝{circumflex over (Π)} λ   {circumflex over (D)} (−√{square root over (2)}( q   m   +ip   m ))|ψ 
 
     For example,  FIG.  2    illustrates a teleportation-based error correction protocol, wherein measurement outcomes q m  and p m  are used in the above equation (also shown in  FIG.  2   ) to determine the output state, where the measurements at the end of the circuits are a homodyne measurement of the position ({circumflex over (q)}) or the momentum ({circumflex over (p)}) operator. 
     Additional details regarding Teleportation-based GKP error correction are shown in  FIGS.  3  and  4 A- 4 D . 
     For example, in the case of the teleportation-based GKP error correction (shown in  FIG.  3   ), the ancilla shift errors are mixed via the balanced beam-splitter interaction. Thus, the third mode (where the state is teleported to) has residual shift errors ξq (+) =(ξ q   (2) +ξ q   (3) )/√{square root over (2)} and ξ p   (+) =(ξ p   (2) +ξ p   (3) )/√{square root over (2)}, which is then carried over to the next round of the GKP error correction. This also means that, in the current round, the data mode inherits residual shifts ξ′ q   (+)  and ξ′ p   (+)  from the previous round (note that ξ′ q   (+)  and ξ′ p   (+)  are defined similarly as ξ q   (+)  and ξ p   (+) ). After the balanced beam-splitter interaction between the two ancilla modes, the second mode has shift errors ξ q   (−) =(ξ q   (2) −ξ q   (3) /√{square root over (2)} and ξ p   (−) =(ξ p   (2) −ξ p   (3) /√{square root over (2)}. Note that since the quadrature transformation matrix of a beam-splitter interaction is an orthogonal matrix, the four shifts ξ q   (+) , ξ p   (+) , ξ q   (−) , and ξ p   (−)  are mutually independent just like the untransformed ancilla shifts ξ q   (2) , ξ p   (2) , ξ q   (3) , and ξ p   (3) . Note that the beam-splitter unitary operator is: 
     
       
         
           
             
               
                 
                   
                     B 
                     ˆ 
                   
                   
                     j 
                     → 
                     k 
                   
                 
                 ( 
                 θ 
                 ) 
               
               ≡ 
               
                 exp 
                 [ 
                 
                   
                     - 
                     i 
                   
                   ⁢ 
                   
                     θ 
                     ⁡ 
                     ( 
                     
                       
                         
                           
                             q 
                             ˆ 
                           
                           j 
                         
                         ⁢ 
                         
                           
                             p 
                             ˆ 
                           
                           k 
                         
                       
                       - 
                       
                         
                           
                             p 
                             ˆ 
                           
                           j 
                         
                         ⁢ 
                         
                           
                             q 
                             ˆ 
                           
                           k 
                         
                       
                     
                     ) 
                   
                 
                 ] 
               
             
             = 
             
               exp 
               [ 
               
                 θ 
                 ⁡ 
                 ( 
                 
                   
                     
                       
                         a 
                         ˆ 
                       
                       j 
                       † 
                     
                     ⁢ 
                     
                       
                         a 
                         ˆ 
                       
                       k 
                     
                   
                   - 
                   
                     
                       
                         a 
                         ˆ 
                       
                       j 
                     
                     ⁢ 
                     
                       
                         a 
                         ˆ 
                       
                       k 
                       † 
                     
                   
                 
                 ) 
               
               ] 
             
           
         
       
     
     Wherein, in the Heisenberg picture, the quadrature operators are transformed via the beam splitter unitary {circumflex over (B)} j→k (θ) as follows: 
     
       
         
           
             
               [ 
               
                 
                   
                     
                       
                         q 
                         ˆ 
                       
                       j 
                     
                   
                 
                 
                   
                     
                       
                         q 
                         ˆ 
                       
                       k 
                     
                   
                 
                 
                   
                     
                       
                         p 
                         ˆ 
                       
                       j 
                     
                   
                 
                 
                   
                     
                       
                         p 
                         ˆ 
                       
                       k 
                     
                   
                 
               
               ] 
             
             → 
             
               
                 [ 
                 
                   
                     
                       
                         cos 
                         ⁢ 
                         θ 
                       
                     
                     
                       
                         
                           - 
                           
                             s 
                             ⁢ 
                             in 
                           
                         
                         ⁢ 
                         θ 
                       
                     
                     
                       0 
                     
                     
                       0 
                     
                   
                   
                     
                       
                         sin 
                         ⁢ 
                         θ 
                       
                     
                     
                       
                         cos 
                         ⁢ 
                         θ 
                       
                     
                     
                       0 
                     
                     
                       0 
                     
                   
                   
                     
                       0 
                     
                     
                       0 
                     
                     
                       
                         cos 
                         ⁢ 
                         θ 
                       
                     
                     
                       
                         
                           - 
                           
                             s 
                             ⁢ 
                             in 
                           
                         
                         ⁢ 
                         θ 
                       
                     
                   
                   
                     
                       0 
                     
                     
                       0 
                     
                     
                       
                         sin 
                         ⁢ 
                         θ 
                       
                     
                     
                       
                         cos 
                         ⁢ 
                         θ 
                       
                     
                   
                 
                 ] 
               
               [ 
               
                 
                   
                     
                       
                         q 
                         ˆ 
                       
                       j 
                     
                   
                 
                 
                   
                     
                       
                         q 
                         ˆ 
                       
                       k 
                     
                   
                 
                 
                   
                     
                       
                         p 
                         ˆ 
                       
                       j 
                     
                   
                 
                 
                   
                     
                       
                         p 
                         ˆ 
                       
                       k 
                     
                   
                 
               
               ] 
             
           
         
       
     
     The shifts in the second mode are then mixed with the shifts in the data mode and the result is a net shift error (ξ′ q   (+) −ξ q   (−) )/√{square root over (2)} in the position quadrature and (ξ′ p   (+) +ξ p   (−) )/√{square root over (2)} in the momentum quadrature. Thus, the measurement outcomes are given by q m =(ξ′ q   (+) −ξ q   (−) )/√{square root over (2)} and p m =(ξ′ p   (+) +ξ p   (−) )√{square root over (2)} modulo √{square root over (π)}λ/√{square root over (2)} and √{square root over (π)}/(√{square root over (2π)}λ), respectively. The actual shifts on the data qubit are given by √{square root over (2)}q m  and √{square root over (2)}p m  with an extra √{square root over (2)} factor. Thus, the relevant shifts (to be compared with the lattice spacings √{square root over (π)}λ and √{square root over (π)}/λ) are ξ′ q   (+) −ξ q   (−)  and ξ′ p   (+) +ξ p   (−)  whose noise variances are given by 2σ gkp   2 . Since the relevant noise variance is smaller in the teleportation-based GKP error correction scheme by a factor of 3/2, logical Pauli errors are less likely to occur in the teleportation based method than in other methods, such as the Steane-type method, given the same GKP squeezing σ gkp   (dB) . 
     Note that since the weight of the Gaussian tail decreases exponentially in the inverse noise variance, the constant factor improvement in the noise variance can bring about a significant decrease in the logical Pauli error probabilities. Apart from the absence of the online squeezing operations and the enhanced resilience against the ancilla GKP noise, it is also remarked that the teleportation-based scheme is more advantageous for keeping the energy of the encoded state bounded than the Steane-type method. This is thanks to the symmetry between the position and the momentum quadratures in the teleportation-based scheme (which is related to the absence of online squeezing operations). Such a symmetry prevents the Gaussian envelope of the finitely-squeezed GKP states from being distorted during the GKP error correction, and hence minimizes the energy of the encoded GKP states. 
     Position and Momentum Measurements Including Analog Information Related to Error Correction Confidence 
     Due to the Heisenberg uncertainty principle there is always some uncertainty in position and momentum measurements. To deal with this uncertainty, position and momentum may be measured modularly with some spacing between decision intervals, such as √{square root over (π)}, where the position or momentum is measured as a shift from a center of the decision interval such as a distance from zero in a direction towards 
             +       π     2           
or in the other direction towards
 
             -         π     2     .           
So that instead of measuring an exact position or momentum, the positon or momentum is measured relative to a center position of a modular quadrant having a size corresponding to plus and minus the decision boundary (e.g. a decision interval). As an example,  FIGS.  5 B and  5 C  illustrate quadrants using different methods to determine decision intervals. For example, in  FIG.  5 B  decision interval boundaries are determined using a closest integer approach, whereas in  FIG.  5 C  decision intervals are determined using a maximum likelihood approach. Note that the maximum likelihood approach better aligns the decision intervals with the probability densities as shown in  FIG.  5 A  than is the case for the closest integer approach shown in  FIG.  5 B . Note that  FIGS.  5 A- 5 C  are actually showing quadrants for two GKP qubits operated on by a CNOT gate. Thus in the single GKP qubit the decision intervals would span from
 
     
       
         
           
             
               
                 
                   - 
                   
                     π 
                   
                 
                 ⁢ 
                     
                 to 
               
                   
               - 
               
                 
                   π 
                 
                 2 
               
             
             , 
             
               
                 - 
                 
                   
                     π 
                   
                   2 
                 
               
               ⁢ 
                   
               to 
               ⁢ 
                   
               
                 
                   π 
                 
                 2 
               
             
             , 
             
               and 
               ⁢ 
                   
               
                 
                   π 
                 
                 2 
               
               ⁢ 
                   
               to 
               ⁢ 
                   
               
                 
                   π 
                 
                 . 
               
             
           
         
       
     
     Position and momentum measurements provide information as to where the qubit resides in a given modular cell, but does not provide information regarding which modular unit cell the position or momentum of the qubit resides in. Thus, a large shift across a decision boundary may appear as a small shift within an adjacent quadrant. Because of this state of affairs, shifts in position or momentum with measured results close to decision boundaries are more likely to be incorrect because it is possible that the shift could be a large shift across the decision boundary or a smaller shift that stops short of the decision boundary in an adjacent quadrant. Conversely shifts in position or momentum that are more further removed from the decision boundaries are more likely to be correct. This is because the likelihood of a large shift crossing a decision boundary and extending further away from the crossed decision boundary is less likely than a shift terminating closer to the crossed decision boundary. 
     In some embodiments, analog information is generated along with the position and momentum measurements, wherein the analog information indicates a relative closeness to a decision boundary for a given position or momentum measurement. Thus the measurement itself is collected and additional analog information is generated that can be used to determine a confidence level in the measurement information or in later uses of the measurement information such as a confidence in an error-correction performed on the GKP qubit. 
     Moreover, when maximum likelihood decision boundaries are used as shown in  FIG.  5 C , the analog information provides even better confidence and reduces errors because the decision boundaries and the probability densities are more closely aligned. 
     When preparing a GKP qubit, such shifts in position and momentum are unavoidable and must be corrected back to the code space, for example using the measured position and momentum shifts. 
     As further discussed below, the analog information (or confidence values generated using the analog information) can be provided for use in an edge graph matching, wherein edges for GKP qubits for which there is a high level of confidence in the error correction are weighted more heavily than other edges for other GKP qubits for which there is less confidence in the error correction (for example due to the shift falling close relative to a decision boundary leading to ambiguities whether the shift is a long shift crossing a decision boundary into an adjacent quadrant or a shorter shift in a given quadrant). 
     Not only can position and momentum be measured and corresponding analog information be generated for a single GKP qubit, a similar process can be carried out for a pair of two GKP qubits operated on by a logical gate, such as a CNOT gate. In such a case, there are two positions and two momentums that are being measured. For example, as mentioned above,  FIGS.  5 A- 5 C  show probability densities and quadrants for position and momentum measurements using both a closest integer decoding protocol and a maximum likelihood protocol (that more closely aligns the decision boundaries with the probability densities). 
     Note that in some embodiments, position and momentum for a given GKP qubit is within a square lattice. However, in some embodiments, a GKP qubit can be squeezed, such that either position or momentum is confined to a smaller span than the other one. In such situations lambda (λ) represents a squeezing factor. Where the total span is −√{square root over (π)} to √{square root over (π)} for both position and momentum in a square lattice and is squeezed by a factor X such that at least one of the spans of position or momentum is increased or reduced such as to span 
     
       
         
           
             
               
                 ± 
                 
                   π 
                 
               
               ⁢ 
               λ 
               ⁢ 
                   
               or 
             
                 
             ± 
             
               
                 
                   π 
                 
                 λ 
               
               . 
             
           
         
       
     
     For example, taking a GKP squeezing σ gkp   (dB) =10 dB and converting it to the noise variance σ gkp   2 , it is found that 
               σ   gkp   2     =         1   2     ⁢   1   ⁢     0       -     σ   gkp     (   dB   )         /   10         =       0   .   0     ⁢   5             
at σ gkp   (dB) =10 dB. This noise variance is doubled because there is one carried over from the previous round of the GKP error correction and another one that is added from the current round. Thus, the relevant noise variance due to the finite GKP squeezing is given by 2σ gkp   2 =0.1 at σ gkp   (dB) =10 dB. On the other hand, the additional noise variance due to the photon loss is given by kt G  (assuming amplification with the same rate), where k is the photon loss rate and t G  is the gate time. Thus, if the gate time t G  is 100 times shorter than the single photon relaxation time 1/k, the extra noise variance due to the photon loss is only about kt G =0.01. Note that even at σ gkp   (dB) =13 dB, there is 2σ gkp   (dB) ≅0.05 and thus the noise variance due to finite GKP squeezing dominates. Hence, as a zeroth order approximation, it is acceptable to focus on the case where the finite squeezing of the ancilla GKP states is the only noise source. However, the maximum likelihood decoding method presented herein applies to more general cases, e.g., with extra noise due to photon losses.
 
     Before analyzing the error-corrected logical CNOT and CZ gate for the GKP qubits, it is remarked that a noisy (teleportation-based) GKP error correction with finitely squeezed ancilla GKP states can be understood as an ideal GKP error correction preceded and followed by extra shift errors (−ξ q   (−) , ξ p   (−) ) and (ξ q   (+) , ξ p   (+) ), respectively, where ξ q   (−) , ξ p   (−) , ξ q   (+)  and ξ p   (+) ˜ iid   (0, σ gkp   2 ) (See  FIGS.  4 A and  4 B ). This circuit identity is used throughout the analysis of the error-corrected two qubit gates between GKP qubits. 
     Error-Corrected CNOT Gate 
     Recall that the logical CNOT gate between two GKP qubits can be realized by a qp coupling. In the following discussion, it is assumed that the first qubit is a rectangular lattice GKP qubit with λ≥1 and the second qubit is the square-lattice GKP qubit. As shown in in  FIG.  4 C , before the CNOT gate is applied, the GKP qubits inherit shift errors (ξ′ q,1   (+) , ξ′ p,1   (+) ) and (ξ′ q,2   (+) , ξ′ p,2   (+) ) from the previous round of the noisy GKP error correction. These shifts are propagated through the CNOT gate as (ξ′ q,1   (+) , ξ′ p,1   (+) −ξ′ p,2   (+) /λ) and (ξ′ q,2   (+) +ξ′ q,1   (+) /λ, ξ′ p,2   (+) ). Then, due to the additional noise from the GKP error correction after the CNOT gate, extra shift errors (−ξ q,1   (−) , ξ p,1   (−) ) and (−ξ q,2   (−) , ξ p,2   (−) ) a are added to the quadratures. Consequently, the two GKP qubits have net shifts 
     
       
         
           
             
               
                 ξ 
                 q 
                 
                   ( 
                   1 
                   ) 
                 
               
               = 
               
                 
                   
                     ξ 
                     ′ 
                   
                   
                     q 
                     , 
                     1 
                   
                   
                     ( 
                     + 
                     ) 
                   
                 
                 - 
                 
                   ξ 
                   
                     q 
                     , 
                     1 
                   
                   
                     ( 
                     - 
                     ) 
                   
                 
               
             
             , 
             
 
             
               
                 ξ 
                 p 
                 
                   ( 
                   1 
                   ) 
                 
               
               = 
               
                 
                   
                     ξ 
                     ′ 
                   
                   
                     p 
                     , 
                     1 
                   
                   
                     ( 
                     + 
                     ) 
                   
                 
                 - 
                 
                   
                     1 
                     λ 
                   
                   ⁢ 
                   
                     
                       ξ 
                       ′ 
                     
                     
                       p 
                       , 
                       2 
                     
                     
                       ( 
                       + 
                       ) 
                     
                   
                 
                 + 
                 
                   ξ 
                   
                     p 
                     , 
                     1 
                   
                   
                     ( 
                     - 
                     ) 
                   
                 
               
             
             , 
             
 
             
               
                 ξ 
                 q 
                 
                   ( 
                   2 
                   ) 
                 
               
               = 
               
                 
                   
                     ξ 
                     ′ 
                   
                   
                     q 
                     , 
                     2 
                   
                   
                     ( 
                     + 
                     ) 
                   
                 
                 + 
                 
                   
                     1 
                     λ 
                   
                   ⁢ 
                   
                     
                       ξ 
                       ′ 
                     
                     
                       q 
                       , 
                       1 
                     
                     
                       ( 
                       + 
                       ) 
                     
                   
                 
                 - 
                 
                   ξ 
                   
                     q 
                     , 
                     2 
                   
                   
                     ( 
                     - 
                     ) 
                   
                 
               
             
             , 
             
 
             
               
                 ξ 
                 p 
                 
                   ( 
                   2 
                   ) 
                 
               
               = 
               
                 
                   
                     ξ 
                     ′ 
                   
                   
                     p 
                     , 
                     2 
                   
                   
                     ( 
                     + 
                     ) 
                   
                 
                 + 
                 
                   
                     ξ 
                     
                       p 
                       , 
                       2 
                     
                     
                       ( 
                       - 
                       ) 
                     
                   
                   . 
                 
               
             
           
         
       
     
     Since all eight underlying shifts ξ′ q,1   (+) , . . . ξ′ p,2   (+)  and ξ q,1   (−)  . . . , ξ p,2   (−)  are randomly drawn from an independent and identically distributed Gaussian distribution  (0, σ gkp   2 ), there are noise variances 
               Var   ⁡   (     ξ   q     (   1   )       )     =       Var   ⁡   (     ξ   p     (   2   )       )     =       2   ⁢     σ   gkp   2     ⁢         and   ⁢           Var   ⁡   (     ξ   q     (   2   )       )       =       Var   ⁡   (     ξ   p     (   1   )       )     =       (     2   +     1     λ   2         )     ⁢       σ   gkp   2     .                   
That is, the position quadrature of the target mode and the momentum quadrature of the control mode have higher noise variances than the other quadratures due to the noise propagation. A motivation for using a rectangular-lattice GKP qubit λ≥1 in the first qubit is to mitigate the enhanced noise variance via the 1/λ suppression. However, since the momentum spacing of the first qubit is decreased by a factor of λ, the Z error rate on the first qubit is enhanced as a result.
 
     Given these shift errors, the measurement outcomes in the GKP error correction (at the end of the CNOT gate) are given by:
 
√{square root over (2)} q   m   (1) =ξ q   (1)   +n   q   (1) √{square root over (π)}λ,
 
√{square root over (2)} p   m   (1) =ξ p   (1)   +n   p   (1) √{square root over (π)}/λ,
 
√{square root over (2)} q   m   (2) =ξ q   (2)   +n   q   (2) √{square root over (π)},
 
√{square root over (2)} p   m   (2) =ξ p   (2)   +n   p   (2) √{square root over (π)}.
 
     Given these measurement outcomes, the goal of the decoding is to correctly infer the four integers n q   (1) , n p   (1) , n q   (2) , and n p   (2) . In some embodiments, a maximum likelihood decoding is used, which is based on an observation that the net shifts errors are mutually correlated. For instance, the net position shifts ξ q   (1)  and ξ q   (2)  are correlated via the propagated shift ξ′ q,1   (+) . More specifically, the position shift vector ξ q ≡(ξ q   (1) , ξ q   (2) ) T  follows a two-variable Gaussian distribution  (0, V ξ     q   ) with zero mean and a covariance matrix 
     
       
         
           
             
               V 
               
                 ξ 
                 q 
               
             
             = 
             
               
                 [ 
                 
                   
                     
                       
                         Var 
                         ⁡ 
                         ( 
                         
                           ξ 
                           q 
                           
                             ( 
                             1 
                             ) 
                           
                         
                         ) 
                       
                     
                     
                       
                         Cov 
                         ( 
                         
                           
                             ξ 
                             q 
                             
                               ( 
                               1 
                               ) 
                             
                           
                           , 
                           
                             ξ 
                             q 
                             
                               ( 
                               2 
                               ) 
                             
                           
                         
                         ) 
                       
                     
                   
                   
                     
                       
                         Cov 
                         ( 
                         
                           
                             ξ 
                             q 
                             
                               ( 
                               1 
                               ) 
                             
                           
                           , 
                           
                             ξ 
                             q 
                             
                               ( 
                               2 
                               ) 
                             
                           
                         
                         ) 
                       
                     
                     
                       
                         Var 
                         ⁢ 
                         
                           ( 
                           
                             ξ 
                             q 
                             
                               ( 
                               2 
                               ) 
                             
                           
                           ) 
                         
                       
                     
                   
                 
                 ] 
               
               = 
               
                 
                   
                     σ 
                     gkp 
                     2 
                   
                   [ 
                   
                     
                       
                         2 
                       
                       
                         
                           1 
                           / 
                           λ 
                         
                       
                     
                     
                       
                         
                           1 
                           / 
                           λ 
                         
                       
                       
                         
                           2 
                           + 
                           
                             1 
                             / 
                             
                               λ 
                               2 
                             
                           
                         
                       
                     
                   
                   ] 
                 
                 . 
               
             
           
         
       
     
     Due to the correlation, shifts in a certain direction are more likely to happen than others. In other words, a larger shift in a preferred direction can occur more often than a smaller shift in a less preferred direction (see the top panel of  FIG.  5 A . 
     Such a possibility is not taken into account in other error correction methods, such as the simple closest-integer decoding. 
     Note that the probability density function of the position shifts ξ q   (1) , ξ q   (2)  is given by: 
                 P   CNOT     [   qq   ]       (       ξ   q     (   1   )       ,     ξ   q     (   2   )         )     =         1     2   ⁢   π   ⁢         ❘   &#34;\[LeftBracketingBar]&#34;       V     ξ   q         ❘   &#34;\[RightBracketingBar]&#34;             ⁢     exp   [       -     1   2       ⁢     ξ   q   T     ⁢     V     ξ   q       -   1       ⁢     ξ   q       ]       =       1     2   ⁢   π   ⁢         (     4   +     1     λ   2         )     ⁢     σ   gkp   4             ×     exp   [     -           (     2   +     1     λ   2         )     ⁢       (     ξ   q     (   1   )       )     2       +     2   ⁢       (     ξ   q     (   2   )       )     2       -       2   λ     ⁢     ξ   q     (   1   )       ⁢     ξ   q     (   2   )             2   ⁢     (     4   +     1     λ   2         )     ⁢     σ   gkp   2           ]               
where |V ξ     q   | is the determinant of V ξ     q   . Then the goal of the maximum likelihood decoding is as follows. Given the measurement outcomes 2q m   (1)  and 2q m   (2) , find n q   (1)  and n q   (2)  such that P CNOT   [qq] (ξ q   (1) , ξ q   (2) ) is maximized, where ξ q   (1) =√{square root over (2)}q m   (1) −n q   (1) √{square root over (π)}λ and ξ q   (2) =√{square root over (2)}q m   (2) −n q   (2) √{square root over (π)}. Since P CNOT   [qq] (ξ q   (1) , ξ q   (2) ) is maximized when
 
                 (     2   +     1     λ   2         )     ⁢       (     ξ   q     (   1   )       )     2       +     2   ⁢       (     ξ   q     (   2   )       )     2       -       2   λ     ⁢     ξ   q     (   1   )       ⁢     ξ   q     (   2   )               
is minimized, the is equivalent to solving the following optimization problem:
 
     
       
         
           
             
               
                 ( 
                 
                   
                     n 
                     q 
                     
                       * 
                       
                         ( 
                         1 
                         ) 
                       
                     
                   
                   , 
                   
                     n 
                     q 
                     
                       * 
                       
                         ( 
                         2 
                         ) 
                       
                     
                   
                 
                 ) 
               
               = 
               
                 arg 
                 ⁢ 
                    
                 
                   min 
                   ⁡ 
                   ( 
                   
                     
                       
                         ( 
                         
                           2 
                           + 
                           
                             1 
                             
                               
                                 λ 
                                 2 
                               
                                 
                             
                           
                         
                         ) 
                       
                       ⁢ 
                       
                         
                           ( 
                           
                             x 
                             1 
                           
                           ) 
                         
                         2 
                       
                     
                     + 
                     
                       2 
                       ⁢ 
                       
                         
                           ( 
                           
                             x 
                             
                               2 
                                 
                             
                           
                           ) 
                         
                         2 
                       
                     
                     - 
                     
                       
                         2 
                         λ 
                       
                       ⁢ 
                       
                         x 
                         
                           1 
                             
                         
                       
                       ⁢ 
                       
                         x 
                         2 
                       
                     
                   
                   ) 
                 
               
             
             , 
           
         
       
         
         
           
             where x 1 ≡√{square root over (2)}q m   (1) −n 1 √{square root over (π)}λ, x 2 ≡√{square root over (2)}q m   (2) −n 2 √{square root over (π)} given √{square root over (2)}q m   (1)  and √{square root over (2)}q m   (2)  (which are measured values). 
           
         
       
    
     Note that  FIG.  5 C  shows the decision boundaries of the maximum likelihood method, which are contrasted with the decision boundaries of the closest integer approach shown in  FIG.  5 B . Note that the decision boundaries in the maximum likelihood method are better aligned with the corresponding probability density functions than the ones in the closest-integer decoding. Thus, there are shifts that can be correctly countered by the maximum likelihood method but are incorrectly mapped to a different lattice point, hence causing a logical Pauli error, in the closest-integer decoding. 
     Similarly as in the case of the position shifts, the momentum shifts ξ p   (1)  and ξ p   (2)  are also mutually correlated via the propagated shift ξ′ p,2   (+) . Hence the momentum shift vector, ξ p ≡(ξ p   (1) , ξ p   (2) ) T  follows a two-variable Gaussian distribution  (0, V ξ     p   ) with zero mean and a covariance matrix 
     
       
         
           
             
               V 
               
                 ξ 
                 p 
               
             
             = 
             
               
                 
                   σ 
                   gkp 
                   2 
                 
                 [ 
                 
                   
                     
                       
                         2 
                         + 
                         
                           1 
                           
                             λ 
                             2 
                           
                         
                       
                     
                     
                       
                         
                           - 
                           1 
                         
                         / 
                         λ 
                       
                     
                   
                   
                     
                       
                         
                           - 
                           1 
                         
                         / 
                         λ 
                       
                     
                     
                       2 
                     
                   
                 
                 ] 
               
               . 
             
           
         
       
     
     The probability density function of the momentum shifts ξ p   (1)  and ξ p   (2)  (e.g. see bottom panel of  FIG.  5 A ) are given by: 
     
       
         
           
             
               
                 P 
                 CNOT 
                 
                   [ 
                   pp 
                   ] 
                 
               
               ( 
               
                 
                   ξ 
                   p 
                   
                     ( 
                     1 
                     ) 
                   
                 
                 , 
                 
                   ξ 
                   p 
                   
                     ( 
                     2 
                     ) 
                   
                 
               
               ) 
             
             = 
             
               
                 1 
                 
                   2 
                   ⁢ 
                   π 
                   ⁢ 
                   
                     
                       
                         ( 
                         
                           4 
                           + 
                           
                             1 
                             
                               λ 
                               2 
                             
                           
                         
                         ) 
                       
                       ⁢ 
                       
                         σ 
                         gkp 
                         2 
                       
                     
                   
                 
               
               × 
               
                 exp 
                 [ 
                 
                   - 
                   
                     
                       
                         
                           ( 
                           
                             ξ 
                             p 
                             
                               ( 
                               1 
                               ) 
                             
                           
                           ) 
                         
                         2 
                       
                       + 
                       
                         
                           ( 
                           
                             2 
                             + 
                             
                               1 
                               
                                 λ 
                                 2 
                               
                             
                           
                           ) 
                         
                         ⁢ 
                         
                           
                             ( 
                             
                               ξ 
                               p 
                               
                                 ( 
                                 2 
                                 ) 
                               
                             
                             ) 
                           
                           2 
                         
                       
                       + 
                       
                         
                           2 
                           λ 
                         
                         ⁢ 
                         
                           ξ 
                           p 
                           
                             ( 
                             1 
                             ) 
                           
                         
                         ⁢ 
                         
                           ξ 
                           p 
                           
                             ( 
                             2 
                             ) 
                           
                         
                       
                     
                     
                       2 
                       ⁢ 
                       
                         ( 
                         
                           4 
                           + 
                           
                             1 
                             
                               λ 
                               2 
                             
                           
                         
                         ) 
                       
                       ⁢ 
                       
                         σ 
                         gkp 
                         2 
                       
                     
                   
                 
                 ] 
               
             
           
         
       
     
     The goal in the decoding is then to find the two integers n p   (1)  and n p   (2)  given the measurement outcomes √{square root over (2)}p m   (1)  and √{square root over (2)}p m   (2) , such that P CNOT   [pp] (ξ p   (1) , ξ p   (2) ) is maximized where ξ p   (1) =√{square root over (2)}p m   (1) −n p   (1) √{square root over (π)}/λ and ξ p   (2) =√{square root over (2)}p m   (2) −n p   (2) √{square root over (π)}. This can be done by solving the optimization problem 
     
       
         
           
             
               
                 ( 
                 
                   
                     n 
                     p 
                     
                       * 
                       
                         ( 
                         1 
                         ) 
                       
                     
                   
                   , 
                   
                     n 
                     p 
                     
                       * 
                       
                         ( 
                         2 
                         ) 
                       
                     
                   
                 
                 ) 
               
               = 
               
                 arg 
                 ⁢ 
                    
                 
                   
                     min 
                     
                       
                         n 
                         1 
                       
                       , 
                       
                         n 
                         2 
                       
                     
                   
                   ( 
                   
                     
                       2 
                       ⁢ 
                       
                         
                           ( 
                           
                             x 
                             1 
                           
                           ) 
                         
                         2 
                       
                     
                     + 
                     
                       
                         ( 
                         
                           2 
                           + 
                           
                             1 
                             
                               λ 
                               2 
                             
                           
                         
                         ) 
                       
                       ⁢ 
                       
                         
                           ( 
                           
                             x 
                             
                               2 
                                 
                             
                           
                           ) 
                         
                         2 
                       
                     
                     + 
                     
                       
                         2 
                         λ 
                       
                       ⁢ 
                       
                         x 
                         
                           1 
                             
                         
                       
                       ⁢ 
                       
                         x 
                         2 
                       
                     
                   
                   ) 
                 
               
             
             , 
           
         
       
         
         
           
             where x 1 ≡√{square root over (2)}p m   (1) −n 1 √{square root over (π)}/λ, x 2 ≡√{square root over (2)}p m   (2) −n 2 √{square root over (π)} given √{square root over (2)}p m   (1)  and √{square root over (2)}p m   (2)  (which are measured values).
 
Error-Corrected CZ Gate
 
           
         
       
    
     The logical CZ gate between a rectangular-lattice GKP qubit and a square-lattice GKP qubit can be realized by a qq coupling. It is assumed that the first qubit is encoded in a rectangular-GKP code with λ≥1 and the second qubit is encoded in the square-lattice GKP code. Similarly as in the case of the CNOT gate, the GKP qubits inherit shift errors (ξ′ q,1   (+) , ξ′ p,1   (+) ) and (ξ′ q,2   (+) , ξ′ p,2   (+) ) from the previous round of the noisy GKP error correction. These shift errors are propagated via the CZ gate as (ξ′ q,1   (+) , ξ′ p,1   (+) +ξ′ p,2   (+) /λ) and (ξ′ q,2   (+) , ξ′ p,2   (+) +ξ′ q,1   (+) /λ). Then, due to the additional noise from the GKP error correction after the CZ gate, extra shift errors (−ξ q,1   (−) , ξ p,1   (−) ) and (−ξ q,2   (−) , ξ p,2   (−) ) are added to the quadratures. Consequently, the two GKP qubits have net shifts 
     
       
         
           
             
               
                 ξ 
                 q 
                 
                   ( 
                   1 
                   ) 
                 
               
               = 
               
                 
                   
                     ξ 
                     ′ 
                   
                   
                     q 
                     , 
                     1 
                   
                   
                     ( 
                     + 
                     ) 
                   
                 
                 - 
                 
                   ξ 
                   
                     q 
                     , 
                     1 
                   
                   
                     ( 
                     - 
                     ) 
                   
                 
               
             
             , 
             
 
             
               
                 ξ 
                 p 
                 
                   ( 
                   1 
                   ) 
                 
               
               = 
               
                 
                   
                     ξ 
                     ′ 
                   
                   
                     p 
                     , 
                     1 
                   
                   
                     ( 
                     + 
                     ) 
                   
                 
                 + 
                 
                   
                     1 
                     λ 
                   
                   ⁢ 
                   
                     
                       ξ 
                       ′ 
                     
                     
                       q 
                       , 
                       2 
                     
                     
                       ( 
                       + 
                       ) 
                     
                   
                 
                 + 
                 
                   ξ 
                   
                     p 
                     , 
                     1 
                   
                   
                     ( 
                     - 
                     ) 
                   
                 
               
             
             , 
             
 
             
               
                 ξ 
                 q 
                 
                   ( 
                   2 
                   ) 
                 
               
               = 
               
                 
                   
                     ξ 
                     ′ 
                   
                   
                     q 
                     , 
                     2 
                   
                   
                     ( 
                     + 
                     ) 
                   
                 
                 - 
                 
                   ξ 
                   
                     q 
                     , 
                     2 
                   
                   
                     ( 
                     - 
                     ) 
                   
                 
               
             
             , 
             
 
             
               
                 ξ 
                 p 
                 
                   ( 
                   2 
                   ) 
                 
               
               = 
               
                 
                   
                     ξ 
                     ′ 
                   
                   
                     p 
                     , 
                     2 
                   
                   
                     ( 
                     + 
                     ) 
                   
                 
                 + 
                 
                   
                     1 
                     λ 
                   
                   ⁢ 
                   
                     
                       ξ 
                       ′ 
                     
                     
                       q 
                       , 
                       1 
                     
                     
                       ( 
                       + 
                       ) 
                     
                   
                 
                 + 
                 
                   
                     ξ 
                     
                       p 
                       , 
                       2 
                     
                     
                       ( 
                       - 
                       ) 
                     
                   
                   . 
                 
               
             
           
         
       
     
     For example this is shown in  FIG.  4 D . Since the noise correlation structure is equivalent to that of the CNOT gate (up to permutation and sign change), the rest of the analysis, including the maximum likelihood decoding, can be performed in an analogous way. 
     Edge Weights in the Matching Graphs 
       FIGS.  6 A- 6 D  illustrate matching graphs used in the implementation of a Minimum Weight Perfect Matching (MWPM) algorithm with weighted edges. Two-dimensional bulk and boundary edges are distinguished by their associated labels since such edges will have different weights. Vertical edges used for detecting measurement errors are dashed. Lastly, consider the space-time correlated edges in  FIGS.  6 B and  6 D  used for detecting errors arising from CNOT/CZ failures which result in errors with a spatial and temporal component. Such edges are distinguished by their labels and associated grey-scale colors. For instance, space-time correlated edges are labelled P bu1x   (3D) . 
     When the extra analog information as described above is used to determine the weights of the edges, the conditional probabilities for the failure rates of each circuit component is computed dynamically for every gate, idle, state-preparation and measurement location at each time step. As such, all circuit components can have different conditional probabilities at every location and in each syndrome measurement round. Hence edge weights for the matching graphs cannot be pre-computed and must be updated dynamically. 
     Given the above, let t be the number of syndrome measurement rounds for a surface with minimum weight logical X operator d x  and minimum weight logical Z operator d z . A matrix (P e ) can be formed, wherein t is the number of syndrome measurement rounds, n corresponds to the number of data qubits, m 1  corresponds to the number of X-type stabilizers and m 2  corresponds to the number of Z-type stabilizers. 
     In some embodiments, a matrix that is a 1×t(3n+62m 1 +62m 2 ) is defined (e.g. matrix P e ), wherein n=d x d z , m 1 =(d x +1)(d z −1)/2, and m 2 =(d z +1)(d x −1)/2. Here, t is the number of syndrome measurement rounds, n corresponds to the number of data qubits, m 1  corresponds to the number of X-type stabilizers and m 2  corresponds to the number of Z-type stabilizers. 
     In some embodiments, the P e  matrix can be decomposed into t blocks and each block can be decomposed into three sub-matrices N (j) =[M 1   (j) |M 2   (j) |M 3   (j) ] where j∈{1, 2, . . . , t}. The matrix M 1   (j)  is 1×3n, M 2   (j)  is 1×62m 1 , and M 3   (j)  is 1×62m 2 . 
     In some embodiments, the 3n columns of the sub-matrix M 1   (j)  can be decomposed into n blocks, where the k&#39;th block stores the conditional probabilities for X, Y and Z Pauli errors arising from idling fault locations on the k&#39;th data qubit and in the j&#39;th syndrome measurement round (ancilla qubits have no idling fault locations). Note that data qubits on the boundaries of the lattice can have more than one idling fault location in a given syndrome measurement round (for instance, if three two-qubit gates interact with a data qubit with an idling location in between two gates). However, without accounting for photon loss, all idling fault locations can be set at the beginning of a syndrome measurement round and thus incorporates the measurement and reset wait time. As such, it can be written:
 
 M   1   (j) =[ P   q     1     ,j   (X)   ,P   q     1     ,j   (Y)   ,P   q     1     ,j   (Z)   , . . . ,P   q     n     ,j   (X)   ,P   n,j   (Y)   ,P   n,j   (Z) ]
 
where, for instance, P q     k     ,j (X) is the conditional probability of a Pauli X error on the k&#39;th data qubit during the j&#39;th syndrome measurement round arising from an idling fault location.
 
     The 62m 1  columns of the M 2   (j)  can be decomposed into m 1  blocks, where the k&#39;th block stores all conditional probabilities arising from fault locations on the k&#39;th ancilla for X-type stabilizer measurements during the j&#39;th syndrome measurement round. It is noted that by default, a fault location for a two-qubit gate is considered to be on the control-qubit of such a gate, and the control qubit of a CZ gate is set to be on the ancilla qubit. On a given ancilla qubit, there are 62 fault locations: one for the |+  state preparation, one for the X-basis measurement, and each of the four two-qubit gates can fail introducing a two-qubit Pauli error P 1 ⊗P 2  (of which there are 15 non-trivial possibilities). Since the ordering is important for understanding, take the following definition: 
                 P   ~       a   m     (   x   )         (       t   s     ;   j     )       =     [             P   IX     (       t   s     ;   j     )       ,     P   IZ     (       t   s     ;   j     )       ,     P   IY     (       t   s     ;   j     )       ,     P   XI     (       t   s     ;   j     )       ,     P   XX     (       t   s     ;   j     )       ,     P   XZ     (       t   s     ;   j     )       ,     P   XY     (       t   s     ;   j     )       ,     P   ZI     (       t   s     ;   j     )       ,     P   ZX     (       t   s     ;   j     )       ,                 P   ZZ     (       t   s     ;   j     )       ,     P   ZY     (       t   s     ;   j     )       ,     P   YI     (       t   s     ;   j     )       ,     P   YX     (       t   s     ;   j     )       ,     P   YZ     (       t   s     ;   j     )       ,     P   YY     (       t   s     ;   j     )       ,           ]           
where t s ∈{1, 2, 3, 4}, a m   (x)  corresponds to the m&#39;th ancilla for X-type stabilizers and
 
             P     P     1   ⁢     P   2           (       t   s     ;   j     )           
corresponds to a conditional probability for the error P 1 ⊗P 2  occurring on a CNOT gate in time-step t s  during the j&#39;th syndrome measurement round. Hence
 
               P   ~       a   m     (   x   )         (       t   s     ;   j     )           
stores the conditional probabilities of all 15 two-qubit Pauli errors for the CNOT gate applied in time step t s  during the j&#39;th syndrome measurement round and which interacts with the ancilla a m   (x) . It is noted that for ancillas used in measuring a weight-two X-type stabilizer, if no CNOT gates are applied in time step t s , all terms in the above equation are set to zero. Then it can be written:
 
               M   2     (   j   )       =     [             P     a   1     (   x   )         (     S   z     )       ,       P   ~       a   1     (   x   )         (       t   1     ;   j     )       ,       P   ~       a   1     (   x   )         (       t   2     ;   j     )       ,       P   ~       a   1     (   x   )         (       t   3     ;   j     )       ,         P   ~       a   1     (   x   )         (       t   4     ;   j     )       ⁢       P   ~       a   1     (   x   )         (     M   z     )         ,   …         ,                   P     a     m   1       (   x   )         (     S   z     )       ⁢       P   ~       a     m   1       (   x   )         (       t   1     ;   j     )         ,       P   ~       a     m   1       (   x   )         (       t   2     ;   j     )       ,       P   ~       a     m   1       (   x   )         (       t   3     ;   j     )       ,         P   ~       a     m   1       (   x   )         (       t   4     ;   j     )       ⁢     P     a     m   1       (   x   )         (     M   z     )                 ]           
where
 
               P     a   l     (   x   )         (     S   z     )       ⁢         and   ⁢           P     a   l     (   x   )         (     M   z     )             
are the conditional probabilities for state-preparation and measurement errors on the l&#39;th ancilla qubit for X-type stabilizer measurements. It is also noted that a convention is used where ancillas for X-type stabilizers are labeled top-bottom and left to right in the surface code lattice shown in  FIG.  1   .
 
     The 62m 2  columns of M 3   (j)  are divided into m 2  blocks where the k&#39;th block stores all conditional probabilities arising from fault locations on the k&#39;th ancilla for Z-type stabilizer measurements during the j&#39;th syndrome measurement round. The vector 
               P   ~       a   m     (   z   )         (       t   s     ;   j     )           
can be defined in a similar way as above for
 
                 P   ~       a   m     (   x   )         (       t   s     ;   j     )       ,         
where the term
 
             P     P     1   ⁢     P   2           (       t   s     ;   j     )           
corresponds to a conditional probability for the error P 1 ⊗P 2  occurring during a CZ gate in time-step t s  during the j&#39;th syndrome measurement round. Then it can be written:
 
               M   3     (   j   )       =     [             P     a   1     (   z   )         (     S   z     )       ,       P   ~       a   1     (   z   )         (       t   1     ;   j     )       ,       P   ~       a   1     (   z   )         (       t   2     ;   j     )       ,       P   ~       a   1     (   z   )         (       t   3     ;   j     )       ,         P   ~       a   1     (   z   )         (       t   4     ;   j     )       ⁢       P   ~       a   1     (   z   )         (     M   z     )         ,   …         ,                   P     a     m   1       (   z   )         (     S   z     )       ⁢       P   ~       a     m   1       (   z   )         (       t   1     ;   j     )         ,       P   ~       a     m   1       (   z   )         (       t   2     ;   j     )       ,       P   ~       a     m   1       (   z   )         (       t   3     ;   j     )       ,         P   ~       a     m   1       (   z   )         (       t   4     ;   j     )       ⁢     P     a     m   1       (   z   )         (     M   z     )                 ]           
where
 
               P     a   l     (   z   )         (     S   z     )       ⁢         and   ⁢           P     a   l     (   z   )         (     M   z     )             
are the conditional probabilities for state-preparation and measurement errors on the l&#39;th ancilla qubit for Z-type stabilizer measurements.
 
     From the above, the P e  matrix can be written as:
 
 P   e =[ N   (1)   ,N   (2)   , . . . ,N   (t) ],
 
     where N (j)  is computed using the above equations. After performing all t syndrome measurement rounds and generating the P e  matrix, edge weights can be computed by extracting the appropriate terms in the P e  matrix. 
     In some embodiments, a method of decoding a surface code using dynamically determined edge weights taking into account error correction confidence reflected in analog data generated when measuring position and momentum includes receiving a syndrome measurement history for syndrome measurements of error-corrected GKP qubits of the surface code. The method further includes receiving analog information or confidence values indicating respective levels of confidence in error corrections for the GKP qubits of the surface code, wherein the confidence values are determined based on the analog information, and wherein the analog information indicates relative amounts respective position operators ({circumflex over (q)}) or respective momentum operators ({circumflex over (p)}) of the GKP qubits were shifted relative to a decision boundary when performing error correction. Additionally, the method includes determining edges between syndrome measurements for respective ones of the GKP qubits of the surface code for, or across, one or more rounds of the syndrome measurements, wherein the determined edges comprise space-time correlated edges and/or two-dimensional edges. Also the method comprises selecting the correct conditional probabilities obtained in a dynamical fashion from the P e  matrix which is used for obtaining the correct weightings of each edge. Additionally, the method comprises determining weightings for the edges, wherein the analog information or the confidence values are used to determine the weightings, wherein GKP qubits with analog information or confidence values indicating higher confidence in error correction for the respective GKP qubits are weighted more heavily than other respective GKP qubits for which the analog information or the confidence values indicate less confidence in error correction for the other respective GKP qubits and applying a minimum weight perfect matching (MWPM) to the weighted edges to decode the surface code. 
     Preparing a Qunaught State Using a Three-Level Ancilla System 
     In some situations there may be adverse consequence of ancilla decay in the performance of GKP state stabilizations. For example, an ancilla decay can cause a large shift in the cavity mode (e.g. GKP data qubit). That is, if the ancilla (e.g. transmon) decays from |1  to |0  during a conditional displacement the cavity state is displaced in the wrong direction, possibly by a large amount depending on when the ancilla decayed (see  FIG.  7 A ). Indeed, as shown in  FIG.  7 C  the achievable squeezing may be reduced due to ancilla decay. 
     To mitigate the effects of ancilla decay, a third level of the ancilla may be used. That is, the ground state |0  and the second excited state |2  are the main ancilla qubit base states. Thus if the ancilla qubit decays from excited state |2  to excited state |1 , the effect on the shift in the cavity mode and the achievable squeezing is minimal, as shown in  FIGS.  7 B and  7 C . 
     For example, a three-level ancilla system comprises a first level (e.g. ground state), a second level (e.g. first excited state or buffer state), and a third level (e.g. second excited state or main state). The three-level ancilla system is configured such that cavity displacement of an auxiliary mode is maintained when the three-level ancilla system is in the second excited state corresponding to the third level of the three-level ancilla system and when the three-level ancilla system is in a first excited state corresponding to a second level of the three-level ancilla system. Thus, the three-level ancialla system is configured to maintain the cavity displacement of the auxiliary mode despite photon loss or decay that causes the three-level ancilla system to transition from the second excited state to the first excited state. In some embodiments, the cavity displacement of the auxiliary mode results in a squeezing of 11 decibels (dB) or more for a GKP qunaught state used to implement the auxiliary mode. In some such embodiments, the three-levelancilla system is configured to maintain the cavity displacement such that the squeezing of a GKP qunaught state used to implement the auxiliary mode remains at or above 11 dB when the three-level ancilla system decays from the second excited state corresponding to the third level of the three-level ancilla system to the first excited state corresponding to the second level of the three-level ancilla system. 
     In some embodiments, a qunaught state is prepared using a three-level ancilla system, wherein the qunaught state is prepared in an auxiliary mode for data and ancilla Gottesman Kitaev Preskill (GKP) qubits of a surface GKP code. The three-level ancilla system maintains a cavity displacement of the auxiliary mode associated with the three-level ancilla system when the three-level ancilla system is in a second excited state corresponding to a third level of the three-level ancilla system and when the three-level ancilla system is in a first excited state corresponding to a second level of the three-level ancilla system. 
     In some embodiments, the ancilla transmon is initialized to a state |+′ =(|0 +|2 )/√{square root over (2)} instead of |+ =(|0 +|1 )/√{square root over (2)}. Also, the single-qubit rotation {circumflex over (R)} θ =[−iθ(|0 1|+|1 0|)/2] is replaced by {circumflex over (R)}′ θ =[−iθ(|0 2|+|2 0|)/2], and the annihilation operator of the ancilla transmon is replaced by {umlaut over (b)}=|0 1|+√{square root over (2)}|+1 2|. It is noted that it is assumed the second excited state of the transom decays twice faster than the first excited state. A key feature of this three-level ancilla scheme is to use the first excited state |1  of the transmon as a buffer state for possible single transmon decay events (from |2  to |1 . For example, to make sure that the cavity mode is displaced in the right direction by the same amount even upon a single transmon decay, the conditional displacement operation is particularly engineered. For example, this can be realized via the following Hamiltonian:
 
 Ĥ∝{circumflex over (q)} ⊗(−|0 0|+|1 1|+|2 2|),
 
or Ĥ∝{circumflex over (p)}⊗(−|0 0|+|1 1|+|2 2|). In this case, even if the second excited state |2  of the transmon decays to its first excited state |1 , the above Hamiltonian still generates the same displacement in the cavity mode. Thus, regardless of when the transmon decays from |2  to |1 , the cavity mode is still displaced by    q  or    qp  (relative to the case where the transmon is in the ground state |0 ) which is approximately equal to √{square root over (2π)}, hence a trivial shift to the square-lattice GKP qunaught state.
 
     The effectiveness of the three-level transmon scheme is demonstrated in  FIG.  7 C . As indicated by the dashed line, despite the strong transmon decay and dephasing rates γ↓=Γ ϕ =1(25 μs), the three-level transmon scheme nearly achieves as high GKP squeezing as in the case where the transmon is assumed to be noiseless (i.e., the solid line). In particular, while the two-level transmon scheme (dotted line in  FIG.  7 C ) can only achieve a GKP squeezing of 10.4 dB at most, the three-level scheme can achieve a GKP squeezing of 11.8 dB choosing the target GKP squeezing to be 14 dB. Moreover, it can potentially realize a higher GKP squeezing by further increasing the target GKP squeezing. 
     Illustrative Computer System 
       FIG.  8    is a block diagram illustrating an example computing device that may be used in at least some embodiments. 
       FIG.  8    illustrates such a general-purpose computing device  800  as may be used in any of the embodiments described herein. In the illustrated embodiment, computing device  800  includes one or more processors  810  coupled to a system memory  820  (which may comprise both non-volatile and volatile memory modules) via an input/output (I/O) interface  830 . Computing device  800  further includes a network interface  840  coupled to I/O interface  830 . Classical computing functions such as edge graphing of syndrome measurement and other non-quantum operations as described herein may be performed on a classical computer system, such as computing device  800 . 
     In various embodiments, computing device  800  may be a uniprocessor system including one processor  810 , or a multiprocessor system including several processors  810  (e.g., two, four, eight, or another suitable number). Processors  810  may be any suitable processors capable of executing instructions. For example, in various embodiments, processors  810  may be general-purpose or embedded processors implementing any of a variety of instruction set architectures (ISAs), such as the x86, PowerPC, SPARC, or MIPS ISAs, or any other suitable ISA. In multiprocessor systems, each of processors  810  may commonly, but not necessarily, implement the same ISA. In some implementations, graphics processing units (GPUs) may be used instead of, or in addition to, conventional processors. 
     System memory  820  may be configured to store instructions and data accessible by processor(s)  810 . In at least some embodiments, the system memory  820  may comprise both volatile and non-volatile portions; in other embodiments, only volatile memory may be used. In various embodiments, the volatile portion of system memory  820  may be implemented using any suitable memory technology, such as static random access memory (SRAM), synchronous dynamic RAM or any other type of memory. For the non-volatile portion of system memory (which may comprise one or more NVDIMMs, for example), in some embodiments flash-based memory devices, including NAND-flash devices, may be used. In at least some embodiments, the non-volatile portion of the system memory may include a power source, such as a supercapacitor or other power storage device (e.g., a battery). In various embodiments, memristor based resistive random access memory (ReRAM), three-dimensional NAND technologies, Ferroelectric RAM, magnetoresistive RAM (MRAM), or any of various types of phase change memory (PCM) may be used at least for the non-volatile portion of system memory. In the illustrated embodiment, program instructions and data implementing one or more desired functions, such as those methods, techniques, and data described above, are shown stored within system memory  820  as code  825  and data  826 . 
     In some embodiments, I/O interface  830  may be configured to coordinate I/O traffic between processor  810 , system memory  820 , and any peripheral devices in the device, including network interface  840  or other peripheral interfaces such as various types of persistent and/or volatile storage devices. In some embodiments, I/O interface  830  may perform any necessary protocol, timing or other data transformations to convert data signals from one component (e.g., system memory  820 ) into a format suitable for use by another component (e.g., processor  810 ). In some embodiments, I/O interface  830  may include support for devices attached through various types of peripheral buses, such as a variant of the Peripheral Component Interconnect (PCI) bus standard or the Universal Serial Bus (USB) standard, for example. In some embodiments, the function of I/O interface  830  may be split into two or more separate components, such as a north bridge and a south bridge, for example. Also, in some embodiments some or all of the functionality of I/O interface  830 , such as an interface to system memory  820 , may be incorporated directly into processor  810 . 
     Network interface  840  may be configured to allow data to be exchanged between computing device  800  and other devices  860  attached to a network or networks  850 , such as other computer systems or devices. In various embodiments, network interface  840  may support communication via any suitable wired or wireless general data networks, such as types of Ethernet network, for example. Additionally, network interface  840  may support communication via telecommunications/telephony networks such as analog voice networks or digital fiber communications networks, via storage area networks such as Fibre Channel SANs, or via any other suitable type of network and/or protocol. 
     In some embodiments, system memory  820  may represent one embodiment of a computer-accessible medium configured to store at least a subset of program instructions and data used for implementing the methods and apparatus discussed in the context of  FIG.  1    through  FIG.  7 C . However, in other embodiments, program instructions and/or data may be received, sent or stored upon different types of computer-accessible media. Generally speaking, a computer-accessible medium may include non-transitory storage media or memory media such as magnetic or optical media, e.g., disk or DVD/CD coupled to computing device  800  via I/O interface  830 . A non-transitory computer-accessible storage medium may also include any volatile or non-volatile media such as RAM (e.g. SDRAM, DDR SDRAM, RDRAM, SRAM, etc.), ROM, etc., that may be included in some embodiments of computing device  800  as system memory  820  or another type of memory. In some embodiments, a plurality of non-transitory computer-readable storage media may collectively store program instructions that when executed on or across one or more processors implement at least a subset of the methods and techniques described above. A computer-accessible medium may further include transmission media or signals such as electrical, electromagnetic, or digital signals, conveyed via a communication medium such as a network and/or a wireless link, such as may be implemented via network interface  840 . Portions or all of multiple computing devices such as that illustrated in  FIG.  8    may be used to implement the described functionality in various embodiments; for example, software components running on a variety of different devices and servers may collaborate to provide the functionality. In some embodiments, portions of the described functionality may be implemented using storage devices, network devices, or special-purpose computer systems, in addition to or instead of being implemented using general-purpose computer systems. The term “computing device”, as used herein, refers to at least all these types of devices, and is not limited to these types of devices. 
     CONCLUSION 
     Various embodiments may further include receiving, sending or storing instructions and/or data implemented in accordance with the foregoing description upon a computer-accessible medium. Generally speaking, a computer-accessible medium may include storage media or memory media such as magnetic or optical media, e.g., disk or DVD/CD-ROM, volatile or non-volatile media such as RAM (e.g. SDRAM, DDR, RDRAM, SRAM, etc.), ROM, etc., as well as transmission media or signals such as electrical, electromagnetic, or digital signals, conveyed via a communication medium such as network and/or a wireless link. 
     The various methods as illustrated in the Figures and described herein represent exemplary embodiments of methods. The methods may be implemented in software, hardware, or a combination thereof. The order of method may be changed, and various elements may be added, reordered, combined, omitted, modified, etc. 
     Various modifications and changes may be made as would be obvious to a person skilled in the art having the benefit of this disclosure. It is intended to embrace all such modifications and changes and, accordingly, the above description to be regarded in an illustrative rather than a restrictive sense.