equivalent condition for a quadratic number field to have a solution of the equation $x^2+y^2=-1$ My question is related to the realization problem of the quaternion group $Q_{8}$.
Let $d$ be a positive square-free integer. It is well known that the unique irreducible 2-dimensional representation of $Q_{8}$ realizes over $K=\mathbb{Q}\left(\sqrt{-d}\right)$ if and only if there exist $x,y\in K$ such that $x^2+y^2=-1$. Is there an equivalent condition of $d$ for $K$ to have a solution of the equation $x^2+y^2=-1$?

When $d\equiv-1\pmod 8$, $K$ embeds into the $2$-adic numbers $\Bbb Q_2$, and in
$\Bbb Q_2$ the equation $x^2+y^2+1=0$ is insoluble (this boils down to congruences
modulo $8$).
Suppose $d\not\equiv-1\pmod 8$. Then the equation $x^2+y^2=-1$
is soluble in $K$ iff the quadratic form $X^2+Y^2+Z^2$ is isotropic over $K$.
By the Hasse-Minkowski theorem for number fields, this is the case
iff $X^2+Y^2+Z^2$ is isotropic over all completions of $K$, that is iff
$x^2+y^2=-1$ is soluble over all completions of $K$.
Certainly $x^2+y^2=-1$ is soluble over $\Bbb C$ and over $\Bbb Q_p$
for all odd primes $p$. It suffices to prove it is soluble over all
$2$-adic completions of $K$. But the only $2$-adic completion of $K$
is $L=\Bbb Q_2(\sqrt{-d})$ which is a quadratic extension of $\Bbb Q_2$.
There are only seven different quadratic extensions of $\Bbb Q_2$, and one can
check individually that $x^2+y^2=-1$ is soluble in each of them.
