Skip to content

Commit

Permalink
Merge branch 'devel' into orbital_optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
kottmanj authored Feb 29, 2024
2 parents e14969b + ce8304c commit 8817cb6
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 457 deletions.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ qulacs # default simulator (best integration), remove if the installation gives
#qibo <= 0.1.1 # can not be installed in the same environment as gpyopt

#optional optimizers
#phoenics # version on PyPi isc urrently broken, we recommend to install from source (AAG github)
#gpyopt # not in combination with qibo as quantum backend

#optional third party libraries
Expand Down
2 changes: 1 addition & 1 deletion src/tequila/apps/adapt/adapt.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AdaptParameters:
degeneracy_threshold: float = 5.e-4
silent: bool = False

def __post__init__(self):
def __post_init__(self):
# avoid stacking of same operator-types in a row
if "method_options" in self.optimizer_args:
if "gtol" in self.optimizer_args["method_options"]:
Expand Down
15 changes: 1 addition & 14 deletions src/tequila/optimizers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class _Optimizers:
methods: list = None


SUPPORTED_OPTIMIZERS = ['scipy', 'phoenics', 'gpyopt', 'gd']
SUPPORTED_OPTIMIZERS = ['scipy', 'gpyopt', 'gd']
INSTALLED_OPTIMIZERS = {}
INSTALLED_OPTIMIZERS['scipy'] = _Optimizers(cls=OptimizerSciPy,
minimize=minimize_scipy,
Expand All @@ -37,19 +37,6 @@ class _Optimizers:
except ImportError:
has_gpyopt = False

has_phoenics = False
try:
from tequila.optimizers.optimizer_phoenics import OptimizerPhoenics
from tequila.optimizers.optimizer_phoenics import minimize as minimize_phoenics

INSTALLED_OPTIMIZERS['phoenics'] = _Optimizers(cls=OptimizerPhoenics,
minimize=minimize_phoenics,
methods=OptimizerPhoenics.available_methods())
has_phoenics = True
except ImportError:
has_phoenics = False


def show_available_optimizers(module=None):
"""
Returns
Expand Down
2 changes: 0 additions & 2 deletions src/tequila/optimizers/optimizer_gpyopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import numbers
from tequila.objective.objective import Variable
import warnings

warnings.simplefilter("ignore")
import GPyOpt
from GPyOpt.methods import BayesianOptimization
import numpy as np
Expand Down
Loading

0 comments on commit 8817cb6

Please sign in to comment.