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

Default values for gates that are added to a circuit #15

Merged
merged 2 commits into from
May 10, 2021

Conversation

eileen-kuehn
Copy link
Member

This pull requests implements the functionality to define a default_value for parameters. In case a parameter is added back into a circuit, either manually or via functions prune or shrink, the parameter can take a specified default_value in case it is defined for the MaskedCircuit.

This PR also includes relevant unit tests.

Fixes #14.

@codecov
Copy link

codecov bot commented May 10, 2021

Codecov Report

Merging #15 (ea6de45) into main (11eaac5) will increase coverage by 1.63%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
+ Coverage   67.81%   69.45%   +1.63%     
==========================================
  Files          12       12              
  Lines         839      884      +45     
  Branches       88       93       +5     
==========================================
+ Hits          569      614      +45     
  Misses        266      266              
  Partials        4        4              
Impacted Files Coverage Δ
maskit/masks.py 100.00% <100.00%> (ø)
tests/test_masks.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

Copy link
Contributor

@maxfischer2781 maxfischer2781 left a comment

Choose a reason for hiding this comment

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

Obligatory-minor-suggestion-so-you-need-another-review! 🧐

maskit/masks.py Outdated Show resolved Hide resolved
Co-authored-by: Max Fischer <maxfischer2781@gmail.com>
Copy link
Contributor

@maxfischer2781 maxfischer2781 left a comment

Choose a reason for hiding this comment

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

🥇

@eileen-kuehn eileen-kuehn merged commit c9ee85c into main May 10, 2021
@eileen-kuehn eileen-kuehn deleted the add/specific-parameter branch May 10, 2021 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable adding parameters back into a circuit with specific values
2 participants