  Parameter estimation and uncertainty quantification are crucial in
computational cardiology, as they enable the construction of digital twins that
faithfully replicate the behavior of physical patients. Robust and efficient
mathematical methods must be designed to fit many model parameters starting
from a few, possibly non-invasive, noisy observations. Moreover, the effective
clinical translation requires short execution times and a small amount of
computational resources. In the framework of Bayesian statistics, we combine
Maximum a Posteriori estimation and Hamiltonian Monte Carlo to find an
approximation of model parameters and their posterior distributions. To reduce
the computational effort, we employ an accurate Artificial Neural Network
surrogate of 3D cardiac electromechanics model coupled with a 0D
cardiocirculatory model. Fast simulations and minimal memory requirements are
achieved by using matrix-free methods, automatic differentiation and automatic
vectorization. Furthermore, we account for the surrogate modeling error and
measurement error. We perform three different in silico test cases, ranging
from the ventricular function to the entire cardiovascular system, involving
whole-heart mechanics, arterial and venous circulation. The proposed method is
robust when high levels of signal-to-noise ratio are present in the quantities
of interest in combination with a random initialization of the model parameters
in suitable intervals. As a matter of fact, by employing a single central
processing unit on a standard laptop and a few hours of computations, we attain
small relative errors for all model parameters and we estimate posterior
distributions that contain the true values inside the 90% credibility regions.
With these benefits, our approach meets the requirements for clinical
exploitation, while being compliant with Green Computing practices.
