Bloch Sphere Widget - Command and Dev Playground - #3306
Bloch Sphere Widget - Command and Dev Playground#3306Scott Carda (ScottCarda-MS) wants to merge 78 commits into
Conversation
…ox validation effects
…c used by both bloch and state-viz
…ove Rz to top, and shrink horizontally
|
Does our target audience already know which vectors lie along the X, Y, and Z axes? |
|
I like the updates, especially the new wireframe. The experience LGTM, but I haven't reviewed the code. |
Andrew Casey (amcasey)
left a comment
There was a problem hiding this comment.
Within the limits of my ability to review, LGTM
Andrew Casey (amcasey)
left a comment
There was a problem hiding this comment.
The experience and the code seem fine to me. We should discuss which release this will be included in.
| export { ScatterChart } from "./scatterChart.js"; | ||
| export { EstimatesOverview } from "./estimatesOverview.js"; | ||
| export { EstimatesPanel } from "./estimatesPanel.js"; | ||
| export { BlochSphere } from "./bloch/bloch.js"; |
There was a problem hiding this comment.
Is this intent to still then remove this out of here and into its own path in package.json? Maybe in the "sccarda/webfiew file size" PR (which looks like it needs updating again now after the changes here)
There was a problem hiding this comment.
There were two possible strategies here: lazy-load the Bloch Sphere or separate the Bloch-Sphere into its own webview. This branch went with the latter of those. The sccarda/WebviewFileSize branch does indeed implement the other strategy of lazy-loading, but that might be obsolete since we are separating the Bloch Sphere into its own webview in this branch.
| "target": "ES2022", | ||
| "noEmit": true, | ||
| "allowImportingTsExtensions": true, | ||
| "resolveJsonModule": true, |
There was a problem hiding this comment.
Why does learning now need to resolve JSON modules? Does it somehow transitively reference the Bloch code? (Or is this in preparation for maybe having the Bloch sphere in the learning content)
| "skipLibCheck": true, | ||
| "types": ["node"] | ||
| }, | ||
| "include": ["./*.ts", "../ux/cplx.ts"] |
There was a problem hiding this comment.
Do you need to explicitly list the files? Doesn't it find the file in the local dir by default and then follow that to the imported module?
| @@ -0,0 +1,944 @@ | |||
| [ | |||
There was a problem hiding this comment.
Does this file need to be checked in for any reason? Does anything import/use 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