1
$\begingroup$

I was trying to build a $cccx$ gate. According to this paper by Berenco et al., it requires a $\sqrt[4]{X}$ gate. Furthermore, I found another paper by Muradian and Frias with this formula:

$$\sqrt A=\frac{1}{\sqrt{2i}}(iI+A).$$

From this I calculated $\sqrt[4]{X}$, $$ \sqrt[4]{X} = \begin{bmatrix}{\frac{2+i}{2}}&{\frac{-i}{2}}\\{\frac{-i}{2}}&{\frac{2+i}{2}}\end{bmatrix} $$

I am not sure about the result at all! I used MATLAB to determine the fourth power of $\sqrt[4]{X}$ matrix, but it doesn't give $X$ matrix. Also, I am confused because there should be four matrices, and I don't know how to implement them in Qiskit either.

$\endgroup$
5
  • 4
    $\begingroup$ You used their Eq. (9) to compute the square root twice. This is not valid. This equation only holds for a self-inverse $A$, aka it only applies when $A^2=I$. That is true of $X$, but it is not true of $\sqrt{X}$, so you can't use Eq. (9) the second time to get the forth root. You instead need to directly use their Eq. (7). $\endgroup$ Apr 28, 2022 at 18:44
  • $\begingroup$ Thanks! I guess I have found the solution! $\endgroup$ Apr 28, 2022 at 18:48
  • $\begingroup$ @JahanClaes is eqn. (7) of Muradian and Frias really valid for $\sqrt X$, where we know that $\sqrt X^4=\mathbb I$? Muradian and Frias state that eqn. (7) is for self-inverse gates ($A^2=\mathbb I$), but I think, naively, the relation between $A$ and $e^{f(A)}$ is slightly different when $A^2\ne\mathbb I$ but $A^4=\mathbb I$. $\endgroup$ Apr 29, 2022 at 14:54
  • 1
    $\begingroup$ @MarkS Eq. (7) is for self-inverse gates, but it is a formula for the $n$th root. So use $n=4$ on $X$, not $n=2$ on $\sqrt{X}$. $\endgroup$ Apr 29, 2022 at 17:35
  • $\begingroup$ Got it. Thanks! But can Eq. (7) be generalized to other operators such as any old arbitrary fourth root of $I$? For example, a quarter-turn clockwise (or counterclockwise) rotation of a square? $\endgroup$ Apr 29, 2022 at 17:56

1 Answer 1

7
$\begingroup$

There are a couple of ways that you might do this calculation directly. I'd start by finding the spectral decomposition of $X$: $$ X=|+\rangle\langle +|-|-\rangle\langle -|=e^{i0}|+\rangle\langle +|+e^{i\pi}|-\rangle\langle -|. $$ The fourth root of the operator is just the same thing but replacing the eigenvalues with their fourth roots: $$ \sqrt[4]{X}=e^{i0/4}|+\rangle\langle +|+e^{i\pi/4}|-\rangle\langle -|. $$ So, as a matrix, this is $$ e^{i\pi/8}\left(\begin{array}{cc} \cos\frac{\pi}{8} & -i\sin\frac{\pi}{8} \\ -i\sin\frac{\pi}{8} & \cos\frac{\pi}{8} \end{array}\right). $$

$\endgroup$
1
  • $\begingroup$ Thank you very much, sir $\endgroup$ Apr 29, 2022 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.