-
Notifications
You must be signed in to change notification settings - Fork 61
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
Migrating Marek's code for DBI to discontinue the old repository #1143
Conversation
- [x] Run loop - [ ] Store values - [ ] Visualization
…th visualize_matrix
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1143 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 70 71 +1
Lines 10381 10437 +56
=========================================
+ Hits 10381 10437 +56
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Thanks @Sam-XiaoyueLi for adding these interesting features.
You can find below some comments. Let me know if you need help with any of the points that I raised.
…ar (could be order of args).
2. Deleted plotting functions
2. Added empty __init__.py
Andrea, how does it work with merging in this situation? Should we request for your approval or 'somehow' go ahead with merge? |
In order to merge the pull request two approvals are needed. I need to check the last changes and then I can approve. |
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.
Thanks @Sam-XiaoyueLi.
Sorry for the late review, I have a few suggestions down below.
Apart from those we should be ready to merge.
Co-authored-by: Andrea Pasquale <[email protected]>
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.
Thanks a lot @Sam-XiaoyueLi for this.
Some suggestions follow. Many of them are very small comments related to the docstrings.
Again on docstrings: I think we should add the utils
file to the documentation. I can do this once the last fixes are done.
The tests are failing because the variable CS_angle_sgn
is not defined. I think you wanted to call cs_angle_sgn
. This will be fixed adding one of my following suggestions.
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.
We should add this utils function to the Qibo documentation.
I can do that just before merging.
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.
Hi @MatteoRobbiati thanks that would be helpful! There's Chinese New Year now so we are both off next week but once @Sam-XiaoyueLi is back it would be great to close the PR! :)
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.
Sure, no problem. Another solution is that I go ahead with the modifications and ask @andrea-pasquale and @Edoardo-Pedicillo for a final review :) So that everything will be merged when you are back.
OFC if @Sam-XiaoyueLi you are ok with this. Otherwise we can simply wait until you are back!
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.
that would be fantastic if you could merge after your changes, thanks @MatteoRobbiati
if there are any issues, you can raise separate issues too and assign @Sam-XiaoyueLi and then we can split the requests into smaller merges. Will be easier to close the PRs? Happy CNY! :)
commit 4f148b8 to fix lint error
I did some modifications. |
|
||
|
||
def select_best_dbr_generator( | ||
dbi_object: DoubleBracketIteration, |
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.
@MatteoRobbiati @Edoardo-Pedicillo if you agree, I believe that here it would make more sense to pass a hamiltonian
as argument. The function should then return the correct DBI
instance with the corresponding execution parameters d
, step
and so on...
Checklist:
Hi guys, this is our first pull request. @marekgluza and I have reviewed the code together and to the best of our knowledge it is ready for your review. The changes include:
additional_double_bracket_functions.py
includes additional functions, among which the most important ones areselect_best_dbr_generator
andselect_best_dbr_generator_and_run
. You may see how it works in the example notebook "DBI_strategies_Pauli-Z_products.ipynb".In summary, you can try running the "DBI_strategies_Pauli-Z_products.ipynb". This will show you which functions are being used.