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

Group common Qblox modules functions #730

Closed
wants to merge 14 commits into from

Conversation

PiergiorgioButtarini
Copy link
Contributor

@PiergiorgioButtarini PiergiorgioButtarini commented Dec 28, 2023

This PR follows the philosophy established in #686 where common properties between the three diferent Qblox modules are defined directly in the class ClusterModule (in module.py) and then are inherited by all of them.

TODO:

Test on hardware.

Checklist:

  • Reviewers confirm new code works as expected.
  • Tests are passing.
  • Coverage does not decrease.
  • Documentation is updated.

Base automatically changed from remove_offset_setup to main January 10, 2024 11:45
@PiergiorgioButtarini PiergiorgioButtarini added the cleanup Code is working but could be simiplified label Jan 15, 2024
@PiergiorgioButtarini PiergiorgioButtarini linked an issue Jan 15, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jan 15, 2024

Codecov Report

Attention: 109 lines in your changes are missing coverage. Please review.

Comparison is base (e11f5c8) 64.00% compared to head (c72f618) 64.45%.

Files Patch % Lines
src/qibolab/instruments/qblox/module.py 35.55% 29 Missing ⚠️
src/qibolab/instruments/qblox/cluster_qrm_rf.py 3.84% 25 Missing ⚠️
src/qibolab/instruments/qblox/cluster_qcm_rf.py 4.34% 22 Missing ⚠️
src/qibolab/instruments/qblox/cluster_qcm_bb.py 5.26% 18 Missing ⚠️
src/qibolab/instruments/qblox/controller.py 11.76% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #730      +/-   ##
==========================================
+ Coverage   64.00%   64.45%   +0.45%     
==========================================
  Files          49       49              
  Lines        5778     5700      -78     
==========================================
- Hits         3698     3674      -24     
+ Misses       2080     2026      -54     
Flag Coverage Δ
unittests 64.45% <16.79%> (+0.45%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PiergiorgioButtarini PiergiorgioButtarini linked an issue Jan 15, 2024 that may be closed by this pull request
@PiergiorgioButtarini PiergiorgioButtarini marked this pull request as ready for review January 18, 2024 09:08
@alecandido
Copy link
Member

This is also outdated wrt main. If you know that is working, and the review is just the routine check, please merge/rebase.

Otherwise, make sure that the branch is updated, and you'd like to merge (I'm asking just because it's not very recent).

@stavros11
Copy link
Member

stavros11 commented Feb 6, 2024

@alecandido I put us as reviewers because I think in the last Qibo meeting @PiergiorgioButtarini said that this is ready to merge and overall is reducing the lines of code so would be good to merge. But indeed let's wait for him to fix the conflict and let us know.

@alecandido
Copy link
Member

Yes, I got your point, but there are a few PRs that are aging a bit in Qibolab, so we should be slightly more careful when merging.

@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2024

Codecov Report

Attention: Patch coverage is 26.11940% with 99 lines in your changes are missing coverage. Please review.

Project coverage is 64.54%. Comparing base (2d48d2a) to head (e24294a).
Report is 85 commits behind head on main.

Files Patch % Lines
src/qibolab/instruments/qblox/module.py 38.23% 42 Missing ⚠️
src/qibolab/instruments/qblox/cluster_qrm_rf.py 15.00% 17 Missing ⚠️
src/qibolab/instruments/qblox/controller.py 11.76% 15 Missing ⚠️
src/qibolab/instruments/qblox/cluster_qcm_rf.py 12.50% 14 Missing ⚠️
src/qibolab/instruments/qblox/cluster_qcm_bb.py 8.33% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #730      +/-   ##
==========================================
+ Coverage   63.89%   64.54%   +0.64%     
==========================================
  Files          49       49              
  Lines        5792     5697      -95     
==========================================
- Hits         3701     3677      -24     
+ Misses       2091     2020      -71     
Flag Coverage Δ
unittests 64.54% <26.11%> (+0.64%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@alecandido alecandido left a comment

Choose a reason for hiding this comment

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

Just a few suggestions for further improvements.

But it's already deduplicating a lot, so it's also fine to merge :)

src/qibolab/instruments/qblox/cluster_qcm_bb.py Outdated Show resolved Hide resolved
src/qibolab/instruments/qblox/cluster_qcm_bb.py Outdated Show resolved Hide resolved
src/qibolab/instruments/qblox/cluster_qcm_bb.py Outdated Show resolved Hide resolved
@alecandido
Copy link
Member

@scarrazza scarrazza added this to the Qibolab 0.1.6 milestone Feb 15, 2024
Copy link
Member

@stavros11 stavros11 left a comment

Choose a reason for hiding this comment

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

Thanks @PiergiorgioButtarini. I am not sure if there is any qblox available right now and where is the runcard, but if you have access it would be good if you can check that at least instrument tests pass before merging.

Comment on lines +155 to +162
self._sequencers[port] = []
if self.settings[port]["lo_frequency"]:
self._ports[port].lo_enabled = True
self._ports[port].lo_frequency = self.settings[port]["lo_frequency"]
self._ports[port].attenuation = self.settings[port]["attenuation"]
self._ports[port].hardware_mod_en = True
self._ports[port].nco_freq = 0
self._ports[port].nco_phase_offs = 0
Copy link
Member

Choose a reason for hiding this comment

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

I believe this part could also be lifted (if I am not missing something). For example, you could have a _setup_output_port(self, port) in ClusterModule and call it here and for "o1" in QRM.

But I think it is minor, it is still fine as it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes you are probably right, I will have a look. Thanks @stavros11

@alecandido alecandido added the deploy on hardware The PR needs to be tested on hardware before merging label Mar 6, 2024
@alecandido
Copy link
Member

Superseded by #868 and the subsequent rewriting

@alecandido alecandido closed this Apr 22, 2024
@alecandido alecandido deleted the pulse_process_qblox branch August 5, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code is working but could be simiplified deploy on hardware The PR needs to be tested on hardware before merging qblox
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Qblox controller manage module connections Lift 'disconnect()' in 'ClusterModule'
5 participants