Quantum Computing Asked by Nehad on April 26, 2021
I know that the two qubit gate generated by $H=Xotimes X$ is $exp{-text{i}theta Xotimes X}=cos{theta} mathbb1 otimes mathbb1 – text{i} sin{theta} X otimes X$, where $X$ is the $sigma_x$ Pauli matrix. Now, if we moved to the Hamiltonian $H= Xotimes X + Y otimes Y + Z otimes Z$, how can we find the two qubit gate?
Perhaps not surprisingly, the gate is $exp(-i theta (X otimes X + Y otimes Y + Z otimes Z))$.
More usefully, the terms that are being summed happen to commute so you can decompose the problem into $exp(-i theta X otimes X) cdot exp(-i theta Y otimes Y) cdot exp(-i theta Z otimes Z)$.
import cirq
from cirq import X, Y, Z
import math
theta = math.pi / 6
a, b = cirq.LineQubit.range(2)
xx = math.e**(-1j * theta * X(a)*X(b))
yy = math.e**(-1j * theta * Y(a)*Y(b))
zz = math.e**(-1j * theta * Z(a)*Z(b))
print(cirq.unitary(cirq.Circuit(xx, yy, zz)).round(4))
[[0.866-0.5j 0. +0.j 0. +0.j 0. +0.j ]
[0. +0.j 0.433+0.25j 0.433-0.75j 0. +0.j ]
[0. +0.j 0.433-0.75j 0.433+0.25j 0. +0.j ]
[0. +0.j 0. +0.j 0. +0.j 0.866-0.5j ]]
Answered by Craig Gidney on April 26, 2021
TL;DR: The two-qubit gate corresponding to the Hamiltonian is the SWAP gate.
For an operator $A$ that squares to identity $A^2=I$, we have $e^{itheta A} = Icostheta +iAsintheta$. In our case the Hamiltonian does not square to identity
$$ (Xotimes X + Yotimes Y + Zotimes Z)^2 ne Iotimes I. $$
However, we can tweak it by adding a constant term since this only affects the unobservable global phase. We note that
$$ frac{Iotimes I + Xotimes X + Yotimes Y + Zotimes Z}{2} = begin{pmatrix} 1 & 0 & 0 & 0 0 & 0 & 1 & 0 0 & 1 & 0 & 0 0 & 0 & 0 & 1 end{pmatrix} = text{SWAP} $$
does square to identity. Thus, we can write
$$ expleft(-frac{igamma}{2}(Iotimes I + Xotimes X + Yotimes Y + Zotimes Z)right) = Icosgamma -text{SWAP}, isingamma $$
which means that the Hamiltonian generates the fractional SWAP gate
$$ expleft(-frac{igamma}{2}(Xotimes X + Yotimes Y + Zotimes Z)right) = e^{frac{igamma}{2}}(Icosgamma -text{SWAP}, isingamma). $$
When $theta=frac{gamma}{2}=kfrac{pi}{4}$ and $k$ is an odd integer then the evolution swaps the two qubits and when $k$ is an even integer then it acts as identity.
If SWAP is unavailable, the evolution generated by the Hamiltonian can also be implemented for example using two CNOTs and a controlled rotation
$$ expleft(-frac{igamma}{2}(Xotimes X + Yotimes Y + Zotimes Z)right) = C_2NOT_1 circ C_1R_{2,x}(2gamma) circ (R_{1,z}(gamma) otimes I_2) circ C_2NOT_1 $$
where we also use an $R_z$ gate to correct the phase of the central $2times 2$ block of the matrix.
Answered by Adam Zalcman on April 26, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP