Adaptive measurement strategy for quantum subspace methods

Estimation of physical observables for unknown quantum states is an important problem that underlies a wide range of fields, including quantum information processing, quantum physics, and quantum chemistry. In the context of quantum computation, in particular, existing studies have mainly focused on holistic state tomography or estimation on specific observables with known classical descriptions, while this lacks the important class of problems where the estimation target itself relies on the measurement outcome. In this work, we propose an adaptive measurement optimization method that is useful for the quantum subspace methods, namely the variational simulation methods that utilize classical postprocessing on measurement outcomes. The proposed method first determines the measurement protocol for classically simulatable states, and then adaptively updates the protocol of quantum subspace expansion (QSE) according to the quantum measurement result. As a numerical demonstration, we have shown for excited-state simulation of molecules that (i) we are able to reduce the number of measurements by an order of magnitude by constructing an appropriate measurement strategy (ii) the adaptive iteration converges successfully even for a strongly correlated molecule of H4. Our work reveals that the potential of the QSE method can be empowered by elaborated measurement protocols, and opens a path to further pursue efficient quantum measurement techniques in practical computations.


I. INTRODUCTION
Estimating observables of quantum states is an exceedingly important process that serves as the foundation across a wide range of fields involving quantum technology.This importance is especially pronounced in the realm of quantum computing [1,2] that aims to perform, e.g., quantum many-body simulation [3][4][5], solving sparse linear equations [6], and quantum machine learning [7][8][9].Consequently, one of the highest priorities is the development of a measurement protocol that imposes minimal burden on the quantum device.
When one has access to a quantum computer with fault-tolerance such that long coherence is ensured, one may rely on the amplitude estimation that achieves the Heisenberg limit of complexity O(1/ϵ) in terms of additive error ϵ [10].There have been some attempts to extend the scheme to a multiple observable estimation regime [11,12], while it is still open how to achieve the optimal query complexity.Meanwhile, when the coherence of the quantum computer is limited, we shall rather depend on projective measurements with circuit executions over O(1/ϵ 2 ) times, either in a near-term device [13][14][15] or in early fault-tolerant regime [16,17].Existing works in the context of variational quantum simulations [13][14][15] have exploited the classical description of the target observable to be measured: the L 1 norm of the Pauli coefficients for the target observable [18,19], qubit-wise commutativity of Pauli operators embedded into Mini-mum Clique Cover (MCC) problem [20][21][22][23][24], and expression of uncertainty for adaptive modification of measurement resource [25].Another important direction is to utilize randomized measurements, which are designed to achieve average-case optimality so that one may choose target observables arbitrarily after the measurement is done [26][27][28][29][30].For instance, the protocol referred to as the classical shadow (CS) tomography achieves estimation accuracy ϵ for M observables with O(log(M )/ϵ 2 ) measurements, with prefactors that crucially rely on the set of available positive operator-valued measurements [29][30][31][32].When one is interested in some specific observables such as quantum many-body Hamiltonians, one may introduce appropriate bias on the measurement strategy so that the estimation variance is suppressed [33][34][35].
We emphasize that existing methods assume two ultimate situations.Namely, it has been assumed that the classical description of the measurement target, e.g., the coefficients to express the target observable as a sum of Pauli operators, is completely known beforehand, or it is completely provided after the measurement.Thus, we are lacking the solution to the important class of problems where the target observables explicitly rely on the measurement outcome.More generally, this problem is common to tasks where the postprocessing operation depends explicitly on the target quantum state.This implies that we are not fully utilizing the capacity of quantum subspace methods [36][37][38][39][40][41][42] or quantum algorithms that utilize error mitigation techniques such as the symmetry expansion [43][44][45], and furthermore early fault-tolerant quantum computers with quantum error detection methods [46][47][48][49].Considering that such postprocessing techniques and error mitigation methods are envisioned to remain crucial for both near-term and faulttolerant quantum devices [50], it is critical to overcome the above issue to fully harness their computational powers.
In this study, we propose an adaptive measurement strategy for quantum subspace methods.In this protocol, efficient measurement is achieved by adaptively updating the measurement strategy based on post-processed calculation results.As numerical validation of the proposed scheme, we perform excited state simulation for molecules such as H 2 , H 4 , and LiH.As a result, we achieve a significant reduction in the number of measurements, approximately 3 to 10 times fewer compared to a naive measurement approach.We further show that the adaptive iteration converges rapidly even for the strongly correlated regime in H 4 , supporting the effectiveness of the proposed method.

A. Quantum subspace expansion
Quantum subspace methods are a collection of techniques in which the many-body Hamiltonian on the entire Hilbert space is projected on one of the appropriate subspaces by applying classical post-processing to information obtained through measurements on a quantum device which is mainly a quantum computer in practice [36-39, 41, 51-55].After the theoretical proposal by McClean et al. to utilize the near-term quantum device for excited-state calculation [36], numerous works have exploited the similarity between the classical power methods to enhance the capability of the quantum subspace method [41,42].Important extensions include many-body calculations such as real-time evolution [56], finite-temperature calculations [57], nonequilibrium steady state calculations [58], and imaginary time Green's functions [52].
Such theoretical advancements have also accelerated the experimental demonstrations in noisy quantum devices.For instance, Colless et al. [51] experimentally evaluated the excited-state energies of the H 2 molecule within the subspace spanned by single Pauli operators {O j } = {σ k α | α ∈ {x, y, z}, k ∈ {1, 2}} using the ground state as the reference state, in which the effect of error mitigation was also observed.As a variant of the subspace method, Gao et al. [53] simulated the equationof-motion Hamiltonian for organic diodes.For a more exhaustive review of both theoretical and experimental works, we guide the readers to Ref. [59].Now let us describe the formalism of the subspace methods.In the following, we specifically consider the computation of eigenvalues of a Hamiltonian H with N qubits.The simulation of eigenstates is often discriminated from others explicitly by using the term Quantum Subspace Expansion (QSE), and thus hereafter we follow the convention.With a set of k reference states {|ψ⟩ k } k realized on a quantum computer, let us assume that we have a set of operators {O (k) j } j,k which yields a subspace S = Span{O (k) j |ψ k ⟩}, whose bases are typically non-orthogonal to each other.For the purpose of eigenstate calculation, we define the following variational state: where the coefficients {α (k) j } j,k are variational parameters that are determined based on the desired computational target.When the target is the energy eigenstate, the Rayleigh-Ritz variational condition leads to the following generalized eigenvalue equation: where E SE represents the eigenvalues, and H and S are matrices representing the Hamiltonian and overlap between the bases, respectively, restricted to the subspace.The matrix elements are given by the following equation: Hereafter, for simplicity, we consider a situation where there is only one reference state given as |ψ QC ⟩ that is assumed to be realized on a quantum computer.In this case, the final energy E SE to be determined is expressed as follows: where the Hamiltonian is expressed as To solve the generalized eigenvalue equation in Eq. ( 2), quantum measurements are necessary to determine the matrix elements H ij and S ij as defined by equations ( 3) and (4).To make efficient use of the limited measurement resources, it is desirable to obtain precise results with as few measurements as possible.However, the optimal measurement strategy for QSE cannot be determined solely from the Hamiltonian; it depends on the solution of the generalized eigenvalue equation itself.While the error of E SE due to the measurement error can be upperbounded [38], it is favorable to minimize the error by choosing a suboptimal measurement strategy.Therefore, here we develop adaptive computation methods that are inspired by solvers for nonlinear eigenvalue problems.

Choose classically simulatable state 𝜙
1. Flow of adaptive measurement strategy construction.

B. Adaptive measurement strategy for QSE
First, it should be noted that Eq. ( 6) is equivalent to the estimation of the expectation values of dressed operators as follows: The expectation values of these operators can be understood to provide energy as as in Eq. ( 7) and (8).
4. Apply measurement basis optimization methods, such as the Locally-Biased Classical Shadow (LBCS) [33] or MCC [21], to H }, where m and µ = (µ 1 , ..., µ N ) (µ k ∈ {X, Y, Z}) denote the iteration index and the set of single-qubit measurement bases, respectively.One may set a maximum number of bases in practice.
Step 2: Quantum measurement and computation Repeat the following.} µ using coefficients {α (m) }, and proceed to the (m + 1)-th round of measurement and computation.
Three remarks are in order.First, for the classical preprocessing in Step 1, it is desirable to use a state |ϕ C ⟩ that does not completely disentangle qubits.For example, if we adopt the Hartree-Fock state for a quantum chemistry Hamiltonian, the expectation value of any electron excitation operators becomes zero as, e.g., ⟨HF|a † i a j(̸ =i) |HF⟩ = 0.In this case, it is not possible to d .To circumvent this issue, it is favorable to adopt quantum states that incorporate electronic excitations, such as CIS (Configuration Interaction Singles), CISD (Configuration Interaction Singles and Doubles), and others.Generally, the requirement for |ϕ C ⟩ is that it allows for polynomial-time computation of expectation values over polynomially many Pauli operators, such as the (near) stabilizer states [61], matrix product states [62][63][64] or (multi) Slater-determinant states [65,66].The impact of the overlap between the true solution and |ϕ C ⟩ on the final accuracy is an interesting challenge to investigate.
Second, the number of iterations required for convergence in Step 2 is generally unknown when the number of measurements is limited.As we discuss later in Sec.III, our numerical simulation with shot noise suggests that only a single iteration is sufficient for the case of H 4 molecule.
Third, the convergence criteria can be practically taken as the variance or fluctuation for the output energy.For instance, one may compare the latest and second-latest output energy whether the difference is less than, e.g., the chemical accuracy, while one may also consider the fluctuation of the moving average as well.In our experiment for H 4 provided in Sec.III, this is typically achieved in a few steps, while we have proceeded up to 10 iterations for the sake of demonstration.

C. Measurement basis optimization subroutines
The proposed method includes a subroutine for optimizing measurement bases {Π (m) µ } using the classical representation of operators H m d and S m d .In the case of multiqubit systems, specifically, we can categorize measurement strategies mainly into two groups.The first group employs randomized measurements with a focus on specific operators, while the second group determines measurement bases based on the commutativity between Pauli operators.In this study, we focus on Locally-Biased Classical Shadows (LBCS) [33] and Derandomized Classical Shadows (DCS) [34] for the former approach, while for the latter, we adopt Minimum Clique Cover (MCC) grouping [21] and Overlapped Grouping Measurement (OGM) [67].For detailed information on each method, refer to Appendix B.

III. RESULTS
Here we provide numerical demonstrations for the proposed adaptive scheme.First, we discuss and compare the measurement basis optimization subroutines in Sec.III A, and then in Sec.III B we show that the adaptive protocol converges successfully within chemical accuracy for a strongly correlated molecule of H 4 .
Throughout the demonstrations, we exclusively consider the lowest-energy eigenstate within different particle sectors from the ground state energy for the secondquantized molecular Hamiltonian: where a ( †) p represents the electron annihilation (creation) operators for the p-th spin orbital, and t pq and v pqrs represent the amplitudes for one-body and two-body interactions, respectively.The qubit representation H = Q c Q P Q is obtained via the Jordan-Wigner transformation from the fermionic representation of Eq. ( 9).We note that, in order to focus on the statistical error associated with the measurement strategy, we have assumed that the exact ground state |ψ QC ⟩ = |ψ GS ⟩ is realized on a quantum computer.

A. Comparison of Measurement basis optimization subroutines for QSE
Here, we confirm the significance of the measurement basis optimization subroutine that it is as crucial to the final accuracy as the introduction of the adaptive method itself.In particular, we consider the following cases: the H 2 molecule with the STO-3G basis set (N = 4) and the 6-31G basis set (N = 8), and the LiH molecule with the STO-6G basis set (N = 10 under frozen 1s orbital).The subspace is spanned as S = Span{O i |ψ GS ⟩} with single electron excitations O i = a i to simulate the excited states.
First, in Table I, we compare the accuracy of QSE by the naive measurement strategy and a Paulimeasurement-basis optimization subroutine mentioned in Sec.II C. In the naive approach, an equal number of measurements is allocated to each matrix element, and then further distributed among Pauli operators using matrix-element-wise LBCS.This results in approximately O(N tot /N 6 ) measurements for a single Pauli operator under the total measurement resource N tot , as each matrix element of H consists of O(N 4 ) Pauli operators.In contrast, the standard deviation of energy estimations using the LBCS subroutine within the latter approach is below the chemical accuracy for H 2 (STO-3G) demonstrating the effectiveness of the measurement basis optimization.Note that the standard deviation is enhanced by around a factor of 3 to 10.Given that the improvement achieved by simultaneous measurements for the explicit representation of operators was not limited to a constant factor but rather showed polynomial improvement [68,69], we expect that similar improvement shall be present in QSE as well.
To make a comparison between measurement optimization subroutines, we have computed the mean absolute errors and standard deviations of estimated excitedstate energies in CS, LBCS, DCS, MCC and OGM, as shown in Fig. 2 (see Appendix C for detailed data).As expected, the measurement optimization methods yield lower estimation variance compared to the CS, which is a simple randomized measurement.While MCC shows a relatively favorable reduction in error for LiH, it exhibits undesirable overhead for H 2 .Nevertheless, both methods follow the scaling by the standard quantum limit of 1/ √ N tot .The performance of LBCS is relatively comparable but superior to CS in terms of both errors and standard deviations.In a comprehensive assessment, DCS and OGM demonstrate stable performance, with DCS exhibiting a slight advantage within 10 trials.
In the context of measurement basis optimization for the Hamiltonian itself, it is known that there is a profound relationship between the time required for classical preprocessing and the estimation accuracy.However, whether similar properties generally hold in QSE is not trivial.To investigate this, we have studied the relationship between the number of Pauli operators and the processing time required for each measurement optimiza-  tion subroutine in Table II.We find the general tendency that the MCC runs the fastest among the four, while the OGM is the most time-consuming.Namely, there is a trade-off between accuracy and preprocessing time, which indicates that the choice of a measurement basis optimization subroutine depends on the classical computational resource.For the sake of simplicity, in Sec.III B, we adopt the LBCS to demonstrate the effectiveness of the adaptive protocol.
We remark that, in the case of OGM, the measurement basis optimization is done faster for LiH (10 qubits) compared to H 2 (8 qubits).This is likely due to the symmetry of the Pauli operators of the Hamiltonian rather than the number of terms, which affects the optimization process dominantly.
FIG. 3. Benchmarking excited-state calculations for the H4 molecule.The red solid lines represent the exact excited-state energies, while the orange and blue dashed lines depict the noiseless estimations using QSE with CISD and ground state (denoted QC), respectively.In both experiments, the regularization process was carried out with n lev = 20 and ε = 10 −4 (see Appendix A for their definitions).(a) The excited-state energies with various interatomic distances.The inset displays the absolute errors between the exact energies and the QSE results.(b) Demonstration of adaptive measurement strategy under shot noise with interatomic distance 2.0 Å.The green dots represent the averaged results over 10 trials of 10 adaptive iterations assuming 10 8 shots at each iteration.Here we have employed the LBCS as the measurement optimization subroutine.

B. Convergenve of adaptive iteration
Now we present a numerical demonstration of the adaptive scheme.Here we consider the strongly correlated H 4 molecule using the STO-6G basis set (N = 8 qubits), with the truncated Hilbert space spanned by S = Span{a i a † j a k |ψ⟩} instead of S = Span{a i |ψ⟩}.As is illustrated in Fig. 3(a), the proposed method successfully converges to the exact energy at any interatomic distance, even in the strongly correlated regime of interatomic distance around 2.0 to 2.5 Å.Using the regularization technique described in Appendix A, we find that the proposed method can stably simulate the excited-state energies within the chemical accuracy of 0.0016 Ha (see Fig. 3(b)).It is worth mentioning that we have chosen the number of truncated eigenvalues in S to be n lev = 20 in this numerical demonstration.As n lev is increased, the differences due to the choice of the reference state, either CISD or the ground state, tend to decrease.In large-scale simulations where one resorts to Monte Carlo sampling on a computational basis, the statistical error from the sampling is one of the bottlenecks to achieve high accuracy [70,71], and therefore we envision that we cannot take arbitrarily large n lev so that a similar deviation occurs as well.

IV. CONCLUSION
In this study, we have proposed an adaptive measurement strategy for situations where the classical description of the target observable explicitly relies on the un-known quantum state and is thus undecidable beforehand.We have in particular focused on measurement strategy for the quantum subspace expansion, and have proposed a scheme that initially determines the protocol based on classical simulatable states and then gradually updates based on measurement outcomes from the unknown quantum state.To validate the effectiveness of the proposed method, we have numerically simulated the excited-state energies of H 2 , H 4 , and LiH molecules assuming that the exact ground states are realized on the quantum computer.The results show that, compared to a naive measurement strategy, the optimization on the measurement strategy exhibits up to a ten-fold reduction in the number of measurement shots, and further that the adaptive iteration converges rapidly even for the strongly correlated molecule of H 4 .
Several future directions can be envisioned.First, it is intriguing to derive the mathematical bound on the accuracy and iteration count of the adaptive updates based on information theoretic analysis.This may lead to tighter bounds than what is currently known for the case with homogeneous measurement resource distribution [72].Second, it is practically important to investigate the performance of subspace methods in the context of quantum error mitigation [38].Quantum error mitigation techniques inevitably require exponential growth in the number of measurements [73][74][75], while the exponent in the scaling heavily depends on the detail of the error mitigation methods.Thus, it is crucial to seek how the adaptive strategy benefits the trade-off relation between bias and variance.operators in the Hamiltonian as ∩ L l=1 G l = {P i } i under the condition that Pauli operators within a group are simultaneously measurable.The assignment of groups is intended to minimize either the number of groups, represented as L, or the variance of the energy estimations.While this problem can be formulated as the MCC problem when no overlap is allowed among measurement basis sets [21], further efficiency can be achieved when overlap is allowed.In the following, we specifically introduce the OGM proposed by Wu et al. [67].
The OGM is designed to minimize the cost function given by the probability distribution K of measurement bases µ for the operator H as follows: where S is a set of measurement bases, and P i ∈ S indicates that P i is measurable by one of the measurement bases µ in S. Furthermore, P ▷ µ indicates that the Pauli operator P ∈ {I, X, Y, Z} ⊗N can be diagonalized (i.e., measurable) through the measurement basis µ.The second term represents a penalty imposed when P i is not included in any measurement set, where T serves as a parameter determining the penalty scale.In all numerical demonstrations involving OGM, we used T = 1000.As discussed in Fig. 2 in the main text, we observe that the DCS and OGM yield steadily efficient measurements compared to CS, LBCS, or MCC, but the optimization procedure is more time-consuming.The choice between these strategies depends on the specific problem being addressed.
d .This allows us to determine the measurement strategy, i.e., the distribution of the measurement bases {Π (m=1) µ

TABLE I .
Comparison between naive equally-distributed measurements and measurement optimization subroutines.Note that the former uses LBCS for Hij (matrix-element-wise LBCS), while the latter applies it to the dressed operator H d .Here, we show the mean absolute errors and standard deviations over 10 trials with the total numbers of measurement shots given by 10 3 , 10 4 , 10 5 , and 10 6 .The basis sets for the second-quantized molecular Hamiltonians are taken for H2 as STO-3G (4 qubits) and 6-31G (8 qubits), and for LiH as STO-6G (10 qubits with frozen 1s orbital).

TABLE II .
The number of Pauli terms in H d and S d for weakly correlated molecular Hamiltonians, along with the preprocessing time required for H d .

TABLE III .
Mean absolute errors and standard deviations in CS, LBCS, DCS, MCC and OGM (10 trials).