Theory of quasi-exact fault-tolerant quantum computing and valence-bond-solid codes

In this work, we develop the theory of quasi-exact fault-tolerant quantum (QEQ) computation, which uses qubits encoded into quasi-exact quantum error-correction codes ("quasi codes"). By definition, a quasi code is a parametric approximate code that can become exact by tuning its parameters. The model of QEQ computation lies in between the two well-known ones: the usual noisy quantum computation without error correction and the usual fault-tolerant quantum computation, but closer to the later. Many notions of exact quantum codes need to be adjusted for the quasi setting. Here we develop quasi error-correction theory using quantum instrument, the notions of quasi universality, quasi code distances, and quasi thresholds, etc. We find a wide class of quasi codes which are called valence-bond-solid codes, and we use them as concrete examples to demonstrate QEQ computation.


I. INTRODUCTION
A universal quantum computer can realize arbitrary unitary evolution on a finite-dimensional quantum system and is expected to be more powerful than classical ones.The universality requires that any unitary operator in the unitary group can be realized efficiently to arbitrary accuracy.The requirement on accuracy is actually a strong one since qubits carried by physical systems are inevitably affected by noises.This is usually achieved with quantum error-correction (QEC) codes leading to the fault-tolerant quantum (FTQ) computation [1][2][3][4][5][6].
Finding good QEC codes is important and many progresses have been made recently.For QEC, the detected errors are required to be fully or exactly corrected.The generalization of QEC by allowing approximation has been considered long time ago.It was observed that [7] approximation can be considered as a quantum resource due to non-orthogonality of quantum states.Some approximate QEC (AQEC) codes were studied in many settings decades ago [7][8][9][10], and recently AQEC is attracting wide attentions partly due to the connection with holography and quantum gravity [11][12][13][14][15][16][17][18].It is thus a question whether in general AQEC codes can be used for FTQ computation.It appears that this is not the case since errors are not guaranteed to be corrected completely hence may accumulate quickly.
In this work, we study the framework of quasi-exact quantum (QEQ) computation introduced recently [19], which allows accurate computation with some kind of AQEC codes.The two primary notions are quasi-exact QEC codes and quasi-exact universality.We will call the former as quasi codes, and later as quasi universality, for simplicity.In essence, a quasi code is a strengthened AQEC code in that it is parameterized by some scaling parameters the tuning of which can drive it to several exact codes.That is, in the scaling-parameter space a quasi code has a sort of 'phase diagram' with several exact codes as its fixed points and the rest as approximate regions.It is clear that a quasi code shall work near fixed points for QEQ computation.Meanwhile, the quasi universality is a slight weakening of the usual universality by making a tunable and controllable 'cut-off' on the accuracy of gates.The cutoff effectively induces a coarsegraining structure on the unitary group by identifying the neighborhood of a gate as the gate itself.The total number of distinct gates is finite but tunable to approach the usual universality.In particular, infinitesimal logical gates (measured by some accuracy) are not required in QEQ computation.The length of a QEQ computation cannot be arbitrarily long, while its accuracy can be well assessed due to error correction.Compared with the usual noisy quantum (NQ) computation and FTQ computation, the model of QEQ computation lies in between while closer to the later, see Fig. 1.
Furthermore, we study more aspects of QEQ computation in details, including quasi code distance, the classification of quasi codes, quasi thresholds, transversality, etc.According to the convergence efficiency to exact codes with respect to scaling parameters, we define two types of quasi distances, strong and weak ones, and four types of quasi codes.Note that more types are possible depending on finer criteria.The threshold theorem has to be modified for quasi codes since the desired logical error rate cannot be made arbitrarily small.Instead, we propose to use a pair of thresholds, the physical and logical ones which both depend on scaling parameters, to specify the fault-tolerance of QEQ computation.
We see that one of the central feature of quasi codes and QEQ computation is the tunability.This requires the existence of tunable or controllable parameters, which actually fitS into usual physical settings that some parameters are sort of controllable, such as temperature, particle number, chemical potential, etc.The tunability is a resource so that a user can design the performance of a QEQ computation in terms of the accuracy, threshold, and code distance.The idea of using tunable parameters is common in many tasks such as machine learning, quantum control, etc.This intuition also applies to the other two models but for QEQ computation the tunability is achieved by changing some classical scaling parameters.
It is important to find quasi codes to demonstrate QEQ computation.A natural setting, but not limited to, is the topological phases of matter [20,21].A notable class is based on valence-bond solids (VBS) [22], which is a wide class of models in quantum magnetism and manybody physics.There are various ways to encode qubits either using bulk ground states, excitations, defects, or edge modes, and the logical gates they support are not the same.Here we define three types: the bulk, edge, and holographic codes, and compare them through concrete examples.The VBS codes are quasi-exact due to non-vanishing (usually exponentially decaying) correlation functions, and weak due to the symmetry-protected topological (SPT) order [23][24][25][26][27][28][29][30].Also they are nonstabilizer codes but very similar with stabilizer codes due to being local and frustration-free.The edge code behaves similarly with holographic code, while the bulk code can support some topological logical gates from the SPT order [29,30].Although the exact distance might be a small constant due to the short-range entanglement of ground states [16,31], the quasi distance could be larger.With a proper local error model, we also estimate the quasi-thresholds, which depend on the weak code distances and they are essentially the same for the three types of VBS codes.
Due to the global symmetry, the holographic SU(d) VBS codes are transversal and quasi universal for SU(d), which are a class of covariant codes.It is recently shown that [17,18,[32][33][34] covariant codes cannot achieve transversal and universal computation efficiently since arbitrary accuracy will lead to an exponential growth of system size.This inefficiency originates from the uncertainty relation, which manifests as the fundamental limitation on the accuracy of estimating an arbitrary unitary operator in quantum metrology [32][33][34].Indeed, the usual approach for estimating a gate U employs many copies of it, which can be viewed as a transversal computation.For QEQ computation, the cutoff on accuracy will avoid the blow-up and turn covariant codes into a moderate class of quasi codes [19].We demonstrate that VBS codes provide a class of covariant codes with novel locality structures.
This work contains the following parts.In section II, we review the standard theory of QEC based on channels, and then we generalize it using instruments, and we define local QEC instruments in particular for codes with locality structures.We introduce quasi codes in section III.After a review of AQEC, we introduce quasi QEC as a strengthened version of AQEC and discuss some examples.We study various aspects of QEQ computation in section IV.In section V we study VBS codes and compare three types of them.We conclude in section VI with comments on some issues and open problems.For the Appendix, in section A, we review completely positive maps, channels and instruments, and distance measures.We also introduce two new types of channels: the subspace CPTP maps and CP but approximate-TP maps, which can both be employed for QEC.In section B we explain how to generalize AQEC by approximate encoding operations, and study quasi logical gates.Some future directions are addressed in the conclusion section VI.

A. Preliminary
In this work, we consider finite-dimensional quantum systems.For a Hilbert space H, denote the space of bounded, positive semi-definite, and density operators as B(H), P(H), and D(H), respectively.Here we review the standard setting of QEC [6].Some basics of quantum channels and instruments are deferred to the Appendix A, where we also introduce some novel variations.
First, we review the setting of error detection (QED).A channel N on a code subspace C ⊂ D(H) is detectable when If p = 0, this means N causes a complete leakage out of C. If p = 1, this means N has trivial action on C. With Kraus operators {E i } for N , the QED condition is and i |e i | 2 = p.Now we consider the correction (recovery) of a channel, N , on a code subspace C. The correction is by a recovery channel R so that The condition in terms of Kraus operators {E i } for N is such that the code matrix [a ij ] := ρ * is a density operator.
The recovery channel R is found by diagonalizing the code matrix ρ * as ρ The recovery channel R is defined by the set of Kraus operators for d k = 0, and an additional The operator P R is a projector on the rotated subspace N (σ), ∀σ ∈ C. Therefore, the operator R has trivial action on the input ∀σ ∈ C.
When the set {F k } contains an operator, denoted by F 0 , which is proportional to identity, then the condition (5) also implies the error detection condition P F k P = 0.This means that F k causes a complete leakage error out of the code space P .The correction condition (5) means the error operators F k can be distinguished.Namely, we can use polar decomposition F k P = √ d k U k P , and define P k = U k P U † k as projectors on the so-called syndrome subspaces with P k P = δ k P k , and P U k U P = δ k P .The syndrome subspaces {P k } are orthogonal to the code space P itself.
Due to the orthogonality of syndromes (subspaces), the error-correction procedure can be done in two ways, see Fig. 2. For the first scheme, the procedure is done without the identification of syndromes by applying R after N directly.This leads to For the second scheme, the procedure is done with the identification of syndromes and each error F is corrected by the corresponding R .This leads to The two schemes are equivalent due to the orthogonality of syndromes.
The second scheme can be formulated using the notion of quantum instrument, which is a set of CP maps (see appendix).For QEC, we can define error or syndrome instrument N = {F k }, for F k as the superoperator form of F k , so that N is a channel.We can also define a recovery instrument R = {R k , R } so that R is a channel.Finally, we can define the combined procedure as an instrument There is an important property of the exact QEC above, usually known as 'linear Kraus-span (LKS) property': if a channel N = {E i } is correctable by R, then any other channel with each of its Kraus operators in the span of {E i } is also correctable by R.This fact can be easily verified.This LKS property simplifies QEC task especially for local QEC: instead of arbitrary channels, one only needs to consider a channel whose Kraus operators span a local space.This applies to the case of topological stabilizer codes [35,36].

B. QEC and QED as instruments
In the above, the recovery channel is found provided the diagonalization of ρ * .This can be easily done if ρ * is a small matrix; however, this will be difficult if the dimension of it is large except cases when ρ * are of particular types.Also each recovery R k might be difficult to realize compared with the set {E i }.
Here, in terms of quantum instrument, we show that the problem of diagonalization can be avoided if there are additional algebraic structures in a code.The notion of QEC instrument applies to the VBS codes studied later in this paper.For quantum codes supported by large physical systems, e.g., topological codes, there are additional structures such as locality.For instance, for topological stabilizer codes [36] there are usually local commuting stabilizers that can be measured instead of {P k } to identify syndromes.The locality of stabilizers is usually constant compared with the system size, which is the size of the code block.The errors that are being corrected are also local.
Below we present QEC (and QED) in terms of quantum instrument.This can be either viewed as a restriction of standard QEC when the syndrome is recorded explicitly, or viewed as a generalization of standard QEC from a single channel to a collection of CP maps, i.e., from correction of (Kraus) operators to correction of superoperators (CP maps).
A noise instrument N is defined as a set of noise CP maps {N x } so that the sum of them is a channel, N .It is clear to see that N is detectable iff each of them N x is detectable.This generalizes the standard QED in the sense that the usual operators are generalized to superoperators.
Similarly, we can define recovery instrument and the whole QEC process as an instrument.
Note that we do not require the set {R x } as an instrument, i.e. a CPTP map.Instead, we require the whole process Q as a sCPTP map on a code subspace C.
With the definition above, it is easy to obtain the following: x q x = 1 with q x ∈ (0, 1).
We see that the condition Q x (σ) = q x σ is the QEC condition for each CP map N x .Given N x , a recovery CP map R x can be found according to the standard QEC.Here the index x plays the role of syndrome for superoperators, namely, it signals which noise CP map N x is identified, and then which recovery R x shall be applied.The index x is a classical degree of freedom that induces distinguishability among the syndromes for the noises N x .However, such a syndrome is not required for the correction of each N x by R x .

C. Local QEC instruments
Now we apply the framework above to the setting when a locality can be defined on a code C. The index x in a quantum instrument can also refer to many different degree of freedoms, such as particle number, super-selection sectors, energy, etc.For QEC, this information shall be easy to access.For QEC on stabilizer codes, there are (semi-)local commuting stabilizers that can be measured to identity syndromes, local Pauli errors, and then the recovery maps.We define local QEC codes as follows.
Definition 2. A local QEC code C ⊂ D(H) is defined by a set of check operators S = {S i } i∈I , such that S i P = P , ∀i ∈ I, for P as the code projector.In particular, when H = ⊗ N n=1 H n , the S i are semi-local check operators such that the weight of each of them is o(1) compared with the system size N .
We say P is nonlocal, the check operators S are semilocal, and the errors in QEC are local.The check operators are often simply referred to being 'local', and may not commute with each other.Although the definition of local codes does not require check operators acting on neighboring sites, in this work we will implicitly assume a notion of geometrical locality.This definition applies to many-body quantum systems defined by local frustration-free Hamiltonians, also it is a special formulation of low-density parity-check codes.In this setting, a local code can be defined as the low-energy sector of a local Hamiltonian H = n H n with local terms H n , which usually act on a constant number of neighboring sites and do not commute with each other in general.In particular, it applies to the VBS codes we study.
A local QEC instrument is defined as a QEC instrument when the index x refers to locality.The most important and primary case is when x refers to local sites.Then the noise we consider is on-site.Each noise map N x acts on a local site.However, each recovery map R x may be semi-local since check operators are semi-local, although they are labelled by x.We shall also keep in mind that in principle x may also refer to semi-local sites or other types of locality.
With respect to local QEC instruments, the code distance is defined as d c = 2t + 1 if t independent errors can be corrected.Let ρ (n) n denote n-site reduced density operators for any n sites denoted by n.A code of distance all the same independent of the codewords.That is to say, the logical information cannot be revealed based on ρ does not have to be a completely mixed state.
With locality, the correction of high-weight errors is reduced to the correction of low-weight errors.Noises of the form ⊗ t n=1 N n with n as site label, or mixtures of them j p j ⊗ t n=1 N n,j , can be corrected by the correction of each local noise N n,j if distance is d.However, channels of more general forms are not guaranteed to be correctable by local QEC instruments.
Given check operators, syndrome plays more practical roles in QEC than the actual underlying physical errors: the syndrome identifies the most likely errors that are detected, which may differ from the actual physical errors.The actual errors may be nonlocal; however, with local syndromes and (semi-)local recovery, the code can be recovered (semi-)locally.This can be understood from the LKS property of QEC mentioned above.In all, we see that our reformulation of QEC in terms of quantum instrument fits in the setting of local QEC very well.

III. QUASI CODES
A. Approximate QEC Here we review the standard setting of approximate QEC (AQEC).A channel N on a code P with an encoding isometry V is -detectable if d(V † PN V, 1) ≤ , for d as a certain distance measure mentioned in section A 2. A channel N on a code P is -correctable if there exists a recovery channel R such that d(V † RN V, 1) ≤ .The recovery channel R which achieves the smallest is not easy to find, and a convex optimization is needed in general [10,37].
As an extension of (4), there exists a ij and B ij ∈ B(H) so that Furthermore, P B ij P can be chosen to represent the traceless part of P E † i E j P , so that a ii ≥ 0 and i a ii = 1, a ij = a * ji , i.e., the matrix [a ij ] := ρ * is a density operator.According to [37], a channel N on a code P is -correctable iff d(D + B, D) ≤ , with D(ρ) := ρ t * , B(ρ) := ij tr(ρB ij )|j i|, ρ ∈ C, for d as a proper distance measure, {|i } as states of an 'environment'.
The above can be understood using the notion of complementary channel.For a channel N (ρ) = i K i ρK † i , its complementary channel is If ρ contains the encoded information, then N (ρ) represents the state of an environment which may contain some information from ρ.For states in a code space P , ρ = P ρP .For a correctable channel it holds , which is the transpose of the code matrix.That is to say, ρ * is the state of the environment and it is independent of the encoded input state ρ.A correctable channel N is a replacement channel.
For AQEC, it becomes Then the condition says that if the distance between N and N 0 is upper bounded by , then the distance between channels N and N 0 is also upper bounded, i.e., there exists a recovery channel R so that the distance between V † RN V and 1 is upper bounded by .
By treating quantum instrument as a set of CP maps, the AQEC of channels also applies to instrument.Namely, an AQEC instrument Q is defined so that d(V † QV, 1) However, there is no definite distance bound for each term Q k .The formalism of AQEC can be further generalized when the encoding itself is also approximate.This is deferred to Appendix B 1.
Compared with exact QEC, there are several nontrivial facts about AQEC.First, the recovery channel is no easier to find in the complementary picture than in the original picture, in general.Second, as the task of AQEC is channel-oriented, the recovery scheme is not universal, i.e., it is not guaranteed to work for other channels acting on the code.The error bound for a noise channel may be different from the error bound for another channel given a fixed recovery scheme.

B. Quasi-exact QEC
Now we introduce a special type of AQEC codes, the quasi-exact AQEC codes, or simply, quasi codes.Roughly speaking, an approximate code is a quasi code if it can get arbitrarily close to an exact code in certain ways.In other words, a quasi code can be viewed as a perturbation of an exact code.The transition between an exact code and an approximate code is done by tuning of a certain parameters that are inherent to a quasi code.The motivation for introducing quasi codes is multiple.
The QEC errors of approximate codes have to be small enough in order to do accurate quantum computing.Also in practice there are usually some parameters that can be controlled and tuned so that the performance of a code can be improved.We define quasi codes as follows.
Definition 3 (Quasi codes (broad)).A quasi code C( λ) is a family of ( λ)-correctable approximate codes with a recovery scheme R( λ), such that each code is defined with fixed values of λ, which is a vector of a finite number of real scaling parameters, and ( λ) → 0 at some points in the parameter space of λ.We assume that is a smooth function of λ.
A quasi code can be labeled as C( λ), or by a tuple while λ may not exist for general approximate codes.The parameters λ are assumed to be real and named as scaling parameters, since this may been seen as an analog (but not the same) of critical theory of phase transition in the sense that a critical point can be reached by tuning of some scaling parameters, such as interaction strength, temperature, etc.Indeed, in the parameter space of λ we can treat exact codes as critical points, and other noncritical regions as for approximate codes, while a quasi code serves as a general reference to the whole 'phase diagram.'However, we will use 'quasi code' to refer to the vicinity of exact codes, since these are the regions that are useful for accurate quantum computing.We assume there are a finite number of scaling parameters.We say a quasi-to-exact (QTE) limit is a limit by tuning some parameters of λ so that ( λ) → 0 is achieved.The number of limits is arbitrary.There are diverse choices of λ defining different quasi codes.These parameters could be the system size, local dimension, temperature, density of states, chemical potential, energy, particle number, etc that are shall be easy to access and controllable in practice.Also numerical optimization might be involved to find suitable values of scaling parameters for general quasi codes.The encoding operation V may be an exact or approximate isometry (see section B 1).We say an eapproximate isometry is a quasi isometry if e is a function of λ and e → 0 in some limits of λ.The encoding inaccuracy e will add to the total correction error.Here we assume the error ( λ) already account for it if the encoding is approximate.
The noise model N and recovery scheme R also depend on λ.The dependence of N on λ shall be 'minimal': it shall be almost irrelevant to λ so that a quasi code distance d c ( λ) can be well-defined.For instance, N can be 1-local errors and its locality shall be fixed, irrelevant to λ.The noise model shall remain to be nontrivial when the quasi code approaches to be exact.On the contrary, the recovery scheme R may depend on λ significantly.For exact codes, the logical states are exactly recovered, while for general approximate codes there may not be scaling parameters in order to approach exact codes.
For each value of λ, an optimization is needed to find an optimal recovery R( λ).The operation R( λ)N ( λ) forms the QEC procedure for channels, while can also be extended to instruments.
Finding quasi codes could be difficult due to the optimization tasks that are involved.However, this could be made easier if we modify the definition of quasi codes by using a fixed recovery scheme.After all, we expect to use codes that are perturbations of exact codes, for which the recovery scheme is well established (see section II).
Definition 4 (Quasi codes (restricted) [19]).A quasi code C( λ) is a family of ( λ)-correctable approximate codes with the recovery scheme for exact codes, such that each code is defined with fixed values of λ, which is a vector of a finite number of real scaling parameters, and ( λ) → 0 at some points in the parameter space of λ.We assume that is a smooth function of λ.
Our definitions above also apply to QED and extend to the setting of instrument.This restricted definition is justified by treating a quasi code as a slight perturbation of an exact code, which is natural from a physical point of view.See Fig. 3 for an illustration of quasi codes.An exact code carried by a physical system may not be actually exact due to practical inaccuracy and noises.On the other hand, by extending exact codes to quasi codes there are new space and opportunity to construct new class of codes.
Furthermore, there exists an explicit formula of the recovery error using trace distance on Choi states (see appendix A).With exact encoding, we find which is a function of d k and β kl := tr( B † kl Bkl ), and also the cardinality of the set {k}, i.e., the size of the 'environment', d E .For local codes, the dimension d E is a polynomial of the system size N and local site dimension q for some positive constants c 1 , c 2 .In order for it being quasi exact, D t has to converge to zero for some values of λ.That is to say, d k and β kl shall depend on λ and show universal decay behaviors with some scaling parameters [19].With quasi encoding, we find for Bkl := 1 Bkl 1 with 1 := V † V = 1 + ∆ due to quasi encoding.Note we ignore terms with ∆ 2 and its higher orders.The 1 affects the recovery operations, which depend on the quasi projector P , hence enters the trace distance.The distance above will add to the encoding error.In order for a quasi code with quasi encoding becomes an exact code, the encoding itself at least has to converge to be exact.
Other equivalent distance measures can also be used which may not have explicit forms.However, what we observe is that the distance is a measure of the average size of these operators Bkl , instead of each individual ones.This means that each error-correction round is for the noise channel (or instrument), which is a collection of Kraus operators (or CP maps), instead of individual Kraus operators (or CP maps).For instance, for the correction of local noises on a code supported by a manybody quantum system, an error-correction round is a statistical average of the correction of local noises at various locations.
The recovery scheme that works for exact codes may not work well for approximate codes in general, leading to an optimization problem, while it is only slightly disturbed for quasi codes.From section II, we see that the operator R is a projector on the rotated space N C, and the operator R = √ 1 − R never needs to be implemented.For quasi codes, R is no longer a projector but close to it, i.e., R is a quasi projector.The QEC instrument V † QV acting on H L is not TP but aCPTP (see appendix A 4), with perturbation terms tr(σ∆) and tr( B † kl Bkl ).When a QTE limit is taken, these terms will vanish, making the QEC process as an identity channel acting on H L , i.e., a sCPTP channel acting on H.
The definition of quasi codes in this work is not channel-oriented, i.e., a quasi code is not designed for a special error model (e.g., depolarizing channel or amplitude-damping channel).Instead, it is more of the spirit of exact codes which possess the LKS property (from Sec.II A).The correction of a noise channel N on a quasi code shall also apply to other noises that are in the span of it, which is the LKS property that holds for exact codes but not for approximate codes in general.Actually, this is also partly a motivation for the introduction of quasi codes, as mentioned in section III A. For quasi codes, what is more crucial for the recovery error is not its value, instead it is the scaling behaviors with respect to λ.Given {E i } for the channel N , hence the set of β kl and d k as functions of λ, any other channel with each Kraus operator in the span of {E i } will lead to the new set of β kl and d k , which are functions of λ.Therefore, the scaling behaviors of the recovery error shall be preserved against the linear-span operation, hence the LKS property holds for quasi codes.

C. Examples
The notion of quasi codes apply to some well-known approximate codes in literature.Actually, many approximate codes are quasi codes.We introduce the term 'quasi codes' to highlight the strong requirement of universality for accurate quantum computing, and the role of scaling parameters, which are common in physics.Here we mention briefly two notable classes: the gapped quantum phases of matter [20,21], in particular, anyons [38], and continuous-variable systems such as the cat codes (and its generalizations) [39][40][41].
The ground subspaces of gapped quantum phases of matter are natural to encode qubits, and generically the codes are quasi-exact.A gapped phase is often defined by a family of Hamiltonians H( λ) in the thermodynamic limit, with some universal features common in the phase, for parameters λ that could be interaction strength, external field, etc.The exact forms of ground states |G( λ) are in general not analytic, while there are often exactly solvable points for certain λ 0 .The codewords |G( λ 0 ) on their own might form an exact or quasi-exact code depending on the error model, while using |G( λ) will lead to further approximations of |G( λ 0 ) .A finite system size is also a source of approximation.Quantitative study of the quasi QEC features can be carried out using matrix-product states [42,43], quantum field theory, or the geometric method based on joint numerical range (JNR) [44][45][46][47].
The braiding of non-Abelian anyons, as excitations of gapped topological systems, can enable universal quantum computing.There are in general exponentially decaying correlations among anyons, which makes the code quasi-exact.Indeed, anyons have to be far away from each other compared with the correlation length.For instance, a qubit can be encoded by 1D Majorana wire [48] with Majorana zero modes (MZM) at each end.Two MZM form a fermion, for which a basis is formed by the occupied |1 and unoccupied |0 states.The states have overlap e −N/ξ which vanishes when the separation between the modes N → ∞, given a finite correlation length ξ.
Codes with continuous variables (or oscillators) often involve parameters, such as squeezing, photon number, etc that can be controlled externally, hence serving as natural systems for quasi codes.The class of cat codes usually employs coherent states of photons, or bosons in general, and their superposition for the encoding.For instance, a logical qubit can be encoded as The errors that are natural for cat codes include loss or gain by a certain orders of â or â † , and dephasing errors of the form e iθn .The violation of the condition ( 4) is typically by a term of order O(α c1 e −c2α c 3 ), with constants c 1 , c 2 , c 3 [41].

IV. QEQ COMPUTATION A. Universality
Now we study computation with quasi codes.Here we review the definition of universality briefly [49][50][51][52][53][54], although there appears to be notions that differ slightly; e.g., some definitions may rely on ancilla and some not.We employ the most simplest and common definition here.
Definition 5 (Universality).A computation on n qubits, for any integer n, is universal if any unitary gate U ∈ SU(2 n ) can be efficiently simulated to arbitrary accuracy.
The first thing to notice is that the group SU(2 n ), or SU(d) for any integer d, is uncountably infinite.Some unitary matrices may contain numbers that are not efficiently computable, hence shall be replaced by computable ones [50].The group SU(2 n ) shall be replaced by such a modified or punctured version.For simplicity, we still refer to the group SU(2 n ) for the definition of universality.
The efficiency refers to the scaling of the overhead (cost) as a function of the problem size.However, there is no unique measure of 'problem size'.A usual choice is to use the amount of bits that represent the input.The cost is measured by space and time, e.g., circuit size or depth.The accuracy is measured by operator-norm distance or its equivalences.If an accuracy parameter is given as an input for an algorithm, then an efficient simulation cost shall scales as polylog 1 .The log is there because decimal numbers are represented as binary numbers, i.e., strings of bits.A universal quantum computer can run algorithms that have arbitrary accuracy given as input, such computations are terms as "algorithmic" (in the setting of quantum simulation) [55,56], compared with others such as analog simulators or emulators.An NQ computation or NISQ device is normally non-algorithmic since the computation accuracy is either not given as input or not assessable.
A gate set S is called universal if any U ∈ SU(2 n ) can be efficiently simulated to arbitrary accuracy by a finite product of gates from S. There are a few well-known gate set: {H, T, CZ}, {H, CCZ}, and {H, CS}, for H as Hadamard gate, T as Z 1/4 gate, CZ as controlled-Z gate, CCZ as controlled-CZ gate, and CS as controlled-S gate, for S = T 2 as the phase gate.A finite universal gate set generates a dense subset of SU(2 n ), with the group itself as the closure of it.
The Solovay-Kitaev theorem and algorithm [6,57] prove that there exists a classical algorithm based on balanced group commutator with runtime t ∈ O(log ct 1 ) that designs a quantum circuit with size s ∈ O(log cs 1 ), for some known numbers c t , c s ∈ (1, 4).The lower bound for the circuit cost is Ω(log 1 ), which can be achieved with methods that reduces the problem to the compiling of Z-rotations [58,59].In the above, the accuracy parameter only results from gate compiling, hence referred to as the compiling error.Correspondingly, the cost is the compiling cost.It assumes that each gate can be exactly performed, and the identity gate 1 is exact.
In practice, there are various sources of decoherence leading to noisy memory and gates.In the setting of FTQ computation, noises are corrected based on QEC so that arbitrarily long computation can be done provided the noise strength is below a threshold, which is essentially the content of the threshold theorem [6].We refer to the cost for encoding qubits as the coding cost, and accuracy parameter as the coding error if the error-correction is not exact.
Without powerful QEC, arbitrarily long computation can not be done.Fortunately, there is no need to always pursue arbitrarily long computation in practice.Primary criteria has been the standard for implementations [52], and there are also requirements for reliable quantum simulators [49,60,61], and in general, the NISQ devices [62].These devices or computers carry out NQ computation and do not require explicit error corrections, hence cannot achieve arbitrary accuracy or arbitrarily long computation, but still useful to run some algorithms or demonstrate quantum features.

B. Quasi-exact universality
Here we analyze the concept of quasi universality introduced in Ref. [19] in more details.The computation with quasi codes shall fit in between NQ computation and FTQ computation, since the error correction of quasi codes cannot be exactly done.Uncorrectable noises will accumulate and induce nontrivial logical errors as the size of computation grows.Furthermore, we require that the usual (exact) universality can be approached from quasi universality by tuning some controllable parameters.
We introduce quasi universality in the following way.First, we employ a 'coarse-graining' scheme to convert the group SU(2 n ) into a set.Namely, a gate U ∈ SU(2 n ) and its neighbors within a distance η to it is treated the same as it logically, forming a 'gate cell', and the group SU(2 n ) can be partitioned into a finite collection of gate cells.The cells shall not overlap with each other, and the partition is not unique but can always be chosen and kept fixed.This partition is similar with the 'net' construction in the proof of Solovay-Kitaev theorem [6], e.g., the lookup table, but here the sizes of cells depend on η and may be different from each other.
It could be difficult to construct the gate-cell structure for the group SU(2 n ) as a whole, so we can reduce the task to the smaller group SU(2) and their couplings.This can be understood for the case with the gate set {CZ, R}, and R represents the set of single-qubit gates.Any gate U ∈ SU(2 n ) can be decomposed into a product of CZ and qubit gates.Any qubit gate can be written as U (θ, n) = e iθ n• σ , ignoring global phases.From U (θ, n) = U (θ − π, n), the set of qubit gates can be rep- resented as a radius-π 2 ball.A gate-cell structure can be defined from a tessellation of the ball, e.g., the cubic lattice.Given the inaccuracy η, the side length of each small cube is η/ √ 3.Such a partition is uniform as all gate-cells have the same size.
The simplest case probably is for rotations and we only need to partition the circle [0, 2π] into a set of segments, see Fig. 4. It is natural to assume that all segments have the same size, η( λ).A quasi code which is quasi universal for U(1) rotations is first required to realize all segments efficiently, and then when λ is tuned, the segment size decreases and their total number increases, approaching the group U(1).The cost for covering all segments is the gate compiling cost, while the cost to achieve the limit U(1) η( λ) → U(1) is the coding cost.When using a discrete gate set, e.g., {H, T }, any gate U ∈ SU(2) needs to be decomposed in terms of them.Each of CZ, H, and T may have its own inaccuracy η CZ , η H , and η T .A qubit gate, as a product of H and T , and also 1, will have larger gate cell whose size depends on η H , η T , and η 1 .Such a partition will be non-uniform.As the result, the whole group SU(2 n ) is reduced to a finite set of gate cells of various sizes, each as a distinct logical gate.
The gate-cell construction above applies both to the NQ computation and QEQ computation.The cell size can be viewed as the gate infidelity, or other equivalent distance measures, which are commonly used in experiments and can also be improved based on experimental technique.For QEQ computation, the gate cell size is also tunable in order for it being exact.For simplicity, we denote the gate-cell size parameter by a single η, which is a function of λ.Compared with compiling error, here η serves as the coding error.Denote the logical gate set as SU(d) η( λ) .
Definition 6 (Quasi universality [19]).A computation on a quasi code C( λ) with accuracy η( λ) is quasi universal for a unitary group SU(d) if the coarse-grained set SU(d) η( λ) can be realized efficiently, and the group SU(d) can be approached when η( λ) → 0 in a certain QTE limit.
Here the efficiency refers to the scaling of the cost with respect to parameters of SU(d) η( λ) , such as d.Given a quasi code C( λ) and a QEC instrument on it, the QEQ computation cannot achieve arbitrary accuracy.It has been estimated that [19] the accuracy parameter is lower bounded by mη, for m as the size of the computation, and η as the smallest cell size.As a result, QEQ computation cannot perform algorithmic computation or simulation [55,56], for which the accuracy is the input of an algorithm; however, the accuracy can be estimated and improved based on the quasi code being used.In other words, a quasi code induces a tunable and controllable 'cut-off' on accuracy, and QEQ computation is weaker than FTQ computation which allows arbitrary accuracy, but stronger than NQ computation for which the accuracy may not be accessible.In this sense, the QEQ computation is "quasi algorithmic."We refer to a QEQ computation with the smallest gate-cell size η as "η-QEQ computation."Furthermore, the scaling parameters λ are given as resources, and the coding cost relating to the tuning of scaling parameters λ will be counted separately from other cost independent of λ, such as the compiling cost in terms of space and time for classical or quantum circuits.

C. Classification and classical simulation
Here we provide a brief classification of quasi codes and QEQ computation.The method is based on local states, or equivalently, the AQEC condition.Recall that ρ (n) n denote an n-site reduced density operators.We find there are two distinct types, which we term as weak and strong quasi codes: 1. Strong quasi codes: Each ρ (n) n converges to the same state independent of the codewords in a QTE limit.

Weak quasi codes: Only the statistical average
converges to the same state for each n independent of the codewords in a QTE limit.Here the average is over locations with the number of sites n kept fixed, and p n denotes probability, which depends on the system size, N .
The inaccuracy, i.e., recovery error, of a quasi code is measured by a distance between the QEC channel Q and identity 1.As a channel, Q depends on the statistical average ρ (n) , so the weak quasi codes is a valid family of quasi codes.Therefore, we can define both weak and strong quasi code distances.
The distinction between the two types of code distance is crucial for quantum codes, while may be unnecessary for some classical codes.For instance, the repetition code encodes 0 (1) as a collection of 0 (1), and there is no sense of worst case or average case for flip errors.The weak code distance can also be used for exact quantum codes.For example, the distance of toric code is √ N for N as system size.However, only a small fraction of weight t = 1 + ( √ N − 1)/2 noises that are close enough geometrically can cause a logical error among all weight-t noises.The weak quasi code distance for the toric code is larger than √ N .If dilute noises are common than dense ones, the toric code will perform better than what the strong distance allows.This agrees with the result that toric code has a high threshold against loss errors based on percolation theory [63].This reveals that the weak code distance is a valid notion for quantum codes.
For a quasi code with a QEC instrument Q = x Q x , the inaccuracy induced by each Q x may depend on x or the system size, or both.For local codes, the index x refers to locations, n.Each inaccuracy can take various forms.For simplicity, here we emphasize four types: exponentially decay x −n or x −N , power-law decay n −α or N −α , for some parameters x and α with |x| > 1 and α > 0. It is obvious to see that the types depending on n (N ) are weak (strong) quasi codes.
These four types of quasi codes above can be realized in topological phases of matter [20,21].Topological (TOP) orders are long-range entangled, while symmetryprotected topological (SPT) orders are short-range entangled.Exponentially decaying correlation functions are common for gapped phases, while power-law decaying correlation functions are common for gapless phases.The correspondence is shown in Table I with some example systems.As a consequence, there are at least four families of QEQ computation which are quasi universal for a certain unitary group.
To see the differences of them, let us consider the convergence from quasi universality to universality.Due to the gate-cell structure, the number of distinct logical gates, N G , is not infinite; instead, it scales with the inverse of the inaccuracy.It is easy to see that it scales with N for weak quasi codes, and as x N or N α for strong quasi codes.The coding cost, when measured by the system size N , scales as log 1 for (x −N )-type strong quasi codes, while 1 for weak quasi codes and (N −α )type strong quasi codes.As the order of the permutation group S m on m bits is m!, it is therefore necessary to have at least m! invertible functions, hence unitary gates on m qubits, if each bit is substituted by a qubit.The factorial m! grows comparably or even faster than 2 m asymptotically.As a result, we conclude that the (x −N )-

Strong
Weak Exponential gapped TOP order gapped SPT order Power-law gapless TOP order gapless SPT order Table I.Four families of quasi codes realized in topological phases of matter.Some examples are fractional quantum Hall liquids and quantum spin liquids with gapped TOP order [20], various VBS models with gapped SPT order [23,25,26], some quantum dimer model [64] and defect model [65] with gapless TOP order, and both bosonic and fermionic models with gapless SPT order [66,67].
type strong quasi codes leads to an efficient convergence, in terms of coding cost, from quasi universality to universality.We shall note that the gapped TOP orders is only one notable examples of (x −N )-type strong quasi codes, and it is expected that other kinds of phases of matter or other quantum systems may also be in this family.
The convergence from quasi universality to universality is irrelevant with classical simulatability of QEQ computation.Suppose a η-QEQ computation is quasi universal for SU(2 n ), can this be efficiently simulated on a classical computer?A circuit performing QEQ computation may be small, especially for weak quasi codes, which means the circuit depth may be small.However, due to the quasi universality, a unitary circuit U can drive the usual starting state |00 • • • 0 across the whole Hilbert space of n qubits, although it cannot reach every point.This means that the intermediate states could contain extensive amount of entanglement.In terms of matrix-product states [42], this is to say that the bond dimension could grow exponentially with n, hence the circuit cannot be efficiently simulated classically.Therefore, quasi universal quantum computers shall be more powerful than classical computers, in general.

D. Thresholds
The threshold theorem states that if the physical error rate, p , given a proper error model and measure of errors, is below a threshold value, * p , the logical error rate, l , can be reduced to be arbitrarily small so that arbitrarily long FTQ computation can be done [6].The fault-tolerance is achieved based on QEC.The threshold value * p may depend on the codes and decoding algorithms.
With quasi codes, the threshold theorem has to be modified since QEQ computation cannot be arbitrarily long or accurate.Definition 7 (Quasi thresholds).If the physical error rate, p , given a proper error model and measure of errors, is below a quasithreshold value, * p , the logical error rate, l , can be reduced below * l so that * l -QEQ computation can be performed, and * l can approach zero in QTE limits.
A quasithreshold theorem is readily proved by observing that it is a weaker version of the usual (exact) threshold theorem.The quasithreshold contains a pair of parameters ( * p , * l ) instead of just one.The quasithreshold values * p and * l may depend on the quasi codes, in particular, the scaling parameters λ, and decoding algorithms.
It might be the case for some quasi codes that * p approaches to zero in QTE limits.To allow a non-zero * p , the quasi code distance d c of a quasi code shall get larger when the dimension of H increases, e.g., under concatenation, for H as the Hilbert space of the physical system.Therefore, the quasi code distance d c of a quasi code needs to be defined properly.For block codes, the exact code distance d c = 2t + 1 is defined when a code can exactly correct up to t errors.The logical error l for exact codes is a step function of weight t.This means that a weight-(t+1) error can cause a logical error in the worst case.However, for quasi codes it is likely a monotonically increasing smooth function of it, see Fig. 5.One has to introduce a cut-off ∧ l so that a quasi code distance is Here ∧ l is nothing but the accuracy parameter in a QEQ computation.Furthermore, as there are two types of quasi codes, weak and strong ones, we can define weak and strong quasi code distances.A quasi code distance is weak (strong) if the quasi code is weak (strong).It is easy to see the weak distance refers to the average case, while the strong distance refers to the worst case of physical errors making a logical error.
The differences between FTQ and QEQ computation we discussed above are summarized in Table II, which also includes transversality that was studied previously [19] and extended to cases with quasi encoding here (see Appendix B 2).This is a justification of Fig. 1, and we shall recall that QEQ computation also shares some features with NQ computation as we discussed.
An arbitrary finite-dimensional quantum state can be written as for dition' (HBC) case.The states |r and |l live in, and the operators A in (n = 1, . . ., N ) act on a space of dimension χ, often known as the bond dimension.For translational-invariant (TI) system, we can always find site-independent A in .See Fig. 6.We consider 1D VBS with global SU(d) symmetry.The features our study reveal also apply to other types of VBS codes with different symmetries or in higher dimensions [22,[68][69][70][71].For its simplicity, we employ the model with on-site adjoint irreps defined by with two-body local terms h n := Now we study its ground states and primary excitations.In the next section we will show how to use it as quasi codes.In the VBS picture, each adjoint irrep is from a product of a fundamental irrep and its conjugate since λ d ⊗ λ d = λ d 2 −1 ⊕ λ 1 , for λ r as an irrep with di- mension r.As H n is basically a projector, the ground states can be exactly solved [29].
With PBC, the ground state is unique for d = 2, while doubly degenerate for d > 2. Denote the two ground states as |G L and |G R .The state |G L is specified by translation-invariant tensors The state |G R is defined with (A i ) * , i.e., the system breaks a parity symmetry, denoted as Z p 2 , but preserves SU(d) symmetry.The parity refers to the interchange of a fundamental irrep λ d and its conjugate λ d .The generators for λ d are {−(t a ) * }.For SU(2), the spin- 1  2 irrep is the same as its conjugate, hence the ground state is unique.For SU(d) with d > 2, additional terms that explicitly break the parity symmetry can split the degeneracy and pin one of the ground states as the unique ground state, denoted as |G .For OBC and HBC, we assume a unique bulk state is chosen, and w.l.o.g.we assume it is |G L .
Observable are computed based on transfer matrix formalism.The primary transfer matrix is which is a real hermitian matrix.The eigenvectors are |v 0 = 1 For instance, to compute energy we first notice the model is frustrationfree, but each local h n does not achieve its minimal value, which is −d for a singlet as its eigenstate, while in a ground state the nearest-neighbor two-body local state is not a singlet; instead, the ground-state energy of h n is Excitations can be well described based on the singlemode approximation (SMA).In the VBS picture, exci-tations are obtained by breaking bonds or rearranging them.Some examples are shown in Fig. 7. Below we explain some terminology.We call an excitation in the irrep λ d as 'soliton', and its conjugate as anti-soliton.When they live in between a ground state and an excited state, they are called pseudo soliton (and anti-soliton).An example of soliton is the well-known spinon which is a spin-1 2 excitation.A broken bond is a single-mode which is a pair formed by a pseudo soliton and a pseudo anti-soliton, also called an adjointor, as a generalization of 'triplon'.Solitons are confined, i.e., it takes energy to separate them apart, and the region in between them could be dimerized.A dimerized state is a product state as a sequence of no bond and double-bond.
When viewing excitations created by operators on the physical sites, the single-modes are equivalent to actions of T a n on any site n.Correlation function decays exponentially with T a n T b m = d 3 2D χ r δ ab for χ := −1/D, D := d 2 − 1, and r = |n − m| as the separation.Furthermore, a unitary operator U g ∈ SU(d) acting on a site n is equivalent to a V g ∈ SU(d) conjugating on site n due to the symmetry condition (see Fig. 6(c)).The modes appear in pair, so we term this type of excitations as 'bimode'.Similar with single-modes, the bi-modes are not exact but good approximate excited states which will be used in our error-correction study.For PBC there could be domains and domain walls which are solitons.A pair of solitons is called a 'vison' and a pair of anti-solitons is an anti-vison.A domain with zero size, i.e., only the four solitons, is a bi-mode, and a domain is created by drifting visons and flipping the bonds in between.There is no confining force between a vision and an anti-vision so that the size of a domain can change at will.

B. SU(d) VBS codes
Based on our knowledge of the model described above, we can define VBS codes.There are three types of encoding: a) The bulk code: using bulk states ground-state degeneracy (GSD); b) The edge code: using edge states; c) The holographic code: using edge-bulk map |l → |Ψ as encoding.For bulk code, the GSD of H comes from the spontaneous symmetry-breaking (SSB) of a global symmetry.For edge code, the code space comes from the edge operator B = |l r|, and the degeneracy comes from the missing term H N near the edge.For holographic code, the code space come from the 'half-edge' operator B = |l .We can think of this by fixing the other edge by coupling to an additional system at site N + 1, and adding a new local term H N to minimize the energy.
Different from stabilizer codes, the VBS model is frustration-free, i.e., each local Hamiltonian term H n takes the minimal value, while [H n , H n+1 ] = 0 ∀n.The local terms {H n } can still be viewed as stabilizers, or nullifiers in the setting of continuous-variable codes.The local evolution e −itHn with t ∈ R and their product has trivial effect on the code.The local terms {H n } can be partitioned into two sets acting on even and odd sites, H even and H odd , so that each set can be measured and the two sets are measured alternatively, which slightly generalizes the case for stabilizer codes.
Besides quasi QEC, we also study QEQ computation with the VBS codes.Logical gates are unitary operators U that commute with the model H on the code space.Namely, let P be the projection onto the code space, then Logical gates can be viewed as 'emergent symmetry' which is a symmetry of H only on the code subspace instead of H itself. Below we compare the three types of VBS codes, see Table III.We study the encoding, low-weight errors, high-weight errors, code distance, threshold, logical gates, and preparation, etc.We find that the edge and holographic codes behave similarly since they both depend on edge states and the SSB of the global SU(d) symmetry at the edge.The bulk code preserves the SU(d) symmetry while breaks the parity symmetry, so it supports different logical gates from the other two codes.Nevertheless, all three codes have similar quasi code distance and quasi threshold.The quasi threshold is defined by introducing a dependence of distance on the system size, instead of using other methods such as code concatenation.This feature is relevant to the exponentially decay correlation function in the system.Due to the SPT order, the exact code distance shall be a constant [16,31]; however, the weak quasi code distance can be larger and we will show that VBS codes are useful for QEQ computation.

Holographic and edge codes
In this section we study the holographic and edge VBS codes together since they behave similarly.A primary error model for the holographic code was introduced earlier [19], here we study the error model in more details.For the holographic code, the bulk effectively induces the encoding operation.The encoding is explicit: the original logical system is a part of the final physical system.For the edge code, the encoding is implicit: we still need an assignment between the logical states and the physical states.
Table III.Comparison of the three primary types of VBS quasi codes: the holographic code, edge code, and bulk code in terms of code space, transversal logical gates, gates being topological or global, code distance, and threshold.
We first study the holographic code.From the viewpoint of the edge, it undergoes a sequence of channels E formed by {A i }, which is a depolarizing channel.The logical state |α is distributed over the whole system.The channel E can be dilated to a unitary operator W such that W |0 = i A i |i , which is an isometry.The encoding isometry V is from the product of W . See Fig. 8.
The reduced one-body bulk state ρ (1) is not the completely mixed state 1 due to the exponentially decaying bulk-edge correlations.We label the edge as the (N +1)th site, and others from 1 to N sequentially.The edge before encoding can be viewed as the 0th site.Let σ n := E n−1 (|α α|) as the logical states of the edge, then the local state ρ which depends on σ n .Both σ n and ρ n converges to the completely mixed state exponentially as n increases.The final state of the edge can be obtained explicitly, which is n contains a bit information of the logical state |α , while the set of all local states is needed to completely reconstruct |α .
It is convenient to describe the error model using the bond space, and we will show later that it is equivalent to errors acting on physical sites.In the bond space, we can treat a local error as the breaking of a bond.Denote the bond or link (n, n ± 1) as n±.For the local Gell-Mann error set {t a n+ }, we find and also ψ α |t a n− |ψ β = χ n−1 t a αβ for codewords |ψ α and Figure 8. Schematics of a holographic VBS code.Big dots are the bulk sites, while the small dot is the edge site.A codeword is prepared by using a unitary operator W , as the dilation of the depolarizing channel E, acting on the edge site with each bulk site sequentially, with the edge state initialized at a logical state |α and each bulk site initialized at the state |0 .
Consider the depolarizing channel N n on any site n The noise N n can be detected by the local term H n .From the quasi QEC theory, we find the recovery operators This means that after the local recovery at link n, there is a noisy map Q n which makes a logical error depending on χ 2n .For the QEC instrument, we average over random errors that occur on the system, then which converges to σ in the large-N or large-d limit.Also tr(V † QV(σ)) = 1 + D N (D 2 −1) → 1 in the large-N or larged limit, which means Q is aCPTP.The trace distance on Choi state is which sets the accuracy of the code.The quasi QEC above also applies to bounded operators in the span of the local Gell-Mann error set {t a n+ } together with t 0 ≡ 1, hence it has the LKS property.Say, for V n+ = a v a t a n+ , we find The uncorrectable part decays with χ, which after average over the system agrees with the analysis above.
The local error on a single bond is single-mode and it is equivalent to the bi-mode model and is simpler.First, the action of a local operator T a , as the adjoint representation of t a , is |i , which means it is a superposition of t a n+ and t a n− acting on the bond space at site n.For bi-mode error caused by local unitary in the symmetry, the virtual action is a conjugation by a unitary U ∈ SU(d).For U = u 0 1 + a u a t a , it is clear that it is quasi detectable with correction in the order χ n .It can be detected by H n and H n−1 and quasi corrected by R n and R n−1 since U is in the Kraus-span of N n .Therefore, it is equivalent to the single-mode local error model.
We have assumed that the separation between pseudo solitons is minimal.When they are separated by a dimerized region, the syndrome can also detect them.A recovery scheme is needed which can reduce the size of dimerized region, and bring pseudo soliton pairs together, and then annihilate them.This is analogue with the minimal-weight perfect-matching algorithm that is commonly used for toric code [72].As the system is 1D, the matching of soliton pairs can be rather easily done.This will be discussed in more details below for the bulk code.
For higher-weight errors, there are further uncorrectable part from the bulk correlations and the accuracy (i.e., D t ) will get worse.Local errors are detected individually and corrected also locally.Here we provide a study when the weight t is much smaller than the system size N .For two-site correlation functions we find for n > m ≥ 0, h bac = d bac + if bac , and d bac are also structure constants of SU(d).For two unitary errors for For weight t = 2 we find the recovered logical state is σf = (1 + Dχ 2r )σ + 2d(χ 2n − χ 2m )E(σ), (26) for E as the map formed by {t a }, r as the separation between two errors at n and m.We see that there are exponentially small terms due to the bulk separation r and the separations n and m from the edge.The minus sign for χ 2m is an interference effect, which may also be constructive for higher-weight errors.
In general, there are edge terms and bulk terms in σf , which both decay exponentially with separations.For weight t, there are t edge terms and t(t+1) 2 −t bulk terms.We shall take the average when χ 2(N −t) → 0. We find the trace distance which reproduces the t = 1 case.The t 2 factor is due to the bulk effect as the number of bulk separations is O(t 2 ), and (N − t) is the effective system size when there are t errors.
We see that the accuracy of the code against weight-t error, measured by D t , is a smooth function of t (also see Fig. 5).We shall introduce a cut-off ∧ l which then defines a code distance, or vice versa.This is distinct from the case of exact codes.
We can then determine the quasi threshold.Consider local noise model as a depolarizing channel N with p ∈ [0, 1] as the physical error rate.If the distance is d c = 2t + 1, we consider the probability of up to t errors p(t) as the success rate, and 1 − p(t) := l as the logical error rate.Similar with repetition code, p(t) = and the logical threshold, which is the accuracy of the code, is 2D(N −t) .In order to ensure * l → 0, we shall choose t ∈ o( √ N ), which leads to * p → 0. This means when the code becomes exact by N → ∞, the code distance grows no faster than √ N , the threshold * p power-law decays to zero.For finite N , which is physically the case in practice, there is a finite threshold * p .From a thermodynamic point of view, the average number of errors t corresponds to the temperature, β th , with t ∼ N e −∆β th for ∆ as the gap of a VBS model.A precise estimation of their relation will depend on more details of a system.
Logical gates follow from the global symmetry of E with j u ij (g)A j = Ȗ (g)A i Ȗ (g) † (30) for U (g) = [u ij ](g) of size d 2 − 1, Ȗ (g) of size d, for g ∈ SU(d) [23,24].Now it is clear that the code is quasi universal and transversal for SU(d) with for N factors of U (g) acting on the bulk and Ȗ (g) acting on the edge, for g ∈ SU(d), and V as the encoding isometry.
The edge code behaves similarly with the holographic code.Here we highlight their differences.Due to the bulk-edge correlation, the bulk local states will depend on the edge states.The local state ρ (1) (32) If the bulk site n is close to the edge 1 or N , the correlation between bulk and edge is apparent.If n 1, we find ρ (1)  n = 1 Also we find similar form for n N .We see that ρ n is almost 1.The error model is the same with the holographic code.To perform logical gates, observe that a global symmetry ⊗ n U n acts as ( Ȗ ⊗ Ȗ † )|l, r .No entangling gates can be induced on |l, r by global symmetry operations.This means effectively one edge is enough for the computation.As a result, we can use |l as the logical states.If the system is large enough, the effect of the other edge |r can be omitted, and this is essentially the same as the holographic code.
For the two edge codes, initialization and readout can be done by coupling the edge to external ancilla.The system shall be cooled to a low temperature comparable to the gap to suppress excitations, and active error correction can also be employed.For the holographic code, one edge λ d already is coupled to an irrep λ d to form a singlet.This is the ground state of the additional term H N +1 between the edge site N and the ancilla at site N + 1.The term H N +1 can be constructed as a projector P (λ d ) , which is a projector onto the parts except the irrep λ d , which appears in the tensor-product λ d ⊗λ d 2 −1 , similar with bulk terms.We use an ancilla λ d to couple the other edge at site 1.To initialize it, one can measure the ancilla and project it onto a state |l , which then initializes the code at logical state |ψ l depending on |l .The code distributes the information of state |l into the global state |ψ l .It is similar to initialize the edge code, wherein one need to project out the two ancillas.After computation by global symmetry operations, the logical state |f can be determined by the values f |t a |f := t a f which is That is to say, it is readout from the local values of T a n for the edge code, and also t a N +1 for the holographic code.The values of T a n may not be easy to measure precisely since some of them may be very close to zero.The final state may also be a mixed state.We find a different method by effectively changing the boundary condition as follows.Perform a projection on the other ancilla onto a state |g , which induces a boundary state |r and the final state is a MPS with boundary operator B = |f g|.We can measure the value of the local term h between the first site and the final site which is and deduce the value | g|f | 2 .Now if we can vary |g over an informationally complete set, then the logical state can be easily obtained following from state tomography.For any d, such a set is believed to exist [73], which has d 2 projectors that are not orthogonal to each other, in general.

Bulk code
In this section, we study quasi QEC of the bulk VBS code.This has been studied in Ref. [29,30], here we estimate the threshold and compare with the other two types of codes.The two ground states are not exactly orthogonal as G L |G R ∝ ( 1 d−1 ) N , which vanishes only for large d or large N .This means the encoding for bulk code |0 := |G L , |1 := |G R is quasi exact.We will omit this effect by considering the large-N limit.
Different from the edge code and holographic code, the global symmetry SU(d) is logically the identity gate.For any d > 3, the bulk code is a single logical qubit.The logical X L gate is the generator of the broken parity symmetry, which can be realized transversally as X L = Π = ⊗ n Π n for Π as a permutation, which exchanges the irrep λ d and its conjugate λ d .The preserved global symmetry induces a logical Z-rotation gate e i 2π d Z , which is a twist operator, F = ⊗ n e i 2π N Ôn , for Ô as an operator in the Cartan subalgebra of SU(d) [29].The operator F is a diagonal matrix and becomes complexconjugated after Π since The code can be viewed as a generalization of the Ising model with the anti-commutation relation The local operator Π acts like Pauli X operator, and T a acts like Pauli Z operator.The term h n is analog to the Ising interaction, except that it is augmented with the SU(d) symmetry, due to which the generators T a are equivalent with each other.It is proper to treat the bit-flip gate X L as acting on the physical site, while the phase-flip gate Z-rotation acting on the virtual bonds, i.e., the bond space.
To establish an error model, we introduce X-type errors caused by Π n flipping bond directions and Z-type errors caused by operators breaking bonds due to the SU(d) symmetry.First, we discuss X-type errors and Z-types errors separately since they arise from different mechanism, and later on we discuss Y -type errors.The scenario for X-type errors is similar with Ising model, which also has SSB of a global symmetry.The local terms h n anti-commutes with local errors while Π n ⊗ Π n+1 will create a direction-flipped bond, together with a vison-antivison pair, and [Π n ⊗Π n+1 , h n ] = 0.A single error Π n can be detected by h n and h n−1 .By measuring all h n and then counting the global parity, the locations of Π n can be deduced and then applying Π n can correct the errors.Furthermore, it is also clear that the code distance d c (X) = N , and the threshold for local Π n errors is 1 2 , the same as the repetition code.The effects of Z-type errors are similar with that for the edge codes except that there are only bulk states.
Due to the exponentially decaying bulk correlations, the local states of bulk sites can be different for different codewords, hence the code is a quasi code.Only onebody local states ρ (1) n are the completely mixed state, so local error N n breaking the bond at link n is exactly correctable with the same recovery scheme R n as for the edge codes.Note for arbitrary superposition |ψ = a|G L + b|G R , the bond dimension is 2d and the local tensors are block diagonal, with each block for a ground state.On a link n, an error acts as N n on one block, and N t n on the other block.Similar with edge codes, for higher-weight errors there are uncorrectable bulk terms which scale with their spatial separations.For t errors, there are t(t − 1)/2 bulk terms.The trace distance D t is t(t−1) 2D(N −t) , and the quasi threshold for Z-type errors will be the same with edge codes.
Using the notion of soliton, the X-type errors introduce solitons and domains, while the Z-type errors introduce pseudo solitons.Now for Y -type errors, there are both solitons and pseudo solitons, and domains.To model Y -type errors, we consider on-site discrete error set {Π i (T a ) j } for i = 0, 1, j = 0, 1, 2. The operators (T a ) 2 can be viewed as a second-order effect of T a , which is further equivalent to the set {t a } acting on the bond space.We find the error correction procedure contains two steps: 1. First, identify the domains and then use error correction to delete the wrong domains; this annihilates all solitons and corrects X-type errors; 2. Second, identify broken bonds and use error correction to annihilate all pseudo solitons; this corrects Z-type errors.
There could also be dimerized regions between pseudo solitons, and they can be easily corrected and all pseudo solitons are annihilated at the end.We note that the details of the procedure above will highly depend on practical implementations, which we do not describe here.The code distance for X-type errors is the system size N , similar with 1D Ising repetition code.As a domain wall can drifted away randomly without causing a net energy, it is not self-correcting for X-type errors.The code distance for Z-type errors, which is weak and quasi-exact, is the same as edge codes, d c (Z) ∈ o( √ N ), also for Ytype errors.As a result, the quasi threshold for Y -type errors shall be similar with Z-type errors.See Table III.In practical systems, the X-type errors and Z-type errors might be highly biased.Breaking a bond at link n will cause energy penalty for one term h n , while flipping a bond at link n will cause energy penalty for two terms h n−1 and h n+1 , so it seems it is easier for Z-type errors to occur.However, a single broken bond caused by N n will only lead to a leakage out of the code space.It requires at least two broken bonds to yield an uncorrectable logical error, which will then cause similar energy penalty with flipping a bond.Therefore, it would be desirable to develop methods to suppress Z-type errors in practice.
Finally, we note that a transversal and quasi universal scheme based on the bulk VBS code is unknown yet.

VI. DISCUSSION AND CONCLUSION
In this work we studied the framework of quasi-exact quantum (QEQ) computation, which is computation based on quasi codes.Here we discuss further on several points.
The tuple form V, N , R, λ, allows optimization schemes for finding good quasi codes.This can be done for codewords expressed as a manifold of parameterized family of matrix-product states or quantum circuits, and optimize the accuracy while keeping the error model and recovery scheme fixed.This is distinct from the optimization for usual approximate codes [37] which search for recovery channels while keeping the error model and encoding fixed.More generally, the idea of using scaling parameters agrees with the technique of optimization applied for various coding tasks [74,75], applications of JNR theory [44][45][46][47], quantum control, machine learning, etc.
The valence-bond-solid (VBS) codes are important classes of quasi codes.Different from all exact codes, we establish their code distances to be quasi-exact and of weak type.Therefore, they show some novel features that are not observed for exact codes including stabilizer codes.In particular, the SU(d) VBS edge or holographic codes are transversal and quasi universal for SU(d).However, the QEQ computation supported by quasi codes is slightly weaker than the standard fault-tolerant quantum (FTQ) computation.The continuous symmetry of VBS codes is one of the novel features on one hand, yet on the other hand, the symmetry requires delicate scheme to avoid being broken down to discrete symmetry or careful control to execute gates.
In general, the VBS codes we constructed can be extended to quantum phases of matter, if we view a VBS state as a special point of a certain SPT phase.The power of SPT phases has been explored in the setting of measurement-based quantum computation [76], which shows that if special states of a SPT phase is powerful, namely, can be used to execute a non-Abelian Lie group, then most likely all states in the same phase can also do so.As discussed in Sec.III C of examples, concrete study of how quasi QEC works across various types of gapped phases of matter shall be investigated.
We also would like to add some comments on quasi codes which could be transversal and quasi universal for SU(2 n ), for any n, and in particular, codes with discrete gate set.The codewords for such desired golden codes may support extensive entanglement so that transversal operations on it, which do not change entanglement, can be quasi universal and cannot be efficiently simulated on classical computers.The (exact or approximate) symmetry group of such a code could be extensive, e.g., may be a higher-form symmetry [77,78], so that the spectrum is rich enough to encode as many qubits as possible.It would be important to see if there are candidate models of these kinds as quasi codes.

Subspace CPTP maps
We now introduce a weaker type of channels suitable for QEC.We only consider dimension-preserving CP maps.
Denote the partition of the whole space as D(H) = C ⊕ C ⊥ .It is not hard to show that a map Φ is sCPTP on C iff its Kraus operators can be written as block-diagonal matrices simultaneously.This can be proved by writing each Kraus operators as K i = A i C i D i B i , and then the condition Φ † (P ) = P implies all C i = 0 and PΦP = ΦP implies all D i = 0. Note that A i do not have to be unitary.The matrices D i represent the leakage out of C, while C i represent the leakage into C.This basically means that there is no exchange of information between C and C ⊥ .If a map Φ is sCPTP on C, we say Φ is a logical operation on C. Note that Φ is logical on C does not in general imply Φ † is also logical.There are some interesting special cases.1) When C is the whole space, the condition above reduces to the TP condition Φ † (1) = 1.2) For any bounded operator A ∈ B(H), it is logical iff A † is logical.In block-diagonal form, the block of A acting on C is unitary.3) A unitary operator U is logical on C iff [U, P ] = 0.
The property of being sCPTP is preserved under mixing and composition.Namely, for several sCPTP maps {E i } on C, the map i p i E i with i p i = 1, p i ∈ (0, 1) is also sCPTP on C. The composition i E i is clearly also sCPTP on C.
From Stinespring dilation, a quantum channel can be realized by a unitary operator.This can be extended to sCPTP maps for input states restricted to C. Given a set of Kraus operators {K i } for a sCPTP map Φ, one can find K to make {K i , K } as a CPTP map, Φ .It is easy to see K has null effect on C. Now one can find a dilated unitary U for Φ , and attach an ancilla which will be traced out to realize Φ(σ), ∀σ ∈ C. The Kraus operators relate to U by K i = i|U |0 for {|i } (including K ) as an orthonormal basis of the ancilla.
As an application, in the setting of QEC and computation with them, the quantum operation after errorcorrection shall be a sCPTP channel on a code space and it is the trivial channel: the identity, and logical gates are sCPTP and often are from unitary operators U such that [U, P ] = 0.

CP but approximate-TP maps
Here we study CP maps that are not TP but approximately TP.We denote this type of maps as aCPTP maps.For a CP map Φ : D(H 1 ) → D(H 2 ) with Kraus operators {K i }, Φ † (1) = i K † i K i := K. Let K = 1 + ∆ with K ≥ 0, ∆ † = ∆.To measure the 'non-TPness' of Φ, we define a CP map K acting on D(H 1 ) with a single Kraus operator √ K. Then the non-TPness of Φ is that of K, which can be measured by the distance D (K † K, 1), the trace distance D t (ω K † K , ω), and the entanglement fidelity F E (ω K † K , ω).As they are equivalent, we will use the distance D .Definition 9 (aCPTP).A CP map is -TP if and both L U P and P R U are small and tend to zero when the encoding becomes exact.From P 2 = P + K, K = V ∆V † , we see that L 1 P = P R 1 = −K.For product of two gates U and V , the difference between U V P and P U V P will increase.Different from the exact case, the set of quasi gates, denoted by G e , is an open subset of G instead of a Lie group.When e → 0, G e → G.We cannot employ the argument for exact encodings directly, but we can still employ it in the following way.A gate of the form C = e iξD can be a quasi gate, quasi identity gate, or not be a gate, and only the first case is nontrivial.Suppose there exists a quasi gate of the form e iξD for a certain value of ξ and D = j α j H j .For other values of ξ, e iξD may not be a quasi gate.Let e iξD P = P e iξD P + L ξ P , ∀ξ ∈ R, and L ξ may not be a smooth function of ξ and may not be bounded.We find DP = P DP + A, A := lim ξ→0 If L ξ is differentiable for all ξ, then A = −i∂ ξ L ξ P , which is not a zero operator in general.With quasi error correction, we find the difference DP − P DP = εP 2 + P BP + A, (B9) for a certain parameter ε, operators A and B. As a result, the operator e iξD P is a nontrivial quasi gate depending on A and B. This means that gates of the form e iξD are logically different.

Figure 1 .
Figure 1.Schematics showing the relation among the three frameworks: noisy quantum (NQ), quasi-exact quantum (QEQ), and fault-tolerant quantum (FTQ) computation.The QEQC introduced in this work is closer to the FTQC.

Figure 2 .
Figure 2. Two ways to realize quantum error correction: (Left) the 'anonymous' scheme RN without the identification of syndromes, and (Right) the 'selective' scheme {R k F k } as an instrument with a classical register (upper wire).

Figure 3 .
Figure 3. Schematics of quasi codes with encoding V, noise model {N k }, recovery scheme {R k }, and the logical states approach the original ones σ → σ by tuning scaling parameters λ.For exact codes, the logical states are exactly recovered, while for general approximate codes there may not be scaling parameters in order to approach exact codes.

Figure 4 .
Figure 4.The schematic gate-cell structure for the group U (1) parameterized by a single rotation angle θ ∈ [0, 2π] with accuracy η( λ).The gate compiling cost refers to the realization of all segments, and the coding cost refers to the convergence from the digitized set to the continuum by tuning λ.

Figure 5 .
Figure 5. Schematics to show the difference between exact code distance (Left) and quasi code distance (Right).A tunable cutoff ∧ l shall be implemented to induce a proper quasi code distance dc = 2t ∧ + 1.

Figure 6 .
Figure 6.Matrix-product states.(a) A pure state |ψ ; (b) A three-leg tensor with the vertical one as the physical site; (c) The global symmetry on a tensor leaves it invariant; (d) MPS with OBC; (e) MPS with HBC; (f) MPS with PBC.

Figure 7 .
Figure 7. Ground states and three types of approximate excitations.Solid lines represent singlet (bond).Each physical site is from a fundamental irrep (filled dot) and its conjugate (empty dot) in the same column.
x (1 − p) N −x .From Chernoff bound, we can determine the quasi threshold as * p

converges exponentially to 1 .
Deep in the bulk, ρ

Figure 9 .
Figure 9.Quantum channel (Left), usually denoted as E, and quantum instrument (Right), denoted as Qx with a classical index x ∈ X.The gray wire is a classical control to record the index x.

Table II .
Comparison between FTQ and QEQ computation in terms of accuracy, algorithm, universality, code distance, threshold, transversal logical gates, and classification of quasi codes.
local subsystems with local integer dimensions d n , and B as the boundary operator, which is 1 for periodic boundary condition (PBC), |l r| for open boundary condition (OBC), and |l for the 'half-boundary con-