I have a question concerning the Schrödinger model for the Weil representation over a finite field $\mathbb{F}_q$.

The way to present the action of the Weil representation $\omega$ of $Sp(2n,\mathbb{F}_q)$ in this model, is to give the action of matrices $\left(\begin{smallmatrix}a & 0\\ 0&^{t}a^{-1}\end{smallmatrix}\right)$ in a standard Levi, $\left(\begin{smallmatrix}1 & u\\ 0& 1\end{smallmatrix}\right)$ of a radical unipotent, and finally of matrices of the form $\left(\begin{smallmatrix}0 & -1\\ 1 & 0 \end{smallmatrix}\right)$. The question I have is about the Legendre symbol appearing in the formula for the action of elements of the Levi. The formula is $$ \omega\left(\begin{matrix}a & 0\\ 0&^{t}a^{-1}\end{matrix}\right)f(x)=\left(\frac{det(a)}{q}\right)f(^tax) $$ I do not understand where the Legendre symbol $\left(\frac{\cdot}{q}\right)$ comes from. In the p-adic setting this is replaced by $|det(a)|^{1/2}$, and the reason is so that the action of this Levi is unitary. I hope someone can clarify this doubt.

Thanks in advance. Greetings.