  A new approach to perform numerical simulations of systems with a
theta-vacuum term is proposed, tested, and applied to CP3 The main new
ingredient of this approach is the method used to compute the probability
distribution function of the topological charge at theta=0. We comment also on
the possibility of applying this approach to QCD at finite baryon density.
