-
Notifications
You must be signed in to change notification settings - Fork 33
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
WIP: Quantum partition function #17
Conversation
src/braket/experimental/algorithms/quantum_partition_function/quantum_partition_function.py
Show resolved
Hide resolved
src/braket/experimental/algorithms/quantum_partition_function/quantum_partition_function.py
Outdated
Show resolved
Hide resolved
src/braket/experimental/algorithms/quantum_partition_function/quantum_partition_function.py
Outdated
Show resolved
Hide resolved
src/braket/experimental/algorithms/quantum_partition_function/quantum_partition_function.py
Show resolved
Hide resolved
src/braket/experimental/algorithms/quantum_partition_function/quantum_partition_function.py
Outdated
Show resolved
Hide resolved
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@mbeach-aws @christianbmadsen I believe this PR is just waiting for our team to review? |
Acknowledged. We will take another look. Thanks for the nudge! |
I wonder if it makes sense to describe a bit more what the functions are doing? |
src/braket/experimental/algorithms/quantum_partition_function/quantum_partition_function.py
Outdated
Show resolved
Hide resolved
src/braket/experimental/algorithms/quantum_partition_function/quantum_partition_function.py
Outdated
Show resolved
Hide resolved
circuit = None | ||
|
||
if function == "shor": | ||
print("shor's algorithm for iccc-check hasn't been implemented!") |
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.
print("shor's algorithm for iccc-check hasn't been implemented!") | |
print("Shor's algorithm for iccc-check hasn't been implemented!") |
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.
Also do you plan to implement this function? If not you should probably remove it.
src/braket/experimental/algorithms/quantum_partition_function/quantum_partition_function.py
Outdated
Show resolved
Hide resolved
|
||
|
||
@circuit.subroutine(register=True) | ||
def quantum_partition_function( |
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.
I don't think the comments in this function sufficiently describe what the function does. Could you flesh out the docstring or at least add a reference?
|
||
def run_quantum_partition_function( | ||
potts_model: dict, | ||
step: str, |
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.
Is there a reason to use the step
keyword here instead of putting each step as a separate function?
if step == "pre": | ||
print("Classical Preprocessing to [n,k] Code") | ||
Ga = potts_model["graph-model"] | ||
# q = potts_model["q-state"] |
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.
What's this line?
|
||
|
||
def run_quantum_partition_function( | ||
potts_model: dict, |
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.
Maybe you should consider defining potts_model
as an object instead. Otherwise it is hard for a user to tell what should go in here
src/braket/experimental/algorithms/quantum_partition_function/quantum_partition_function.py
Outdated
Show resolved
Hide resolved
'graph-model': networkx graph to save the definition of potts model | ||
'q-state': q-state of potts model | ||
'qft-func': dictionary to save information for quantum fourier transform function | ||
'task': braket task for quantum fourier transform |
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.
'task': braket task for quantum fourier transform | |
'task': Braket task for quantum fourier transform |
In general, the notebook needs more explanation than just the code blocks; you should be interleaving code and markdown cells, with a markdown cell before each code block explaining what is happening, with the math if applicable. |
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #17 +/- ##
===========================================
- Coverage 100.00% 96.29% -3.71%
===========================================
Files 26 28 +2
Lines 1028 1107 +79
Branches 161 197 +36
===========================================
+ Hits 1028 1066 +38
- Misses 0 34 +34
- Partials 0 7 +7
☔ View full report in Codecov by Sentry. |
Hello AoyuQC, This PR has had little activity; I will close it for now. You are welcome to come back and work on it and reopen it any time. You can also consider developing this work further in a sperate repo of yours and highlighting it on in Braket Algorithm library "Community repos" section, which we recently added. I hope this helps. |
Issue #, if available:
Description of changes:
Testing done:
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.