Skip to content

Commit

Permalink
Merge pull request #72 from randomir/fix-eid
Browse files Browse the repository at this point in the history
Less restrictive EnergyImpactDecomposer, Tabu
  • Loading branch information
randomir authored Dec 8, 2018
2 parents 0c61ed3 + 35f31ae commit 969ad8d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hybrid/decomposers.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class EnergyImpactDecomposer(Runnable, traits.ProblemDecomposer):
Args:
max_size (int):
Maximum number of variables in the subproblem.
min_gain (int, optional, default=0):
min_gain (int, optional, default=-inf):
Minimum reduction required to BQM energy, given the current sample. A variable
is included in the subproblem only if inverting its sample value reduces energy
by at least this amount.
Expand All @@ -65,7 +65,7 @@ class EnergyImpactDecomposer(Runnable, traits.ProblemDecomposer):
See examples on https://docs.ocean.dwavesys.com/projects/hybrid/en/latest/reference/decomposers.html#examples.
"""

def __init__(self, max_size, min_gain=0.0, min_diff=1, stride=1):
def __init__(self, max_size, min_gain=None, min_diff=1, stride=1):
super(EnergyImpactDecomposer, self).__init__()

if min_diff > max_size or min_diff < 0:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dimod>=0.7.7
minorminer
dwave-system
dwave-neal>=0.4.1
dwave-tabu>=0.1.2
dwave-tabu>=0.1.3
numpy
networkx
dwave-networkx>=0.6.6
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Package requirements, minimal pinning
install_requires = ['six>=1.10', 'numpy', 'networkx', 'click>5', 'plucky>=0.4.3',
'dimod>=0.7.7', 'minorminer', 'dwave-system', 'dwave-networkx>=0.6.6',
'dwave-neal>=0.4.1', 'dwave-tabu>=0.1.2']
'dwave-neal>=0.4.1', 'dwave-tabu>=0.1.3']

# Package extras requirements
extras_require = {
Expand Down

0 comments on commit 969ad8d

Please sign in to comment.