Quirk icon indicating copy to clipboard operation
Quirk copied to clipboard

UI customization

Open amirebrahimi opened this issue 4 years ago • 4 comments

Hi @Strilanc. A few of us are working on a Quirk-related project as part of QOSF and we're needing to allow for some customization with regards to the UI. Specifically, it is being able to turn off/on whole Toolboxes (e.g. Toolbox_2), individual columns in the toolbox (e.g. Spinning), and displays on individual wires. Before embarking on this work I'd like to know two things:

  1. Are you open to the contribution?
  2. Can we agree on the approach (I can lay out further details in comments) prior to starting? Ideally, I'll want to match how you might do this yourself.

I'd much prefer working on this with the intention of contributing rather than maintaining a separate fork.

amirebrahimi avatar Dec 19 '20 19:12 amirebrahimi

  1. Are you open to the contribution?

Yes, although I'll note that the toolboxes are one of the things I'm more sensitive about changing.

  1. [..] I'll want to match how you might do this yourself.

The toolbox entries are specified in AllGates.js https://github.com/Strilanc/Quirk/blob/2880208814ccea2bb8d1c52efe2a4c3825d9c30a/src/gates/AllGates.js#L273

Turning entries on and off would require some sort of menu, and also code changes to deal with things like the toolbox image being cached to avoid redrawing costs.

Strilanc avatar Dec 19 '20 19:12 Strilanc

Coming back to this now that we're wrapping up our QOSF projects for cohort 2. I'll likely start on this soon. If I determined that it isn't needed any more by our project, then I'll close out this issue.

The main project is a circuit and pulse dashboard that I'll post URLs for since Quirk is used for the circuit dashboard, but I'm still in the process of preparing those repos. For now, I'll post this auxiliary project that is standalone for anyone who wants to use Quirk in Jupyter with a little more control than the standard HTML widget: https://github.com/adgt/pyQuirk

amirebrahimi avatar Jan 24 '21 21:01 amirebrahimi

That's pretty neat to use it as a UI element in a notebook.

Strilanc avatar Jan 28 '21 09:01 Strilanc

Here's the full project: https://github.com/adgt/qonduit

amirebrahimi avatar Feb 08 '21 04:02 amirebrahimi