Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circuit Editor #2238

Open
wants to merge 124 commits into
base: main
Choose a base branch
from
Open

Circuit Editor #2238

wants to merge 124 commits into from

Conversation

ScottCarda-MS
Copy link
Contributor

@ScottCarda-MS ScottCarda-MS commented Mar 18, 2025

This PR adds a custom editor view in the VS Code extension for files with the .qsc extension. The editor makes use of the same library code that is used to draw circuit diagrams elsewhere in the VS Code extension. The editor provides basic drag-and-drop editing of circuits with a simple gate set, including the ability to have controlled gates, and gates with arguments.
The circuit files are included in Q# projects and can be called into from Q# as if they were Q# operations. This is done by generating Q# files for circuit files when compiling.

@ScottCarda-MS ScottCarda-MS marked this pull request as ready for review March 18, 2025 19:03
*/
const _dropzoneLayer = (context: Context) => {
const dropzoneLayer = document.createElementNS(
"http://www.w3.org/2000/svg",

Check warning

Code scanning / devskim

An HTTP-based URL without TLS was detected. Warning

Insecure URL
});

// Generate svg container to store gate elements
const svgElem = document.createElementNS("http://www.w3.org/2000/svg", "svg");

Check warning

Code scanning / devskim

An HTTP-based URL without TLS was detected. Warning

Insecure URL
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.

2 participants