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

Conversation

giangiac
Copy link
Contributor

@giangiac giangiac commented Feb 29, 2024

The "step-by-step frontend" started as an educational project, but became the playground to explore an alternative frontend design. It reached the maturity to be integrated in the main branch. That's the goal of this PR.

NOTE: The alternative frontend is contained in the folder named <repo>/frontend_v2/.

* 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 giangiac marked this pull request as ready for review February 29, 2024 16:44
@giangiac
Copy link
Contributor Author

@smburdick @rryoung98 I believe you asked to be the reviewers.
Please add other reviewers as needed (I cannot do it via the github website).

@rryoung98
Copy link
Contributor

Fantastic! Added @smburdick, @vtomole and myself for review.

Copy link
Contributor

@smburdick smburdick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I think we can merge this as a tutorial, and copy/edit circuit.js into the main frontend. Should be easy enough since it was build as a class.

If you have time, you can address the (minor) comments of mine, but I don't consider any of them blockers.

@@ -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.

frontend_v2/README.md Show resolved Hide resolved
frontend_v2/src/App.js Show resolved Hide resolved
<div className="Tabs">
<script>console.log('test log from App.js (tabs)')</script>
<button id='tab1'>Tab 1</button>
<button id="tab2">Tab 2</button>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you manage to get tabbing working? If not, remove the buttons

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 did not manage to make the tab content appear/disappear on click.

frontend_v2/src/tqec_logo.svg Outdated Show resolved Hide resolved
/**
* Create a button formed by a Text graphics plus a rounded rectangular background
*/
export const button = (text, x, y, buttonColor = 'black', fontColor = 'white', isLeftAligned = true) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For instructional purposes, I think it is better to extend the Container class, as we currently do.

frontend_v2/src/workspace/circuit.js Show resolved Hide resolved
frontend_v2/src/workspace/circuit.js Show resolved Hide resolved
frontend_v2/src/workspace/circuit.js Show resolved Hide resolved
frontend_v2/src/workspace/circuit.js Show resolved Hide resolved
@smburdick smburdick merged commit 647fafa into QCHackers:main Mar 5, 2024
5 checks passed
@giangiac giangiac deleted the integrate-alternative-frontend branch March 13, 2024 14:18
giangiac added a commit to giangiac/tqec that referenced this pull request Mar 13, 2024
rryoung98 added a commit that referenced this pull request Apr 10, 2024
Apply the suggestions from the review of PR
#166.

Add the option to generate the circuit as an ASCII art or a STIM code
snippet.

NOTE: I do not think that the name "tutorial" is appropriate for this
alternative frontend.
Currently, the folder does not contain any explanation of the code nor
the commits provide a step-by-step guide (the commits have been squashed
in the merge).

---------

Co-authored-by: rryoung98 <ritsukiyoung98@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants