Skip to content

Commit

Permalink
Merge pull request #1074 from qiboteam/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
alecandido authored Feb 4, 2025
2 parents 45bd84d + 08ba270 commit bc7a7ba
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ repos:
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/psf/black
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 6.0.0
hooks:
- id: isort
args: ["--profile", "black"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Custom error models are build here for making it possible to pass
"""Custom error models are build here for making it possible to pass
strings describing the error model via runcards in qibocal.
They inherit from the qibo noise NoiseModel module and are prebuild.
"""
Expand Down
4 changes: 2 additions & 2 deletions src/qibocal/protocols/randomized_benchmarking/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def number_to_str(
if isinstance(uncertainty, Number):
if precision is None:
precision = (significant_digit(uncertainty) + 1) or 3
return f"{value:.{precision}f} \u00B1 {uncertainty:.{precision}f}"
return f"{value:.{precision}f} \u00b1 {uncertainty:.{precision}f}"

# If any uncertainty is None, return the value with precision
if any(u is None for u in uncertainty):
Expand All @@ -181,7 +181,7 @@ def number_to_str(

# Check if both uncertainties are equal up to precision
if np.round(uncertainty[0], precision) == np.round(uncertainty[1], precision):
return f"{value:.{precision}f} \u00B1 {uncertainty[0]:.{precision}f}"
return f"{value:.{precision}f} \u00b1 {uncertainty[0]:.{precision}f}"

return f"{value:.{precision}f} +{uncertainty[1]:.{precision}f} / -{uncertainty[0]:.{precision}f}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _acquisition(
ResonatorFrequencyType,
(qubit),
dict(
freq=np.array([(ro_pulses[qubit].frequency + freq)]),
freq=np.array([ro_pulses[qubit].frequency + freq]),
assignment_fidelity=np.array([model.assignment_fidelity]),
angle=np.array([model.angle]),
threshold=np.array([model.threshold]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
_fit,
)
from .virtual_z_phases import _plot as _plot_prob
from .virtual_z_phases import _update, create_sequence
from .virtual_z_phases import (
_update,
create_sequence,
)


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion tests/test_update.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Testing update_* helper functions. """
"""Testing update_* helper functions."""

import random
import re
Expand Down

0 comments on commit bc7a7ba

Please sign in to comment.