n = 1
##################
# YOUR CODE HERE #
##################
error_XandZ = trotter_k_error_XandZ(alpha, beta, time, n, k)
while error_XandZ > error:
n += 1
error_XandZ = trotter_k_error_XandZ(alpha, beta, time, n, k)
return n
I submitted once more at 10h25 CEST, I am located in France. I have waited approximately 90 secondes to have the error message.
But I have a very good news, I tried the piece of code you sent to @Qimi and it worked, I finally have the “Correct!” message. Thank you!
Hi @CatalinaAlbornoz, I think I figured out what went wrong. My mistake was to use an optimal_k = 10. As soon as I decreased the value sufficiently enough, I did not get the network error anymore and I could pass the codercise.
I hope you’ve been enjoying the Codebook.
If you haven’t tried them already I encourage you to try the PennyLane Coding Challenges too! You can even get limited-time badges if you complete the challenges in certain categories by the end of April.