Carola Ciaramelletticarola.ciaramelletti@graduate.univaq.itDipartimento di Ingegneria e Scienze dell’Informazione e Matematica, Università dell’Aquila, via Vetoio,I-67010 Coppito-L’Aquila, Italy. Martin BesedaDipartimento di Ingegneria e Scienze dell’Informazione e Matematica, Università dell’Aquila, via Vetoio,I-67010 Coppito-L’Aquila, Italy.IT4Innovations, VSB - Technical University of Ostrava, 17. listopadu 2172/15, Ostrava, 708 00, Czech Republic. Mirko ConsiglioDepartment of Physics, University of Malta, Msida MSD 2080, Malta. Luca LeporiDipartimento di Scienze Matematiche, Fisiche e Informatiche, Università di Parma, Parco Area delle Scienze, 53/A, I-43124 Parma, Italy.INFN, Gruppo Collegato di Parma, Parco Area delle Scienze 7/A, 43124, Parma, Italy. Tony J. G. ApollaroDepartment of Physics, University of Malta, Msida MSD 2080, Malta. Simone PaganelliDipartimento di Scienze Fisiche e Chimiche, Università dell’Aquila, via Vetoio,I-67010 Coppito-L’Aquila, Italy.

###### Abstract

We study the exact ground states of the Su–Schrieffer–Heeger open chain and of the Kitaev open chain, using the Variational Quantum Eigensolver (VQE) algorithm. These models host symmetry-protected topological phases, characterized by edge modes with vanishing single-particle energy in the thermodynamic limit. The same fact prevents the standard VQE algorithm from converging to the correct ground state for finite chains, since it is quasi-degenerate in energy with other many-body states. Notably, this quasi-degeneracy cannot be removed by small perturbations, as in typical spin systems. We address this issue by imposing appropriate constraints on the VQE evolution and constructing appropriate variational circuits, to restrict the probed portion of the Hilbert space along the same evolution. These constraints stem from both general properties of the topological phases and of the studied Hamiltonians. In this way, the improved VQE algorithm achieves an accurate convergence to the exact ground states in each phase. The present approach promises large applicability, also to realistic systems and possibly with different topology, thanks to the very high fidelity achieved also on systems with a relatively high number of qubits.

## I Introduction

Quantum computing is a rapidly evolving field that explores the potential of harnessing the principles of quantum mechanics for computational speed-up. At its core, quantum computing relies on the fundamental principles of quantum mechanics, such as superposition, entanglement, and interference[1]. Currently, quantum computation exists in the Noisy Intermediate-Scale Quantum (NISQ) era [2], which represents a crucial phase in the development of quantum technologies, characterized by the control over single quantum systems, however critically subject to errors and noise. Nonetheless, several claims have been made about quantum calculations performed beyond the reach of classical computers[3, 4, 5].

Since current NISQ devices tend to suffer from rather strong decoherence, a great deal of research effort is focused on the field of hybrid quantum–classical algorithms, where a quantum computer is tasked with evaluating quantum expectation values embedded in a classical optimization framework. One family of such algorithms is the variational quantum algorithms, aimed at addressing problems in quantum chemistry, materials science, and many-body systems, among others[6, 7, 8, 5].

Given the potential of quantum computing, it is essential to explore variational quantum algorithms’ applications to different physical systems that can leverage quantum properties for enhanced computational capabilities. In this context, the study of topological systems in physics is becoming an area of growing interest in recent years due to their unique and intriguing properties [9]. These systems are mathematically characterized by certain topological invariants, i.e., nonlocal quantities that are insensitive to small changes in local parameters or thermodynamical quantities such as temperature or pressure. One of the most important features of many topologically non-trivial phases is the existence of topological surface states, that are robust against large sets of perturbations[10]. The existence of topological surface states is important for different reasons: first, in certain circ*mstances they provide a direct way to probe the bulk properties of a compound; second, they can have practical applications, such as in the development of new materials and structures, as well as for quantum simulation and information. For instance, topological systems have been shown to be suitable to implement qubits that are robust against decoherence[11, 12, 13]. Related to this fact, the study of topological systems could also play a central role in the development of new quantum algorithms, e.g., the topological properties of certain systems can be used to perform topological quantum error correction[14, 15].

Recently, quantum computation has been applied to investigate topological phases, for instance: a topological quantum phase transition has been parametrically crossed by the states generated on a quantum computer[16] higher-order topological phases in high-dimensional lattices have been investigated[17], using iterative quantum phase estimation; a classically optimized Variational Quantum Eigensolver (VQE) algorithm, supported by machine learning tools, has been utilized for measuring the string order parameters and to reveal a topological phase transition in certain spin-$1/2$ systems[18] and implementation of a two-dimensional $Z_{2}$ lattice gauge theory model on a shallow quantum circuit has been proposed [19].

The aim of this work is to study two models that host topologically non-trivial symmetry-protected phases, using variational quantum algorithms. Specifically, the VQE algorithm is employed in order to identify the topologically non-trivial ground states of the Su–Schrieffer–Heeger (SSH)[20] and Kitaev open chains[21].

The SSH chain is an instance of a one-dimensional topological insulator with spinless fermions hopping on a bipartite lattice, while the Kitaev chain is a prototype of topological superconductor, describing spinless fermions with nearest-neighbor superfluid pairing. These specific models are chosen since they are the simplest ones exhibiting non-trivial (symmetry-protected) topological behavior and are exactly solvable. In this respect, the exact solvability of the SSH and Kitaev chains makes them ideal playgrounds to test the convergence of the VQE, i.e. towards the ground states, in the different phases. Moreover, the presence of edge modes with vanishing energy in the thermodynamic limit makes the ground states of the topological phases quasi-degenerate at finite sizes with other many-body states; for this reason, the convergence of the prototypical VQE in these phases is generally poor.Notably, due to topology, this quasi-degeneracy cannot be removed by small perturbations, differently as, for instance, in typical spin systems. This fact makes the considered chains even more suitable to illustrate the power of our method.

Here, we solve this convergence issue, imposing appropriate constraints on the portion of the Hilbert space probed along the sequence of transformations performed by the VQE algorithm. These constraints stem from both general properties of the topological phases and of the studied Hamiltonians. In this way, the improved VQE achieves accurate convergence to the exact ground states in every phase. The present approach promises a large applicability, also on realistic systems with different types of topology, also thanks to the verified good behavior against enlarging the system sizes.

The paper is organized as follows: in sectionII, the SSH and the Kitaev model are briefly recalled. In sectionIII, we present different VQE approaches to address the quasi-degeneracy of the ground states in the topological non-trivial phases of the aforementioned models. In section IV, we show the main results of the work. Finally, in sectionV, we draw our conclusions. The paper is accompanied by AppendicesA,B, and C,where details and further results from the different VQE strategies are reported.

## II The models

In this section, we recall some basic features of the SSH and Kitaev chains, focusing on the properties of the symmetry-protected topological phases, which will be utilized to improve the VQE implementations.

### II.1 SSH chain

The SSH model[20, 22] describes spinless fermions hopping on a one-dimensional lattice with staggered hopping amplitudes v and w between two sublattices $A$ and $B$. Here, we consider an open chain with $N/2$ unit cells, each unit cell hosting two sites. Interactions between the particles are neglected, and the dynamics is described by the quadratic Hamiltonian

$H=-v\sum_{j=1}^{N/2}(\hat{c}^{\dagger}_{j,A}\hat{c}_{j,B}+\text{h.c.})-w\sum_{%j=1}^{N/2-1}(\hat{c}^{\dagger}_{j,B}\hat{c}_{j+1,A}+\text{h.c.}).$ | (1) |

The bulk properties can be studied first in the thermodynamic limit, where in the momentum space the Hamiltonian can be recast as

$H=\sum_{k}\underline{c}_{k}^{{\dagger}}H(k)\underline{c}_{k},$ | (2) |

where$\underline{c}_{k}^{{\dagger}}=\begin{pmatrix}c_{A,k}^{{\dagger}},&c_{B,k}^{{%\dagger}}\\\end{pmatrix}$is the vector of creation operators acting on the $A$ and $B$ sublattices, $k$ lies inside the first Brillouin zone, i.e. $k\in[-\pi/a,\pi/a]$, where $a$ denotes the lattice spacing, and

$H(k)=\bm{d}\left(k\right)\cdot\bm{\sigma}_{k}\,,$ | (3) |

with

$d_{x}(k)=v+w\cos(k);\quad d_{y}(k)=w\sin(k);\quad d_{z}(k)=0\,.$ | (4) |

The Hamiltonian possesses a topology-protecting sublattice symmetry

$\sigma_{z}H(k)\sigma_{z}=-H(k)\,,$ | (5) |

also reflected in a two-band symmetric spectrum, reading

$E^{\pm}_{k}\left(\bm{d}_{k}\right)=\pm\sqrt{d_{x}^{2}+d_{y}^{2}}=\pm\sqrt{v^{2%}+w^{2}+2vw\cos(k)}\leavevmode\nobreak\ .$ | (6) |

The SSH Hamiltonian belongs to the AIII-class in the ten-fold way classification[23] for topological insulators and superconductors.Hereafter, we adopt the following parametrization for the parameters $v$ and $w$

$v=1-\delta,\qquad w=1+\delta.$ | (7) |

Moreover, along with all the work, we will consider the half-filling regime $\nu=1/2$, then the Fermi level sets in between the two bands in Eq. (6). In this condition, two different topological phases occur, depending on the sign of $\delta$: a trivial phase if $\delta<0$ ($v>w$) and a topologically non-trivial phase if $\delta>0$ ($v<w$).

In the topologically non-trivial phase, the system with open boundaries displays two symmetry-protected (i.e. against disorder or other spatial perturbations) modes, localized at the edges of the chain. These modes have zero single-particle energy in the thermodynamic limit [24]. For a finite open chain, the two edge modes hybridize, giving rise to two single-particle states with energy $\pm\Delta E$. However, as $\Delta E$ vanishes exponentially with the number of sites, the hybridization amplitude also vanishes: $\Delta E\propto e^{-N/\xi}$, where $\xi$ is the localization length given by $1/\log(v/w)$[22]. In turn, these facts make the half-filling ground state of the system quasi-degenerate (at finite sizes) in energy with three other many-body states, the four elements of this quasi-multiplet differing from each other by the presence of a hybrid single-particle state described above. In particular, the ground state has populated the hybrid state with energy $-\Delta E$. Also important for the following, this state displays two peaks at the edges in the square of the spatial wavefunction.

### II.2 Kitaev chain

The Kitaev chain[21] describes spinless fermions with an on-site energy offset (chemical potential) and a nearest-neighbor superconductive pairing.The corresponding Hamiltonian reads

$\begin{split}H=&-\mu\sum_{n=1}^{N}c_{n}^{{\dagger}}c_{n}-t\sum_{n=1}^{N-1}(c_{%n+1}^{{\dagger}}c_{n}+\text{h.c.})\\&+\Delta\sum_{n=1}^{N-1}(c_{n}c_{n+1}+\text{h.c}),\end{split}$ | (8) |

where $\mu$ is the on-site potential, $t$ is the hopping term, and $\Delta$ is the pairing term creating or annihilating pairs of particles at neighboring sites. Experimental realizations of the model in Eq. (8) are claimed to have been performed in[25, 26].

We cast the Hamiltonian in Eq.(8) in momentum space, as

$H(k)=\begin{pmatrix}-\mu-2t\cos(kd)&2\Delta\sin(kd)\\2\Delta\sin(kd)&\mu+2t\cos(kd)\\\end{pmatrix}\,,$ | (9) |

where now $\underline{c}_{k}=(c_{k},c^{{\dagger}}_{-k})^{T}$ is the Nambu vector. This Hamiltonian yields the excitation spectrum

$E_{\pm}=\pm\sqrt{4\Delta^{2}\sin^{2}(kd)+[\mu+2t\cos(kd)]^{2}}\,,$ | (10) |

where a topologically nontrivial phase is obtained for $|\mu/t|<1/2$, hosting symmetry-protected edge modes, quoted Majorana modes [21] with vanishing energy. Via a very similar mechanism as for the SSH chain, this gives rise to a four-fold quasi-degeneracy of the many-body ground state at finite sizes, again due to the hybridization of the edge modes. We recall that here the ground state is characterized by all single-particle states with negative energy being populated, as for any Bogoliubov states [27]. Again, the hybrid single-particle state with negative energy displays two peaks at the edges in the square of its spatial wavefunction.

## III VQE SIMULATION APPROACHES

In this section, we report the study of the ground states of the two models introduced in the previous section by means of the VQE algorithm. With this aim in mind, we employ the Jordan–Wigner transformation [28], mapping fermions to qubits (spin-$1/2$) and the SSH and the Kitaev chain, respectively, to an isotropic and anisotropic XY quantum spin-$1/2$ chain.

In a first attempt to determine the ground state, we implement a standard VQE algorithm, minimizing the average energy with respect to the parameters of the ansatz. We use a hardware-efficient ansatz [29] that does not preserve the number of fermions, i.e., the total magnetization along the $z$-axis. This parametrized quantum circuit is a sequence of $d=3$ repetitions of one layer (in order to keep a sufficiently shallow circuit depth) of single-qubit rotations and CNOT gates, as shown in Fig.1.

To compare the state obtained by the VQE with the exact ground state, we compute their fidelity, defined as

$F=\left|\braket{\psi_{\text{VQE}}}{\psi_{\text{Exact}}}\right|^{2}.$ | (11) |

The results for the SSH and Kitaev models are shown in Fig.2 and Fig.3, as functions of the parameter $\delta$ and $\mu$, respectively, for $N=6$ sites.

A sharp drop in the efficiency of the VQE algorithm appears evident when used to determine the ground state in the non-trivial phase. Indeed, since the many body ground state is quasi-degenerate in such a phase, the VQE ends up stuck in a subspace whose states have similar average energy. As a consequence, the algorithm gives a satisfactory ground state energy but fails in identifying the correct ground state. Being this a distinctive feature of phases with degenerate ground states, as the topological phase considered here, it is therefore necessary to find a strategy beyond the standard VQE approach.

The main idea is to exploit some general features of the ground states in the non-trivial phases and of the corresponding Hamiltonians to drive the minimization process in the degenerate subspace toward states closer to the exact ground state.The relevant properties we focus on are the amount of entanglement between two bulk sites and/or between the edges, detected by *i*) the concurrence between them, and *ii*) the purity of two nearest-neighbor spins. Both these quantities, which drastically change across the two phases, are recalled in detail in the appendix A, while a deeper justification of their specific use is given in the appendix B.

Different approaches can be adopted in order to account for these properties:

- •
Modified cost function: the cost function in the VQE algorithm can be modified so that it would favor the states having the correct entanglement (concurrence and purity). Therefore, entanglement-related constraints are taken into account, together with the average energy.

- •
Warm-Start: the initial state of the VQE can be chosen in such a way to be already sufficiently close to the state to be found. To improve the previous strategy, for instance, one can first implement a modified cost function approach described above, and then take the so-obtained state as the initial state for a new VQE where the extra constraints in the cost function are removed. Another option is to start from a trivial phase (where the VQE easily finds the correct ground state) close to a transition point with a topological phase, then change some Hamiltonian parameters by sufficiently small amounts, such as to move towards the second phase. At any step, the ground state is computed and used as the initial state for the next step.

- •
Problem-Inspired ansatz: as a third approach, one could incorporate the knowledge of the models and their topological properties directly into the initial variational wave function, by constructing a ‘problem-inspired ansatz’, that is a specifically designed ansatz considering some features (as from topology) of the Hamiltonian under investigation. From our results, this method, possibly employed together with the second one, appears a posteriori to be the most effective, both in terms of precision of the results and scalability.

All these strategies can help to improve the results of the VQE, nevertheless, each of them has drawbacks that need to be considered. In the first approach, changing the cost function seems, at first sight, quite straightforward and does not imply a change in the circuit setup. Nevertheless, since the main significant properties that we have identified as relevant are the entanglement properties of the system, any related quantity requires the evaluation of reduced density matrices. This task becomes operatively involved in increasing the size of the system.

The second approach can be employed by changing the Hamiltonian parameters by small amounts and without imposing extra constraints on the evolution along the quantum circuit. Then the constraints can be set as a control to exclude the output states that do not display the required properties. A real-amplitude ansatz[30] is used for the variational circuit, which consists of parametrized single-qubit $R_{y}$ gates and a ladder of CNOT gates as entangling gates. This ansatz often has fewer parameters than other ansatz, and by limiting the parameter count, the optimization process can become more efficient and less prone to overfitting or getting stuck in local minima. Moreover, with a reduced parameter space, the optimization landscape can be simpler. This can lead to more accurate results and make optimization algorithms more effective. A drawback of this type of ansatz is that it is not scalable with the number of qubits required to describe the target state, as the barren plateau problem, i.e., the gradients of the cost functions become exponentially small making parameter training difficult [31], is more prominent in this context.Moreover, the request for a small variation of the Hamiltonian parameters implies the need for a large number of runs of the quantum computer. These two approaches will be discussed in the appendix B and C, respectively.

The last approach, being not hardware efficient, requires to be adapted to native gates of the quantum hardware and thus may produce a significant overhead of quantum gates. However, the problem-inspired ansatz appears as the most promising one in terms of scalability and results.

Hereafter, we show the results for the two considered models, obtained via the problem-inspired ansatz and using the L-BFGS-B optimization algorithm[32]. The other strategies are also discussed in better detail in appendix B and C.

## IV Main results from optimized hybrid strategy

In this section, we adopt an optimized mix between the second and third strategies outlined above. In particular, we resort to a problem-inspired ansatz approach to incorporate the physics of the SSH model into the wavefunction represented by the quantum circuit. The circuit includes rotation gates $R_{y}(\theta)$, which allow for the preparation of superpositions of the basis states, and two-qubit gate

$R_{N}(\theta)\equiv e^{i\frac{\theta}{2}(\sigma_{x}\otimes\sigma_{y}-\sigma_{y%}\otimes\sigma_{x})}\,,$ | (12) |

effectively recreating the hopping elements in the SSH Hamiltonian. The latter gates are specifically chosen to generate correlations between neighboring sites. The same gates mimic the staggered nearest-neighbor interactions in the isotropic XY Hamiltonian, to which Eq. (8) is mapped via the Jordan-Wigner transformation. Additionally, they connect the first and the last qubit, inducing correlations between the edges as in a topologically non-trivial phase. Moreover, for each run, we slightly increase the parameter $\delta$ and use the state obtained in the previous run as a new initial state. A representative image of this circuit is shown in Fig.4.

The results of the state-vector simulations with this method are shown in Fig. 5, where we report the fidelity in Eq.(11) between the exact ground state and the VQE state, varying $\delta$ and for $N=4,6,8,10,12$ sites.It can be observed that the convergence to the ground state is guaranteed across the entire range of $\delta$. It is also worth noticing that the present method allows this convergence without utilizing any properties of the topological system other than the Hamiltonian ones themselves. This fact avoids the requirement of precise knowledge not only of the properties of the searched ground state, but also of its topological quantum phase transition point.As a consequence, by evaluating the entanglement between two qubits of the obtained VQE solution, e.g., the first and last qubit, it is possible to determine whether, for the specified Hamiltonian parameters, the system is in the trivial or non-trivial topologically phase, thus determining also the topological quantum phase transition point.Notably, in all the simulations, the number of layers scales logarithmically with the number of sites, specifically as $\lceil\log_{2}(n)\rceil+1$, making the present approach suitable for the investigation of larger systems.

Also for the Kitaev chain, the problem-inspired approach produces more accurate results.We apply the ansatz illustrated in Fig.4, already used for the SSH model, to the Kitaev chain. The method proves very robust for this second model as well, yielding a fidelity very close to $1$ between the VQE state and the exact state, across the entire range of the $\mu/t$ ratio.This also allows us to determine the location of topological quantum phase transition point, without assuming a priori knowledge about its location.The purities between nearest-neighbor sites in the two states also match completely.Similar to the SSH simulations, we used $\lceil\log_{2}(n)\rceil+1$ repetitions of layers, which indicates good scalability of the method with the number of sites.The comparison between $N=4,6,8,10$, and 12 sites is shown in Fig.6, where an excellent convergence of the algorithm to the exact ground state is preserved, also with increasing system sizes.

Further results obtained following separately the second and third strategies mentioned in section III are reported in the appendices B and C.

## V Conclusions

In this work, we applied the VQE algorithm on two one-dimensional fermionic models exhibiting non-trivial (symmetry-protected) topological phases, namely the SSH and Kitaev chains. Using a hardware-efficient ansatz, we found that the VQE algorithm fails to determine the ground state in the topologically non-trivial phases of both models, due to its (quasi-)degeneracy.Notably, due to topology, this quasi-degeneracy cannot be removed by small perturbations, differently as, for instance, in typical spin systems. This fact makes the considered chains even more suitable to illustrate the power of our method.

Different methods for improving the results of the standard hardware-efficient ansatz have been investigated, taking into account the topological properties of the considered models. In particular, we added constraints to the cost function related to entanglement witnesses between two qubits, controlling the parameters of the initial ansatz state, and performed adiabatic assistance, using previously obtained solutions for the next VQE initial state. Although in this way some improvement can be achieved, the best results have been obtained by a problem-inspired ansatz, which incorporates some features of the considered models. Interestingly, the problem-inspired ansatz assures good scalability, leading to near-unit fidelities with up to 14 qubits, and it does not require any a priori knowledge of the phase diagram of the system.

The problem-inspired ansatz, utilized in this investigation, is composed of single qubit $R_{y}$ and two-qubit $R_{N}$(12) gates between nearest-neighbor qubits, mimicking the Hamiltonian terms of the considered models, and adding an additional set of the latter between the first and last qubit to generate the correlations present in the topologically non-trivial phase. By utilizing only the average energy as a cost function, the VQE is able to determine the correct ground state both in the topologically trivial and non-trivial phase. As a consequence, this enables to determine the topological quantum phase transition point by evaluating, on the obtained state, known properties of the two phases, e.g., the edge-state concurrence and the nearest-neighbor two-qubit purity for the SSH and the Kitaev model, respectively.

Our investigation reinforces the applicability of VQE algorithms for the determination of a ground state and its energy in cases where the latter is degenerate or quasi-degenerate, as in some topologically non-trivial phases. Indeed, it proved able to resolve efficiently the degeneracy and also to determine precisely the topological phase transition point.More in detail, our approaches to drive the VQE algorithm by specific properties proved particularly effective.

Further central developments involve the addition and consequent mitigation of realistic or simulated noises, inducing quantum decoherence. As mentioned in the Introduction, this problem has been already shown critical for all the existing quantum architectures.

Acknowledgements –L. L. is pleased to thank Stefano Carretta and Paolo Santini for support and discussions.L. L. also acknowledges financial support by a project funded under the National Recovery and Resilience Plan (NRRP), Mission 4 Component 2 Investment 1.3 - Call for tender No. 341 of 15/03/2022 of Italian Ministry of University and Research funded by the European Union – NextGenerationEU, award number PE0000023, Concession Decree No. 1564 of 11/10/2022 adopted by the Italian Ministry of University and Research, CUP D93C22000940001, Project title “National Quantum Science and Technology Institute” (NQSTI).S. P. acknowledges financial support from the University of L’Aquila by the internal project “Variational Quantum Eigensolver methods for the disordered Su-Schrieffer-Heeger model”and the Ministero dell’Università e della Ricerca (MUR) and the Project PRIN 2022 number 2022W9W423 funded by the European Union Next Generation EU.We acknowledge the CINECA award under the ISCRA initiative, for the availability of high-performance computing resources and support.M.C. acknowledges financial support by the Quantum Thermodynamics of Precision in Electronic Devices (ASPECTS) project from the Horizon Europe funding agency — HORIZON-WIDERA-2022-ACCESS-07 grant agreement 101080167.M. B. acknowledges computational resources by Variational Quantum Eigensolver for Topological systems (OPEN-30-32) project from National Supercomputing Center IT4Innovations.

## Appendix A Concurrence of a two-qubit state and Purity

In this appendix, we define two quantities that we use here to quantify the entanglement between two parts of the analyzed system: the concurrence and the purity.

Given a two-qubit state represented by a density-matrix $\rho$, the concurrence is an entanglement monotone defined as [33, 34, 35, 36]:

$\mathit{C}(\rho)\equiv\text{max}(0,\lambda_{1}-\lambda_{2}-\lambda_{3}-\lambda%_{4}),$ | (13) |

where $\lambda_{1},...,\lambda_{4}$ are the eigenvalues, in decreasing order, of the Hermitian matrix

$R=\sqrt{\sqrt{\rho}\tilde{\rho}\sqrt{\rho}},$ | (14) |

with $\tilde{\rho}$ defined by

$\tilde{\rho}=(\sigma_{y}\otimes\sigma_{y})\rho^{*}(\sigma_{y}\otimes\sigma_{y}),$ | (15) |

and $\sigma_{y}$ is the Pauli matrix. The concurrence ranges from $0$ for a separable state to $1$ for a maximally entangled state.

The purity is defined for a generic state $\rho$ as

$\mathcal{P}\left(\rho\right)=\mathrm{Tr}\left(\rho^{2}\right)\,,$ | (16) |

and it is bounded from above by $1$ for pure states, and from below by $1/d$ (where $d$ denotes the dimension of the Hilbert space) when the state is maximally mixed. In quantum computation, it is often useful to assess the purity of quantum states, particularly in the context of quantum error correction and fault-tolerant quantum computing[37]. Given a pure state, the purity of the reduced density matrix of a subsystem is an indicator of how much it is entangled with the rest of the system.

## Appendix B Adapted cost function

In this appendix, we described in more detail the second strategy mentioned in section III on the main text, and we report some results obtained following it.

In the SSH model, the ground state in the non-trivial phase is expected to exhibit a significant entanglement between the edge sites. Moreover, because of the dimerization effect, the bulk tends to be arranged in singlets of adjacent sites. Since the two phases, topological and not, are characterized by two different dimerizations, two adjacent sites will be highly entangled in one phase and almost disentangled in the other. These are the features of the SSH model that we exploit here. The amount of entanglement between the edge sites can be quantified by the concurrence of the corresponding reduced density matrix. Moreover, the different bulk dimerizations give rise to an alternation of values of the purity between pairs of adjacent sites (see the appendixA for definitions). We know that the concurrence between the edges is very small in the trivial phase (vanishing in the thermodynamic limit), while it increases rapidly when going deeper into the topologically non-trivial phase.

In the topologically non-trivial phase, the purity of the reduced density matrix for sites connected by the hopping $v$ switches from values close to $1$,in the trivial phase, to values close to $1/4$, in the non-trivial phase. Hence, additional constraints can be inserted into the cost function, pushing it to search for the minimum energy state and, at the same time, minimizing the purity between pairs of nearest-neighboring bulk sites with hopping amplitude $v$, and maximizing the concurrence between the edges. These tasks are performed according to the following equation

$\mathcal{C}(\bm{\theta})=E(\bm{\theta})-\eta\,C\left[\rho_{\text{edge}}(\bm{%\theta})\right]+\tau\,\mathcal{P}\left[\rho_{\text{nn}}(\bm{\theta})\right],$ | (17) |

where where $\bm{\theta}$ denotes the vector of the ansatz parameters, $E(\bm{\theta})$ is the average energy, $\rho_{\text{edge}}$ is the reduced density matrix of the edge sites, $\rho_{\text{nn}}$ is the reduced matrix of two nearest-neighbor sites, $\eta$ and $\tau$ are two Lagrangian coefficients.In this approach, the initial minimization step is performed with respect to the parameters $\bm{\theta}$, while keeping the coefficient $\eta$ constant, so as to approach the almost-degenerate subspace. The minimization is then restarted with the final parameters, gradually increasing $\eta$ at each repetition, until a sufficient minimum of the cost function is achieved.As a result, the fidelity between the VQE state and the exact state is increased beyond $0.99$.

In Fig.7, the fidelity between the VQE state and the exact ground state is shown, as a function of the $\delta$ parameter for $N=6$ sites and *a*) when the cost function contains the energy term only; *b*) when the concurrence and purity penalty terms are also included.

A Warm-Start approach has been also employed to further improve the convergence beyond the values already obtained, without using constraints on the cost function [38]. This technique is useful to speed up the convergence of the algorithm, by initializing the optimization procedure with parameters obtained from previous runs. Here, we initialize the state with the one obtained imposing the extra constraints on the purity and on the concurrence, and then we run the VQE minimizing only the mean energy.The results, as functions of $\delta$, are shown in Fig.8 for $N=6$ sites.

Moreover, in Fig.9, the fidelity between the VQE state and the exact ground state is depicted as a function of the number $N$ of sites and at $\delta=0.8$, for both the VQE without any constraints in the cost function, and with the Warm-Start approach. It can be observed that, in the latter situation, there is a significant improvement in the accuracy of the algorithm.

As found for the SSH model, the fidelity in the Kitaev chain between the exact ground state and the corresponding VQE state decreases relevantly in the non-trivial phase, as shown in Fig.3 (red circles).Similarly, if we consider the reduced density matrix between two adjacent sites of the Kitaev chain, its purity has a sudden decrease in the non-trivial phase. This fact can be intuitively understood by observing that the XY spin model (where the Kitaev chain is mapped on by the Jordan-Wigner transformation) exhibits a ferromagnetic phase when the Kitaev model is in its non-trivial phase. Here the ground state is a GHZ entangled state (due to the $Z_{2}$ spin-flip symmetry of the XY Hamiltonian [39, 40]), then every two-spin state is maximally mixed.

By introducing the constraint of minimizing the purity, in the range for the ratio $\mu/t$ where the algorithm without any constraints fails, we achieve a significant improvement in the fidelity, as shown in Fig.10 (black dots).

Again, we also exploit the Warm-Start approach to further enhance the accuracy already achieved in the topologically non-trivial phase with the purity as a constraint. This leads to a significant improvement of the fidelity, as shown in Fig.11.

In Fig.12, we show the fidelity as a function of the number $N$ of sites, for $\mu/t=0.3$ and $\Delta/t=1.2$, in the case of the VQE without the constraints (red circles) and with the Warm-Start approach (blue crosses), up to $N=14$ sites (which is the largest number of sites we were able to test on our high-performance computing facilities).

## Appendix C Progressive change of parameters with concurrence and purity controls

In this appendix, we described in more detail the second third mentioned in section III on the main text, and we report some results obtained following it.

Concerning the random choice of the initial parameters in the circuit, the problem of choosing the suitable Lagrangian multipliers in Eq.(17) requires a careful investigation. For this reason, here we propose another Warm-Start approach, optimizing only the energy of the system, i.e., defining the cost function

$\displaystyle\mathcal{C}(\bm{\theta})=\min_{\bm{\theta}}E\left(\bm{\theta}%\right),$ | (18) |

but also introducing a result acceptance check, based on the values of the concurrence for the SSH chain and of the purity for the Kitaev chain.Starting from $\delta_{\text{first}}=-1.0$ for the SSH chain ($\mu/t$ for the Kitaev chain) in the trivial phase, the first-point algorithm takes the number $n$ of initial guesses as an input, generating directly the pool of competing points from which the one with the lowest energy is taken. Thereafter, one checks if the concurrence of its edge qubits is close to 0 (the purity of two first neighbors is close to 1), and proceeds with the computation of the subsequent points, each time starting from the reference parameters of the previous point.

The results for the SSH model with $N=10$ sites are shown in the Fig.13, where the black circles denote the fidelity between the VQE state obtained using the present method and the exact state, while the red circles represent the same fidelity but without performing any concurrence check. A minimum fidelity around $0.87$ is observed at the transition point $\delta=0$, increasing beyond $0.99$ in the topologically non-trivial phase, as the fully dimerized limit is approached. Instead, the VQE simulations without the concurrence control return a minimum-energy state that is a linear superposition of the two degenerate ground states, with fidelity dropping down to around 50% in the topologically non-trivial phase.

In Fig.14, the results for the Kitaev chain, with $N=10$ sites, $t=1$, and $\Delta=1.2$ are presented. The black circles show the fidelity, as the ratio $\mu/t$ varies, of the exact state with the VQE state obtained using the purity control method, while the red circles show the same fidelity with the VQE state obtained without the purity control. This method improves the convergence of the algorithm to over 99% in the topologically non-trivial phase, with minimum values of 92% and 96% around the phase transition points. These results are in contrast to the fidelity values obtained by the VQE algorithm without purity check, where the fidelity drastically drops to 50%.

## References

- NielsenandChuang [2010]M.NielsenandI.Chuang,
*Quantum Computation and Quantum Information: 10thAnniversary Edition*(Cambridge University Press,2010). - Preskill [2018]J.Preskill,Quantum2,79 (2018).
- etal. [2019]F.A.etal.,Nature574,505–510 (2019).
- etal. [2024]A.D.K.et al.,Computational supremacy in quantum simulation (2024),arXiv:2403.00910[quant-ph] .
- YagoMalo
*etal.*[2024]J.YagoMalo, L.Lepori,L.Gentini,andM.L.M.Chiofalo,Technologies12,10.3390/technologies12050064 (2024). - Peruzzo
*etal.*[2014]A.Peruzzo, J.McClean,P.Shadbolt, M.-H.Yung, X.-Q.Zhou, P.J.Love, A.Aspuru-Guzik,andJ.L.O’Brien,Nature Communications5,4213 (2014). - Fedorov
*etal.*[2021]D.A.Fedorov, B.Peng,N.Govind,andY.Alexeev,Vqe method: A short survey and recent developments(2021),arXiv:2103.08505 [quant-ph] . - Consiglio
*etal.*[2022]M.Consiglio, W.J.Chetcuti, C.Bravo-Prieto, S.Ramos-Calderer, A.Minguzzi, J.I.Latorre, L.Amico,andT.J.G.Apollaro,Journal of Physics A: Mathematical and Theoretical55,265301 (2022). - BernevigandHughes [2013]B.BernevigandT.Hughes,
*Topological Insulators and Topological Superconductors*(Princeton University Press,2013). - HasanandKane [2010]M.Z.HasanandC.L.Kane,Rev. Mod. Phys.82,3045 (2010).
- Freedman
*etal.*[2002]M.H.Freedman, A.Kitaev,M.J.Larsen,andZ.Wang,Topological quantum computation (2002),arXiv:quant-ph/0101025 [quant-ph] . - Kitaev [2006]A.Kitaev,Annals of Physics321,2 (2006),january Special Issue.
- Nayak
*etal.*[2008]C.Nayak, S.H.Simon,A.Stern, M.Freedman,andS.DasSarma,Rev. Mod. Phys.80,1083 (2008). - Kitaev [2003]A.Kitaev,Annals of Physics303,2–30 (2003).
- Dennis
*etal.*[2002]E.Dennis, A.Kitaev,A.Landahl,andJ.Preskill,Journal of Mathematical Physics43,4452–4505 (2002). - Smith
*etal.*[2022]A.Smith, B.Jobst,A.G.Green,andF.Pollmann,Phys. Rev. Res.4,L022020 (2022). - Koh
*etal.*[2024]J.M.Koh, T.Tai,andC.H.Lee,Nature Communications15,5807 (2024). - Okada
*etal.*[2023]K.N.Okada, K.Osaki,K.Mitarai,andK.Fujii,Phys. Rev. Res.5,043217 (2023). - Lumia
*etal.*[2022]L.Lumia, P.Torta,G.B.Mbeng, G.E.Santoro, E.Ercolessi, M.Burrello,andM.M.Wauters,PRX Quantum3,020320 (2022). - Su
*etal.*[1979]W.P.Su, J.R.Schrieffer,andA.J.Heeger,Phys. Rev. Lett.42,1698 (1979). - Kitaev [2001]A.Y.Kitaev,Physics-Uspekhi44,131 (2001).
- Asbóth
*etal.*[2016]J.K.Asbóth, L.Oroszlány,andA.Pályi,*A Short Course on Topological Insulators*(Springer International Publishing,2016). - AltlandandZirnbauer [1997]A.AltlandandM.R.Zirnbauer,Phys. Rev. B55,1142 (1997).
- Bernevig [2013]B.A.Bernevig,
*Topologicalinsulators and topological superconductors*(Princeton University Press,2013). - Mourik
*etal.*[2012]V.Mourik, K.Zuo,S.M.Frolov, S.R.Plissard, E.P. A.M.Bakkers,andL.P.Kouwenhoven,Science336,1003 (2012),https://www.science.org/doi/pdf/10.1126/science.1222360 . - Nadj-Perge
*etal.*[2014]S.Nadj-Perge, I.K.Drozdov, J.Li,H.Chen, S.Jeon, J.Seo, A.H.MacDonald, B.A.Bernevig,andA.Yazdani,Science346,602 (2014),https://www.science.org/doi/pdf/10.1126/science.1259327 . - Ripka
*etal.*[1986]S.Ripka, J.Blaizot,andG.Ripka,*Quantum Theory of Finite Systems*(MIT Press,1986). - Giamarchi [2003]T.Giamarchi,
*Quantum Physics in One Dimension*,International Seriesof Monographs on Physics(Clarendon Press,2003). - Kandala
*etal.*[2017]A.Kandala, A.Mezzacapo,K.Temme, M.Takita, M.Brink, J.M.Chow,andJ.M.Gambetta,Nature549,242 (2017). - Qiskit contributors [2023]Qiskitcontributors,Qiskit: An open-source framework for quantum computing (2023).
- Larocca
*etal.*[2024]M.Larocca, S.Thanasilp,S.Wang, K.Sharma, J.Biamonte, P.J.Coles, L.Cincio, J.R.McClean,Z.Holmes,andM.Cerezo,A review of barrenplateaus in variational quantum computing (2024),arXiv:2405.00781 [quant-ph]. - NocedalandWright [2006]J.NocedalandS.J.Wright,
*Numerical Optimization*,2nded.,Springer Series in Operations Research and Financial Engineering(Springer-Verlag New York,NewYork, NY,2006)pp.XXII, 664,published: 27 July 2006, Softcover Published: 01 April2009. - HillandWootters [1997]S.HillandW.K.Wootters,Physical Review Letters78,5022–5025 (1997).
- Wootters [1998]W.K.Wootters,Phys. Rev. Lett.80,2245 (1998).
- Hildebrand [2007]R.Hildebrand,Journal of Mathematical Physics48(2007).
- Horodecki
*etal.*[2009]R.Horodecki, P.Horodecki, M.Horodecki,andK.Horodecki,Rev. Mod. Phys.81,865 (2009). - Xu
*etal.*[2023]Q.Xu, G.Zheng, Y.-X.Wang, P.Zoller, A.A.Clerk,andL.Jiang,npj Quantum Information9,78 (2023). - Egger
*etal.*[2021]D.J.Egger, J.Mareček,andS.Woerner,Quantum5,479 (2021). - GiampaoloandHiesmayr [2013]S.M.GiampaoloandB.C.Hiesmayr,Phys. Rev. A88,052305 (2013).
- Mussardo [2009]G.Mussardo,
*Statistical Field Theory: An Introduction to ExactlySolved Models in Statistical Physics*,Oxford Graduate Texts(OUP Oxford,2009).