$\frac{\mathrm{d}q}{\mathrm{d}z}=\frac{\partial\mathrm{H}}{\partial p},$