Small bug in the code for Codecercise D.4.3 Metrics

This post is about a small error naming a variable which you could fix to avoid misunderstandings from the readers.


I believe there is a small bug in the code template for the exercise, as the density_matrix is defined by calling circuit(target_state) when the actual variable is called target_state_vector.

This last screenshot is my solution to the exercise and has the correct code, I believe.

Thanks a lot for providing the Codebook and the exercises!

1 Like

Thanks again for the feedback @FedeHR !

I’ve blurred your screenshots to avoid spoilers for others.