Identification of topological phases using classically-optimized variational quantum eigensolver

Variational quantum eigensolver (VQE) is regarded as a promising candidate of hybrid quantum-classical algorithm for the near-term quantum computers. Meanwhile, VQE is confronted with a challenge that statistical error associated with the measurement as well as systematic error could significantly hamper the optimization. To circumvent this issue, we propose classically-optimized VQE (co-VQE), where the whole process of the optimization is efficiently conducted on a classical computer. The efficacy of the method is guaranteed by the observation that quantum circuits with a constant (or logarithmic) depth are classically tractable via simulations of local subsystems. In co-VQE, we only use quantum computers to measure nonlocal quantities after the parameters are optimized. As proof-of-concepts, we present numerical experiments on quantum spin models with topological phases. After the optimization, we identify the topological phases by nonlocal order parameters as well as unsupervised machine learning on inner products between quantum states. The proposed method maximizes the advantage of using quantum computers while avoiding strenuous optimization on noisy quantum devices. Furthermore, in terms of quantum machine learning, our study shows an intriguing approach that employs quantum computers to generate data of quantum systems while using classical computers for the learning process.


I. INTRODUCTION
Over the past few years, quantum computation has garnered a lot of interest from various scientific fields because of rapid technological progress in quantum device manufacturing [1,2].To date, quantum computers with several tens of qubits have been experimentally realized [3], which leads to an expectation that a few hundreds of qubits could be implemented within the next decade.Quantum computers with that scale are named noisy intermediate-scale quantum (NISQ) devices [4] in a sense that they have a classically-intractable number of qubits, but that they are vulnerable to noise due to lack of quantum error correction.As for software development, researchers have been focused on how to utilize NISQ devices to solve problems that are hard to tackle on classical computers [5][6][7][8].They have developed various hybrid quantum-classical algorithms applicable to quantum many-body problems [9,10], combinatorial optimization [11], machine learning [12][13][14][15][16][17], and so on.
Variational quantum eigensolver (VQE) [9,10] is one of the most promising hybrid quantum-classical algorithms to solve quantum many-body problems.VQE, based on the variational principle, searches for the ground state of the target Hamiltonian with a parameterized quantum circuit used as the ansatz.In VQE, one measures energy or its parameter derivatives on a quantum computer and accordingly updates variational parameters on a classical computer.One repeats this process until the energy converges to a minimum.So far, benchmark experiments using actual quantum devices have demonstrated that with * These two authors contributed equally.appropriate ansätze, VQE could yield approximate solutions with high precision for small quantum systems, primarily, small molecules [9,[18][19][20][21][22][23][24][25].Meanwhile, they have also revealed that optimization process in VQE could be significantly affected by statistical error as well as systematic error; the former intrinsically arises from measurement on quantum circuit, whereas the latter comes from imperfect fidelity of quantum gates and read-out or decoherence of quantum states.Although various techniques of error mitigation have been proposed [6,[26][27][28][29][30][31][32][33][34][35][36], some of which have been experimentally found effective to a certain extent [20,21], it still remains an issue how to minimize adverse effect of error on computation with NISQ devices.
We propose a variant of VQE that conducts the whole process of optimization on a classical computer.We term this method classically-optimized VQE (co-VQE).By its nature, co-VQE is free of the aforementioned errors because it does not involve a quantum computer in the optimization process.It is based on an observation that shallow depth circuits are easy to simulate when we are only interested in local observables.For Hamiltonians with only local interactions, this allows us to optimize the ansatz classically without exponential computational cost.Another important observation is that, while local observables on shallow circuits are classically simulatable, nonlocal ones are not in general.Therefore, we need to run the optimized circuit on a quantum device if we wish to obtain information about nonlocal quantities.This kind of situation occurs very naturally with a quantum system which exhibits a topological phase transition, where the system Hamiltonians are local but its order parameters are global [37][38][39].Another useful quantity that has to be measured on a quantum device is inner prod-uct between the states, which can be used for, e.g., the unsupervised clustering of states in different phases [40].
As numerical demonstrations of co-VQE, we study two quantum spin models in which topological orders emerge; the one-dimensional (1D) cluster model [41,42] and the two-dimensional (2D) toric code model with transverse field [43][44][45].co-VQE would be practically important in 2D systems because in 1D systems, one can often obtain the ground states with high accuracy as well as evaluate nonlocal observables efficiently on classical computers using matrix product states (MPS).After optimization, we characterize the topological phases by measuring nonlocal order parameters.Moreover, for the 1D model, we identify the topological phase via another method, measurement of fidelity combined with an unsupervised machine learning.Here quantities of quantum systems are created by quantum computers and processed by classical computers.This could be another promising type of quantum machine learning in the NISQ era.As compared to other near-term quantum machine learning algorithms [12][13][14][15][16][17] treating classical data, we might say that our proposal makes natural use of quantum computers.We also refer to recent similar works in Refs.[46,47].
The paper is organized as follows.First, we describe the principle of co-VQE in Sec.II.We devote Secs.III and IV to numerical demonstrations of co-VQE on the 1D cluster and 2D toric code models with transverse field, respectively.Finally, we summarize our results in Sec.V.

II. CLASSICALLY-OPTIMIZED VARIATIONAL QUANTUM EIGENSOLVER
In this section, we explain the premise and principle of co-VQE.In the optimization process of the original VQE, one evaluates expectation values of operators by measurement on a quantum computer and accordingly update variational parameters on a classical computer [Fig.1(a)].In co-VQE, meanwhile, one efficiently calculates the expectation values with a classical computer instead of using a quantum computer [Fig.1(b)].The key to the efficiency is reduction in the number of simulated qubits, thanks to the locality of causal cones in shallow-depth quantum circuits [Fig.1(c)].
As prerequisites for co-VQE, we suppose the following constraints on the target problem and ansatz.
(i) Operators measured in the optimization process are local.
(ii) The initial state of the quantum circuit is a product state or more generally a stabilizer state.
(iii) The quantum circuit is only composed of local operations.
(iv) The quantum circuit has a constant (or logarithmic) depth as a function of the system size.In many systems of interest in condensed-matter physics, the constraint (i) holds for operators composing the physical Hamiltonian.In addition, a majority of the circuit ansätze proposed so far meet the constraints (ii) and (iii).
The constraint (iv) allows for hardware-efficient ansätze [9,19,21] as well as the Hamiltonian variational ansatz [48] in spin models as we treat in the paper.Although (iv) restricts depth of the ansatz, we remark that, when one increases the system size up to, e.g., 10 3 or 10 4 , in the NISQ era, polynomially-scaled circuit depths are not ideal or viable due to exponential decrease in fidelity.We also point out that quantum circuits with constant depth can have quantum advantages [49].
Under those constraints, one can classically simulate quantum circuits without suffering from exponential increase in the computational cost.As a simple example, let us consider a 1D brickwall quantum circuit applied to a product state [Fig.1(c)].As indicated in Fig. 1(c), measurement of a local operator on the circuit only involves a part of the qubits considering the causal cone.Therefore, it only suffices to simulate a local subsystem rather than the entire system.The argument can be generalized to d dimensions (d ≥ 1).Let N be the number of qubits of the entire system.Suppose we calculate the expectation value of a local observable O with respect to a quantum circuit with depth l.Assuming that O is described as a sum of m k-body Pauli operators, the maximal number of qubits among the causal cones corresponding to m Pauli operators, M , is estimated as M = O(kl d ).Hence, evaluation of the observable O costs O(m2 kl d ), whereas it costs O(m2 N ) when one simulates the entire system.In the case where O is the Hamiltonian, considering m = O(poly(N )) (O(N ) in typical spin models), the simulation assisted by causal cones can be performed efficiently as long as the depth l is constant (or logarithmic) with respect to N .Importantly, this technique enables us to classically simulate systems with more qubits than current computers could afford to simulate, e.g., N ∼ 100 as long as M is sufficiently small.
One might think that the efficient simulatability of lowdepth quantum circuits for local observables is limited to cases where the initial state is a product state.In fact, however, it holds as long as the initial state is a stabilizer state.Supposing that U represents the quantum circuit, U † OU can be decomposed into O(m4 kl d ) (kl d )-body Pauli operators.Since expectation values of Pauli products with respect to a stabilizer state can be efficiently calculated on classical computers, one can efficiently simulate the expectation value of the local observable when l is constant (or logarithmic).In the numerical simulations in Secs.III and IV, we use stabilizer states as the initial state of the ansatz.
The argument above raises a question; once that the entire optimization is conducted on a classical computer, in what cases does one benefit from using a quantum computer?The answer would be in cases where one conducts measurement of nonlocal quantities [Fig.1(b)].One case which necessitates such measurements would be characterization of topological orders [37][38][39] emergent in certain quantum spin models.Since order parameters of topological phases are nonlocal, it is necessary to measure them on a quantum device to explicitly tract topological orders.Another case that we consider here is measurement of fidelity, the absolute value of inner product between two quantum states.Fidelity is useful to detect quantum phase transitions, especially when one does not know an apparent form of order parameter [50,51].We also need to evaluate it on a quantum device due to its globality.
In Secs.III and IV, we present proof-of-concept demonstrations of co-VQE on quantum spin models with topological phases.First, in Sec.III, we study the 1D cluster model with transverse field.However, in 1D systems, one can efficiently evaluate nonlocal observables on a classical computer if the circuit has a constant or logarithmic depth.In 2D systems, on the other hand, it is not feasible to classically simulate nonlocal observables even with a constant depth.In that sense, co-VQE is expected to provide practical importance in 2D systems.With that in mind, in Sec.IV, we treat the 2D toric code model with transverse field.
We simulate quantum circuits using Qulacs [52] and optimize variational parameters using the BFGS method implemeted in the SciPy library [53].We also perform exact diagonalization (ED) to obtain reference values.For clustering, we employ scikit-learn [54].We note that our studies are restricted to a classically-tractable number of qubits (N ≤ 25) so that we could simulate nonlocal measurements, which would be conducted on quantum computers in actual usage of the co-VQE.

III. TRANSVERSE-FIELD CLUSTER MODEL A. Nonlocal order parameter
In this section, we study the 1D cluster model with transverse field [41].We consider an N -qubit chain with open boundary condition, where the Hamiltonian reads We define the stabilizer K i as K i = Z i−1 X i Z i+1 .For J = 0, the ground state of the model is in an symmetryprotected topological (SPT) phase [38,39] and called the cluster state [55].The state is characterized with eigenvalues of K i being equal to 1 for all i.The model is exactly solvable because it can be mapped to the transverse-field Ising model via a nonlocal transformation [41].The exact solution tells us that as J increases from zero, the cluster state transitions to a trivial phase at J = 1.The order parameter characterizing the phase transition is a product of the stabilizers represented as The cluster state corresponds to Ω = 1, whereas the trivial phase has Ω = 0 [41].We remark that the order parameter Ω is a nonlocal observable.
We study the ground state of H cluster by co-VQE.We use a brickwall quantum circuit applied to the cluster state [Fig.2(a)] as the ansatz.The ansatz and Hamiltonian meet four conditions for co-VQE listed in Sec.II.Note that the cluster state is a stabilizer state.As shown in Fig. 2(b), each brick is composed of four single-qubit and one two-qubit rotations with independent variational parameters.We define the depth of the circuit d as the number of brick layers (d = 4 in Fig. 2(a)).Importantly, the ansatz corresponds to the Hamiltonian variational ansatz [48].This guarantees that the ansatz can generate the exact solution when d → ∞.As described in Sec.II, in the optimization process of co-VQE, we only simulate relevant qubits dictated by the causal cone [Fig.First, we study the phase transition by explicitly measuring the nonlocal order parameter Ω.For each value of J (0 ≤ J ≤ 2), we optimize variational parameters and then compute Ω.In Figs.3(a) and 3(b), we show J dependence of the ground state energy E and Ω, respectively, for N = 16 and d = 4 as well as those calculated by ED.As expected, the order parameter Ω of ED [Fig.3(b)] points to the phase transition at J ∼ 1. Figures 3(a) and 3(b) show that both the energy and order parameter of co-VQE agree well with those of ED.We note that Ω of co-VQE shows a slightly steeper decline at the phase transition than that of ED [Fig.3(b)], which might be attributed to limitation of expressibility in the low-depth ansatz.The result implies that the brickwall circuit of even a low depth [Fig.2(a)] can capture a broad range of quantum states including the cluster state and trivial state at the end points.Next, as another approach to detect the phase transition, we use fidelity for unsupervised machine learning.Fidelity measures similarity between two quantum states |Ψ and |Φ , and it is defined as In the last decade and a half, researchers in condensedmatter physics have found out that fidelity is a useful tool to detect quantum phase transitions [50,51], especially when one does not have information of order parameters.This stems from the property that the fidelity F equals almost one between quantum states within the same phase, whereas zero between states in different phases.
Although in the thermodynamic limit, one should employ other relevant quantities such as fidelity per site [46,56,57] or fidelity susceptibility [58] to avoid the orthogonality catastrophe [59], in the following we can safely rely on fidelity because we only treat small-size systems.
We compute fidelities between the optimized states for different values of J. Figure 4(a) shows the color plot of fidelity | Ψ(J )|Ψ(J) |.The top row of the color plot in Fig. 4(a) shows that as J increases, the fidelity | Ψ(J = 2.0)|Ψ(J) | steeply arises around J = 1.There-fore one can speculate that a phase transition seems to take place around J = 1.
To confirm the observation, we conduct clustering on the data set of fidelity for phase classification [Fig.4(a)].Here, we apply the spectral clustering method with the number of clusters fixed at two while using the fidelity as affinity between data points.As a consequence, we obtain two phases as shown in Fig. 4(b); one corresponds to 0 ≤ J ≤ 0.9 (SPT phase), and the other to 1 ≤ J ≤ 2 (trivial phase).The result is consistent with the exact phase diagram.We emphasize that clustering allows us to detect the phase transition without prior knowledge of the order parameter Ω.Our clustering analysis contrasts with recent studies that have proposed similar methods for classifying phases based on measurement of fidelity in conjunction with classical machine learning [46,47], both of which employ supervised machine learning.While we have considered the 1D model in the previous section, classical approaches using MPS or multiscale entanglement renormalization ansatz (MERA) are in many cases sufficient for 1D models.In this section, we study the toric code model with transverse field as a nontrivial example in two dimensions.The model is defined on a square array of N = L 2 + (L − 1) 2 (L: linear dimension) qubits with open boundary conditions as shown in Fig.

The Hamiltonian reads
where A s and B p are stabilizers defined as A s = i∈s X i and B p = i∈p Z i for each square s and plaquette p [Fig.5], and h z represents strength of transverse field.
For h z = 0, the ground states are toric code states with a nontrivial topology [37].They are characterized with eigenvalues of A s and B p being equal to 1 for all s and p, which are two-fold degenerate in our setting of boundary conditions.These two-fold ground states are distinguished by eigenvalues of a logical operator L Z , defined as L Z = i∈γ1 Z i [Fig.5].With application of h z , quantum Monte Carlo calculations revealed that the toric code state undergoes a topological transition at h z = 0.328474(3) in the thermodynamic limit [43][44][45].
Below we study the model by co-VQE.We use the Hamiltonian variational ansatz [48] in a more explicit form than in Sec.III.The ansatz is expressed with variational parameters β l and γ l as where both H 0 toric and H The reason why we set the toric code state as the initial state is because topologically ordered states cannot be generated from a product state with a constant depth circuit.By doing so, one can study the region belonging to the same topological phase with a shallow quantum circuit.A preparation of the toric code state |Ψ(L Z = 1) has been discussed in the context of quantum error correction.More precisely, the syndrome measurements for A s project a product state |0 onto the toric code state |Ψ(L Z = 1) .The randomness of the measurement outcomes can be treated classically by updating the Pauli frame and rewriting the state and operations in an appropriate basis.
To tract the topological order, we evaluate the Wilson loop operator W [60], which we define as [Fig.5] In Figs.Our calculations indicate that the ansatz with the toric code state as the initial state is effective.Specifically, for small external field, it may describe the ground states with a constant depth.Although we restricted ourselves into a simulatable number of qubits in the calculations above, co-VQE would be beneficial for larger N by using real quantum devices.When you evaluate the energy, the maximal number of qubits among all the causal cones is represented as M = 4(d + 1) 2 .Therefore, classical optimization would be possible up to d = 2 irrespective of N .If one intends to increase the depth, i.e., d ≥ 3, one needs to conduct optimization on quantum computers, but even in that case, co-VQE for d = 2 would help one to determine the initial parameters for d = 3 and thus reduce the risk of being trapped at suboptimal solutions.

V. CONCLUSION
In this work, we propose co-VQE, a variant of VQE that is more reliant on classical computers.In co-VQE, assuming locality of the Hamiltonian and constant (or logarithmic) depth of the ansatz, the whole process of optimization is efficiently conducted on a classical computer.The efficiency of the classical optimization comes from exponential reduction in simulation costs by virtue of causal cones in quantum circuits.Compared to the original version of VQE, co-VQE has an advantage that its optimization process is by definition free of statistical or systematic error inherent in quantum hardware.co-VQE does not exclude opportunities to benefit from quantum devices; one needs to rely on them to measure global quantities such as nonlocal order parameter and fidelity after the optimization.As proof-of-concepts for our method, we present numerical simulations on 1D and 2D quantum spin models with topological phases.First, we solve the 1D cluster model by co-VQE.We detect the topological phase transition by evaluating the nonlocal order parameter.In addition, we demonstrate that even without prior knowledge of the order parameter, we could also identify the phases by applying clustering technique to fidelity.Then, given that the ground states and nonlocal observables in 1D models are often achievable by classical computers, we also study the 2D toric code model with co-VQE.We find that the ansatz initiated from the toric code state works well.The important thing is that it may cover the region within the topological phase with a constant depth.This leads to an expectation that we can derive advantages from quantum computers if we conduct co-VQE using a real quantum device for larger system sizes.
We expect that because of its error-immunity in the optimization process, co-VQE may have more potential than the original VQE to leverage NISQ devices to solve quantum many-body problems.Our study is also suggestive of an intriguing field of quantum machine learning that combines measurement on quantum computers with classical machine learning to analyze quantum many-body problems.

FIG. 2 .
FIG. 2. (a) Brickwall quantum circuit used as the ansatz of co-VQE for the transverse-field cluster model.The leftmost block corresponds to a circuit that generates the cluster state.(b) Quantum operations composing a single brick in (a).

1
(c)] to evaluate expectation values of the local terms in H cluster .

FIG. 3 .
FIG. 3. J dependence of (a) the energy E and (b) nonlocal order parameter Ω in Eq. (2) of the ground states obtained by co-VQE on the transverse-field cluster model with the Hamiltonian H cluster in Eq. (1).The blue (orange) points show the data of co-VQE (ED).In co-VQE, we set the depth of the ansatz as d = 4.The calculations are done for N = 16.

FIG. 4 .
FIG. 4. (a) Color plot of the fidelity between the states optimized by co-VQE for different values of J. (b) Phase classification by spectral clustering on the data set in (a).Phase 1 corresponds to the SPT phase and 0 to the trivial phase.

FIG. 5 .
FIG. 5. Square array of qubits (open circle) with L = 4 for the toric code model.
6(a) and (b), we present h z dependence of the energy E and nonlocal order parameter W , respectively, calculated by co-VQE together with those of ED.The calculations are done for L = 4 (N = 25).The loop operator W computed by ED [Fig.6(b)] shows that the toric code state gradually transitions to a trivial state as h z increases up to 0.5.Figure 6(a) shows that the energy of co-VQE becomes lower as the depth D increases and nearly overlaps with that of ED for D = 5.With regard to W , the result of co-VQE almost replicates that of ED with a lower depth (D = 3) [Fig.6(b)].

5 EDFIG. 6 .
FIG. 6. hz dependence of (a) the energy and (b) nonlocal order parameter W in Eq. (6) of the ground states obtained by co-VQE on the transverse-field toric code model with the Hamiltonian Htoric in Eq. (4).The purple line shows the data of ED.The calculations are done for L = 4 (N = 25).
1 toric are parts of H toric defined as H 0 toric = − s A s − p B p and H 1 toric = −h z N i=1 Z i .The initial state |Ψ(L Z = 1) represents the toric code state with the eiganvalue of L Z being equal to 1, which is the exact ground state of H toric with h z = 0.The Hamiltonian and ansatz satisfy four constraints for co-VQE listed in Sec.II.