# Hamiltonian simulation: how can I incorporate the constant before each term?

I got another follow-up question about Hamiltonian simulation from the previous post: if I perform the controlled time-evolution of the Hamiltonian:

$$H_{3} = \alpha\ X_1\otimes Y_2 + \beta \ Z_1\otimes Z_2$$ where $$\alpha$$ and $$\beta$$ are real constants. When they're both equal to 1, $$H_3$$ could be simulated via the following quantum circuit (answer from @KAJ226): However, how can I introduce those constants when they're not equal to 1? This paper by Earl Campbell proposed an idea to build up a compiler and randomly 'select' the part of Hamiltonian according to a probability distribution determined by constants like $$\alpha$$ and $$\beta$$.

I think this is a good way to incorporate the effects of those constants (the effect would be more obvious if you have enough time steps), but it's still kind of 'indirect' to me. I'm wondering is there another option that I can show the effects of $$\alpha$$ and $$\beta$$ when they are generic real numbers?

Thanks!!

You'll place the phase within the CRz gate.

The approach you've taken essentially argues that: $$e^{it H_3} \approx e^{it \alpha X_1 \otimes Y_2} e^{it \beta Z_1 \otimes Z_2}$$

So, when you're applying the Rz gate, you can select the $$it \alpha$$ coefficient to align with the necessary phase (likely you'll use $$\theta = -2 t \alpha$$, depending on the definition of your Rz)

Something to keep in mind with the approach that you're leveraging is that it is a form of exponentiated Hamiltonian splitting. Namely, $$e^{-i \sum H_j t} = \prod_{j = 1}^m e^{-i H_j t} + \mathcal{O}(m^2 t^2)$$

(From Microsoft) This is important to keep in mind because the circuit that you're implementing does not perfectly simulate the Hamiltonian, and the selection of $$t$$ has significant impacts on the accuracy of the realized circuit.

I note this because it's really important to understand the foundational simulation theory in conjunction with simulation realization. Microsoft has great resources, plus the Whitfield paper previously suggested is excellent.

• Thanks for the answer! In this case, $[\alpha (𝑋_1⊗𝑌_2)+\beta (𝑍_1⊗𝑍_2)] = 0$, so does that means the circuit could give a precise simulation? – ZR- Nov 21 '20 at 5:53
• It is true that if $[A,B] = 0$ then $e^{it(A+B)} = e^{itA}e^{itB}$ and indeed $[XY, ZZ] =0$. – KAJ226 Nov 21 '20 at 6:21