  We discuss a Quantum Non-Demolition Measurement (QNDM) protocol to estimate
the derivatives of a cost function with a quantum computer. %This is a key step
for the implementation of variational quantum circuits. The cost function,
which is supposed to be classically hard to evaluate, is associated with the
average value of a quantum operator. Then a quantum computer is used to
efficiently extract information about the function and its derivative by
evolving the system with a so-called variational quantum circuit. To this aim,
we propose to use a quantum detector that allows us to directly estimate the
derivatives of an observable, i.e., the derivative of the cost function. With
respect to the standard direct measurement approach, this leads to a reduction
of the number of circuit iterations needed to run the variational quantum
circuits. The advantage increases if we want to estimate the higher-order
derivatives. We also show that the presented approach can lead to a further
advantage in terms of the number of total logical gates needed to run the
variational quantum circuits. These results make the QNDM a valuable
alternative to implementing the variational quantum circuits.
