Skip to content

Commit

Permalink
qa
Browse files Browse the repository at this point in the history
Signed-off-by: Melvin Strobl <[email protected]>
  • Loading branch information
Melvin Strobl committed Dec 2, 2024
1 parent 9a250e3 commit 505fb49
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import subprocess
import pandas as pd
import os
import optuna

from fromhopetoheuristics.utils.hyperparam_optimizer import Hyperparam_Optimizer

Expand All @@ -10,9 +11,6 @@
log = logging.getLogger(__name__)


from typing import Dict, List


def create_hyperparam_optimizer(
n_trials: int,
timeout: int,
Expand Down Expand Up @@ -54,7 +52,7 @@ def create_hyperparam_optimizer(
hyperparam_optimizer.set_fixed_parameters({})

def objective(
trial: o.trial.Trial,
trial: optuna.trial.Trial,
parameters: Dict[str, float],
report_callback: Optional[Callable[[Dict[str, float], int], None]] = None,
early_stop_callback: Optional[Callable[[], bool]] = None,
Expand Down
3 changes: 2 additions & 1 deletion src/fromhopetoheuristics/utils/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def __init__(self, hit_start: Hit, hit_end: Hit):
Notes
-----
The angle in the XY plane between this doublet and the Y axis is stored in `xy_angle`.
The angle in the XY plane between this doublet and the Y axis
is stored in `xy_angle`.
"""
super().__init__(hit_start, hit_end)

Expand Down
4 changes: 2 additions & 2 deletions src/fromhopetoheuristics/utils/spectral_gap_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def calculate_spectral_gap(
num_dec_pos: The number of decimal positions to round the eigenvalues to
Returns:
A tuple of three floats, the ground state energy, the first excited state energy,
and the spectral gap
A tuple of three floats, the ground state energy,
the first excited state energy, and the spectral gap
"""
num_qubits = len(qubo)
H = build_hamiltonian(qubo, fraction, num_qubits)
Expand Down

0 comments on commit 505fb49

Please sign in to comment.