We derive the exact dual to the bosonic Hubbard model. The dual variables t
ake the form of conserved current loops (local and global). Previously this
has been done only for the very soft core model at very high density. No s
uch approximations are made here. In particular, the dual of the hard core
model is shown to have a very simple form, which is then used to construct
an efficient Monte Carlo algorithm which is quite similar to the World Line
algorithm but with some important differences. For example, with this algo
rithm we can measure easily the correlation function of the order parameter
(Green function), a quantity which is extremely difficult to measure with
the standard World Line algorithm. We demonstrate the algorithm for the one
and two dimensional hardcore bosonic Hubbard models. We present results es
pecially for the Green function and zero-mode filling fraction in the two d
imensional hardcore model.