Hello. I am stuck in the exercise on Trotterization. Any suggestions?
Hi @qreg, welcome to the forum! You are on the right track I can provide a couple hints.
- The main one is the evolution time. In Trotterization, the operation is split up into n identical steps.
- Recall that while circuits are read from left to right, when we write out the representation of a circuit as matrix multiplication, it is written from right to left.
- Double check the definition of RZ and the other Pauli rotations expressed as a matrix exponential (e.g., see the text panel of I.6.5); then, compare it to the expression of e^{-iHt/\hbar} for the Hamiltonian we are working with here. What parameters do you need to pass to
RZ
to rotate the qubits in the correction direction?
Hope that helps, please let us know if you have any further questions!
1 Like
Thank you, @glassnotes ! I will rewrite the code to conform to your hints. All the best!
OK, I solved the challenge. Thanks again for your help, @glassnotes.
No problem, glad to hear you solved it!