Skip to content
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

refactor QuantumNetwork to support general quantum networks #1244

Open
wants to merge 43 commits into
base: master
Choose a base branch
from

Conversation

Canoming
Copy link
Contributor

@Canoming Canoming commented Mar 2, 2024

Checklist:

  • Reviewers confirm new code works as expected.
  • Tests are passing.
  • Coverage does not decrease.
  • Documentation is updated.

I've refactored the QuantumNetworks to support general quantum networks and make it more compatible with usual tensor contraction methods.

To make things clear, I made a class diagram for the future development of the module

class diagram

@Canoming Canoming added the quantum_info module PRs and issues related to the quantum information module label Mar 2, 2024
@Canoming Canoming self-assigned this Mar 2, 2024
@renatomello renatomello marked this pull request as draft March 6, 2024 16:02
@scarrazza scarrazza added this to the Qibo 0.2.8 milestone Mar 26, 2024
@Canoming Canoming marked this pull request as ready for review April 17, 2024 07:45
@Canoming
Copy link
Contributor Author

The build of the wheel fails after I merge the master into this branch. Not sure what causes the problem

Copy link

codecov bot commented Apr 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.82%. Comparing base (c132711) to head (d3798e1).
Report is 265 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #1244    +/-   ##
========================================
  Coverage   99.81%   99.82%            
========================================
  Files          72       72            
  Lines       10520    10659   +139     
========================================
+ Hits        10501    10640   +139     
  Misses         19       19            
Flag Coverage Δ
unittests 99.82% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MatteoRobbiati MatteoRobbiati removed the request for review from BrunoLiegiBastonLiegi May 22, 2024 09:14
@scarrazza scarrazza modified the milestones: Qibo 0.2.8, Qibo 0.2.9 May 23, 2024
Copy link
Contributor

@AlejandroSopena AlejandroSopena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Canoming. All the methods seem to be implemented correctly.

Regarding the documentation, I have noticed that the new classes QuantumComb and QuantumChannel need to be added to qibo.srt so that they appear on the website. The file README.md is not included in any toctree. I think the best place to add it is in advancedexamples.rst.

I only have a few minor suggestions at the code level:

src/qibo/quantum_info/quantum_networks.py Outdated Show resolved Hide resolved
src/qibo/quantum_info/quantum_networks.py Outdated Show resolved Hide resolved
tests/test_quantum_info_quantum_networks.py Outdated Show resolved Hide resolved
tests/test_quantum_info_quantum_networks.py Show resolved Hide resolved
tests/test_quantum_info_quantum_networks.py Outdated Show resolved Hide resolved
tests/test_quantum_info_quantum_networks.py Outdated Show resolved Hide resolved
tests/test_quantum_info_quantum_networks.py Outdated Show resolved Hide resolved
tests/test_quantum_info_quantum_networks.py Outdated Show resolved Hide resolved
@renatomello
Copy link
Contributor

@Canoming I'm sorry for my absence. I can't review this PR this week but I can next week.

@Canoming
Copy link
Contributor Author

Canoming commented Jun 2, 2024

Hi, @AlejandroSopena , I've updated the code according to your comments. The Readme.md file is a deprecated 'proof of principle' demonstration for earlier development. I accidentally committed that file to the branch, and it's deleted now. I'm working on a more practical example for the quantum_network, which will be added to a separate PR for documentations later.

@AlejandroSopena AlejandroSopena self-requested a review June 2, 2024 10:24
Canoming and others added 2 commits June 6, 2024 00:02
no cover

Co-authored-by: Alejandro Sopena <44305203+AlejandroSopena@users.noreply.github.com>
@AlejandroSopena AlejandroSopena self-requested a review June 9, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quantum_info module PRs and issues related to the quantum information module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants