To solve the equation \( q^2 = 9 \), we take the square root of both sides:
\[ q = \pm \sqrt{9} \]
Calculating the square root gives:
\[ q = \pm 3 \]
Thus, the solutions are:
\[ q = 3 \quad \text{or} \quad q = -3 \]
So, the final answers are:
\[ q = 3 \quad \text{or} \quad q = -3 \]