5

Suppose I want to perform the time-evolution simulation on the following Hamiltonians:

$$ H_{1} = X_1+ Y_2 + Z_1\otimes Z_2 \\ H_{2} = X_1\otimes Y_2 + Z_1\otimes Z_2 $$

Where $X,Y,Z$ are Pauli matrices. Since $[X_1,Y_2] = 0$, I can simultaneously perform the time evolution simulation of $X_1$ and $Y_2$. Thus, it seems like both Hamiltonians could be simulated using the following circuit ($\pi$ is just a random number):

Is this circuit looks right? If so, how can I tell the difference between these two Hamiltonians just by looking at the circuit?

Ohad
  • 1,739
  • 2
  • 15
ZR-
  • 2,388
  • 7
  • 19
  • 1
  • 1
    Another point is that a tensor product in the Hamiltonian couples qubits together while the tensor product for gates does not. This means $H = X_{1}\otimes Y_{2}$ requires a two qubit gate to implement the associated evolution, while $H = X_{1} + Y_{2}$ can be implemented by two single qubit gates. In terms of circuit diagrams this means the tensor product $X_{1}\otimes Y_{2}$ should have a gate that connects $q_0$ and $q_1$, while the sum $X_{1} + Y_{2}$ would have separate gates for $q_0$ and $q_1$ (as you have in your figure above). – N A McMahon Nov 06 '20 at 13:26
  • 1
    Note that what kind of two qubit gate(s) is used (and any other single qubit gates that are also used) depends on the hardware and how you implement the unitary. In the answer below these are the CNOT gates. – N A McMahon Nov 06 '20 at 13:29
  • 1
    @Davit Khachatryan Thanks!! – ZR- Nov 06 '20 at 14:06
  • @N A McMahon Thank you so much, that's really helpful:) – ZR- Nov 06 '20 at 14:15

1 Answers1

5

The circuit to simulate the term $e^{i Z \otimes Z t}$ can be construct as

enter image description here

and the circuit to simulate the term $e^{i X \otimes Y t}$ can be construct as

enter image description here

Now to simulate $H = X \otimes Y + Z \otimes Z$, we can use Trotter approx with one time slice to get the following circuit to approximate $e^{i (X \otimes Y + Z \otimes Z) t}$ :

enter image description here

Now as commented by @tsgeorgios, in fact, $X \otimes Y$ and $Z \otimes Z$ are commute. That is,

$$ [X\otimes Y, Z \otimes Z] = X\otimes Y \cdot Z \otimes Z - Z \otimes Z \cdot X\otimes Y = \boldsymbol{0}$$

you can see this explicitly as follows: $$ X \otimes Y = \begin{pmatrix} 0 & 0 & 0 & -i\\ 0 & 0 & i & 0\\ 0 & -i & 0 & 0\\ i & 0 & 0 & 0\\ \end{pmatrix} \ \ \ \ \ \ \textrm{and} \ \ \ \ Z \otimes Z = \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & -1 & 0 & 0\\ 0 & 0 & -1 & 0\\ 0 & 0 & 0 & 1\\ \end{pmatrix} $$ hence you can see that $$ X \otimes Y \cdot Z \otimes Z - Z \otimes Z \cdot X \otimes Y = \begin{pmatrix} 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ \end{pmatrix} $$

that is they are commute with one another. This is important because if two matrix $A$ and $B$ are commute then we have that (See here. ) $$e^{A + B} = e^{A}e^{B}$$

What this tells us is that the above circuit is the exact representation of the term $e^{i (X \otimes Y + Z \otimes Z) t}$ and not just an approximation!



Now, the circuit to simulate $e^{i X \otimes I t}$ is:

enter image description here

and the circuit to simulate $e^{i I \otimes Y t}$ is:

enter image description here

As you can see, the Identity operator doesn't do anything! so you can ignore them out of the circuit.

Thus, the trotter approx circuit for $e^{i (X \otimes I + I \otimes Y + Z \otimes Z) t}$ is:

enter image description here


I would like to linked a very good and detail answer by @Davit Khachatryan to a similar question here.

KAJ226
  • 13,822
  • 2
  • 10
  • 30
  • Thank you so much for the reply! Are all the parameters in U3 and Rz gates random variables? – ZR- Nov 06 '20 at 05:36
  • 1
    The paramters in $U3$ are fixed. They are meant to implement exactly that gate. The parameters in $R_Z$ gate is arbirary, depending on the coeffecient in the exponential. :) – KAJ226 Nov 06 '20 at 05:38
  • Thanks! I'm kind of new to quantum computing, could you give me some suggestions on how I can come up with ideas in constructing the circuit for ^⊗ and ^⊗t? – ZR- Nov 06 '20 at 05:45
  • 1
    It can be proven that if $t$ a real number and $P$ a matrix such that $P^2=I$ then $e^{iPt} = \cos(t) I + i\sin(t) P$. Hence if we have $P = I \otimes Y$ for instance, then we have $e^{i I \otimes Y t} = \cos(t) I \otimes I + i\sin(t) I \otimes Y = I \otimes \bigg[ \cos(t) I + i \sin(t) Y \bigg] = I \otimes e^{i Y t} $. This means we will only apply $e^{i Y t} $ operation to the second qubit, and the first qubit will be left alone. And we can decompose $e^{i Y t}$ into sequence of single qubit gates. – KAJ226 Nov 06 '20 at 06:07
  • Thank you so much:) – ZR- Nov 06 '20 at 06:21
  • 1
    In fact, since $ X \otimes Y $ and $ Z \otimes Z $ commute, the first Trotter approx is exact. – tsgeorgios Nov 06 '20 at 09:41
  • @tsgeorgios Thanks for the comment! Could you explain a bit about how can I understand they are commute? – ZR- Nov 06 '20 at 14:25
  • @KAJ226 Thanks for the update, that's really helpful:) – ZR- Nov 06 '20 at 16:20
  • @KAJ226 Should the gates designed for $ ^{⊗}$ be on q1 and $^{⊗}$ on q0? Thanks:) – ZR- Nov 08 '20 at 22:50
  • 1
    Yes. Sorry about that. – KAJ226 Nov 08 '20 at 23:10
  • @KAJ226 Could you explain a bit about how the circuit for $e^{iX\otimes Yt}$ is constructed? Like why there are two $U_3$ gates on the two sides? (Or are there any relevant resources?) Thank you so much:) – ZR- Nov 15 '20 at 06:01
  • Yes. The idea is that it comes down to the fact that: $X = HZH$ and $Y = U_3(\pi/2, \pi/2, \pi/2) Z U_3(-\pi/2, \pi/2, \pi/2)$. And we already know how to implement the circuit to represent the evolution $e^{i t Z \otimes Z }$, so if $Z$ is now switched to $X$ then we placed the $H$ gate infront... and if $Z$ was instead replaced with $Y$ then we placed $U_3(\pi/2, \pi/2, \pi/2) $ in front and its inverse $U_3(-\pi/2, \pi/2, \pi/2)$ at the end.... This extends to higher number of qubit as well. – KAJ226 Nov 15 '20 at 17:46
  • 1
    Here is another good resource: https://github.com/DavitKhach/quantum-algorithms-tutorials/blob/master/Hamiltonian_simulation.ipynb – KAJ226 Nov 15 '20 at 17:47