According to [this answer](https://mathoverflow.net/a/343911) by Laurent Moret-Bailly, the set of rational non-squares is diophantine over the rationals (a result of Bjorn Poonen): there is a polynomial $P(a,x_1,\dots,x_n)$ which for $a\in\mathbb{Q}$ has a rational solution iff $a$ is a rational non-square. For the variety, take the hypersurface with equation $P^2+(x_{n+1}^2-a)^2=0$ in $n+2$ coordinates $(a,x_1,\dots,x_{n+1})$.