-
Notifications
You must be signed in to change notification settings - Fork 5
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
Create frontend interface #9
Conversation
`simulate_program()` only uses a `qm.Program` to extract a `program_ast.program.Program`. Allow passing a `program_ast.program.Program` directly. Since a `qm.Program` is hard to serialize, this eases the interactions with an API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic Piwakk! I managed to get it working locally, and it looks good and matches the requirements.
I agree with your comment regarding plotting, it requires some more thinking, but that's for a future PR.
Before approving, I found that a few new packages are introduced, could you add these to the requirements? The packages are requests
, fastapi
, uvicorn
, dash_bootstrap_components
.
And again, nicely done!
Thanks for the feedback! 😊 I've added the dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
Closes: #4 (as part of unitaryHACK 2024)
Implement a FastAPI backend and a Dash frontend (http://127.0.0.1:8000/frontend/) to visualize the simulated results and the Qiskit Pulse Schedule of a QUA program.
Requirements in #4 are respected. One non-trivial issue remains: the code for plotting the simulated results is not transmitted through the API, so it has to be the same for all programs, which is obviously not possible. I'm not sure about what would be the best here (the current implementation uses the plotting code of
test_rabi.py
).Run
uvicorn quaqsim.api.backend:app
, run_main.py
and go to http://127.0.0.1:8000/frontend/ to test.Note:
_main.py
is included in this PR temporarily, as a way to quickly test the API.