  The understanding of the mechanisms for the production of weakly bound
clusters, such as a deuteron $d$, in heavy-ion reactions at mid-rapidity is
presently one of the challenging problems which is also known as the "ice in a
fire" puzzle. In this study we investigate the dynamical formation of deuterons
within the Parton-Hadron-Quantum-Molecular Dynamics (PHQMD) microscopic
transport approach and advance two microscopic production mechanisms to
describe deuterons in heavy-ion collisions from SIS to RHIC energies: kinetic
production by hadronic reactions and potential production by the attractive
potential between nucleons. Differently to other studies, for the "kinetic"
deuterons we employ the full isospin decomposition of the various $\pi
NN\leftrightarrow \pi d$, $NNN\leftrightarrow N d$ channels and take into
account the finite size properties of the deuteron by means of an excluded
volume condition in coordinate space and by the projection onto the deuteron
wave function in momentum space. We find that considering the quantum nature of
the deuteron in coordinate and momentum space reduces substantially the kinetic
deuteron production in a dense medium as encountered in heavy-ion collisions.
If we add the "potential" deuterons by applying an advanced Minimum Spanning
Tree (aMST) procedure, we obtain good agreement with the available experimental
data from SIS energies up to the top RHIC energy.
