quantum-circuit icon indicating copy to clipboard operation
quantum-circuit copied to clipboard

Repository of Examples to Illustrate Quantum Programming Concepts

Open simplygreatwork opened this issue 5 years ago • 2 comments

I've been on a mission lately to create lots of quantum computing examples in JavaScript. I had been using dabbling with qcsimulator, qics, and jsqubits but I finally settled on embedding a pared down version of quantum circuit.

I'm working with the O'Reilly book "Programming Quantum Computers", QASM examples, and anything I can comprehend online. These are some examples I've created so far which have not been reviewed. I did see this recent bug report and I'll need to review whether or not I have hacked around this bug or not. I may eventually re-integrate with the full Quantum Circuit library but this is just what I have so far.

The examples are in my Github repository.

simplygreatwork avatar Jun 30 '20 03:06 simplygreatwork

@simplygreatwork wow!

Let’s talk privatelly, can you send me a email to one of addresses which you will find at https://quantastica.com ?

perak avatar Jun 30 '20 05:06 perak

By the way, following gate matrices were changed this week: rz, crz, r2, r4, r8. If your code uses any of these gates then it will return different results with version >= 0.9.154

I believe that gate matrices will not change anymore.

If you are using some of changed gates, quick fix is to replace rz(theta) with u1(lambda) and crz(theta) with cu1(lambda). I believe that you didn't use r2, r4, r8, gates, but if you did, you can quickly replace them with u1(pi/2), pi/4 and pi/8 respectively.

perak avatar Jun 30 '20 20:06 perak