-
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
Integrate alternative frontend #166
Merged
smburdick
merged 51 commits into
QCHackers:main
from
giangiac:integrate-alternative-frontend
Mar 5, 2024
Merged
Changes from 50 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
1bea76f
Create a template for React + PIXI web app
giangiac 96d61f9
Add pixi and pixi/react; change logo
giangiac e7c9897
Update link, vertical spacing, stage size
giangiac 1bbe7e9
Add stage with empty grid
giangiac 8902811
Add qubits to the grid
giangiac 8df224f
Add button over the grid
giangiac 5b6fa08
Change logo
giangiac 12155b4
Minor edits
giangiac d083f3d
Rename folder for the step-by-step frontend coding
giangiac 14acad2
Rotate the grid axis
giangiac 9c8bb21
Interactive qubits change color on click; qubit now have a 'role'
giangiac 839898f
Qubit label appears when qubits are selected
giangiac cc0f82c
Update README; add gitignore
giangiac 071fb9d
On click of 'create plaquette', identify the selected qubits
giangiac 3a0432d
Print names of the qubits in the plaquette
giangiac 2b0dc89
Add clear plaquette button; add basic class Plaquette
giangiac ba599b6
On click 'create plaquette', add visual rectangle
giangiac 7e8d572
Add visualization of the plaquette circuit
giangiac 36886c6
Extend plaquette to arbitrary shapes (convex hull)
giangiac 5e6ee62
Label the qubits with their name instead of their role
giangiac 75b53be
Left align the buttons
giangiac 954f313
Improve ASCII graphics for plaquette circuit
giangiac 10bf2ad
Change icon in browser tab
giangiac 4b34a22
Add effect to the circuit box and improve warning message
giangiac f231866
Add missing file
giangiac c17d925
Fix merge conflicts
giangiac 7fbff77
Add position as the locations where qubits can be
giangiac 5729c58
Add missing file; add guide for the plaquette composition
giangiac 679e5dc
Move plaquette to the library
giangiac 88dd5df
Change color of the saved plaquettes
giangiac d51bffd
Change color to the circuit graphics
giangiac 705b456
Rename the qubits relative to the top-left corner
giangiac dd09bbc
Enlarge hitarea of dots
giangiac 5490b66
Merge remote-tracking branch 'upstream/main' into test-frontend
giangiac 28cfca1
Add time ruler to the circuit
giangiac 20347fa
Associate circuit with plaquette
giangiac cea459b
Change form of circuit to the one with H on the ancilla and both CNOT…
giangiac 8334d83
Improve inline comments
giangiac 32c4f7f
Add area to edit the circuit
giangiac e2e3d5d
Smooth behavior when buttons are mis-clicked
giangiac 33774f6
Fix typo
giangiac e72c650
Add option to download the plaquette's circuits
giangiac 6860a80
Separate plaquettes when downloaded
giangiac e8a65cd
Add file
giangiac 1c13aad
[WIP] Add tabs to the main webpage
giangiac de7849e
[WIP] Undo part of the changes to introduce tabs
giangiac 1191cd0
Merge remote-tracking branch 'upstream/main' into integrate-alternati…
giangiac f621294
Undo unwanted changes to frontend/package-lock.json
giangiac da337ca
Rename folder of alternative frontned to '<repo>/frontend_v2'
giangiac 2452258
Add file printing useful commands
giangiac 84a8849
Merge branch 'main' into integrate-alternative-frontend
smburdick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
define INFO_MSG | ||
---------------------- | ||
Install and launch the frontend app: | ||
|
||
> npm install | ||
> npm start | ||
|
||
---------------------- | ||
A few useful commands: | ||
|
||
Get the PID of the processes running on port 3000: | ||
> lsof -i :3000 | ||
|
||
Kill the process given the PID: | ||
> kill -9 PID | ||
|
||
endef | ||
|
||
export INFO_MSG | ||
info: | ||
@echo "$$INFO_MSG" | ||
|
||
.PHONY: info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Step-by-step coding of the frontend | ||
|
||
Are you new to JavaScript, React and Pixi? | ||
Do you want to contribute or simply understand the code powering the visual frontend of `tqecjs`? | ||
Look no further. | ||
|
||
In this folder we will re-build the frontend adding a few lines of codes at a time. | ||
The commit message will make clear which functionality is added (or, at least, the goal is to have informative commits). | ||
giangiac marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**NOTE:** The step-by-step frontend does not exactly match the official one in the `<repo>/frontend` folder. | ||
This helps to better understand certain design choices while at the same time providing a playground for alternatives. | ||
|
||
|
||
|
||
## Installation and execution | ||
|
||
From this folder, install by typing: | ||
```bash | ||
npm start | ||
``` | ||
|
||
Run the app in the development mode by typing: | ||
```bash | ||
npm start | ||
``` | ||
Open [http://localhost:3000](http://localhost:3000) to view it in your browser. | ||
|
||
The page will reload when you make changes. | ||
You may also see any lint errors in the console. | ||
|
||
Launch the test runner in the interactive watch mode. | ||
```bash | ||
npm test | ||
``` | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
|
||
Build the app for production to the `build` folder: | ||
```bash | ||
npm run build | ||
``` | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
|
||
The build is minified and the filenames include the hashes. | ||
Your app is ready to be deployed! | ||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
|
||
|
||
|
||
## Learn More | ||
|
||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | ||
|
||
To learn React, check out the [React documentation](https://reactjs.org/). |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think
frontend-tutorial
is a better name tofrontend_v2
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.
I am not sure that I'd call this a tutorial.