Skip to content

Commit

Permalink
Fixed variable ordering in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
davidedellagiustina committed Feb 7, 2024
1 parent 8415168 commit 3708400
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/examples/grover_search_known_m.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def main():
pause()

# Oracle
oracle = qasp.oracle.from_asp_stable_models(STABLE_MODELS)
oracle = qasp.oracle.from_asp_stable_models(
STABLE_MODELS, var_order=['p', 'q', 'r'])
print(f'Quantum oracle:\n{tab(str(oracle[1].draw()))}\n')
pause()

Expand Down
3 changes: 2 additions & 1 deletion src/examples/grover_search_unknown_m.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def main():
pause()

# Oracle
oracle = qasp.oracle.from_asp_stable_models(STABLE_MODELS)
oracle = qasp.oracle.from_asp_stable_models(
STABLE_MODELS, var_order=['p', 'q', 'r'])
print(f'Quantum oracle:\n{tab(str(oracle[1].draw()))}\n')
pause()

Expand Down

0 comments on commit 3708400

Please sign in to comment.