-
Notifications
You must be signed in to change notification settings - Fork 212
Demo DQI #1524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Demo DQI #1524
Conversation
👋 Hey, looks like you've updated some demos! 🐘 Don't forget to update the Please hide this comment once the field(s) are updated. Thanks! |
Your preview is ready 🎉!You can view your changes here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work packing such a complex work into a demo, @daniela-angulo 🚀 💪
I left quite a few comments, a good bit of which are just tiny code ideas and subjective suggestions.
Overall, the flow of the demo is great. I think it would benefit from (additional) markers here or there that make clear to readers that they can't expect to get all details from the demo. I'd suggest to reduce code duplication between the DQI
function definitions to not interrupt the nice flow and improve readability. :)
Now that we have this nice code, is there any way we can apply it to a larger problem? 👀 😁
return qml.counts(wires=range(0, m + 1)) | ||
|
||
|
||
print(DQI(m, n, l)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Horizontal scrollbar in output. Might be fine, just wanted to bring it up.
# the random sampling done af first. | ||
# | ||
|
||
dev = qml.device("default.qubit", wires=range(0, 1 + m + n), shots=n_samples) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above :)
# The objective function :math:`f(\mathbf{x})` has a very sparse Hadamard spectrum. This means that | ||
# there are only :math:`m` non-zero “frequency” components :math:`\mathbf{b_i}` out of :math:`2^n` | ||
# possible in :math:`f(\mathbf{x})`. Consequently, preparing the state | ||
# :math:`\sum_{\mathbf{x}} f(\mathbf{x})|\mathbf{x}\rangle` can be seen as a simple task by creating | ||
# an appropriate superposition of the :math:`m` amplitudes and apply a Hadamard transform. The same | ||
# principle holds for preparing :math:`|P(f)\rangle`, even though it is not as simple, we will still first | ||
# prepare the Hadamard transform of the state, taking advantage of its sparse spectrum, and then | ||
# transform back. The Hadamard transform of :math:`P(f(\mathbf{x}))` is: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph marks the beginning of where I would have to dive into the literature and//or accept that I won't understand all details while reading.
This is totally fine, given the complexity of the topic/algorithm, but it felt a little bit abrupt, using the notions of Hadamard spectrum and frequencies.
Could you maybe ease a bit more into things becoming hard from here on? :) Maybe just with a tiny disclaimer that not all technical details will be explained or so? 🤔
Co-authored-by: David Wierichs <[email protected]>
Co-authored-by: David Wierichs <[email protected]>
Co-authored-by: David Wierichs <[email protected]>
Co-authored-by: David Wierichs <[email protected]>
Before submitting
Please complete the following checklist when submitting a PR:
Ensure that your tutorial executes correctly, and conforms to the
guidelines specified in the README.
Remember to do a grammar check of the content you include.
All tutorials conform to
PEP8 standards.
To auto format files, simply
pip install black
, and thenrun
black -l 100 path/to/file.py
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Title:
Decoded quantum interferometry
Summary:
Relevant references:
Possible Drawbacks:
Related GitHub Issues:
If you are writing a demonstration, please answer these questions to facilitate the marketing process.
GOALS — Why are we working on this now?
Eg. Show a PL implementation of a recent paper.
AUDIENCE — Who is this for?
Eg. Researchers.
KEYWORDS — What words should be included in the marketing post?
Which of the following types of documentation is most similar to your file?
(more details here)