Hi!
I read in a paper that certain optimization schemes can be improved by applying a sigmoid transformation to the cost Hamiltonian of the system
where H_c is the cost Hamiltonian and E_\tau is the energy expectation value at the current optimization step, whereas \sigma_0 and \sigma_T are scalar values which are not important for the purpose of my question. In this specific case, the cost Hamiltonian H_c is a sum of Pauli-Z strings, and is thus diagonal in the computational basis. The idea is that applying the sigmoid “stretches” the energy spectrum around the current energy of the system in a way that can be beneficial for optimization problems where the goal is to find the ground state of H_c.
I would like to try out this idea in my own simulations, but I am not sure how to implement the transformation efficiently. The goal is that at each optimization step in a VQE, I want to calculate the gradient and optimize the parameters of my ansatz \psi(\bar{\theta}) with respect to \langle f(H_C) \rangle, rather than the original Hamiltonian \langle H_c \rangle. How can I incorporate this feature into a Pennylane optimization framework? Exactly calculating the eigenvalues of the Hamiltonian is not an option, since that would defeat the purpose of trying to efficiently solve the optimization problem.
For those interested, the paper is found here.