Efficient Postprocessing Procedure for Evaluating Hamiltonian Expectation Values in Variational Quantum Eigensolver

Chi-Chun Chen,Hsi-Sheng Goan
2023-12-27
Abstract:We proposed a simple strategy to improve the postprocessing overhead of evaluating Hamiltonian expectation values in Variational quantum eigensolvers (VQEs). Observing the fact that for a mutually commuting observable group G in a given Hamiltonian, <b|G|b> is fixed for a measurement outcome bit string $b$ in the corresponding basis, we create a measurement memory (MM) dictionary for every commuting operator group G in a Hamiltonian. Once a measurement outcome bit string $b$ appears, we store $b$ and <b|G|b> as key and value, and the next time the same bit string appears, we can find <b|G|b> from the memory, rather than evaluate it once again. We further analyze the complexity of MM and compare it with commonly employed post-processing procedure, finding that MM is always more efficient in terms of time complexity. We implement this procedure on the task of minimizing a fully connected Ising Hamiltonians up to 20 qubits, and $H_2$, $H_4$, $LiH$, and $H_2O$ molecular Hamiltonians with different grouping methods. For Ising Hamiltonian, where all $O(N^2)$ terms commute, our method offers an $O(N^2)$ speedup in terms of the percentage of time saved. In the case of molecular Hamiltonians, we achieved over $O(N)$ percentage time saved, depending on the grouping method.
Quantum Physics
What problem does this paper attempt to address?
This paper aims to solve the post - processing overhead problem when evaluating the expected value of the Hamiltonian in the Variational Quantum Eigensolver (VQE). Specifically, the paper proposes a simple strategy to reduce the post - processing overhead required for evaluating the expected value of the Hamiltonian in VQE. This strategy is based on an observation: for a set of commuting observables \(G\) in a given Hamiltonian, if the measurement result bit - string \(b\) is fixed in the corresponding basis, then \(\langle b|G|b\rangle\) is also fixed. Therefore, the authors suggest creating a Measurement Memory (MM) dictionary for each set of commuting observables \(G\) in the Hamiltonian. Once the measurement result bit - string \(b\) appears, it is stored as a key - value pair with \(\langle b|G|b\rangle\) in the dictionary; when the same bit - string appears again next time, \(\langle b|G|b\rangle\) can be directly looked up from the memory without recalculation. The paper further analyzes the complexity of MM and compares it with common post - processing procedures. It is found that MM is always more efficient in terms of time complexity. The authors implement this process on the fully - connected Ising Hamiltonian and molecular Hamiltonians (such as \(H_2\), \(H_4\), LiH, and \(H_2O\)) using different grouping methods. For the fully - connected Ising Hamiltonian, all \(O(N^2)\) terms are commutable, and this method provides an \(O(N^2)\) speedup. In the case of molecular Hamiltonians, depending on the grouping method, a time - saving ratio of more than \(O(N)\) can be achieved.