Closed cfpgomes closed 4 years ago
You're correct, great catch! It looks like we refer to that sample twice, and the 3-qubit output was missed in our last revision. By going back through the Git history, I can see that @sparrigan had it correct in 54e91bc18df0c02690fead57f69aa69a2ea77ae8 and then I accidentally clobbered it in e771eedfc5189fd4100e9182dcdce2aa85692be7.
I've updated online sample 8-1 to be 3-qubit output and with a Nic's correct unitary which provides a 150-degree eigenphase, so the output now matches the book.
Book:
New online result:
I'll also ask @tcNickolas for help adjusting the Q# version, that should be pretty straightforward.
In any case, the sample now matches the book. Thank you!
For the record, here's the diff for this: https://github.com/oreilly-qc/oreilly-qc.github.io/compare/b9d5c676..63e102b8
Context
In Chapter 8: Quantum Phase Estimation, in The Fine Print part (Choosing the Size of the Output Register), the book refers to an example of determining an eigenphase of 150º with an output register having only three qubits that can be run online at http://oreilly-qc.github.io?p=8-2.
Issue
However, the example seems to be a duplicate of Example 8-1 and does not implement the expected code for the example 8-2. The circuit is identical to the Example 8-1 and contains an output register with four qubits (should be three) and does not use the aforementioned 150º eigenphase.