  The current state of quantum computing is commonly described as the Noisy
Intermediate-Scale Quantum era. Available computers contain a few dozens of
qubits and can perform a few dozens of operations before the inevitable noise
erases all information encoded in the calculation. Even if the technology
advances fast within the next years, any use of quantum computers will be
limited to short and simple tasks, serving as subroutines of more complex
classical procedures. Even for these applications the resource efficiency,
measured in the number of quantum computer runs, will be a key parameter. Here
we suggest a general optimization procedure for hybrid quantum-classical
algorithms that allows finding the optimal approach with limited quantum
resources. We demonstrate this procedure on a specific example of variational
quantum algorithm used to find the ground state energy of a hydrogen molecule.
