Skip to content

Conversation

@Kyung-hoon-Jung0
Copy link
Collaborator

Summary

This PR focuses solely on pre-commit (pylint/black) compliance for qubit spectroscopy versus flux calibration files.

  • No functional or behavioral changes
  • Refactored the codes (e.g. redundant control flow) recommended by Pylint.
  • Module/function/class docstrings, line length fixes, code style improvements
  • Goal: ensure clean pre-commit passes

File-by-file summary of changes (non-functional only)

calibrations/1Q_calibrations/03b_qubit_spectroscopy_vs_flux.py
  • Added module docstring (line 1):
    • """Qubit spectroscopy versus flux bias calibration."""
  • Fixed long docstrings to comply with 120-character line limit:
    • execute_qua_program function (lines 181-182): Split docstring from 126 characters into two lines
    • analyse_data function (lines 222-223): Split docstring from 147 characters into two lines
  • Added function docstrings:
    • custom_param function (line 56): """Allow the user to locally set the node parameters for debugging purposes."""
    • save_results function (line 269): """Save the node results and state."""
  • Fixed generator usage (line 77):
    • Changed any([q.z is None for q in qubits]) to any(q.z is None for q in qubits) per pylint R1729
  • Fixed no-else-continue issue (lines 254-263):
    • Removed unnecessary else after continue statement and de-indented the code
calibration_utils/qubit_spectroscopy_vs_flux/__init__.py
  • Added module docstring (line 1):
    • """Qubit spectroscopy versus flux calibration utilities."""
calibration_utils/qubit_spectroscopy_vs_flux/analysis.py
  • Added module docstring (line 1):
    • """Analysis utilities for qubit spectroscopy versus flux calibration."""
  • Fixed long docstring to comply with 120-character line limit:
    • process_raw_dataset function (lines 53-54): Split docstring from 140 characters into two lines
  • Replaced __bool__() with bool() (line 145):
    • Changed fit.sel(qubit=q).success.values.__bool__() to bool(fit.sel(qubit=q).success.values)
    • Fixed unnecessary dunder method call per pylint C2801
calibration_utils/qubit_spectroscopy_vs_flux/parameters.py
  • Added module docstring (line 1):
    • """Parameters for qubit spectroscopy versus flux calibration."""
  • Added class docstrings:
    • NodeSpecificParameters class (line 10): """Node-specific parameters for qubit spectroscopy versus flux."""
    • Parameters class (line 39): """Combined parameters for qubit spectroscopy versus flux calibration."""
calibration_utils/qubit_spectroscopy_vs_flux/plotting.py
  • Added module docstring (line 1):
    • """Plotting utilities for qubit spectroscopy versus flux calibration."""

Copy link
Collaborator

@paulQM paulQM left a comment

Choose a reason for hiding this comment

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

couple quick fixes and good to go

QubitsExperimentNodeParameters,
):
pass
"""Combined parameters for qubit spectroscopy versus flux calibration."""
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is pass removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks for the check! I think I removed the line by mistake.. I will modify this (+the comment line as mentioned below).

q.z.joint_offset += fit_results["idle_offset"]
q.xy.RF_frequency = fit_results["qubit_frequency"]
q.f_01 = fit_results["qubit_frequency"]
# q.freq_vs_flux_01_quad_term = fit_results["quad_term"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

commented line should be deleted

@Kyung-hoon-Jung0 Kyung-hoon-Jung0 merged commit bdf5f22 into KAVR_12182025 Jan 12, 2026
3 checks passed
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.

3 participants