microsoft / microsoft/qdk

Circuit visualization

Open
#1,085 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
1k
Forks
212
Avg merge
3d 8h
Merged PRs (30d)
65

Description

We'd like to add the ability to generate circuit diagrams from a Q# program.

These can appear in:
- VS Code
- Python notebooks
- Python command line (ascii art)

Small programs without classical constructs (e.g. the Bell State sample) are fairly easy to generate diagrams for, but we'll have to figure how best to visualize more complex cases.

Design considerations:
- How to represent classical constructs, such as loops, visually
- Whether the circuit should map to the hardware behavior (i.e. closer to the generated QIR, showing auxiliary qubits, unrolled loops etc), or to the high level input Q# program
- UI to visually map parts of the circuit to source code

For reference, Q# notebooks in the classic QDK had the ability to generate diagrams using the `%trace` magic and the `quantum_viz` Python package.

Contributor guide

Open the contributing guide

Research direction

No implementation files, tests, or entry points are named. Start by reviewing the classic QDK `%trace` reference and the `quantum_viz` Python package, then clarify the supported Q# constructs and target surfaces; done would require an agreed design and circuit diagrams for VS Code, Python notebooks, and the Python CLI.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vscode
Domain
computer-graphics, developer-experience, quantum-computing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.