-
Notifications
You must be signed in to change notification settings - Fork 127
Circuit Editor Bug Bash Instructions
Scott Carda edited this page May 26, 2025
·
3 revisions
-
Create an Empty Project Folder
- In your file system, create a new, empty folder for your Q# project.
-
Open the Folder in VS Code
- Launch VS Code.
- Use File > Open Folder... to open your new project folder.
-
Create a Q# Project
- In the VS Code file explorer, right-click the empty folder.
- Select "Create Q# Project" from the context menu.
- This will scaffold the necessary project files and folders.
-
Add a Circuit File
- Inside the src folder, add a new file with the .qsc extension (for example, MyCircuit.qsc).
- You can now open this file and use the Circuit Editor to design your quantum circuit.
Test each action and note any unexpected behavior or UI issues.
-
File Operations
- Create a new circuit file.
- Open an existing circuit file.
- Open an empty circuit file.
Example of an empty or new circuit file:
-
Gate Operations
- Add a gate from the toolbox by dragging a gate from the toolbox onto the circuit.
- Remove a gate by dragging it off the circuit or using its context menu. Context menus for gates and other circuit elements can be found by right-clicking the element.
- Add controls to a gate using the gate's context menu.
- Remove controls by dragging them off the circuit or using context menu on gate or control.
Example of populating a circuit:
-
Qubit Operations
- Add qubits by dragging gates onto the ghost line.
- Move qubit lines by dragging the qubit state label on the left of the circuit. Try swapping and reordering qubits with and without gates.
- Verify trailing (bottom) qubit lines are removed.
- Verify non-trailing empty qubit lines are allowed.
- Delete qubits by dragging the qubit line off the circuit.
Example of moving qubits:
-
Gate Movement
- Try moving gates onto existing gates/controls (should be blocked except swapping with own control).
- Move gates into new/existing columns (start, middle, and end of circuit).
- Verify empty columns are removed.
- Move gates with controls (controls move with gate).
- Make copies of a gate by moving it while holding down the Ctrl key.
Example of gate movement:
-
Gate Arguments
- Add a gate that requires arguments (prompt appears).
- Test argument validation (empty, invalid, valid input). Only simple arithmetic expressions are allowed.
- Edit arguments by clicking on the argument on the gate or through the gate's context menu.
- Use Pi button or enter "pi".
Example of Adding a gate with an argument:
-
Measurement Gates
- Add multiple measurement gates to the same qubit.
- Move measurement gates and verify lines update correctly.
Example of measurement lines readjusting:
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