Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 9, 2024
1 parent 1e83f33 commit 791dc60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions examples/variational_classifier/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ def main(nclasses, nqubits, nlayers, nshots, training, RxRzRx, method):
method=method,
)
path_angles = (
LOCAL_FOLDER
/ "data"
/ f"optimal_angles_ry_{nqubits}q_{nlayers}l.npy"
LOCAL_FOLDER / "data" / f"optimal_angles_ry_{nqubits}q_{nlayers}l.npy"
)
np.save(
path_angles,
Expand Down
4 changes: 1 addition & 3 deletions src/qibo/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,7 @@ def __init__(self, mode: Union[str, int] = "gap", check_degenerate: bool = True)
f"Gap callback mode should be integer or string but is {type(mode)}.",
)
elif isinstance(mode, str) and mode != "gap":
raise_error(
ValueError, f"Unsupported mode {mode} for gap callback."
)
raise_error(ValueError, f"Unsupported mode {mode} for gap callback.")
self.mode = mode
self.check_degenerate = check_degenerate
self.evolution = None
Expand Down

0 comments on commit 791dc60

Please sign in to comment.