Skip to content

Add python widget for Bloch Sphere - #3595

Open
Scott Carda (ScottCarda-MS) wants to merge 4 commits into
mainfrom
sccarda/PythonBloch
Open

Add python widget for Bloch Sphere#3595
Scott Carda (ScottCarda-MS) wants to merge 4 commits into
mainfrom
sccarda/PythonBloch

Conversation

@ScottCarda-MS

@ScottCarda-MS Scott Carda (ScottCarda-MS) commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Adds python support for the Bloch Sphere visualizer by making it a python widget, which is then added under the qsharp_widgets package, and additionally made available under the QDK python package.

Example python usage:

import qdk.widgets as w
bloch = w.BlochSphere('H T H') # string is initial gate sequence, can be empty
bloch

Additional fields added to the python bloch widget:

bloch.initial_gates # the initial gate sequence given when creating the widget
bloch.gates # the live gate sequence

@ScottCarda-MS
Scott Carda (ScottCarda-MS) marked this pull request as ready for review August 17, 2026 20:53
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.

1 participant