In a computer program (written in C++), given $x\in[0,1)$ and $\sigma>0$, I need to sample $y$ from the wrapped normal distribution $\mathcal W_{x,\:\sigma^2}$ with mean $x$ and variance $\sigma^2$ and evaluate the density $q$ of $\mathcal W_{x,\:\sigma^2}$ at $y$ at the same time.
If $\varphi_{\sigma^2}$ denotes the density of the normal distribution with mean $0$ and variance $\sigma^2$ and $$\psi_{\sigma^2}(y):=\sum_{k\in\mathbb Z}\varphi_{\sigma^2}(k+y)\;\;\;\text{for }y\in\mathbb R,$$ then $$q(y):=\psi_{\sigma^2}(y-x)\;\;\;\text{for }y\in[0,1)$$ is the density of $\mathcal W_{x,\:\sigma^2}$ with respect to the Lebesgue measure.
We can sample $y$ by drawing $\xi\sim\mathcal N_{0,\:1}$, setting $z:=x+\sigma\xi$ and $y:=z-\lfloor z\rfloor$. But now I would need to evaluate $q(y)$ separately.
So, my question is: Can we somehow sample $y$ in a clever way such that we obtain $q(y)$ as a byproduct? If not, how should we evaluate $q(y)$ (the problematic thing being that it's an infinite sum)?