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

easy cast #412

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

easy cast #412

wants to merge 62 commits into from

Conversation

ziofil
Copy link
Collaborator

@ziofil ziofil commented Jun 13, 2024

Allows circuit component with a class initializer to take another circuit component as only argument and cast it to its type.
For example:

cc = Some >> Circuit  # say this returns a CircuitComponent
channel = Channel(cc)   # fails if wires are incompatible

Copy link

codecov bot commented Jun 13, 2024

Codecov Report

Attention: Patch coverage is 93.63057% with 10 lines in your changes missing coverage. Please review.

Project coverage is 87.55%. Comparing base (d025abb) to head (0621574).

Current head 0621574 differs from pull request most recent head 599a86c

Please upload reports for the commit 599a86c to get more accurate results.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #412      +/-   ##
===========================================
- Coverage    87.76%   87.55%   -0.21%     
===========================================
  Files           81       81              
  Lines         6226     6154      -72     
===========================================
- Hits          5464     5388      -76     
- Misses         762      766       +4     
Files Coverage Δ
mrmustard/lab_dev/circuit_components_utils.py 100.00% <100.00%> (ø)
mrmustard/lab_dev/circuits.py 95.45% <100.00%> (ø)
mrmustard/lab_dev/transformations/base.py 100.00% <100.00%> (ø)
...mustard/lab_dev/transformations/transformations.py 100.00% <100.00%> (ø)
mrmustard/lab_dev/utils.py 83.33% <ø> (-8.34%) ⬇️
mrmustard/lab_dev/wires.py 99.21% <100.00%> (+0.12%) ⬆️
mrmustard/physics/fock.py 92.23% <ø> (-0.30%) ⬇️
mrmustard/lab_dev/circuit_components.py 97.60% <95.00%> (+2.24%) ⬆️
mrmustard/lab_dev/states/base.py 94.59% <79.41%> (-2.33%) ⬇️

... and 3 files 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 d025abb...599a86c. Read the comment docs.

@ziofil ziofil added WIP work in progress no changelog Pull request does not require a CHANGELOG entry labels Jun 14, 2024
mrmustard/lab_dev/wires.py Outdated Show resolved Hide resolved
mrmustard/lab_dev/wires.py Outdated Show resolved Hide resolved
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 WIP work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant