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

Bugfix in transmon class #146

Merged
merged 1 commit into from
Oct 28, 2021
Merged

Conversation

alex-simm
Copy link
Collaborator

@alex-simm alex-simm commented Oct 26, 2021

What

The Transmon class is using the anharmonic part of the Hamiltonian (Hs["anhar"]) which is, however, only generated if the levels are >2. A transmon with 2 levels throws an error. This fixes it.

Why

Because it wasn't working

How

Only use the parameter if levels are >2.

Remarks

Checklist

  • Tests - Added unit tests for new code, regression tests for bugs and updated the integration tests if required
  • Formatting & Linting - black and flake8 have been used to ensure styling guidelines are met
  • Type Annotations - All new code has been type annotated in the function signatures using type hint
  • Docstrings - Docstrings have been provided for functions in the numpydoc style
  • Documentation - The tutorial style documentation has been updated to explain changes & new features
  • Notebooks - Example notebooks have been updated to incorporate changes and new features
  • Changelog - A short note on this PR has been added to the Upcoming Release section

@codecov
Copy link

codecov bot commented Oct 26, 2021

Codecov Report

Merging #146 (388a9af) into dev (2b4625f) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #146      +/-   ##
==========================================
- Coverage   71.43%   71.42%   -0.01%     
==========================================
  Files          36       36              
  Lines        5219     5218       -1     
==========================================
- Hits         3728     3727       -1     
  Misses       1491     1491              
Impacted Files Coverage Δ
c3/libraries/chip.py 57.67% <100.00%> (-0.08%) ⬇️

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 2b4625f...388a9af. Read the comment docs.

Copy link
Collaborator

@nwittler nwittler left a comment

Choose a reason for hiding this comment

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

Looks good.

@nwittler nwittler merged commit 79b34f0 into q-optimize:dev Oct 28, 2021
@lazyoracle lazyoracle mentioned this pull request Nov 12, 2021
@lazyoracle lazyoracle added this to the 1.4 milestone Dec 7, 2021
@lazyoracle lazyoracle mentioned this pull request Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants