arXiv:2308.11616v2quant-ph

Zero and Finite Temperature Quantum Simulations Powered by Quantum Magic

Andi Gu1, Hong-Ye Hu1, Di Luo1,2,3, Taylor L. Patti4, Nicholas C. Rubin5, and Susanne F. Yelin1,3

1Department of Physics, Harvard University, 17 Oxford Street, Cambridge, MA 02138, USA
2Center for Theoretical Physics, Massachusetts Institute of Technology, Cambridge, MA 02139, USA
3The NSF AI Institute for Artificial Intelligence and Fundamental Interactions
4NVIDIA, Santa Clara, CA 95051, USA
5Google Quantum AI, Venice, CA 90291, United States
Andi Gu: Equal contributions (Alphabetical order)
Hong-Ye Hu: Equal contributions (Alphabetical order)
Di Luo: Equal contributions (Alphabetical order)
Susanne F. Yelin: syelin@g.harvard.edu

We introduce a quantum information theory-inspired method to improve the characterization of many-body Hamiltonians on near-term quantum devices. We design a new class of similarity transformations that, when applied as a preprocessing step, can substantially simplify a Hamiltonian for subsequent analysis on quantum hardware. By design, these transformations can be identified and applied efficiently using purely classical resources. In practice, these transformations allow us to shorten requisite physical circuit-depths, overcoming constraints imposed by imperfect near-term hardware. Importantly, the quality of our transformations is tunable: we define a ‘ladder’ of transformations that yields increasingly simple Hamiltonians at the cost of more classical computation. Using quantum chemistry as a benchmark application, we demonstrate that our protocol leads to significant performance improvements for zero and finite temperature free energy calculations on both digital and analog quantum hardware. Specifically, our energy estimates not only outperform traditional Hartree-Fock solutions, but this performance gap also consistently widens as we tune up the quality of our transformations. In short, our quantum information-based approach opens promising new pathways to realizing useful and feasible quantum chemistry algorithms on near-term hardware.

A central task in quantum chemistry is determining ground state energies and finite temperature free energies for electronic Hamiltonians. While numerous algorithms aim to leverage quantum hardware for solutions [21, 31, 47, 48], the constraints of near-term hardware, particularly limited circuit depth, pose challenges. One approach to address this difficulty is classically assisted quantum algorithms, wherein computation is offloaded to a classical computer where possible, and the quantum hardware only supplies the quantum resources which are absolutely necessary to identify an accurate solution. A natural way in which a classical computer might assist a quantum algorithm is to preprocess the electronic Hamiltonian into a more favorable form before it is analyzed on quantum hardware. For instance, one can use a classical algorithm to partition the terms of a Hamiltonian HH into commuting groups which can be measured simultaneously, so that calculating the expectation ⟨H⟩\langle H \rangle can be done with fewer samples [42].

In this work, we consider another preprocessing method: similarity transformations, wherein our aim is to identify a unitary change of basis UU such that the transformed Hamiltonian Heff≡U†HUH_{\mathrm{eff}} \equiv U^{\dagger}HU is more amenable to analysis on near-term quantum hardware. Indeed, similarity transforms have long been used to simplify Hamiltonians [4, 8, 13, 22, 24, 33, 37, 44, 46]. In this work, we take a novel quantum information theoretic approach to similarity transforms: we center our techniques around two fundamental measures of ‘quantumness’ – namely, entanglement and nonstabilizerness (popularly termed ‘quantum magic’). These notions of quantumness formalize the intuition that the degree to which a state is truly quantum can be measured by how difficult it is to simulate classically. For instance, low entanglement states can be simulated by matrix product states [10]. However, entanglement alone is insufficient to completely characterize quantumness – classically simulable (i.e., using classical resources that scales polynomially in system size) circuits [1], known as Clifford circuits can generate an unbounded amount of entanglement. Indeed, it has been shown that random Clifford circuits will almost always produce volume-law entangled states [43]. Yet, these circuits are unable to express a different quantum resource: quantum magic. More precisely, Clifford circuits are generated by a non-universal gateset (composed of the Hadamard, phase, and CNOT gates); this has motivated the formal definition of magic as a measure of the amount of non-Clifford resources required to prepare a particular state [18, 35]. Like entanglement, quantum magic has also been shown to be directly connected with the hardness of classical simulation [5].

Our main insight in this work is that similarity transforms can be used to eliminate spurious quantumness (i.e., classically simulable entanglement and magic) in the Hamiltonian’s eigenbasis before it is analyzed on quantum hardware. Then, the real hardware only needs to supply the fundamentally necessary quantumness for the problem, hence helping shorten requisite circuit depths. We introduce a class of similarity transformations, represented as Clifford circuits augmented with a few (non-Clifford) single-qubit ZZ-rotation gates. For brevity, we call these circuits Clifford + kRz circuits. Conveniently, this design allows good similarity transforms to be both identified and applied efficiently using purely classical resources. The Clifford component of the circuit can be interpreted as eliminating spurious entanglement from HeffH_{\text{eff}}, while the non-Clifford gates eliminate spurious magic. Importantly, by varying the number of non-Clifford gates, we show that the power of these transformations is tunable, so that we can identify increasingly simple eigenbases (i.e., exhibiting less entanglement and magic) at the cost of increased classical computational resources. Since this tunability comes in discrete steps, we term this the “quantum magic ladder” (see Fig. 1). By applying our approach to zero and finite temperature free energy calculations, we demonstrate that this reduction in quantumness can have significant practical benefits. Specifically, we show that our similarity transforms find energies which are significantly more accurate than other popular classical solutions, and moreover, the performance gap only improves as we climb the quantum magic ladder. Furthermore, we present a classical algorithm which outputs a new (simplified) effective Hamiltonian HeffH_{\mathrm{eff}}, related to the original Hamiltonian via a similarity transform. We show that the resultant simplified Hamiltonians HeffH_{\mathrm{eff}} produced by our method enables significantly reduced circuit depths on quantum hardware. Under this quantum information theoretic lens, these results demonstrate a promising pathway for designing practical quantum chemistry algorithms in the NISQ era.

Quantum Chemistry. Quantum chemistry is a natural domain for assessing the efficacy of our protocol. The Hamiltonians produced by quantum chemistry systems have immediate physical interpretations, allowing us to apply physical intuition to better understand how our protocol modulates the ‘quantumness’ of a problem. Furthermore, there is a wealth of established quantum chemistry methods against which we can benchmark our protocol, such as the Hartree-Fock (HF) approximation. In short, quantum chemistry allows us to demonstrate the advantages of our approach in a well-understood physical context.

Diagram of a ladder with four rungs, from the bottom: Hartree-Fock, Clifford, Clifford + Rz and Full Quantum, with an arrow labelled Increasing k pointing up. Beside each rung, a square map of a matrix: blue and red entries scattered at the bottom rung, gathering onto the diagonal toward the top. Arrows along the side read Classical simulation limit and Quantum magic. A brace joins the upper rungs to Zero temperature, min over theta of psi H psi, and Finite temperature, min over theta of Tr(rho H) minus TS, each with a thermometer. Below, a row of orbital shapes over a matrix H between two boxes labelled Clifford, U dagger on the left and U on the right, each holding three small Rz gates.

Figure 1: A general approach for similarity transformations using the quantum magic ladder. Starting with a second quantized Hamiltonian HH, we use classical simulable quantum circuits (e.g., Clifford + kRz circuits) to reduce the quantumness of the Hamiltonian by the basis transformation Heff=U†HUH_{\mathrm{eff}} = U^{\dagger}HU. We climb up the quantum magic ladder by increasing kk, which increases the degree to which UU can simplify the Hamiltonian (by reducing the quantum magic of the HeffH_{\text{eff}} eigenbasis). Note that for finite temperature calculations, when working in the grand canonical ensemble, we replace HH with H−μNH - \mu N.

In quantum chemistry, one key goal of the electronic structure problem is to solve the energy of many-body electronic Hamiltonians at zero and finite temperature. These electronic Hamiltonians are often expressed in a molecular orbital basis:

H=∑p,qhpqc^p†c^q+12∑p,q,r,sVpqrsc^p†c^q†c^sc^r,(1)H = \sum_{p,q} h_{pq} \hat{c}_p^\dagger \hat{c}_q + \frac{1}{2} \sum_{p,q,r,s} V_{pqrs} \hat{c}_p^\dagger \hat{c}_q^\dagger \hat{c}_s \hat{c}_r, \tag{1}

where p,q,r,sp,q,r,s label the spin-orbitals and c^α,  c^α†\hat{c}_{\alpha}, \; \hat{c}_{\alpha}^{\dagger} are the annihilation and creation fermionic operators. Anticipating analysis on qubit-based quantum computers, we apply a fermion-qubit mapping (e.g., parity mapping [36], Jordan-Wigner [20], Bravyi-Kitaev [41]) to map the fermionic Hamiltonian to a qubitized Hamiltonian H=∑iαiPiH = \sum_{i} \alpha_i P_i, where PiP_i is an nn-qubit Pauli operator. For the molecules considered in this work (LiH and H2O\text{H}_2\text{O}), the qubitized Hamiltonians contain O(102)O(10^2) Pauli strings. The explicit construction of these Hamiltonians was performed using the OpenFermion library [28]. In this work, we focus on two paradigmatic problems involving these electronic Hamiltonians, which are to calculate the ground state energy of HH, and the free energy of the Gibbs state at finite temperature [9]. In this work, we work in the grand canonical ensemble, so that the Gibbs state is ρ∝exp⁡(−β(H−μN))\rho \propto \exp(-\beta(H - \mu N)), with inverse temperature β\beta, chemical potential μ\mu, and particle number NN.

The Quantum Magic Ladder. Similarity transformations have historically occupied a key role in the development of quantum mechanics. An early example is the Schrieffer-Wolff method, which generates low-energy effective Hamiltonians by constructing similarity transformations that separate high-energy and low-energy subspaces [4, 8, 33, 44]. In keeping with this tradition, we argue that similarity transforms can also play a central role in bringing quantum chemistry algorithms closer to practical feasibility in the NISQ era. One way of understanding the role of a similarity transformation UU, particularly in the context of near-term hardware, is as a virtual circuit that is appended to the end of a ground state preparation circuit VV. That is, if we define a transformed Hamiltonian Heff=U†HUH_{\text{eff}} = U^{\dagger}HU, we observe that ⟨V†HeffV⟩=⟨(UV)†H(UV)⟩\langle V^{\dagger} H_{\text{eff}} V \rangle = \langle (UV)^{\dagger} H(UV) \rangle, so that, in effect, the applied circuit is UVUV. This is especially important for NISQ devices, which face limited circuit depths (hence limited expressive power of VV). An appropriate similarity transformation UU can act like an appended circuit that significantly eases the burden of the real quantum circuit VV.

In what follows, we describe a unified framework to programatically construct a new class of similarity transformations for quantum chemistry algorithms, a system we term “the quantum magic ladder.” These transformations are comprised of Clifford circuits augmented by a few Rz gates. There are several reasons for the attractiveness of the Clifford + kRz approach. Firstly, Clifford circuits are classically simulable with complexity O(n3)O(n^3), where nn is the system size [1]. As we discuss below, these Clifford circuits can be dramatically enhanced by doping them with just a few (kk) non-Clifford gates. While this enhancement comes at the cost of an increase in simulation complexity that is exponential in kk, Clifford + kRz transforms with k≤O(log⁡n)k \leq O(\log n) can still be simulated with polynomial classical resources [1, 3, 6]. Secondly our circuits strictly generalize more conventional circuits such as Clifford circuits with a few T gates. Indeed, we find that the additional continuous degrees of freedom introduced by Clifford + kRz circuits (i.e., the rotation angle of each Rz gate) is both easy to optimize and yields significant performance improvements. Furthermore, these improvements are free in the sense that the additional simulation cost for kRz gates is exactly the same as that of kk T gates. The simulation of these Clifford + kRz circuits was performed using the PyClifford package [19] (for details, see Appendix A). Finally, as illustrated in Fig. 1, ‘climbing’ the quantum magic ladder provides a systematic way to increase the expressive power of our similarity transformation: one simply needs to increase kk.

The enhanced expressivity of ansatze higher on this ladder can be understood through the lens of quantum magic. Much like entanglement defines one notion of quantumness, quantum magic, or nonstabilizerness, is another metric which measures the degree to which a state can be considered truly quantum [18, 35]. Our main insight in this work is that the optimal Clifford + kRz transform can model the quantumness of HH along both axes of quantumness, capturing its entanglement via the Clifford component of the circuit, and its quantum magic via the non-Clifford components. As we climb the magic ladder, we increase the degree to which our transform can model the quantum magic of the energy eigenbasis (hence reducing the magic of the transformed Hamiltonian’s eigenbasis). In the limit as k→∞k \to \infty, our ansatz can model any unitary [29], which ultimately leads to a full reduction in the Hamiltonian’s quantumness (i.e., complete diagonalization).

Our Clifford + kRz circuits are parameterized as U(Θ)U(\Theta), where Θ\Theta is a combination of discrete and continuous parameters, corresponding to the Clifford and Rz components respectively. To identify good transformations U(Θ)U(\Theta), we make use of the variational principle for both ground state energies and finite temperature free energies. Specifically, consider the zero temperature case: U(Θ)U(\Theta) defines a parameterized effective Hamiltonian Heff(Θ)H_{\mathrm{eff}}(\Theta), and our aim is then to minimize ⟨0∣Heff(Θ)∣0⟩\langle 0|H_{\mathrm{eff}}(\Theta)|0\rangle (which is equivalent to minimizing the energy, with respect to HH, of U(Θ)∣0⟩U(\Theta)|0\rangle). Optimizing Θ\Theta is a hybrid discrete-continuous problem with a large search space, so we develop a three-step approach. First, we observe that qubitized electronic Hamiltonians strongly resemble disordered Hamiltonians, whose energy coefficients span a wide range of scales. We leverage this formal similarity by using the spectrum bifurcation renormalization group [13, 37, 46] (which produces Clifford similarity transformations effective for modelling strongly-disordered quantum materials) to find an initialization point Θ0\Theta_0 for our Clifford + kRz transformation. We then perform a combination of greedy search and gradient descent to further optimize Θ\Theta (see Appendix B for details).

Results. We apply our Clifford+kRz transformation for both ground state and finite temperature quantum chemistry calculations [7, 12, 16, 32, 39] on LiH (n=8n = 8) and H2O\text{H}_2\text{O} (n=12n = 12). While these system sizes are modest compared to the capabilities of state-of-the-art classical numerical methods, they serve as valuable proof-of-concept demonstrations for our quantum-classical hybrid approach, and are representative of the system scales that are expected to be tractable on near-term quantum devices. We start with the zero temperature case, where we aim to identify a ground state energy E=⟨0∣Heff(Θ)∣0⟩E = \langle 0|H_{\text{eff}}(\Theta)|0\rangle that closely approximates the true ground state energy E0E_0. In Fig. 2, the energy gap E−E0E - E_0 is plotted as a function of different bond lengths between atoms, where EE is the energy predicted by an optimized from Clifford + kRz transformation. First, compare the accuracy to the accuracy of the Hartree-Fock (HF) solution: since the HF solution is a strict subset of the Clifford ansatz [38], the energy gap of a pure Clifford transformation (k=0)(k = 0) is upper bounded by that of the HF solution. However, a pure Clifford circuit only surpasses the HF solution when the bond length exceeds the equilibrium bond length. In contrast, as we climb the quantum magic ladder, the energy gap is significantly reduced for all the bond lengths, including bond lengths shorter than the equilibrium bond length. Moreover, as the number of non-Clifford gates increases, the energy gap consistently decreases. This is clear evidence that tuning up the power of Clifford + kRz ansatz can significantly improve accuracy for ground state calculations. It is important to note that the number of non-Clifford gates kk should be considered in relation to the total number of qubits nn. If we allow k = exp⁡(Θ(n))k \, = \, \exp(\Theta(n)), the doped circuit can approximate an arbitrary unitary gate. In contrast, in our study, we focus on the regime where k ≪ nk\,\ll\,n to maintain the classical simulability of the circuits while still enhancing their expressibility. We observe that the convergence of our method improves as kk increases, with significant improvements seen for k=1k=1 and k=2k = 2. However, the improvement becomes marginal for higher values of kk. There is a tradeoff between the expressibility gained by increasing kk and the computational cost associated with it; it appears that there are sharply diminishing returns beyond k=2k=2. Future work could investigate this tradeoff in more detail and develop strategies for optimally selecting kk based on the problem at hand. We also note the presence of kinks in some curves of Fig. 2, which are artifacts likely due to numerical precision limitations and minor optimization errors, rather than physical phenomena.

Two line plots, Clifford+kRz for LiH above and Clifford+kRz for H2O below, of the optimality gap E minus E0 on a log scale against bond length in ångströms. Each has a blue line for each k from 0 to 4, lighter for smaller k, and a dashed black line labelled Hartree Fock above them, and an inset of M against bond length for the ground state and the first excited state.

Figure 2: E−E0E-E_0 is the gap between EE, the energy calculated by the optimized Clifford + kRz circuit, and E0E_0, the true ground state energy. We illustrate this gap for LiH and H2O\text{H}_2\text{O} as a function of their bond lengths. Note that the HF solution is consistently higher in energy, as it is strictly less expressive than the Clifford ansatz, even when k=0k = 0, underscoring the enhanced representational power of the Clifford circuits in capturing the ground state properties. Furthermore, the accuracy (as measured by E−E0E-E_0) improves as we climb the quantum magic ladder. The inset shows the stabilizer Rényi entropy MM, which quantifies the magic of the ground and first excited states at different bond lengths.

Interestingly, the energy gap peaks around a particular bond length, indicating a region of maximal quantum magic. To show this, we employ a popular metric specifically designed to quantify the magic of a state ∣ψ⟩|\psi\rangle. This metric M(∣ψ⟩)M(|\psi\rangle) is known as the stabilizer entropy [23], and is defined as

M(ψ)=−log⁡2(∑P∈Pntr⁡4(Pψ)2n),(2)M(\psi) = -\log_2 \left( \sum_{P \in \mathbb{P}_n} \frac{\operatorname{tr}^4(P\psi)}{2^n} \right), \tag{2}

where Pn\mathbb{P}_n is the nn-qubit Pauli group. Notably, it obeys M(∣ψ⟩)=0M(|\psi\rangle) = 0 if and only if ∣ψ⟩|\psi\rangle is a stabilizer state, and it is strictly positive otherwise. In general, a higher value of M(∣ψ⟩)M(|\psi\rangle) indicates a greater degree of nonstabilizerness [23]. We see in the inset of Fig. 2 that quantum magic (as measured by MM) and the energy gap peak near the same bond length, indicating that regions where the ground state has high quantum magic cannot accurately be reduced by basis transformations with insufficient non-Clifford gates. Interestingly, we observe that the magic of the ground state is typically very small at extreme bond lengths, and peaks at intermediate bond lengths. This peak in magic and energy gap likely corresponds to the Coulson-Fisher point [11], where the electronic structure transitions from single-reference to multi-reference character. This transition point is known to be challenging for computational methods [25], aligning with our observation of increased quantum resources being necessary in this region. Our quantum information theoretic approach thus provides a new perspective on this well-established concept in quantum chemistry. This suggests that in practice, hyperparameters like kk ought to be set accordingly — for extreme bond lengths, a small kk should suffice, while intermediate bond lengths will require a larger kk to accurately capture the increased magic. Near these intermediate bond length regions, accurate results demand either more powerful classical similarity transformations (i.e., larger kk) or further analysis on real quantum devices.

Violin plot of energy gap in hartrees against time in microseconds, at 0.1, 0.2 and 0.25, with a blue violin for Original and a green one for Transformed at each time, and a dashed line at 0.100 labelled Hartree Fock.

Figure 3: Pulse time reduction with the transformed Hamiltonian, depicted as a violin plot. This displays the probability density of a solution having a particular energy gap, with the width representing the solution density at each energy level. We model an analog quantum machine with a 87^{87}Rb atomic chain for LiH ground state preparation using fixed lattice spacing and total evolution time. The Rabi frequency and the local detuning of each atom are optimized. For each evolution time, twenty randomly initialized variational ground states are optimized.

We demonstrate this by applying our method on analog quantum computers. Specifically, we classically simulate the dynamics of a one-dimensional Rydberg array, which serves as a programmable quantum simulator (PQS) for preparing a ground state of LiH at a bond length 3.4Å. Note that this bond length exhibits high magic (Fig. 2), indicating that additional quantumness, supplied by the PQS, is necessary to prepare the ground state. To prepare this state, we fix the total PQS evolution time TT and evolve the initial state ∣0⟩|0\rangle under a time-dependent Rydberg Hamiltonian [2] with variationally optimized site-dependent Rabi frequencies Ωi(t)\Omega_i(t) and local detunings Δi(t)\Delta_i(t). For each fixed total evolution time TT, we variationally optimize 20 randomly initialized ground states for both the bare Hamiltonian HH, and for the Clifford-transformed Hamiltonian HeffH_{\rm eff}, using automatic differentiation with Jax [15] and Tensorcircuit [50] to directly optimize the pulse shapes Ωi(t),Δi(t)\Omega_i(t), \Delta_i(t). The results are shown in Fig. 3. Consider just the case of T=0.1μsT = 0.1 \mu s, for which dramatic differences are already clear. The optimized energy with the original Hamiltonian is concentrated at levels significantly above the HF energy, because the entanglement generated by the PQS within this small timeframe is limited. However, the Clifford + kRz similarity transform already significantly reduces the entanglement of the ground state before evolution on the PQS; hence, even under the limited evolution time T=0.1μsT = 0.1 \mu s, the PQS can quickly identify a solution that vastly surpasses the accuracy of the Hartree Fock solution. This demonstrates that Clifford + kRz transformations effectively reduce requisite entanglement and pulse times, a significant advantage for near-term quantum devices.

Line plot of the optimality gap F minus F0 in hartrees against temperature in kelvin, both on log scales, with blue lines for k = 0, 2 and 4 and a dashed black line labelled Hartree Fock. An inset plots N in angle brackets against temperature for the same lines and a black one, Untransformed in the legend.

Figure 4: Free energy gap for LiH at a bond length 3.4Å. The inset shows the entanglement negativity N\mathcal{N} averaged over each site of the Gibbs state for the transformed Hamiltonian.

For finite temperature calculations, we apply our approach to the LiH molecule for grand free energy estimation. Our ansatz for the density matrix is

ρ(Θ)=∑x∈{0,1}np(x)U(Θ)∣x⟩ ⁣⟨x∣U†(Θ),(3)\rho(\Theta) = \sum_{x \in \{0,1\}^n} p(x) U(\Theta) |x\rangle\!\langle x| U^{\dagger}(\Theta), \tag{3}

where U(Θ)U(\Theta) is a Clifford + kRz circuit. Again applying the variational principle, we solve for Θ\Theta by minimizing the free energy F=⟨H⟩−μ⟨N⟩−TS of ρ(Θ)F = \langle H \rangle - \mu \langle N \rangle - TS \text{ of } \rho(\Theta) (see Appendix B for details). The results in Fig. 4 show that the Clifford + kRz ansatz consistently reduces the free energy gap F−F0F - F_0 (where FF is the free energy of the optimized density matrix ρ(Θ)\rho(\Theta), and F0F_0 is the free energy of the true Gibbs state) as we climb the quantum magic ladder. Similar to the zero temperature case, all Clifford transformations outperform the finite temperature HF method, including the pure Clifford transformation (k=0k = 0), which reduces the free energy gap by ∼50%\sim 50\%.

To quantify the extent to which our transforms reduce the quantumness of the transformed Hamiltonian, we examine the entanglement features and off-diagonal terms of the exact Gibbs state for the transformed Hamiltonian HeffH_{\mathrm{eff}}. We quantify the entanglement of a mixed state with its entanglement negativity N(ρ)=(∥ρΓA∥1−1)/2\mathcal{N}(\rho) = (\|\rho^{\Gamma_A}\|_1 - 1)/2, where ρΓA\rho^{\Gamma_A} is the partial transpose of ρ\rho with respect to subsystem AA [14, 17, 30]. Using this metric, in the inset of Fig. 4, we show that our similarity transformations indeed consistently reduce the entanglement of the

Violin plot of off-diagonal elements, rho ij, on a log scale against temperature in kelvin, at 40, 400, 4000 and 40000, with four violins at each temperature: blue for Original, green for k = 0, orange for k = 2 and red for k = 4.

Figure 5: Density distribution of the off-diagonal term for the Gibbs state ρ\rho of LiH across different temperatures for bond length 3.4Å. The width of features is proportional to solution density.

Gibbs state. Furthermore, Fig. 5 shows that, across a wide temperature range, our transformation’s ability to suppress off-diagonal elements in the exact Gibbs state ρ\rho grows with kk. This provides further evidence that Clifford + kRz transformations provide an effective method to reduce the quantumness of a Hamiltonian, and moreover, that this reduction is tunable by varying kk.

Conclusions. We have developed a general approach for zero and finite temperature quantum calculations from a quantum information theoretic perspective, facilitated by the Clifford + kRz transformation. One of the primary benefits of our approach is that it is fully classically simulable for small kk, providing an convenient method to conserve costly quantum resources. Furthermore, by tuning kk, we provide a means of customizing the similarity transforms produced by our technique: larger kk enables greatly increased expressive power and accuracy, at the cost of increased classical computation. This tunability forms the basis of what we term the quantum magic ladder. We apply these methods in the context of ground state and free energy calculations for quantum chemistry, demonstrating superior performance to HF techniques and consistent improvement as we ascend the quantum magic ladder, for both digital and analog quantum computers. We examine how the Clifford + kRz transformation reduces quantumness (as measured by entanglement and magic) before any algorithms are run on quantum hardware, and demonstrated how this reduction directly translates to reduced requirements for quantum resources. While our approach shows promise for small-scale systems like LiH and H2O\mathrm{H}_{2}\mathrm{O}, it is necessary to investigate its scalability to larger systems. The classical simulation cost of the Clifford+kRz circuits grows exponentially with kk, which could limit the applicability of our method to larger systems. However, it is encouraging to note that we are already able to find significant improvements for k≤2k \leq 2, which suggests that even a small number of strategically placed non-Clifford gates can provide significant benefits. As quantum hardware continues to improve, we expect that the insights and techniques developed in this work, such as the use of classically-optimized similarity transformations to reduce the “quantumness" of the problem, will be valuable for scaling up to larger system sizes.

Having established this framework, we also identify a number of remaining open questions and future directions. Algorithmically, in addition to the greedy search algorithms used in this work, powerful methods such as simulated annealing and differentiable quantum architecture search [49] could be considered. Our similarity transformation based on doped Clifford circuits could also potentially augment well-known numerical approaches such as density matrix renormalization group (DMRG) [34]. Since our method identifies effective Hamiltonians whose ground states have significantly lower entanglement compared to the original problem, it could potentially aid in the construction of more efficient tensor network representations. Moreover, recent work [27] has shown that the stabilizer formalism can be integrated with tensor networks. By transforming the problem into a basis where the ground state is closer to a stabilizer state, our approach could enable the use of these compact representations. Investigating the interplay between our similarity transformations and tensor network methods could lead to powerful new tools for simulating quantum many-body systems. Finally, to scale finite temperature calculations to larger systems, high-dimensional classical probability distributions of the Gibbs state can be simulated using generative models in the spirit of β-VQE\beta\text{-VQE} [26]. Our approach can also be applied to the finite temperature calculation based on the thermal double field framework [40, 45]. This offers an opportunity to tailor our transformations to specific applications, opening new pathways for near-term quantum computers to address a wide array of quantum chemistry problems.

Acknowledgments

The authors would like to thank Chong Sun, Yi Tan, Linqing Peng, Yuan Liu, Shi-Xin Zhang, Joonho Lee, James Whitfield, and Ryan Babbush for the helpful discussions. DL acknowledges support from the NSF AI Institute for Artificial Intelligence and Fundamental Interactions (IAIFI). This material is based upon work supported by the U.S. Department of Energy, Office of Science, National Quantum Information Science Research Centers, Co-design Center for Quantum Advantage (C2QA) under contract number DE-SC0012704. HYH is grateful for the support from Harvard Quantum Initiative Fellowship. SFY would like to thank the NSF through a Cornell HDR and the CUA PFC grant.

References

References (50)

[1] S. Aaronson and D. Gottesman. Improved simulation of stabilizer circuits. Phys. Rev. A, 70:052328, Nov. 2004. DOI: 10.1103/PhysRevA.70.052328.

[2] C. S. Adams, J. D. Pritchard, and J. P. Shaffer. Rydberg atom quantum technologies. Journal of Physics B: Atomic, Molecular and Optical Physics, 53(1):012002, Dec. 2019. DOI: 10.1088/1361-6455/ab52ef.

[3] S. Bravyi and D. Gosset. Improved Classical Simulation of Quantum Circuits Dominated by Clifford Gates. Phys. Rev. Lett., 116:250501, June 2016. DOI: 10.1103/PhysRevLett.116.250501.

[4] S. Bravyi, D. P. DiVincenzo, and D. Loss. Schrieffer–Wolff transformation for quantum many-body systems. Annals of Physics, 326(10): 2793–2826, Oct. 2011. ISSN 00034916. DOI: 10.1016/j.aop.2011.06.004.

[5] S. Bravyi, D. Browne, P. Calpin, E. Campbell, D. Gosset, and M. Howard. Simulation of quantum circuits by low-rank stabilizer decompositions. Quantum, 3:181, Sept. 2019. DOI: 10.22331/q-2019-09-02-181.

[6] S. Bravyi, D. Gosset, and Y. Liu. How to Simulate Quantum Measurement without Computing Marginals. Phys. Rev. Lett., 128:220503, June 2022. DOI: 10.1103/PhysRevLett.128.220503.

[7] B. J. Brown, D. Loss, J. K. Pachos, C. N. Self, and J. R. Wootton. Quantum memories at finite temperature. Rev. Mod. Phys., 88:045005, Nov. 2016. DOI: 10.1103/RevModPhys.88.045005.

[8] L. S. Cederbaum, J. Schirmer, and H. D. Meyer. Block diagonalisation of Hermitian matrices. Journal of Physics A: Mathematical and General, 22(13):2427–2439, July 1989. ISSN 0305-4470, 1361-6447. DOI: 10.1088/0305-4470/22/13/035.

[9] A. N. Chowdhury And and R. D. Somma. Quantum algorithms for Gibbs sampling and hitting-time estimation. Quantum Information and Computation, 17(1&2):41–64, Jan. 2017. ISSN 15337146, 15337146. DOI: 10.26421/QIC17.1-2-3.

[10] J. I. Cirac, D. Pérez-García, N. Schuch, and F. Verstraete. Matrix product states and projected entangled pair states: Concepts, symmetries, theorems. Reviews of Modern Physics, 93(4), Dec. 2021. DOI: 10.1103/revmodphys.93.045003.

[11] C. Coulson and I. Fischer. Xxxiv. notes on the molecular orbital treatment of the hydrogen molecule. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 40(303):386–393, 1949. DOI: 10.1080/14786444908521726. URL https://doi.org/10.1080/14786444908521726.

[12] J. F. Donoghue, B. R. Holstein, and R. Robinett. Quantum electrodynamics at finite temperature. Annals of Physics, 164(2):233–276, 1985. ISSN 0003-4916. DOI: https://doi.org/10.1016/0003-4916(85)90016-8.

[13] C. M. Duque, H.-Y. Hu, Y.-Z. You, V. Khemani, R. Verresen, and R. Vasseur. Topological and symmetry-enriched random quantum critical points. Phys. Rev. B, 103:L100207, Mar. 2021. DOI: 10.1103/PhysRevB.103.L100207.

[14] J. Eisert and M. B. Plenio. A comparison of entanglement measures. Journal of Modern Optics, 46(1):145–154, Jan. 1999. ISSN 1362-3044. DOI: 10.1080/09500349908231260.

[15] R. Frostig, M. Johnson, and C. Leary. Compiling machine learning programs via high-level tracing. 2018. URL https://mlsys.org/Conferences/doc/2018/146.pdf.

[16] N. Haldolaarachchige, A. B. Karki, W. A. Phelan, Y. M. Xiong, R. Jin, J. Y. Chan, S. Stadler, and D. P. Young. Effect of chemical doping on the thermoelectric properties of FeGa3. Journal of Applied Physics, 109(10), May 2011. ISSN 1089-7550. DOI: 10.1063/1.3585843.

[17] M. Horodecki, P. Horodecki, and R. Horodecki. Separability of mixed states: necessary and sufficient conditions. Physics Letters A, 223(1–2):1–8, Nov. 1996. ISSN 0375-9601. DOI: 10.1016/s0375-9601(96)00706-2. URL http://dx.doi.org/10.1016/S0375-9601(96)00706-2.

[18] M. Howard and E. Campbell. Application of a Resource Theory for Magic States to Fault-Tolerant Quantum Computing. Physical Review Letters, 118(9), Mar. 2017. ISSN 1079-7114. DOI: 10.1103/physrevlett.118.090501.

[19] H.-Y. Hu, C. Zhao, T. L. Patti, A. Gu, Y.-Z. You, and S. Yelin. PyClifford: Efficient Clifford Circuit Simulation in Python. In preparation, 2023.

[20] P. Jordan and E. P. Wigner. About the Pauli exclusion principle. Z. Phys., 47:631–651, 1928. DOI: 10.1007/BF01331938.

[21] C. Kang, N. P. Bauman, S. Krishnamoorthy, and K. Kowalski. Optimized Quantum Phase Estimation for Simulating Electronic States in Various Energy Regimes. Journal of Chemical Theory and Computation, 18(11):6567–6576, Nov. 2022. DOI: 10.1021/acs.jctc.2c00577.

[22] V. Khemani, F. Pollmann, and S. L. Sondhi. Obtaining Highly Excited Eigenstates of Many-Body Localized Hamiltonians by the Density Matrix Renormalization Group Approach. Phys. Rev. Lett., 116:247204, June 2016. DOI: 10.1103/PhysRevLett.116.247204.

[23] L. Leone, S. F. Oliviero, and A. Hamma. Stabilizer Rényi Entropy. Physical Review Letters, 128(5), Feb. 2022. DOI: 10.1103/physrevlett.128.050402.

[24] S. P. Lim and D. N. Sheng. Many-body localization and transition by density matrix renormalization group and exact diagonalization studies. Phys. Rev. B, 94:045111, July 2016. DOI: 10.1103/PhysRevB.94.045111.

[25] P. A. Limacher, P. W. Ayers, P. A. Johnson, S. De Baerdemacker, D. Van Neck, and P. Bultinck. A new mean-field method suitable for strongly correlated electrons: Computationally facile antisymmetric products of nonorthogonal geminals. Journal of chemical theory and computation, 9(3):1394—1401, March 2013. ISSN 1549-9618. DOI: 10.1021/ct300902c. URL https://doi.org/10.1021/ct300902c.

[26] J.-G. Liu, L. Mao, P. Zhang, and L. Wang. Solving quantum statistical mechanics with variational autoregressive networks and quantum circuits. Machine Learning: Science and Technology, 2(2):025011, Feb. 2021. DOI: 10.1088/2632-2153/aba19d.

[27] S. Masot-Llima and A. Garcia-Saez. Stabilizer tensor networks: universal quantum simulator on a basis of stabilizer states. arXiv/quant-ph, 2024. DOI: 10.48550/arXiv.2403.08724.

[28] J. R. McClean, N. C. Rubin, K. J. Sung, I. D. Kivlichan, X. Bonet-Monroig, Y. Cao, C. Dai, E. S. Fried, C. Gidney, B. Gimby, P. Gokhale, T. Häner, T. Hardikar, V. Havlíček, O. Higgott, C. Huang, J. Izaac, Z. Jiang, X. Liu, S. McArdle, M. Neeley, T. O’Brien, B. O’Gorman, I. Ozfidan, M. D. Radin, J. Romero, N. P. D. Sawaya, B. Senjean, K. Setia, S. Sim, D. S. Steiger, M. Steudtner, Q. Sun, W. Sun, D. Wang, F. Zhang, and R. Babbush. Openfermion: the electronic structure package for quantum computers. Quantum Science and Technology, 5(3):034014, jun 2020. DOI: 10.1088/2058-9565/ab8ebc. URL https://dx.doi.org/10.1088/2058-9565/ab8ebc.

[29] G. Nebe, E. M. Rains, and N. J. Sloane. Real and Complex Clifford Groups, pages 171–192. Springer Berlin Heidelberg, Berlin, Heidelberg, 2006. ISBN 978-3-540-30731-0. DOI: 10.1007/3-540-30731-1_6.

[30] A. Peres. Separability Criterion for Density Matrices. Physical Review Letters, 77(8):1413–1415, Aug. 1996. ISSN 1079-7114. DOI: 10.1103/physrevlett.77.1413.

[31] A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O’Brien. A variational eigenvalue solver on a photonic quantum processor. Nature Communications, 5(1):4213, 2014. DOI: 10.1038/ncomms5213.

[32] C. Powers, L. Bassman Oftelie, D. Camps, and W. A. De Jong. Exploring finite temperature properties of materials with quantum computers. Scientific Reports, 13(1):1986, Feb. 2023. ISSN 2045-2322. DOI: 10.1038/s41598-023-28317-5.

[33] G. Roussy. An approximate block diagonalization for hermitian matrices as an improvement on successive Van Vleck transformations. Molecular Physics, 26(5):1085–1092, Nov. 1973. ISSN 0026-8976, 1362-3028. DOI: 10.1080/00268977300102311.

[34] U. Schollwöck. The density-matrix renormalization group. Reviews of Modern Physics, 77 (1):259–315, Apr. 2005. ISSN 1539-0756. DOI: 10.1103/revmodphys.77.259.

[35] J. R. Seddon and E. T. Campbell. Quantifying magic for multi-qubit operations. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences, 475(2227): 20190251, July 2019. ISSN 1471-2946. DOI: 10.1098/rspa.2019.0251.

[36] J. T. Seeley, M. J. Richard, and P. J. Love. The Bravyi-Kitaev transformation for quantum computation of electronic structure. The Journal of Chemical Physics, 137(22), Dec. 2012. ISSN 1089-7690. DOI: 10.1063/1.4768229.

[37] K. Slagle, Y.-Z. You, and C. Xu. Disordered XYZ spin chain simulations using the spectrum bifurcation renormalization group. Phys. Rev. B, 94:014205, July 2016. DOI: 10.1103/PhysRevB.94.014205.

[38] G. Subramanian Ravi, P. Gokhale, Y. Ding, W. M. Kirby, K. N. Smith, J. M. Baker, P. J. Love, H. Hoffmann, K. R. Brown, and F. T. Chong. CAFQA: A classical simulation bootstrap for variational quantum algorithms. arXiv e-prints, art. arXiv:2202.12924, Feb. 2022. DOI: 10.48550/arXiv.2202.12924.

[39] S.-N. Sun, M. Motta, R. N. Tazhigulov, A. T. Tan, G. K.-L. Chan, and A. J. Minnich. Quantum Computation of Finite-Temperature Static and Dynamical Properties of Spin Systems Using Quantum Imaginary Time Evolution. PRX Quantum, 2(1), Feb. 2021. ISSN 2691-3399. DOI: 10.1103/prxquantum.2.010317.

[40] Y. Takahashi and H. Umezawa. Thermo Field Dynamics. International Journal of Modern Physics B, 10(13n14):1755–1805, June 1996. ISSN 0217-9792, 1793-6578. DOI: 10.1142/S0217979296000817.

[41] A. Tranter, S. Sofia, J. Seeley, M. Kaicher, J. McClean, R. Babbush, P. V. Coveney, F. Mintert, F. Wilhelm, and P. J. Love. The Bravyi–Kitaev transformation: Properties and applications. International Journal of Quantum Chemistry, 115 (19):1431–1441, 2015. DOI: 10.1002/qua.24969.

[42] V. Verteletskyi, T.-C. Yen, and A. F. Izmaylov. Measurement optimization in the variational quantum eigensolver using a minimum clique cover. The Journal of Chemical Physics, 152(12), Mar. 2020. DOI: 10.1063/1.5141458.

[43] Z. Webb. The Clifford group forms a unitary 3-design. Quantum Information and Computation, 16(15&16):1379–1400, Nov. 2016. ISSN 15337146, 15337146. DOI: 10.26421/QIC16.15-16-8.

[44] S. R. White. Numerical canonical transformation approach to quantum many-body problems. The Journal of Chemical Physics, 117(16):7472–7482, Oct. 2002. ISSN 0021-9606, 1089-7690. DOI: 10.1063/1.1508370.

[45] J. Wu and T. H. Hsieh. Variational Thermal Quantum Simulation via Thermofield Double States. Physical Review Letters, 123(22), Nov. 2019. DOI: 10.1103/physrevlett.123.220502.

[46] Y.-Z. You, X.-L. Qi, and C. Xu. Entanglement holographic mapping of many-body localized system by spectrum bifurcation renormalization group. Phys. Rev. B, 93:104205, Mar. 2016. DOI: 10.1103/PhysRevB.93.104205.

[47] X. Yu, D. Pekker, and B. K. Clark. Bulk Geometry of the Many Body Localized Phase from Wilson-Wegner Flow. arXiv e-prints, art. arXiv:1909.11097, Sept. 2019. DOI: 10.48550/arXiv.1909.11097.

[48] X. Yuan, S. Endo, Q. Zhao, Y. Li, and S. C. Benjamin. Theory of variational quantum simulation. Quantum, 3:191, Oct. 2019. ISSN 2521-327X. DOI: 10.22331/q-2019-10-07-191.

[49] S.-X. Zhang, C.-Y. Hsieh, S. Zhang, and H. Yao. Differentiable quantum architecture search. Quantum Science and Technology, 7 (4):045023, Aug. 2022. DOI: 10.1088/2058-9565/ac87cd.

[50] S.-X. Zhang, J. Allcock, Z.-Q. Wan, S. Liu, J. Sun, H. Yu, X.-H. Yang, J. Qiu, Z. Ye, Y.- Q. Chen, C.-K. Lee, Y.-C. Zheng, S.-K. Jian, H. Yao, C.-Y. Hsieh, and S. Zhang. TensorCircuit: a Quantum Software Framework for the NISQ Era. Quantum, 7:912, Feb. 2023. ISSN 2521-327X. DOI: 10.22331/q-2023-02-02-912.

A Classical simulation of Clifford-dominated quantum circuits

In this section, we review the basic idea of the generalized stabilizer representation and how to simulate non-Clifford gates and general quantum states with stabilizer frames. First, let us define Pauli group and stabilizer group:

Definition A.1 (Pauli group). The Pauli group on nn-qubits is the set of all tensor products of Pauli matrices, i.e.

Gn={ikσi1⊗σi2⊗⋯⊗σin∣k,ih∈{0,1,2,3}}(4)G_n = \{i^k \sigma^{i_1} \otimes \sigma^{i_2} \otimes \cdots \otimes \sigma^{i_n} | k, i_h \in \{0, 1, 2, 3\}\} \tag{4}

Definition A.2 (Stabilizer group). Stabilizer group SS is a subgroup of Pauli group satisfies the following properties:

1. SS is an abelian group. For ∀si,sj∈S, [si,sj]=0\forall s_i, s_j \in S, \ [s_i, s_j] = 0.

2. It doesn’t contain negative identity, i.e. −I∉S-I \notin S.

The stabilizer group can always be represented by its generators. For example, a stabilizer group containing 2r2^r elements can be represented by rr generators of the group: S=⟨s1,s2,…,sr⟩S = \langle s_1, s_2, \dots, s_r \rangle. One should notice the generators are not unique. For example, S=⟨s1,s2,…,sr⟩=⟨s1s2,s2,…,sr⟩S = \langle s_1, s_2, \dots, s_r \rangle = \langle s_1 s_2, s_2, \dots, s_r \rangle. With the stabilizer group, one can define stabilizer states:

Theorem A.1 (Pure stabilizer state). A full stabilizer (nn generators for a nn-qubit system) stabilizes a unique pure state ∣ψS⟩|\psi_S\rangle

One can check the density matrix can be represented as

ρS=12n∏i=1n(I+si)(5)\rho_S = \frac{1}{2^n} \prod_{i=1}^n \left( I + s_i \right) \tag{5}

Another concept that is useful for describing general quantum state is the destabilizers:

Definition A.3 (Destabilizer group). A destabilizer group D\mathcal{D} is a subgroup of Pauli group associated with the stabilizer group S=⟨s1,s2,…,sr⟩S = \langle s_1, s_2, \dots, s_r \rangle. It has the following properties:

1. D\mathcal{D} has the same number of generators as SS: D=⟨d1,d2,…,dr⟩\mathcal{D} = \langle d_1, d_2, \dots, d_r \rangle.

2. For each generator did_i, it anti-commute with sis_i, but commute with all the other generators sj,j≠is_j, j \neq i.

Definition A.4 (Full tableau). A full stabilizer tableau T=(S,D)\mathcal{T} = (S, \mathcal{D}) is a pair of full stabilizer and destabilizer.

Definition A.5 (Stabilizer basis). The stabilizer basis with full tableau T\mathcal{T} is B(T)={d∣ψS⟩∣d∈D}\mathcal{B}(\mathcal{T}) = \{d \left| \psi_S \right\rangle \left| d \in \mathcal{D} \right\}

The stabilizer basis is an orthonormal and complete basis for nn-qubit Hilbert space. Since the destabilizers are note unique, if D\mathcal{D} and D′\mathcal{D}' are both destabilizers for SS, then B(S,D)\mathcal{B}(S,D) and B(S,D′)\mathcal{B}(S,D') are the same set of basis modulo phase difference. Since B(T)\mathcal{B}(\mathcal{T}) is a complete basis for Hilbert space, then any quantum state can be represented by the stabilizer basis. Therefore, we introduce the generalized stabilizer representation.

Definition A.6 (Generalized stabilizer representation). Any pure quantum state can be represented with stabilizer basis. More particularly, the density matrix ρ\rho of any pure quantum state can be written as

ρ=∑i=12n∑j=12nχijdi∣ψS⟩⟨ψS∣dj=∑ijχijdiρSdj.(6)\rho = \sum_{i=1}^{2^n} \sum_{j=1}^{2^n} \chi_{ij} d_i \left| \psi_S \right\rangle \left\langle \psi_S \right| d_j = \sum_{ij} \chi_{ij} d_i \rho_S d_j. \tag{6}

Therefore, we call the two-tuple (χ,B(S,D))(\chi,\mathcal{B}(S,\mathcal{D})) the generalized stabilizer representation.

For a general state, in the worst case, we need O(4n)\mathcal{O}(4^n) classical memory to store and simulate its dynamics. However, this formulation is particularly useful when this decomposition is sparse. For simplicity, we can use the zero norm of χ\chi matrix to denote its complexity, i.e. Λ(χ)=∣∣χ∣∣0\Lambda(\chi) = ||\chi||_0. And the simulation complexity scales as O(Λ(χ))\mathcal{O}(\Lambda(\chi)). Now we define the Pauli channel and see how to simulate general quantum states with the generalized stabilizer representation.

Definition A.7 (Pauli channel). The Pauli channel of a nn-qubit system can be written as

E(ρ)=∑ijϕijPiρPj(7)\mathcal{E}(\rho) = \sum_{ij} \phi_{ij} P_i \rho P_j \tag{7}

where Pi,Pj∈GnP_i, P_j \in G_n, and ϕij\phi_{ij} are complex numbers. We use Λ(E)=∣∣ϕ∣∣0\Lambda(\mathcal{E}) = ||\phi||_0 to denote the complexity of the Pauli channel.

A.1 General state evolution under Clifford gates

The evolution of the general state under a Clifford circuit CC evolution can be written as

CρC†=C(∑ijχijdiρSdj)C†=∑ijχijCdjC†(CρSC†)CdjC†(8)C\rho C^{\dagger} = C\left(\sum_{ij}\chi_{ij}d_{i}\rho_{S}d_{j}\right)C^{\dagger} = \sum_{ij}\chi_{ij}Cd_{j}C^{\dagger}\left(C\rho_{S}C^{\dagger}\right)Cd_{j}C^{\dagger} \tag{8}

Therefore, we only need to update the full tableau T=(S,D)\mathcal{T} = (S, \mathcal{D}), which can be done with O(n2)\mathcal{O}(n^2) time. Under Clifford gates, the general stabilizer frame will update as (χ,S,D)→(χ,S′,D′)(\chi, S, \mathcal{D}) \to (\chi, S', \mathcal{D}').

A.2 General state evolution under Pauli channels

First, we use the fact that any Pauli string can be decomposed with stabilizer and destabilizers, Pm=αmdbmscmP_m = \alpha_m d_{b_m} s_{c_m}. An efficient implementation of this decomposition is in Algorithm 1. Suppose we want to simulate a general Pauli channel, E(ρ)=∑m,nϕm,nPmρPn†\mathcal{E}(\rho) = \sum_{m,n} \phi_{m,n} P_m \rho P_n^{\dagger}. For each term in the Pauli channel:

ϕm,nPmρPn†=∑ijϕm,nPmχijdiρSdjPn†=∑ijϕm,nχijPmdiρSdjPn†=∑ijϕm,nχijαmαn∗dbmscmdiρSdjscndbn=∑ijϕm,nχijαmαn∗(−1)cm⋅i+cn⋅jdbmdiscmρSscndjdbn=∑ij(ϕm,nχijαmαn∗(−1)cm⋅i+cn⋅j)dbm+iρSdj+bn=∑i′j′χi′j′′di′ρSdj′.(9)\begin{split} \phi_{m,n}P_m\rho P_n^\dagger &= \sum_{ij} \phi_{m,n}P_m\chi_{ij}d_i\rho_S d_j P_n^\dagger = \sum_{ij} \phi_{m,n}\chi_{ij}P_m d_i\rho_S d_j P_n^\dagger \\ &= \sum_{ij} \phi_{m,n}\chi_{ij}\alpha_m\alpha_n^* d_{b_m}s_{c_m}d_i\rho_S d_j s_{c_n}d_{b_n} \\ &= \sum_{ij} \phi_{m,n}\chi_{ij}\alpha_m\alpha_n^* (-1)^{c_m\cdot i + c_n\cdot j}d_{b_m}d_i s_{c_m}\rho_S s_{c_n}d_j d_{b_n} \\ &= \sum_{ij} \left(\phi_{m,n}\chi_{ij}\alpha_m\alpha_n^* (-1)^{c_m\cdot i + c_n\cdot j}\right)d_{b_m+i}\rho_S d_{j+b_n} \\ &= \sum_{i'j'} \chi'_{i'j'}d_{i'}\rho_S d_{j'}. \end{split} \tag{9}

Therefore, for each term in Pauli channel, we need to update (χ,S,D)→(χ′,S,D)(\chi, S, \mathcal{D}) \to (\chi', S, \mathcal{D}). And we sum over all the terms in the Pauli channel, which contains Λ(ϕ)\Lambda(\phi) terms. Especially, T-gate can be written as the following channel:

TρT†=(cos⁡π8I+isin⁡π8Z)ρ(cos⁡π8I−isin⁡π8Z),(10)T\rho T^{\dagger} = \left(\cos\frac{\pi}{8}I + i\sin\frac{\pi}{8}Z\right)\rho\left(\cos\frac{\pi}{8}I - i\sin\frac{\pi}{8}Z\right), \tag{10}

where Λ(T)=4\Lambda(T)=4.

Algorithm 1, Pauli decomposition algorithm. It decomposes a Pauli string P into a product of stabilizer and destabilizer elements d_b and s_c and a phase factor alpha, and the decomposition is used in the classical simulation of the Clifford+kRz circuits. Procedure Decompose(P), returning alpha, d_b and s_c: set b and c to zero vectors, phase to 0 and P_t to I. For i from 0 to N minus 1, over the stabilizer generators: if {P, s_i} = 0, set b_i to 1, subtract ipow(P_t, d_i) from phase, and multiply P_t by d_i. Then for i from 0 to N minus 1, over the destabilizer generators: if {P, d_i} = 0, set c_i to 1, subtract ipow(P_t, s_i) from phase, and multiply P_t by s_i. Return phase, b and c.

B Optimization of Clifford+kRz circuits

We use a brickwork circuit ansatz (see Fig. 6) with LL layers. One layer is composed of nn Clifford gates, each of which acts on neighboring qubits. Although a common gate set for the Clifford group is taken to be the Hadamard, phase, and CNOT gates, we instead use the gate set composed of eiπP/4e^{i\pi P/4}, where P∈{I,X,Y,Z}⊗2P \in \{I, X, Y, Z\}^{\otimes 2}. We dope the circuit with kk Rz gates at a fixed layer, but a variable site index (which is optimized over). To summarize, our free parameters belong to the domain Z16n×L×Znk×Rk\mathbb{Z}_{16}^{n \times L} \times \mathbb{Z}_n^k \times \mathbb{R}^k. The first term corresponds to 16 possible choices for the Clifford gates (of which there are n×Ln \times L). The second corresponds to the nn possible choices for the site index of the kk Rz gates, and the last is simply the argument for the kk Rz gates.

Circuit diagram on eight qubits, q0 to q7: two layers of two-qubit gates, boxes labelled e to the i pi P over 4, set in a brick pattern, P0 to P7 in the first layer and P8 to P15 in the second. Between the layers, set off by dashed lines, two single-qubit gates: Rz(theta 0) on q2 and Rz(theta 1) on q5.

Figure 6: The brickwork circuit ansatz for L=2L=2 and k=2k=2.

To optimize our circuit, we treat the discrete and continuous parameters separately. We label X∈Z16n×L ⁣× ⁣ZnkX \in \mathbb{Z}_{16}^{n \times L} \! \times \! \mathbb{Z}_{n}^{k} the discrete parameters and Θ ∈ Rk\Theta\,\in\,\mathbb{R}^k the continuous ones. For any cost function f(X,Θ)f(X,\Theta), we can define a ‘marginalized’ cost function by minimizing over Θ ⁣:\Theta\colon

f(X)≡min⁡Θf(X,Θ).(11)f(X) \equiv \min_{\Theta} f(X, \Theta). \tag{11}

This is a useful construction when it is easy to do this minimization; it turns out that for small kk, this process is very easy. Since the cost is periodic in Θ\Theta, we only need to search the small volume Θ∈[0,2π]k\Theta \in [0, 2\pi]^k. This search is further simplified by the fact that f(X,Θ)f(X,\Theta) is continuous in Θ\Theta, and does not have many local minima (see Fig. 7). By applying a simple gradient-based optimizer (e.g., gradient descent, conjugate gradient, etc.) to just a few (∼10\sim 10) randomly initialized choices of Θ\Theta, we can often find the global minimum within very few iterations. This is to say, the marginalized cost function f(X)f(X) is easy to evaluate. With this, we optimize over the remaining parameters XX with a simple greedy search. Each iteration, we pick one of the parameters in XX to optimize over. For instance, if we choose to optimize P1P_1 (refer to Fig. 6), we would evaluate the cost with all other parameters held constant, varying P1P_1 over all 16 possibilities {I,X,Y,Z}⊗2\{I, X, Y, Z\}^{\otimes 2}. Then, we simply replace P1P_1 with the choice that yielded the lowest cost f(X)f(X). Finally, we do this discrete optimization in parallel for a large number (ninit∼1000n_{init} \sim 1000) of randomly initialized parameters XX, and simply take the best performing solution after a fixed number (niter∼100n_{iter} \sim 100) iterations. Although we considered more advanced schemes for this discrete optimization, such as a simulated annealing process, we found that these schemes did not yield better results.

Two heat maps over theta 0 and theta 1, each from minus 2 pi to 2 pi: on the left, beta = infinity, coloured by E minus E0 from 0 to about 0.5; on the right, beta = 200, coloured by F minus F0 from 0 to about 0.25. Dark patches mark the lowest values, in a repeating pattern on both.

Figure 7: The landscape of f(Θ)≡f(Xbest,Θ)f(\Theta) \equiv f(X_{best}, \Theta) for LiH at a bond length 3.4Å, where XbestX_{best} was the best performing solution for k=2k=2. On the left, we show the landscape for the ground state calculation, and on the right, we show the landscape at a finite temperature β=200\beta = 200 (T≈1500T \approx 1500K). Note that there are very few suboptimal local minima – applying gradient descent to a randomly initialized Θ\Theta will find the global minimum with high probability.

Algorithm 2, Optimizing Clifford + kRz Circuits. Procedure Optimize(f, L, k, n_iter): set X to a random initialization in Z16 to the power n times L, times Zn to the power k. For i from 1 to n_iter: pick j, a random index from 1 to n times L plus k; if j is at most n times L, params is Z16, otherwise params is Zn; for each p in params, set X[j] to p and cost[p] to f(X); then set X[j] to the p with the lowest cost.

C Symmetry of the Recovered Solutions

A noteworthy drawback of the Clifford + kRz ansatz (Fig. 6) is that it does not necessarily conserve any symmetries of the Hamiltonian. Despite this, we observe that the optimization process prefers to recover solutions that are both eigenstates of the number and spin operators, and furthermore, typically states that conserve symmetries in the Hamiltonian (e.g., total spin zero). Although observe that the latter does not hold for every solution (see Fig. 9), it holds in the vast majority of cases. Remarkably, we observe a greater tendency to preserve symmetries as more Rz gates are injected. However, we did not explicitly investigate the relationship between these preserved symmetries and the magic of the initial state. Understanding this connection could provide valuable insights into the role of symmetries and magic in our approach. Future work could explore this relationship in more detail, potentially leading to better ansatz designs and improved performance.

D Pulse optimization of programmable quantum simulators

The Rydberg Hamiltonian can be modeled as

H/ℏ=∑jΩj(t)2(eiϕj(t)∣g⟩⟨r∣+e−iϕj(t)∣r⟩⟨g∣)−∑jΔj(t)n^j+Vijn^in^j,(12)H/\hbar = \sum_{j} \frac{\Omega_{j}(t)}{2} \left( e^{\mathrm{i}\phi_{j}(t)} \left| g \right\rangle \left\langle r \right| + e^{-\mathrm{i}\phi_{j}(t)} \left| r \right\rangle \left\langle g \right| \right) - \sum_{j} \Delta_{j}(t) \hat{n}_{j} + V_{ij} \hat{n}_{i} \hat{n}_{j}, \tag{12}

where Ωj(t), ϕj(t), Δj(t)\Omega_j(t), \ \phi_j(t), \ \Delta_j(t) are Rabi frequency, laser phase, and local detuning of the driving field for each atom, and ∣g⟩|g\rangle is the ground state, ∣r⟩|r\rangle is the Rydberg state, n^j = ∣r⟩j ⟨r∣j\hat{n}_j \, = \, |r\rangle_j \, \langle r|_j is the number operator. We use

Ten small line plots in two rows, LiH above and H2O below, one column for each k from 0 to 4: probability on a log scale from 10 to the minus 9 up to 1, against bond length in ångströms, with a coloured line for each n (2, 4, 6, 8 and 10). In every plot one line runs along 1, n = 2 for LiH and n = 8 for H2O; the others stay low or show only over some bond lengths.

Figure 8: We analyze optimized Clifford + kRz solution in the eigenbasis for the qubitized number operator NN for both LiH (top) and H2O\text{H}_2\text{O} (bottom), demonstrating that the recovered solution approximately conserves of NN.

Ten small line plots in two rows, LiH above and H2O below, one column for each k from 0 to 4: probability on a log scale against bond length in ångströms, with a coloured line for each m_tot from minus 2 to 2. The m_tot = 0 line runs along 1 in most of them; in the H2O plots for k = 0 and k = 1, other values take its place at longer bond lengths.

Figure 9: We analyze optimized Clifford + kRz solution in the eigenbasis for the qubitized spin operator SS for both LiH (top) and H2O\text{H}_2\text{O}(bottom), demonstrating that the recovered solution, for most cases, approximately conserves of SS.

Vij=C6/∣xi−xj∣6V_{ij} = C_6/|x_i - x_j|^6 with C6  =  2π ∗ 8.627∗105C_6 \; = \; 2\pi \, * \, 8.627 * 10^5 MHz μm6\mu m^6 to describe the Rydberg interactions. In our optimization, we translate the Hamiltonian into Pauli basis, which gives

H/ℏ=∑j(Ωj2cos⁡ϕjXj−Ωj2sin⁡ϕjYj)+∑j(Δj2−Vij)Zj+∑i,jVij4ZiZj+Hconst,(13)H/\hbar = \sum_{j} \left(\frac{\Omega_{j}}{2} \cos \phi_{j} X_{j} - \frac{\Omega_{j}}{2} \sin \phi_{j} Y_{j}\right) + \sum_{j} \left(\frac{\Delta_{j}}{2} - V_{ij}\right) Z_{j} + \sum_{i,j} \frac{V_{ij}}{4} Z_{i} Z_{j} + H_{\text{const}}, \tag{13}

where Hconst=∑i,jVij4I−∑jΔj2IH_{\text{const}} = \sum_{i,j} \frac{V_{ij}}{4} I - \sum_{j} \frac{\Delta_{j}}{2} I. Then we optimize the pulse in the Pauli basis, such as Ωj2cos⁡ϕj\frac{\Omega_j}{2} \cos \phi_j. We parameterize each pulse as a piece-wise constant function with ten pieces, and initialize them randomly. The atom positions are fixed to be separated with 9.37μm9.37 \mu m. Since the interaction strength of the next nearest neighbors are 64 times smaller than the interaction strength of the nearest neighbors, we only consider the leading nearest neighbor interactions for our model.

E Finite temperature calculation

The variational principle extends beyond ground state calculations; indeed, it can be shown that the free energy satisfies a variational principle. That is, defining

Fβ(ρ)≡Tr(Hρ)−S(ρ)/β,(14)F_{\beta}(\rho) \equiv \text{Tr}(H\rho) - S(\rho)/\beta, \tag{14}

where S(ρ)S(\rho) is the von Neumann entropy, it can be shown that for all β\beta,

Fβ(ρ)≥Fβ(e−βHTr(e−βH))≡F0(15)F_{\beta}(\rho) \ge F_{\beta} \left( \frac{e^{-\beta H}}{\text{Tr}(e^{-\beta H})} \right) \equiv F_0 \tag{15}

for all ρ\rho. We take advantage of this variational principle to estimate the free energy at finite temperatures. The procedure is simple: we fix an orthogonal basis of stabilizer states {∣ψk⟩∣k=1,…,2n}\{|\psi_k\rangle\mid k=1,\dots,2^n\} (typically derived from SBRG), so that the initial state is

ρ0≡∑kpk∣ψk⟩ ⁣⟨ψk∣ ,(16)\rho_0 \equiv \sum_k p_k |\psi_k\rangle\!\langle\psi_k|\,, \tag{16}

where the pk∈[0,1]p_k \in [0,1] form a probability distribution (i.e., ∑kpk=1\sum_k p_k = 1). We construct a Clifford+kRz unitary UU from Clifford + kT gates, and evolve each of the under this unitary. The final state is therefore

ρ=∑kpkU∣ψk⟩ ⁣⟨ψk∣U†.(17)\rho = \sum_{k} p_{k} U |\psi_{k}\rangle\!\langle\psi_{k}| U^{\dagger}. \tag{17}

Defining Ek≡Tr((H−μN)U ∣ψk⟩ ⁣⟨ψk∣ U†)E_k \equiv \text{Tr} \big( (H - \mu N) U \, |\psi_k\rangle\!\langle\psi_k| \, U^\dagger \big), we observe that

Fβ(ρ)=∑kpk(Ek−log⁡pkβ).(18)F_{\beta}(\rho) = \sum_{k} p_{k} \left( E_{k} - \frac{\log p_{k}}{\beta} \right). \tag{18}

The optimal pkp_k can be solved for in closed form (i.e., they do not need to be optimized numerically), yielding a free energy estimate

Fβ(ρ)=−1βlog⁡(∑kexp⁡(−βEk)).(19)F_{\beta}(\rho) = -\frac{1}{\beta} \log \left( \sum_{k} \exp(-\beta E_{k}) \right). \tag{19}

Since calculating EkE_k as a function of the unitary UU is efficient, we can then apply our optimization techniques over the unitary UU to minimize Fβ(ρ)F_{\beta}(\rho).