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

Integrate alternative frontend #166

Merged
merged 51 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
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 Jan 30, 2024
96d61f9
Add pixi and pixi/react; change logo
giangiac Jan 30, 2024
e7c9897
Update link, vertical spacing, stage size
giangiac Jan 30, 2024
1bbe7e9
Add stage with empty grid
giangiac Jan 30, 2024
8902811
Add qubits to the grid
giangiac Jan 30, 2024
8df224f
Add button over the grid
giangiac Jan 30, 2024
5b6fa08
Change logo
giangiac Jan 30, 2024
12155b4
Minor edits
giangiac Jan 30, 2024
d083f3d
Rename folder for the step-by-step frontend coding
giangiac Jan 31, 2024
14acad2
Rotate the grid axis
giangiac Jan 31, 2024
9c8bb21
Interactive qubits change color on click; qubit now have a 'role'
giangiac Jan 31, 2024
839898f
Qubit label appears when qubits are selected
giangiac Jan 31, 2024
cc0f82c
Update README; add gitignore
giangiac Jan 31, 2024
071fb9d
On click of 'create plaquette', identify the selected qubits
giangiac Jan 31, 2024
3a0432d
Print names of the qubits in the plaquette
giangiac Jan 31, 2024
2b0dc89
Add clear plaquette button; add basic class Plaquette
giangiac Jan 31, 2024
ba599b6
On click 'create plaquette', add visual rectangle
giangiac Jan 31, 2024
7e8d572
Add visualization of the plaquette circuit
giangiac Jan 31, 2024
36886c6
Extend plaquette to arbitrary shapes (convex hull)
giangiac Feb 1, 2024
5e6ee62
Label the qubits with their name instead of their role
giangiac Feb 1, 2024
75b53be
Left align the buttons
giangiac Feb 1, 2024
954f313
Improve ASCII graphics for plaquette circuit
giangiac Feb 1, 2024
10bf2ad
Change icon in browser tab
giangiac Feb 1, 2024
4b34a22
Add effect to the circuit box and improve warning message
giangiac Feb 1, 2024
f231866
Add missing file
giangiac Feb 6, 2024
c17d925
Fix merge conflicts
giangiac Feb 6, 2024
7fbff77
Add position as the locations where qubits can be
giangiac Feb 7, 2024
5729c58
Add missing file; add guide for the plaquette composition
giangiac Feb 7, 2024
679e5dc
Move plaquette to the library
giangiac Feb 7, 2024
88dd5df
Change color of the saved plaquettes
giangiac Feb 7, 2024
d51bffd
Change color to the circuit graphics
giangiac Feb 7, 2024
705b456
Rename the qubits relative to the top-left corner
giangiac Feb 7, 2024
dd09bbc
Enlarge hitarea of dots
giangiac Feb 7, 2024
5490b66
Merge remote-tracking branch 'upstream/main' into test-frontend
giangiac Feb 9, 2024
28cfca1
Add time ruler to the circuit
giangiac Feb 13, 2024
20347fa
Associate circuit with plaquette
giangiac Feb 14, 2024
cea459b
Change form of circuit to the one with H on the ancilla and both CNOT…
giangiac Feb 14, 2024
8334d83
Improve inline comments
giangiac Feb 14, 2024
32c4f7f
Add area to edit the circuit
giangiac Feb 15, 2024
e2e3d5d
Smooth behavior when buttons are mis-clicked
giangiac Feb 15, 2024
33774f6
Fix typo
giangiac Feb 15, 2024
e72c650
Add option to download the plaquette's circuits
giangiac Feb 15, 2024
6860a80
Separate plaquettes when downloaded
giangiac Feb 16, 2024
e8a65cd
Add file
giangiac Feb 23, 2024
1c13aad
[WIP] Add tabs to the main webpage
giangiac Feb 23, 2024
de7849e
[WIP] Undo part of the changes to introduce tabs
giangiac Feb 28, 2024
1191cd0
Merge remote-tracking branch 'upstream/main' into integrate-alternati…
giangiac Feb 29, 2024
f621294
Undo unwanted changes to frontend/package-lock.json
giangiac Feb 29, 2024
da337ca
Rename folder of alternative frontned to '<repo>/frontend_v2'
giangiac Feb 29, 2024
2452258
Add file printing useful commands
giangiac Feb 29, 2024
84a8849
Merge branch 'main' into integrate-alternative-frontend
smburdick Mar 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions frontend_v2/.gitignore
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.
Copy link
Contributor

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 to frontend_v2

Copy link
Contributor Author

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.


# 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*
23 changes: 23 additions & 0 deletions frontend_v2/Makefile
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
53 changes: 53 additions & 0 deletions frontend_v2/README.md
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/).
Loading
Loading