Monday, July 8, 2024

Sharma 13

 Got through Sharma 13, the Deutsch-Jozsa algorithm. Easy enough to follow, but had

some moments trying to upgrade the code to actually go on the quantum computer.

The opening code:


Misleading to think this code always outputs 1. One chooses the output value one

wnats to use.

                                                               


Code to run a similation:

                                                                               


Running on the actual computer:




One needs a token number, given when one registers with IBM Qunatum.

                                                           *     *     *

Made a very useful discovery. By going to PyPI, one can see all the available 

Packages on Python...

                                                           *     *     *

                            


So asking numpy for a random number(2) get us 0 and 1 as choices. We are ont the

half-open that contains 0 but not two.

                                                            *     *     *

Fun fact: the first ever quntum computer was built in 1998. It has 2 qubits'



No comments: