5
$\begingroup$

I would like to implement the operation $$ U(a,b) = \exp\left(i \frac{a}{2} (XX + YY) + i \frac{b}{2} (XY - YX) \right) $$

($a,b \in \mathbb{R}$) without using Baker-Campbell-Hausdorf expansion, which at first seems necessary since $[(XY - YX), (XX + YY)] \neq 0$. My intuition is that this can be done in the same way that $\exp(i(aX + bY))$ does not require a BCH expansion to implement. The above operation is generated by these two matrices:

\begin{align} i \frac{a}{2} (XX + YY)\rightarrow i a \begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix} \\ i \frac{b}{2} (XY - YX)\rightarrow i b\begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & \text{-}i & 0 \\ 0 & i & 0 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}. \end{align}

Since sum of these matrices is proportional to the operator $(aX - bY)$ in the $(|01\rangle,|10\rangle)$ subspace it seems possible that the operation can be done with a general single-qubit rotation $\text{R}_\hat{n}$ in that subspace. Taking the (unnormalized) unit vector $\hat{n} = a\hat{x} - b\hat{y}$ this rotation is given by

$$ \text{R}_\hat{n} (\theta) = \cos\frac{\theta}{2} + i \sin \frac{\theta}{2} (a X - b Y) $$

so that the operation can be implemented as

$$ U(a, b) = \text{CNOT}^{2\rightarrow 1} \text{CR}_{\hat{n}}(\theta)^{1\rightarrow 2} \text{CNOT}^{2\rightarrow 1} $$

where $\text{CR}_{\hat{n}}(\theta)$ is a controlled version of $\text{R}_\hat{n}$ and $i\rightarrow j$ indicates an operation on qubit $j$ controlled by qubit $i$. My main concern is that since neither $(XY - YX)$ nor $(XX + YY)$ has support in the $|00\rangle, |11\rangle$ subspace that there's something missing or wrong in this process.

My question is, is this a valid decomposition for $U(a, b)$ or is there something wrong in the above reasoning?

$\endgroup$
3
  • $\begingroup$ You can just multiply the 4 by 4 matrices to check your answer. $\endgroup$
    – AHusain
    Commented Jan 15, 2021 at 0:55
  • $\begingroup$ I don't know the matrix representation of $U(a,b)$ $\endgroup$
    – forky40
    Commented Jan 15, 2021 at 0:56
  • $\begingroup$ You can find a matrix representation of a 2-qubit gate using a math software package, e.g. scipy enables you to compute matrix exponentials using scipy.linalg.expm. $\endgroup$ Commented Jan 15, 2021 at 17:37

1 Answer 1

4
$\begingroup$

Your approach is correct. In particular, sandwiching a controlled rotation between two CNOT gates is a common technique for implementing rotations on the $|01\rangle, |10\rangle$ subspace on hardware that does not implement it natively.

We can justify your approach using the fact that if $A$ has eigendecomposition

$$ A = \sum_i \lambda_i|i\rangle\langle i| $$

then $e^A$ has eigendecomposition

$$ e^A = \sum_i e^{\lambda_i}|i\rangle\langle i|. $$

Consequently, if $A$ is block diagonal

$$ A = \begin{pmatrix} A_1 & & & \\ & A_2 & & \\ & & \ddots & \\ & & & A_k \\ \end{pmatrix} $$

then so is $e^A$

$$ e^A = \begin{pmatrix} e^{A_1} & & & \\ & e^{A_2} & & \\ & & \ddots & \\ & & & e^{A_k} \\ \end{pmatrix}. $$

In the present case

$$ \frac{a}{2}(XX + YY) + \frac{b}{2}(XY - YX) = \begin{pmatrix} 0 & & \\ & aX - bY & \\ & & 0 \end{pmatrix} $$

so

$$ \exp\left(i\frac{a}{2}(XX + YY) + i\frac{b}{2}(XY - YX)\right) = \begin{pmatrix} e^0 & & \\ & e^{iaX-ibY} & \\ & & e^0 \end{pmatrix} = \begin{pmatrix} 1 & & \\ & R_{\hat n}(2t) & \\ & & 1 \end{pmatrix} $$

where $n$ is the normalized real 3-vector $(-a, b, 0) / t = (-\alpha, \beta, 0)$, $\hat n = \beta Y-\alpha X$ and $t = \|n\|_2 = \sqrt{a^2 + b^2}$.

In particular, we do not need to be concerned about the subspace $|00\rangle, |11\rangle$ because it is the eigenspace of the operator in the exponent associated with eigenvalue zero which means that $U(a, b)$ acts on it as identity.


Note that in practice it is sometimes possible to avoid using Baker-Campbell-Hausdorff by bringing the terms of the exponent into a form in which they commute, e.g. by regrouping the terms

$$ \begin{align} U(a,b) &= \exp\left(i \frac{a}{2} (XX + YY) + i \frac{b}{2} (XY - YX) \right) \\ &= \exp\left(\frac{i}{2} X\otimes(aX + bY) + \frac{i}{2} Y\otimes(aY - bX) \right) \\ \end{align} $$

where $X\otimes(aX+bY)$ and $Y\otimes(aY-bX)$ commute. Therefore,

$$ \begin{align} U(a, b) &= \exp\left(\frac{i}{2} X\otimes(aX + bY)\right) \exp\left(\frac{i}{2} Y \otimes(aY - bX)\right) \\ &= \exp\left(\frac{it}{2} X\otimes(\alpha X + \beta Y)\right) \exp\left(\frac{it}{2} Y\otimes(\alpha Y - \beta X)\right) \end{align} $$

where $t = \sqrt{a^2 + b^2}, \alpha = \frac{a}{t},\beta = \frac{b}{t}$ as before. Notice that $[X\otimes(\alpha X + \beta Y)]^2 = I$ and $[Y\otimes(\alpha Y - \beta X)]^2 = I$ so

$$ \exp\left(\frac{it}{2} X\otimes(\alpha X + \beta Y)\right) = I \cos\frac{t}{2} + i X\otimes(\alpha X + \beta Y) \sin\frac{t}{2} \\ \exp\left(\frac{it}{2} Y\otimes(\alpha Y - \beta X)\right) = I \cos\frac{t}{2} + i Y\otimes(\alpha Y - \beta X) \sin\frac{t}{2} $$

(c.f. equation $(4.7)$ on p.175 in Nielsen & Chuang). Thus,

$$ U(a, b) = II \cos^2\frac{t}{2} + ZZ\sin^2\frac{t}{2} + i\left(\frac{\alpha}{2}(XX + YY) + \frac{\beta}{2}(XY - YX)\right)\sin t. $$

In matrix representation

$$ U(a, b) = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos t & (-\beta + i\alpha)\sin t & 0 \\ 0 & (\beta + i\alpha)\sin t &\cos t & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix} $$

where we recognize the middle $2\times 2$ block as $R_{\hat n}(2t)$ with $\hat n = \beta Y-\alpha X$ as before.

$\endgroup$

Your Answer

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

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