  The production of exotic hadron $\rm X(3872)$ in $pp$ collisions at
$\sqrt{s}=2.76\,\mathrm{TeV}$ is investigated by the parton and hadron cascade
model PACIAE in this work. In the simulation the final partonic state (quark
matter, QM) and the final hadronic state (hadron matter, HM) are continuously
processed and recorded. The $\rm X(3872)$ compact tetraquark state and loose
molecular state are, respectively, coalesced and recombined in the QM and HM
with the quantum statistical mechanics inspired dynamically constrained
phase-space coalescence model. The formation time, velocity and temperature of
QM (tetraquark state) and HM (molecular state) are proposed as identifying
criteria between the two states. Our results in transverse momentum spectrum
and rapidity distribution, etc. show a significant discrepancy between the two
states and confirm that they are also valuable criteria identifying the $\rm
X(3872)$ compact tetraquark state or molecular state.
