crazy4pi314 / learn-qc-with-python-and-qsharp

Companion code for Learn Quantum Computing with Python and Q# Book by Dr. Sarah Kaiser and Dr. Cassandra Granade 💖
https://bit.ly/qsharp-book
MIT License
90 stars 51 forks source link

Qubit reset unnecessary in send_classical_bit function #9

Closed hettlage closed 3 years ago

hettlage commented 4 years ago

The function send_classical_bit in ch03/qkd.py includes a call to the qubit's reset method. But from what I can see, this shouldn't be necessary as the using_qubit context manager calls this method as well.

crazy4pi314 commented 3 years ago

Thanks for calling this out! You're quite right that the reset is technically extraneous, but we've written this the way we did so as to match how you might write Q# programs with explicit Reset calls later in the book. Thanks again for pointing this out!