qiskit-community / qiskit-metal

Quantum Hardware Design. Open-source project for engineers and scientists to design superconducting quantum devices with ease.
https://qiskit-community.github.io/qiskit-metal/
Apache License 2.0
279 stars 205 forks source link

Update open_to_ground.py #760

Closed fgnyilmaz closed 2 years ago

fgnyilmaz commented 2 years ago

What are the issues this pull addresses (issue numbers / links)?

open_to_ground default options were not generalized. width & gap and termination_gap was with some constant numbers so when One change their cpw_width and cpw_gap, open to ground's extra part was not changing accordingly.

Did you add tests to cover your changes (yes/no)?

Yes

Did you update the documentation accordingly (yes/no)?

Yes

Did you read the CONTRIBUTING document (yes/no)?

Yes

Summary

When One want to use different cpw_with and cpw_gap, the extra part (that makes the resonator not grounded) of open to the ground does not change because it was fixed as 10um and 6um, respectively. I changed them to cpw_width and cpw_gap as needed and it works now. Analyses also work.

Details and comments

Just updated some of the default options to have a generalized open to ground library.

fgnyilmaz commented 2 years ago

@ThomasGM4 and @priti-ashvin-shah-ibm Tests / tests-python3.8-ubuntu-latest (pull_request) gives error

priti-ashvin-shah-ibm commented 2 years ago

@ThomasGM4 and @priti-ashvin-shah-ibm Tests / tests-python3.8-ubuntu-latest (pull_request) gives error

In file /Users/pritishah/QInfo/open_qm/qiskit-metal/qiskit_metal/tests/test_qlibrary_2_options.py there is a test on line 199 which checks the number of options that are in the component. It used to be 3, as part of the pull request, the number of options has changed to 8. So the test needs to reflect the change in the number of default_options; can you change the test to be as follows?

self.assertEqual(len(options), 8)