iqm-finland / KQCircuits

KLayout Python library for integrated quantum circuit design.
GNU General Public License v3.0
128 stars 71 forks source link

`super().build()` always needed in chips #12

Closed jkotilahti closed 2 years ago

jkotilahti commented 2 years ago

At the end of each chip's build() method we must always remember to call super().build() because Chip.build() creates some geometry that is needed in all chips. It would be better if that was not needed.

Proposed solution is to use a new post_build() method that is always automatically called in Element.produce_impl():

The post_build() method of elements could later be used also for other actions that are needed after build().

upsideon commented 2 years ago

@jkotilahti I've submitted a pull request which fulfills the tasks provided in your instructions. The changes went smoothly and all tests pass, but feel free to let me know if I missed anything and I'll make the appropriate updates. Thank you!

jkotilahti commented 2 years ago

Thank you for the contribution @upsideon! Great to have the first PR from outside IQM :)

We will probably review this at the beginning of next week because of team event today.

Please note also that in order for us to accept your pull request you must sign the IQM Contributor License Agreement (https://github.com/iqm-finland/KQCircuits#contributing). Let me know if you already did this, at least I did not receive it yet.

upsideon commented 2 years ago

I signed the IQM Contributor License Agreement momentarily before submitting the pull request. I've submitted the form again just in case the first one didn't go through.

jkotilahti commented 2 years ago

Thanks, I got now the confirmation that the CLA is signed.