pedrorrivero / qrand

A multiprotocol and multiplatform quantum random number generation framework
https://pypi.org/project/qrand/
Apache License 2.0
24 stars 14 forks source link

Jupyter notebook tutorial #4

Open pedrorrivero opened 3 years ago

pedrorrivero commented 3 years ago

What is the nature of the issue?

New content

Describe the issue

Build an interactive and up-to-date Jupyter Notebook tutorial for QRAND v1.0.0

Which files need to be updated?

What content needs to be added, updated, or replaced?

The tutorial should at least include:

Additional context

This has to be targeted for v1.0.0 → QiskitBitGenerator deprecated in favor of QuantumBitGenerator

gprs1809 commented 3 years ago

Hello, I had few hours ago seen that this was a part of unitaryhack. Even though it is not a part of it now, can I still try this out with Qiskit? I am new to open source and I thought this task would be something I could start of with.

pedrorrivero commented 3 years ago

Hi @gprs1809!

I removed this issue from #unitaryHACK because I do not think we will be able to complete a full tutorial at this stage of development. However, feel free to try. Before the start of the hackathon I will be merging the new structure of QRAND to master. If you need any guide, we can chat via discord!

I will retag it.

Thanks!

Avhijit-Nair commented 3 years ago

@pedrorrivero I guess contributing to this issue will still be counted for Unitary Hack, right? 'cause it has the good first issue tag.

gprs1809 commented 3 years ago

Hi @gprs1809!

I removed this issue from #unitaryHACK because I do not think we will be able to complete a full tutorial at this stage of development. However, feel free to try. Before the start of the hackathon I will be merging the new structure of QRAND to master. If you need any guide, we can chat via discord!

I will retag it.

Thanks!

Sure @pedrorrivero, I will try

anushkrishnav commented 3 years ago

Hey @gprs1809 can we team up on this ?

gprs1809 commented 3 years ago

Hey @gprs1809 can we team up on this ?

Sure

gprs1809 commented 3 years ago

Hey @pedrorrivero, I will continue to work on this. Thank you, for answering my question on Discord :). I have a couple of more questions: In qrng.py, there is a deprecation warning, should I still use that in the tutorial I will be creating? Also, I see that QuantumBitGenerator inherits UserBitGenerator from randomgen. I am reading about it, but are there more resources to understand it better?

pedrorrivero commented 3 years ago

Hi @gprs1809! Awesome! Let me get to your questions:

  1. Use the new version of Qrng better, it is located in qrand.qrngV1. I am keeping it this way since it will introduce a breaking a change and I want to have all breaking changes happen at once when we bump up to version 1.0.0
  2. Don't worry about UserBitGenerator. Randomgen is an external library that helps interfacing with NumPy. Pretty much all the functionality related to it is enclosed within the ## NUMPY INTERFACE ##section. I might even refactor QuantumBitGenerator to move it all to a different file. All you really need to know is that thanks to that we can use QuantumBitGenerator (and any of its child classes like Qrng) as a NumPy bit generator (e.g. to instantiate a generator numpy.Generator(qrng)). I would therefore advice taking a look at some applications of NumPy's BitGenerator class and simply add some examples 😊

Also, instead of looking at the code inside the master branch, I would suggest looking at dev. That is the most up to date code you can find!