Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PRAGMA to allow user control of swap search strategy #914

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

macrologist
Copy link
Contributor

This PR adds a specialized PRAGMA for controlling the value of the *addresser-rewiring-search-search-type* special variable. This value defaults to :a* but two other options are available that have been previous unexposed to end-users.

The PRAGMA introduced here has the following syntax:

PRAGMA REWIRING_SEARCH <SEARCHTYPE>

Where <SEARCHTYPE> should be a string that names one of the available algorithms: "A*", "GREEDY_QUBIT", or "GREEDY_PATH".

This PR is offered as a partial answer to #913 after discovering through experimentation that the offending program + chip spec discussed there compiled more quickly and with lower resource requirements after manually rebinding the *addresser-rewiring-swap-search-type* in the REPL.

It should be noted that I did not reproduce the exact crash that @MarquessV encountered, probably due to increased heap size given to SBCL on my machine. Compilation with the default search type of ':A* did, however, take a very long time to finish.

@stylewarning stylewarning merged commit 967c9ff into quil-lang:master Jan 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants