rhoforsympy

..where we discuss density operators wrt SymPy

Month: August, 2012

Week 12 : Starting work on Shor’s algorithm

This has been a great 12 week run filled with learning and valuable experience! I believe I have accomplished most of what I had set out to do.  The only other thing pending as far as proposed tasks goes is to relocate the Tr module. This would be based on decisions that needs to be taken by more experienced folks here! Once, the decision is made, I don’t think this would take too much of my time. (I am estimating this based on the current approaches that have been proposed).  Therefore, I am committed to getting this done even if this goes beyond GSoC pencils down deadline which is this week!

So, that was all about the wrap up! So, what I am doing now?

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

Looking forward, I have taken up another interesting task I am excited to work on.  Past week I started working on implementing/completing Shor’s algorithm. The 2 major activities that consumed my time this week were

a) Understand Shor’s algorithm in more detail to help me understand what is available in the current implementation.

b) Review the current implementation and plan on next steps.

After reviewing the current implementation, I have decided to approach this task with the following smaller tasks:

a) Review and complete the implementation of QFT gate ( include tests, documentation), so that it can work independent of Shor’s algorithm.

b) Review and complete the implementation of CMOD gate. Right now, the implementation is not complete, and needs more tests too. This is the set of gates that would do the  |a mod N> * |state> over 2^j times for j = { 0, 1, ….2^(n-1)}

c) Put this all together and re-factor the current implementation (especially break down current period_find() ) to help more detail testing.

d) Also, I plan to provide a argument to shor() method, to work as a flag to turn on detail logging as the circuit progresses.

All the code I am currenly reviewing and planning to work on are available on the master branch even though it is not complete.

Happy coding!

Week 11: Fidelity of quantum states

As discussed in my previous weeks report, this week I started addressing some of the issues in the pending PR’s and all the pending PRs were merged!

In addition to getting the pending PRs accepted, I have stated working on 2 other tasks. One of them, that was completed is the feature to compute Fidelity (PR 1459) of quantum states.  Some screen-shots follow (taken from notebook examples available with code base). Information regarding fidelity can be found at these 2 wikis: 1, 2

For the next week, my plan is to finish up work on the implementation of Shor’s algorithm available here.

Here are some examples of using the fidelity function: