Skip to content

Commit

Permalink
Fix examples that used the removed endomorphic option of Parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
randomir committed Jun 7, 2019
1 parent 1f68456 commit 94714d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/dialectic-search.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
generate_synthesis = ( hybrid.GreedyPathMerge()
| hybrid.TabuProblemSampler())

min_tracker = hybrid.TrackMin()
tracker = hybrid.TrackMin()

local_update = hybrid.LoopWhileNoImprovement(
hybrid.Parallel(generate_antithesis) | generate_synthesis | min_tracker,
hybrid.Parallel(hybrid.Identity(), generate_antithesis) | generate_synthesis | tracker,
max_tries=10)

global_update = hybrid.Loop(generate_antithesis | local_update, max_iter=10)
Expand All @@ -69,4 +69,4 @@
hybrid.profiling.print_counters(global_update)

# show results
print("Solution: sample={.samples.first}".format(min_tracker.best))
print("Solution: sample={.samples.first}".format(tracker.best))
2 changes: 1 addition & 1 deletion examples/qbsolv-like-alt.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def merge_substates(_, substates):
hybrid.Lambda(merge_substates)
) | hybrid.SplatComposer()

subsampler = hybrid.Parallel(qpu, random, endomorphic=False) | hybrid.ArgMin()
subsampler = hybrid.Parallel(qpu, random) | hybrid.ArgMin()

iteration = hybrid.Race(
hybrid.Identity(),
Expand Down

0 comments on commit 94714d5

Please sign in to comment.