2. Given that $q$ is a positive rational number. There are two ants starting from a point $X$ on a plane at the same time. Each ant chooses one of the four directions (east, south, west, north) and moves $q^{n}$ meters in the $n$-th minute $(n=1,2, \cdots)$. Suppose they meet again after some integer minutes, but their paths are not identical. Find all possible values of $q$.
2. Establish a Cartesian coordinate system with $X$ as the origin, the positive east and north directions as the positive directions of the $x$-axis and $y$-axis, respectively.

Let the sum of the horizontal and vertical coordinates of the first ant after $n$ minutes be $a_{n}$, and the corresponding coordinate sum of the other ant be $b_{n}$.
$$
\begin{array}{l}
\text { By }\left|a_{n}-a_{n-1}\right|=\left|b_{n}-b_{n-1}\right|=q^{n} \\
\Rightarrow a_{n}=\sum_{i=1}^{n} \lambda_{i} q^{i}, b_{n}=\sum_{i=1}^{n} \mu_{i} q^{i},
\end{array}
$$

where, $\lambda_{i} 、 \mu_{i} \in\{-1,1\}$.
If the two ants meet after $n$ minutes, then
$$
0=\frac{a_{n}-b_{n}}{2}=\sum_{i=1}^{n} \frac{1}{2}\left(\lambda_{i}-\mu_{i}\right) q^{i} \text {. }
$$

Let the right-hand side of the above equation be $P(q)$. Then the coefficients of the polynomial $P$ all take values in $\{-1,0,1\}$.
Since $q$ is a positive rational root of $P$, it must be that $q=1$.
The case $q=1$ is possible. For example, if the first ant alternates between moving east and west, and the second ant alternates between moving north and south, they will meet at the starting point after any even number of minutes.