-
Notifications
You must be signed in to change notification settings - Fork 17
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
Educational: step-by-step coding of the frontend #89
Conversation
* the visualization is a simple ASCII diagram * the box has fixed dimensions * the plaquette format is constrained (exactly 1 ancilla, then only x or z data qubits)
@giangiac If you'd like, you can go ahead and open this PR. One thing I noticed was that the commit history shows you the tutorial steps for building up the frontend piece-by-piece. |
In the last few commits, the step-by-step frontend explored a different approach for adding and saving plaquettes.
frontend_2024-02-08.mp4 |
On the circuit-writing function Currently it is just a placeholder and it assumes that:
For its implementation, I did not define a proper circuit class but have a simple function creating the ASCII art. The automatically-generated circuit should be considered a starting point that the user can modify via the GUI. |
Comments on the differences with the original frontend
|
Sam, I'll create a separate PR with the relevant code. |
hi @giangiac and @smburdick I looked at your step-by-step branch and it's great! thank you @giangiac. I'm thinking of getting started with the connection between frontend and backend. Do you want me to wait until the new pr is made? |
@rryoung98 Are you referring to #38? |
Thanks, @rryoung98! Is there a way to have a deeper integration? An idea (not sure how realistic) may be having multiple "tabs" in the webapp. The first tab being the frontend, then the user can switch to other tabs for the template creation, etc etc. The code enabling the frontend functionalities (and thus the other tabs) is in Python, so I am not sure how/if that works. |
@giangiac You're spot on, actually -- the frontend and backend communicate via REST APIs, using a predetermined JSON schema. Your multi-tab idea was sketched up in one of our design files in the shared Gdrive, but I don't think we've looked into those as a group lateley. |
Yes, it's going to be just rest apis with json (we will need to tweak your ascii circuits into something easier to parse like qasm). |
b3ed59c
to
6860a80
Compare
Marking this as closed -- @giangiac |
Hi TQEC friends,
I am unfamiliar with JavaScript, React, Pixi, ... but would like to help developing the frontend part.
I opted for a hands-on approach to learn those language & libraries, with the side benefit of familiarizing with the frontend codebase.
I started by setting up a template React project with:
https://create-react-app.dev/
and then continued by adding snippets of code from the tqecjs frontend:
https://github.com/giangiac/tqec/tree/test-frontend/step-by-step-frontend
I noticed that this may be helpful to the community members who, like me, need to learn the basics of a web app.
If there is interest, I can create a PR to track the extension of the "step-by-step frontend coding", with the commit message indicating the functionality added by each of them.
Checking the commit content will help locating the part of code responsible for that functionality.