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

Rich wires #523

Open
wants to merge 44 commits into
base: develop
Choose a base branch
from
Open

Rich wires #523

wants to merge 44 commits into from

Conversation

ziofil
Copy link
Collaborator

@ziofil ziofil commented Nov 14, 2024

Wires have been challenging to maintain due to evolving requirements.

This PR introduces a better abstraction for Wire that stores a collection of QuantumWire and ClassicalWire dataclasses. Metadata can be added to these dataclasses without modifying the Wires object’s handling of indices and dictionaries. Many methods, like __matmul__, are greatly simplified.

@ziofil ziofil added the no changelog Pull request does not require a CHANGELOG entry label Nov 14, 2024
@ziofil ziofil added the WIP work in progress label Nov 14, 2024
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 99.11111% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.78%. Comparing base (4c603d0) to head (3b6be98).

Files with missing lines Patch % Lines
mrmustard/physics/wires.py 98.76% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #523      +/-   ##
===========================================
- Coverage    89.84%   89.78%   -0.07%     
===========================================
  Files           93       93              
  Lines         6098     6089       -9     
===========================================
- Hits          5479     5467      -12     
- Misses         619      622       +3     
Files with missing lines Coverage Δ
mrmustard/lab_dev/circuit_components.py 98.44% <100.00%> (ø)
...ustard/lab_dev/circuit_components_utils/b_to_ps.py 100.00% <100.00%> (ø)
...mustard/lab_dev/circuit_components_utils/b_to_q.py 100.00% <100.00%> (ø)
...tard/lab_dev/circuit_components_utils/trace_out.py 100.00% <100.00%> (ø)
mrmustard/lab_dev/circuits.py 94.93% <100.00%> (ø)
mrmustard/lab_dev/states/dm.py 95.73% <100.00%> (+0.07%) ⬆️
mrmustard/lab_dev/states/ket.py 98.62% <100.00%> (+0.02%) ⬆️
mrmustard/lab_dev/states/number.py 100.00% <100.00%> (ø)
mrmustard/lab_dev/states/quadrature_eigenstate.py 100.00% <100.00%> (ø)
mrmustard/lab_dev/states/sauron.py 100.00% <ø> (ø)
... and 6 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c603d0...3b6be98. Read the comment docs.

@ziofil ziofil removed the WIP work in progress label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Pull request does not require a CHANGELOG entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants