The fixed code of the grader has this:
for i in range(20):
params = update(gamma, params)
if i > 10:
gamma *= 0.9
params = [param.tolist() for param in params]
return params
So the optimization loop always exists after the first iteration. As a result the optimized parameters are not optimal - the fidelity is far away from 1.
Nevertheless, it seems that the test cases for this challenge were written with this bug in place, so a correct implementation of the challenge passes the tests, so this does not hinder completing the challenge.
The tests actually never check the fidelity, so I guess the creators of the challenge never noticed this bug because of this. As a developer to developer, I thought it is worth letting the organizers know about this bug ![]()