Solving $B=m\cos^2\alpha + k\cos\alpha\sin\alpha + n\sin^2\alpha$ for $\alpha$

57 Views Asked by At

The context of this question comes from calculating the fidelity drop of quantum systems after applying rotational X and Z gates. The equation to solve is shown below, for which the angle $\alpha$ needs to be found. $$ B = m\cos^{2}(\alpha) + k\cos(\alpha)\sin(\alpha) + n\sin^{2}(\alpha) $$ In the equation $B$, $m$, $k$, and $n$ are known.

I would be happy to receive some help with this, thanks in advance!

3

There are 3 best solutions below

2
On BEST ANSWER

$$ B = m\cos^{2}(\alpha) + k\cos(\alpha)\sin(\alpha) + n\sin^{2}(\alpha) $$ $$ \implies B-\frac{m+n}{2}=\frac{m-n}{2} \cos 2 \alpha + \frac{k}{2} \sin 2\alpha $$ $$ \frac{2B-m-n}{\sqrt{(m-n)^2+k^2}}=\frac{(m-n) \cos 2 \alpha + k \sin 2\alpha}{\sqrt{(m-n)^2+k^2}}=\cos(2\alpha-\beta) $$ Finally we get $$\alpha=\frac{1}{2}\cos^{-1}\left[\frac{2B-m-n}{\sqrt{(m-n)^2+k^2}}\right]+\frac{\beta}{2},~~ \beta=\tan^{-1}\frac{k}{m-n}.$$

4
On
  1. Move the $\cos\alpha\sin\alpha$ term to one side, then square both sides of the equation
  2. Use $x=\cos^2\alpha$, so then $\sin^2\alpha=1-x$
  3. Solve the equation in $x$
  4. Finds $\alpha$.
  5. Check the solution by plugging it back into the original equation. You might need to adjust the sign of $\alpha$

EDIT: $$ (B - m\cos^{2}(\alpha) - n\sin^{2}(\alpha))^2= k^2\cos^2(\alpha)\sin^2(\alpha) $$ Substituting $\cos^2\alpha=x,\ \sin^2\alpha=1-\cos^2\alpha=1-x$, you get: $$(B-mx-n(1-x))^2=k^2x(1-x)$$ This is a simple quadratic equation in $x$.

0
On

Hint:

Avoid squaring as it generally introduces When do we get extraneous roots?

Divide both sides by $\cos^2\alpha$ to find $$B(1+t^2)=m+kt+nt^2$$ which on rearrangement is a quadratic equation in $t=\tan^2\alpha$

We can divide both sides by $\sin^2\alpha$ as well to find another quadratic equation in $\dfrac1t$