{
  "name": "qsharp-lang-vscode-dev",
  "displayName": "[DEV BUILD] Azure Quantum Development Kit (QDK)",
  "description": "Q# Language Support",
  "version": "0.0.0",
  "publisher": "quantum",
  "icon": "resources/qdk.png",
  "galleryBanner": {
    "color": "#252526",
    "theme": "dark"
  },
  "type": "commonjs",
  "engines": {
    "vscode": "^1.77.0"
  },
  "categories": [
    "Programming Languages",
    "Notebooks"
  ],
  "browser": "./out/extension.js",
  "virtualWorkspaces": true,
  "activationEvents": [
    "onNotebook:jupyter-notebook",
    "onDebug",
    "onDebugResolve:qsharp",
    "onDebugDynamicConfigurations:qsharp",
    "onFileSystem:qsharp-vfs",
    "onWebviewPanel:qsharp-webview"
  ],
  "contributes": {
    "walkthroughs": [
      {
        "id": "qsharp-vscode.welcome",
        "title": "The Azure Quantum Development Kit",
        "description": "Getting started with the Azure Quantum Development Kit in VS Code",
        "steps": [
          {
            "id": "qsharp-vscode.welcome.editor",
            "title": "Welcome to the Azure Quantum Development Kit",
            "description": "The Azure Quantum Development Kit (QDK) is an open-source SDK that you can use to write quantum programs and execute them on quantum hardware. This walkthrough will show you how to get started with the Azure Quantum Development Kit in VS Code.\n\nThe QDK gives you rich editor support for writing quantum programs in the Q# language, such as error checking, signature help, completion lists, safely renaming identifiers, and much more.",
            "media": {
              "image": "resources/intellisense.png",
              "altText": "Intellisense"
            }
          },
          {
            "id": "qsharp-vscode.welcome.debug",
            "title": "Debug Q# code",
            "description": "With your Q# code open in the editor, use the F5 shortcut or the top right icons in the code edtior to run or debug the code.",
            "media": {
              "image": "resources/debug.png",
              "altText": "Debug"
            }
          },
          {
            "id": "qsharp-vscode.welcome.simulator",
            "title": "Run quantum simulations",
            "description": "You can run quantum simulations directly in VS Code and see the program output in the integrated terminal.",
            "media": {
              "image": "resources/console.png",
              "altText": "Console"
            }
          },
          {
            "id": "qsharp-vscode.welcome.submit",
            "title": "Run on Azure Quantum",
            "description": "If you have an Azure subscription, you can connect to your Azure Quantum workspace and submit your Q# program directly to quantum hardware",
            "media": {
              "image": "resources/submit.png",
              "altText": "Submit to Azure"
            }
          },
          {
            "id": "qsharp-vscode.welcome.starters",
            "title": "Starting points",
            "description": "Expore Q# safely by opening files in the [Q# playground](command:qsharp-vscode.openPlayground), or work in Python by [creating a Jupyter Notebook](command:qsharp-vscode.createNotebook) from a template",
            "media": {
              "image": "resources/notebook.png",
              "altText": "Jupyter Notebooks"
            }
          }
        ]
      }
    ],
    "webOpener": {
      "scheme": "qsharp-vfs",
      "runCommands": [
        {
          "command": "qsharp-vscode.webOpener",
          "args": [
            "$url"
          ]
        }
      ]
    },
    "configuration": {
      "title": "Q#",
      "properties": {
        "Q#.qir.targetProfile": {
          "type": "string",
          "default": "unrestricted",
          "enum": [
            "unrestricted",
            "base",
            "adaptive_ri"
          ],
          "enumDescriptions": [
            "The set of all capabilities required to run any Q# program.",
            "The minimal set of capabilities required to run a quantum program. This option maps to the Base Profile as defined by the QIR specification.",
            "The Adaptive_RI target profile includes all of the required Adaptive Profile capabilities, as well as the optional integer computation and qubit reset capabilities, as defined by the QIR specification."
          ],
          "markdownDescription": "Setting the target profile allows the Q# extension to generate programs that are compatible with a specific target. The target is the hardware or simulator which will be used to run the Q# program. [Learn more](https://aka.ms/qdk.qir)"
        }
      }
    },
    "menus": {
      "editor/title/run": [
        {
          "command": "qsharp-vscode.runEditorContents",
          "when": "resourceLangId == qsharp",
          "group": "navigation@1"
        },
        {
          "command": "qsharp-vscode.debugEditorContents",
          "when": "resourceLangId == qsharp",
          "group": "navigation@2"
        }
      ],
      "commandPalette": [
        {
          "command": "qsharp-vscode.debugEditorContents",
          "when": "resourceLangId == qsharp"
        },
        {
          "command": "qsharp-vscode.runEditorContents",
          "when": "resourceLangId == qsharp"
        },
        {
          "command": "qsharp-vscode.runEditorContentsWithCircuit",
          "when": "resourceLangId == qsharp"
        },
        {
          "command": "qsharp-vscode.targetSubmit",
          "when": "qsharp-vscode.treeItemSupportsQir"
        },
        {
          "command": "qsharp-vscode.workspacesRemove",
          "when": "qsharp-vscode.treeItemIsWorkspace"
        },
        {
          "command": "qsharp-vscode.workspacePythonCode",
          "when": "qsharp-vscode.treeItemIsWorkspace"
        },
        {
          "command": "qsharp-vscode.workspaceOpenPortal",
          "when": "qsharp-vscode.treeItemIsWorkspace"
        },
        {
          "command": "qsharp-vscode.downloadResults",
          "when": "qsharp-vscode.treeItemSupportsDownload"
        },
        {
          "command": "qsharp-vscode.getQir",
          "when": "resourceLangId == qsharp"
        },
        {
          "command": "qsharp-vscode.showHistogram",
          "when": "resourceLangId == qsharp"
        },
        {
          "command": "qsharp-vscode.showRe",
          "when": "resourceLangId == qsharp"
        },
        {
          "command": "qsharp-vscode.showHelp",
          "when": "resourceLangId == qsharp"
        },
        {
          "command": "qsharp-vscode.showCircuit",
          "when": "resourceLangId == qsharp"
        },
        {
          "command": "qsharp-vscode.showDocumentation",
          "when": "resourceLangId == qsharp"
        },
        {
          "command": "qsharp-vscode.setTargetProfile",
          "when": "resourceLangId == qsharp"
        },
        {
          "command": "qsharp-vscode.webOpener",
          "when": "false"
        },
        {
          "command": "qsharp-vscode.populateFilesList",
          "when": "resourceFilename == qsharp.json"
        },
        {
          "command": "qsharp-vscode.addProjectReference",
          "when": "resourceFilename == qsharp.json"
        }
      ],
      "view/title": [
        {
          "command": "qsharp-vscode.workspacesRefresh",
          "when": "view == quantum-workspaces",
          "group": "navigation"
        },
        {
          "command": "qsharp-vscode.workspacesAdd",
          "when": "view == quantum-workspaces",
          "group": "navigation"
        }
      ],
      "view/item/context": [
        {
          "command": "qsharp-vscode.workspaceOpenPortal",
          "group": "inline",
          "when": "view == quantum-workspaces && viewItem == workspace"
        },
        {
          "command": "qsharp-vscode.workspacesRemove",
          "when": "view == quantum-workspaces && viewItem == workspace"
        },
        {
          "command": "qsharp-vscode.targetSubmit",
          "group": "inline",
          "when": "view == quantum-workspaces && viewItem == qir-target"
        },
        {
          "command": "qsharp-vscode.downloadResults",
          "group": "inline",
          "when": "view == quantum-workspaces && viewItem == result-download"
        },
        {
          "command": "qsharp-vscode.workspacePythonCode",
          "when": "view == quantum-workspaces && viewItem == workspace"
        }
      ],
      "explorer/context": [
        {
          "command": "qsharp-vscode.createProject",
          "when": "explorerResourceIsFolder"
        },
        {
          "command": "qsharp-vscode.populateFilesList",
          "when": "resourceFilename == qsharp.json"
        },
        {
          "command": "qsharp-vscode.addProjectReference",
          "when": "resourceFilename == qsharp.json"
        }
      ]
    },
    "views": {
      "explorer": [
        {
          "id": "quantum-workspaces",
          "name": "Quantum Workspaces"
        }
      ]
    },
    "viewsWelcome": [
      {
        "view": "quantum-workspaces",
        "contents": "Connect to Azure Quantum\n[Add an existing workspace](command:qsharp-vscode.workspacesAdd)\nNote: For the first workspace added there may be several consent prompts to grant VS Code access.\nFor more information about the QDK and Azure Quantum, visit [https://aka.ms/AQ/Documentation](https://aka.ms/AQ/Documentation)."
      }
    ],
    "commands": [
      {
        "command": "qsharp-vscode.createProject",
        "title": "Create Q# project",
        "category": "Q#"
      },
      {
        "command": "qsharp-vscode.webOpener",
        "title": "Internal web opener",
        "category": "Q#"
      },
      {
        "command": "qsharp-vscode.debugEditorContents",
        "title": "Debug Q# file",
        "category": "Debug",
        "enablement": "!inDebugMode",
        "icon": "$(debug-alt)"
      },
      {
        "command": "qsharp-vscode.runEditorContents",
        "title": "Run Q# File",
        "category": "Debug",
        "enablement": "!inDebugMode",
        "icon": "$(play)"
      },
      {
        "command": "qsharp-vscode.runEditorContentsWithCircuit",
        "title": "Run file and show circuit diagram",
        "category": "Q#"
      },
      {
        "command": "qsharp-vscode.showHistogram",
        "title": "Run file and show histogram",
        "category": "Q#"
      },
      {
        "command": "qsharp-vscode.showRe",
        "title": "Calculate Resource Estimates",
        "category": "Q#"
      },
      {
        "command": "qsharp-vscode.showHelp",
        "title": "Help",
        "category": "Q#"
      },
      {
        "command": "qsharp-vscode.showCircuit",
        "title": "Show circuit",
        "category": "Q#"
      },
      {
        "command": "qsharp-vscode.showDocumentation",
        "title": "Show API documentation",
        "category": "Q#"
      },
      {
        "command": "qsharp-vscode.workspacesRefresh",
        "category": "Q#",
        "title": "Refresh Azure Quantum workspaces",
        "icon": "$(refresh)"
      },
      {
        "command": "qsharp-vscode.workspacesAdd",
        "category": "Q#",
        "title": "Connect to an Azure Quantum workspace",
        "icon": "$(add)"
      },
      {
        "command": "qsharp-vscode.workspacesRemove",
        "category": "Q#",
        "title": "Remove workspace connection",
        "icon": "$(remove)"
      },
      {
        "command": "qsharp-vscode.workspacePythonCode",
        "category": "Q#",
        "title": "Copy Python code to connect to workspace"
      },
      {
        "command": "qsharp-vscode.workspaceOpenPortal",
        "category": "Q#",
        "title": "Open the workspace in the Azure portal",
        "icon": "$(link-external)"
      },
      {
        "command": "qsharp-vscode.targetSubmit",
        "category": "Q#",
        "title": "Submit current Q# program",
        "icon": "$(run)"
      },
      {
        "command": "qsharp-vscode.getQir",
        "category": "Q#",
        "title": "Get QIR for current Q# program"
      },
      {
        "command": "qsharp-vscode.downloadResults",
        "category": "Q#",
        "title": "Download Azure Quantum job results",
        "icon": "$(cloud-download)"
      },
      {
        "command": "qsharp-vscode.setTargetProfile",
        "category": "Q#",
        "title": "Set the Azure Quantum QIR target profile"
      },
      {
        "command": "qsharp-vscode.createNotebook",
        "category": "Q#",
        "title": "Create an Azure Quantum notebook"
      },
      {
        "command": "qsharp-vscode.openPlayground",
        "category": "Q#",
        "title": "Open Q# playground"
      },
      {
        "command": "qsharp-vscode.populateFilesList",
        "category": "Q#",
        "title": "Populate qsharp.json files list"
      },
      {
        "command": "qsharp-vscode.addProjectReference",
        "category": "Q#",
        "title": "Add Q# project reference"
      }
    ],
    "breakpoints": [
      {
        "language": "qsharp"
      }
    ],
    "languages": [
      {
        "id": "qsharp",
        "aliases": [
          "Q#",
          "qsharp"
        ],
        "extensions": [
          ".qs"
        ],
        "configuration": "./language-configuration.json"
      }
    ],
    "grammars": [
      {
        "language": "qsharp",
        "scopeName": "source.qsharp",
        "path": "./syntaxes/qsharp.tmLanguage.json"
      }
    ],
    "jsonValidation": [
      {
        "fileMatch": "qsharp.json",
        "url": "./qsharp.schema.json"
      }
    ],
    "debuggers": [
      {
        "type": "qsharp",
        "languages": [
          "qsharp"
        ],
        "label": "Q# Debug",
        "configurationAttributes": {
          "launch": {
            "properties": {
              "program": {
                "type": "string",
                "description": "Absolute path to a text file.",
                "default": "${file}"
              },
              "stopOnEntry": {
                "type": "boolean",
                "description": "Automatically stop after launch.",
                "default": false
              },
              "entry": {
                "type": "string",
                "description": "Entry expression.",
                "default": ""
              },
              "shots": {
                "type": "number",
                "description": "Number of shots to execute.",
                "default": 1
              },
              "trace": {
                "type": "boolean",
                "description": "Enable logging of the Debug Adapter Protocol.",
                "default": false
              },
              "showCircuit": {
                "type": "boolean",
                "description": "Display the quantum circuit diagram while running.",
                "default": false
              }
            }
          }
        }
      }
    ],
    "configurationDefaults": {
      "[qsharp]": {
        "debug.saveBeforeStart": "none"
      }
    }
  },
  "scripts": {
    "build": "npm run tsc:check && node build.mjs",
    "build:watch": "node build.mjs --watch",
    "start": "npm exec --no -- @vscode/test-web --extensionDevelopmentPath . ../samples",
    "test": "node ./test/runTests.mjs",
    "pretest": "npm exec --no playwright install chromium && node ./test/buildTests.mjs",
    "tsc:check:main": "node ../node_modules/typescript/bin/tsc -p ./tsconfig.json",
    "tsc:check:view": "node ../node_modules/typescript/bin/tsc -p ./src/webview/tsconfig.json",
    "tsc:check": "npm run tsc:check:main && npm run tsc:check:view",
    "tsc:watch": "node ../node_modules/typescript/bin/tsc -p ./tsconfig.json --watch --preserveWatchOutput",
    "tsc:watch:view": "node ../node_modules/typescript/bin/tsc -p ./src/webview/tsconfig.json --watch --preserveWatchOutput"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/microsoft/qsharp.git"
  },
  "license": "SEE LICENSE IN LICENSE.txt",
  "aiKey": "0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255"
}
