Skip to content

Conversation

@Kyung-hoon-Jung0
Copy link
Collaborator

Summary

This PR focuses solely on pre-commit (pylint/black) compliance for power Rabi calibration files.

  • No functional or behavioral changes
  • Module/function 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/04b_power_rabi.py
  • Added module docstring (line 1):
    • """Power Rabi calibration."""
  • Fixed import order (line 3):
    • Moved from dataclasses import asdict to the standard library import section (before third-party imports)
  • Fixed long docstrings to comply with 120-character line limit:
    • execute_qua_program function (lines 185-186): Split docstring from 126 characters into two lines
    • analyse_data function (lines 224-225): Split docstring from 147 characters into two lines
  • Added missing docstring for save_results function (line 268):
    • """Save the node results and state."""
  • Added pylint disable comments for create_qua_program function (line 79):
    • # pylint: disable=too-many-branches,too-many-statements
    • Function has 16 branches and 52 statements due to QUA program complexity
calibration_utils/power_rabi/__init__.py
  • Added module docstring (line 1):
    • """Power Rabi calibration utilities."""
calibration_utils/power_rabi/analysis.py
  • Added module docstring (line 1):
    • """Analysis utilities for power Rabi calibration."""
  • Added function docstring for process_raw_dataset (line 53):
    • """Process raw dataset by converting IQ to V and adding amplitude/phase."""
  • Fixed implicit booleaness comparisons (lines 107-108):
    • Changed ds.nb_of_pulses.data[0] % 2 == 0 to not ds.nb_of_pulses.data[0] % 2
    • Changed ds.nb_of_pulses.data[0] % 2 != 0 to ds.nb_of_pulses.data[0] % 2
    • Per pylint C1805 (use-implicit-booleaness-not-comparison-to-zero)
  • Replaced dict() calls with dict literals (lines 136, 141, 150):
    • Changed coords=dict(qubit=fit.qubit.data) to coords={"qubit": fit.qubit.data}
    • Per pylint R1735 (use-dict-literal)
  • Replaced dunder method calls with built-in functions (lines 166, 167, 169):
    • Changed __float__() to float() (2 occurrences)
    • Changed __bool__() to bool() (1 occurrence)
    • Per pylint C2801 (unnecessary-dunder-call)
calibration_utils/power_rabi/parameters.py
  • Added module docstring (line 1):
    • """Parameters for power Rabi calibration."""
  • Added pylint disable comment for HasErrorAmplification Protocol class (line 60):
    • # pylint: disable=too-few-public-methods
    • Protocol classes are type hints and don't require methods
calibration_utils/power_rabi/plotting.py
  • Added module docstring (line 1):
    • """Plotting utilities for power Rabi calibration."""

@Kyung-hoon-Jung0 Kyung-hoon-Jung0 merged commit 2c70060 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.

2 participants