  The simulation of electronic properties is a pivotal issue in modern
electronic structure theory, driving significant efforts over the past decades
to develop protocols for computing energy derivatives. In this work, we address
this problem by developing a strategy to integrate the quantum phase estimation
algorithm within a fully differentiable framework. This is accomplished by
devising a smooth estimator able to tackle arbitrary initial states. We provide
analytical expressions to characterize the statistics and algorithmic cost of
this estimator. Furthermore, we provide numerical evidence that the estimation
accuracy is retained when an arbitrary state is considered and that it exceeds
the one of standard majority rule. We explicitly use this procedure to estimate
chemically relevant quantities, demonstrating our approach through ground-state
and triplet excited state geometry optimization with simulations involving up
to 19 qubits. This work paves the way for new quantum algorithms that combine
interference methods and quantum differentiable programming.
