By Guillermo Alonso-Linaje
VQE is currently one of the most widely used algorithms for optimizing problems using quantum computers. A necessary step in this algorithm is calculating the expectation value given a state, which is calculated by decomposing the Hamiltonian into Pauli operators and obtaining this value for each of them. In this work, we have designed an algorithm capable of figuring this value using a single circuit. A time cost study has been carried out, and it has been found that in certain more complex Hamiltonians, it is possible to obtain a good performance over the current methods.