Bloch Sphere Widget - Command and Dev Playground#3306
Conversation
…ox validation effects
…c used by both bloch and state-viz
|
It seems like the slider at the bottom manipulates Rz in radians but the angles at the top are in degrees? Maybe that's a feature? |
|
Personally, I'd find it very helpful to see the ending state in the top-level summary (maybe top-right) and not just in the sidebar. |
|
Is the |
amcasey
left a comment
There was a problem hiding this comment.
Random drive-by comments. That's a lot of 3D geometry code to review...
billti
left a comment
There was a problem hiding this comment.
This increases the size of the webview.js file in VS Code from 3MB to 4.4MB, which is a pretty sizable increase (~50%) for a file that gets loaded every time a webview opens (such as histogram, circuit viewer, etc.). We should determine if we've happy with this from a size and performance perspective before merging - as we've been pretty agressive on both of those fronts with the QDK to date.
If size matters, have we considered minifying it? |


Bloch Sphere View for Q# UX (Playground + VS Code)
Summary
This PR introduces an interactive Bloch sphere view in the shared Q# UX package and wires it into both:
It also adds the synthesis data/tooling used by the Bloch Rz helper.
What’s Included
New Bloch UX surface
Shared math and compute cleanup
Rz synthesis artifacts and generator source
source/npm/qsharp/rz-array.jsonsource/npm/qsharp/rz-details.jsonsource/npm/qsharp/tools/rz-synthesis.tssource/npm/qsharp/tools/tsconfig.jsonPlayground integration
VS Code integration
Packaging and dependency updates
Key Files (high signal)
source/npm/qsharp/ux/bloch.tsxsource/npm/qsharp/ux/blochGates.tssource/npm/qsharp/ux/quantum-math.tssource/npm/qsharp/ux/cplx.tssource/npm/qsharp/ux/circuit-vis/state-viz/worker/stateCompute.tssource/npm/qsharp/rz-array.jsonsource/npm/qsharp/rz-details.jsonsource/npm/qsharp/tools/rz-synthesis.tssource/playground/src/nav.tsxsource/playground/src/main.tsxsource/vscode/src/webviewPanel.tssource/vscode/src/webview/webview.tsxScreenshots