Sunday, September 29, 2024

More_Fun

 Below, code to look at Phase Estimation. One is even free to change the number of qubits used...

                                                                      



How it works:

The example code, with 3 control qubits, comes in at .75. I can reduce the number of qubits

to 2 and still get this result. If I increase the number if qubits to 4, I will do well to increase

the number of trials as well. At 4, then, my estimate goes to .6875.

As the number of qubits - and trials - grows, the program looks for the mode of the 

most_probable set. The odds may  be around 40% but they are the best of the lot, and the

'mode' zeroes in on the value we are looking for.

                                                              3 control qubits:




Not to get too carried away, the expected load on current quantum machines is between

5 and 20 qubits, and up to 20000 runs!!


Ended up with a problem when there is a single output case (index 0). Below,

for theta .5:

                                                         







No comments: