Skip to content

Instantly share code, notes, and snippets.

@Q-lds
Created December 14, 2022 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Q-lds/fc58de67464412081644a90e84ce534c to your computer and use it in GitHub Desktop.
Save Q-lds/fc58de67464412081644a90e84ce534c to your computer and use it in GitHub Desktop.
The entrypoint for the openqaoa_job.py script
from openqaoa.workflows.managed_jobs import AWSJobs
from braket.jobs import save_job_result
import json
def main():
"""
The entry point is kept clean and simple and all the load statements are hidden in the `aws_jobs_load` function (which will become part of the OpenQAOA library)
"""
job = AWSJobs(algorithm='RQAOA')
job.load_input_data()
job.set_up()
job.run_workflow()
print('keys', job.workflow.results.keys())
save_job_result({"rqaoa_result": job.workflow.results.as_dict()})
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment