  We present some aspects of high precision calculations in the context of
Lattice Quantum Field Theory. This work is a collection of three studies done
during my Ph.D. period. First we present how to use the reweighting technique
to compensate for the breaking of unitarity due to the use of different
boundary conditions in the valence and sea sector. In particular when twisted
boundary conditions are employed, with $\theta$ twisting angle. In large volume
we found that the breaking is negligible, while in rather small volumes an
effect is present. The quark mass appears to change with $\theta$ as a cutoff
effect. In the second part of the dissertation we present an optimization
method for Hybrid Monte Carlo performances. The work is based on the existence
of a shadow Hamiltonian, an exactly conserved quantity along the Molecular
Dynamics trajectory. The optimization method is economic since it only requires
the forces to be measured, which are already used for the evolution from one
configuration to the new one. We found predictions for the cost of the
simulations with an accuracy of 10% and we could estimate the optimal
parameters for the Omelyan integrator with mass-preconditioning and multi
time-scale. In the last part of the work we address the calculation of
electromagnetic corrections to the hadronic contribution to the $(g-2)$ anomaly
of the muon. A long standing discrepancy between theoretical calculations and
experimental results is present. But before invoking New Physics we need to
clear the sight from possible effects within the Standard Model. In this
exploratory study we carefully matched the masses of the charged pions in the
theory with and without QED. We found a visible effect at the percent level
although consistent with zero within two sigmas.
