[proofplan]
We study the squaring map on the finite multiplicative group $G=(\mathbb{Z}/p\mathbb{Z})^\times$. Its image is exactly $Q_p$, and a direct closure argument shows that this image is a subgroup. The only elements whose square is $1$ are $1$ and $-1$, because $\mathbb{Z}/p\mathbb{Z}$ is a field and $p$ is odd. Hence the squaring map is exactly two-to-one onto $Q_p$, so $|Q_p|=(p-1)/2$ and therefore $[G:Q_p]=2$.
[/proofplan]
[step:Show that the nonzero squares are closed under the subgroup test]
Let $1_G \in G$ denote the multiplicative identity, and let $a,b \in Q_p$. By definition of $Q_p$, there exist $u,v \in G$ such that
\begin{align*}
a = u^2
\end{align*}
and
\begin{align*}
b = v^2.
\end{align*}
Since $v \in G$, its inverse $v^{-1} \in G$ exists. Therefore
\begin{align*}
ab^{-1} = u^2(v^2)^{-1} = u^2(v^{-1})^2 = (uv^{-1})^2.
\end{align*}
Because $uv^{-1} \in G$, this shows $ab^{-1} \in Q_p$. Also $1_G = 1_G^2 \in Q_p$. Thus $Q_p$ is nonempty and closed under the subgroup test, so $Q_p \le G$.
[guided]
We prove the subgroup property directly, rather than citing a general theorem about images of homomorphisms. The subgroup test says that a nonempty subset $H$ of a group is a subgroup if, whenever $a,b \in H$, the element $ab^{-1}$ also lies in $H$.
First, $Q_p$ is nonempty because the identity element $1_G \in G$ satisfies
\begin{align*}
1_G = 1_G^2,
\end{align*}
so $1_G \in Q_p$.
Now take arbitrary elements $a,b \in Q_p$. Since $Q_p$ is the set of squares in $G$, there exist elements $u,v \in G$ with
\begin{align*}
a = u^2
\end{align*}
and
\begin{align*}
b = v^2.
\end{align*}
Because $v$ lies in the group $G$, it has an inverse $v^{-1} \in G$. Hence
\begin{align*}
b^{-1} = (v^2)^{-1} = (v^{-1})^2.
\end{align*}
Multiplying $a$ by $b^{-1}$ gives
\begin{align*}
ab^{-1} = u^2(v^{-1})^2.
\end{align*}
The group $G=(\mathbb{Z}/p\mathbb{Z})^\times$ is abelian because multiplication of residue classes is commutative. Therefore
\begin{align*}
u^2(v^{-1})^2 = (uv^{-1})^2.
\end{align*}
Since $uv^{-1} \in G$, this final expression is a square of an element of $G$, so $ab^{-1} \in Q_p$. The subgroup test now gives $Q_p \le G$.
[/guided]
[/step]
[step:Identify the elements whose square is the identity]
Let $K$ denote the set of elements of $G$ whose square is the identity:
\begin{align*}
K := \{x \in G : x^2 = 1_G\}.
\end{align*}
If $x \in K$, then in the field $\mathbb{Z}/p\mathbb{Z}$ we have
\begin{align*}
x^2 - 1_G = 0.
\end{align*}
Factoring gives
\begin{align*}
(x - 1_G)(x + 1_G) = 0.
\end{align*}
Since $p$ is prime, $\mathbb{Z}/p\mathbb{Z}$ is a field and therefore has no zero divisors. Hence $x - 1_G = 0$ or $x + 1_G = 0$, so $x=1_G$ or $x=-1_G$. Conversely, both $1_G$ and $-1_G$ square to $1_G$. Since $p$ is odd, $1_G \ne -1_G$. Therefore
\begin{align*}
K = \{1_G,-1_G\}
\end{align*}
and
\begin{align*}
|K|=2.
\end{align*}
[/step]
[step:Count the image of the squaring map by proving every fiber has two elements]
Define the squaring map
\begin{align*}
\phi: G &\to G
\end{align*}
\begin{align*}
x &\mapsto x^2.
\end{align*}
Its image is exactly $Q_p$. Let $y \in Q_p$, and choose $u \in G$ such that $u^2=y$. We claim that the fiber of $\phi$ over $y$ is precisely
\begin{align*}
\phi^{-1}(\{y\}) = \{u,-u\}.
\end{align*}
Indeed, if $x \in G$ satisfies $\phi(x)=y$, then $x^2=u^2$, so
\begin{align*}
(xu^{-1})^2 = x^2u^{-2} = u^2u^{-2} = 1_G.
\end{align*}
Thus $xu^{-1} \in K$, and the previous step gives $xu^{-1}=1_G$ or $xu^{-1}=-1_G$. Hence $x=u$ or $x=-u$. Conversely, $u^2=y$ and $(-u)^2=u^2=y$, so both $u$ and $-u$ lie in the fiber. Since $p$ is odd and $u \ne 0$ in $\mathbb{Z}/p\mathbb{Z}$, the elements $u$ and $-u$ are distinct. Therefore every fiber of $\phi:G\to Q_p$ has exactly two elements.
[/step]
[step:Compute the index from the two-to-one count]
The group $G=(\mathbb{Z}/p\mathbb{Z})^\times$ consists of the $p-1$ nonzero residue classes modulo $p$, so
\begin{align*}
|G| = p-1.
\end{align*}
Since the map $\phi:G\to Q_p$ is onto by definition of $Q_p$ and every fiber has exactly two elements, the finite set $G$ is partitioned into $|Q_p|$ fibers, each of cardinality $2$. Hence
\begin{align*}
|G| = 2|Q_p|.
\end{align*}
Therefore
\begin{align*}
|Q_p| = \frac{p-1}{2}.
\end{align*}
Because $Q_p \le G$ and $G$ is finite, the index is the quotient of cardinalities:
\begin{align*}
[G:Q_p] = \frac{|G|}{|Q_p|}.
\end{align*}
Substituting the computed sizes gives
\begin{align*}
[G:Q_p] = \frac{p-1}{(p-1)/2} = 2.
\end{align*}
This proves that the nonzero quadratic residues modulo $p$ form an index two subgroup of $G$.
[/step]