-
Notifications
You must be signed in to change notification settings - Fork 127
Manual Validation
Scott Carda edited this page May 22, 2025
·
7 revisions
- open terminal in repo root:
pip uninstall qsharp_widgets
pip uninstall qsharp
python .\build.py --wasm --npm --vscode --pip
pip install .\pip\
pip install .\widgets\
- new terminal in repo root:
cd vscode
npm start
- This will start a browser instance of VS Code
To do
- Circuit Code Lens
- Trace circuit: BernsteinVazirani sample
- Non-trace circuit: BitFlip sample
- Test Q# projects with circuit files in them: circiut-integartion sample
- Q# Notebook: circuit notebook
- New circuit file:
- Open existing circuit file:
- Empty existing circuit file
- Add gate to circuit from the Toolbox
- Remove gate to circuit
- Drag gate off of circuit
- Context menu -> Delete
- Add controls to gate
- Context menu -> Add Control
- Remove controls from gate
- Drag control off of circuit
- Context menu for gate -> Remove Control
- Context menu for control -> Delete
- Adding Qubits:
- Repeated add qubits by dragging the same gate down onto ghost line
- Moving Qubits:
- Swap qubit lines with gates
- Move qubit line with gates
- Non-trailing empty qubit line allowed
- Delete Qubits:
- Move empty qubit line to last line
- Swap empty qubit line to last line
- Remove last gate in last qubit line
- With multiple empty qubit lines behind it
- Drag qubit line outside of circuit
- Moving Gates:
- Can't move onto existing gate
- Can't move onto existing control
- But can swap with own control
- Can't move onto existing control lines of other gates (line connecting gate to controls)
- But can do this for own gate's control lines
- Can move gate into existing column
- Can make new column inside circuit
- And at the end of the circuit
- And at the beginning
- Empty columns are removed
- Gates with controls move with their controls
- When moving the gate
- When moving the control
- Gates with Arguments:
- Argument is prompted upon gate creation
- Cancel will cancel gate creation
- "OK" button disabled until valid input
- Empty input
- Non-arithmetic input
- When input goes from valid to invalid
- Edit argument by click on arg
- Edit argument by context menu
- Cancel button will cancel edit of argument
- Pi button works
- Entering "pi" works
- Measurement Gates:
- Multiple measure lines for multiple measures on same qubit
- Measurement lines move with gate
- When moving, measurement lines from former qubit update
- Can Run Q# project with Circuit File used as operation: circuit_integration sample
- Circuit signature with empty circuit
operation Circuit() : Unit is Adj + Ctl
- Circuit signature with 1 qubit
operation Circuit(qs : Qubit[]) : Unit is Adj + Ctl
- Description: "Expects a qubit register of at least 1 qubits."
- Circuit signature with many qubits
operation Circuit(qs : Qubit[]) : Unit is Adj + Ctl
- Description: "Expects a qubit register of at least 3 qubits."
- Circuit signature with no measurements
- Returns
Unit
and isAdj + Ctl
- Returns
- Circuit signature with one measurement
- Returns
Result
and is notAdj
orCtl
- Returns
- Circuit signature with many measurements
- Returns
Result[]
and is notAdj
orCtl
- Returns
- Pass too few qubits to circuit
- Run the Q# project to see a runtime error: "Error: program failed: Invalid number of qubits. Operation Foo expects a qubit register of at least 3 qubits."
- Pass extra qubits to circuit
- Run the Q# project to see no errors
- Circuit signature updates in real time from circuit edits
To do
To do
To do
To do
To do
To do
To do
To do
To do
Q# Wiki
Overview
Q# language & features
- Q# Structs
- Q# External Dependencies (Libraries)
- Differences from the previous QDK
- V1.3 features
- Curated list of Q# libraries
- Advanced Topics and Configuration
OpenQASM support
VS Code
Python
Circuit diagrams
Azure Quantum
For contributors