{"id":28552242,"url":"https://github.com/qiskit/qiskit-code-assistant-jupyterlab","last_synced_at":"2025-07-06T08:30:54.909Z","repository":{"id":256974151,"uuid":"854585532","full_name":"Qiskit/qiskit-code-assistant-jupyterlab","owner":"Qiskit","description":"A Jupyterlab extension to use the Qiskit Code Assistant","archived":false,"fork":false,"pushed_at":"2025-06-26T15:31:34.000Z","size":645,"stargazers_count":20,"open_issues_count":5,"forks_count":6,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-06-26T15:34:45.389Z","etag":null,"topics":["jupyterlab-extension","qiskit"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/qiskit-code-assistant-jupyterlab/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Qiskit.png","metadata":{"files":{"readme":"README-PyPi.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-09T12:44:14.000Z","updated_at":"2025-06-26T15:31:33.000Z","dependencies_parsed_at":"2024-09-14T06:22:17.345Z","dependency_job_id":"82993f06-a883-469c-a612-26ec413f706f","html_url":"https://github.com/Qiskit/qiskit-code-assistant-jupyterlab","commit_stats":null,"previous_names":["qiskit/qiskit-code-assistant-jupyterlab"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Qiskit/qiskit-code-assistant-jupyterlab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qiskit%2Fqiskit-code-assistant-jupyterlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qiskit%2Fqiskit-code-assistant-jupyterlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qiskit%2Fqiskit-code-assistant-jupyterlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qiskit%2Fqiskit-code-assistant-jupyterlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qiskit","download_url":"https://codeload.github.com/Qiskit/qiskit-code-assistant-jupyterlab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qiskit%2Fqiskit-code-assistant-jupyterlab/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262099664,"owners_count":23258664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jupyterlab-extension","qiskit"],"created_at":"2025-06-10T04:08:30.967Z","updated_at":"2025-07-06T08:30:54.904Z","avatar_url":"https://github.com/Qiskit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Qiskit Code Assistant (Beta)\n\n\u003e The Qiskit Code Assistant is a beta release, subject to change.\n\nWrite and optimize Qiskit code with a generative AI code assistant.\n\n---\n\nIncrease quantum computing developer productivity and learn best practices for Qiskit and IBM Quantum Platform services with Qiskit Code Assistant!\n\n---\n\nMake programming quantum computers even easier with Qiskit Code Assistant, a generative AI code assistant. Trained with approximately 370 million text tokens from Qiskit SDK v1.x, years of Qiskit code examples, and IBM Quantum features, Qiskit Code Assistant accelerates your quantum development workflow by offering LLM-generated suggestions based on [IBM Granite 3.3 8B](https://www.ibm.com/products/watsonx-ai/foundation-models) that incorporate the latest features and functionalities from IBM. And soon, Qiskit Code Assistant will be able to be used alongside Qiskit patterns building blocks for reusable code and workflow simplification.\n\nQiskit is the open-source quantum SDK preferred by 69% of respondents to the Unitary Fund's Open Source Software Survey, with nearly 600,000 registered users to date. Now you can get the performance and stability of the Qiskit SDK with the added efficiency of Qiskit Code Assistant to streamline your workflow and optimize your quantum computing programs.\n\n## Features\n\n- Accelerate Qiskit code generation by leveraging generative AI based on the `granite-3.3-8b-qiskit` model\n- Use abstract and specific prompts to generate recommendations\n- Manage code changes by reviewing, accepting, and rejecting suggestions\n- Supports Python code files\n\n## Learn the best ways to use Qiskit and IBM Quantum Platform services\n\nImprove your Qiskit code by reviewing, browsing, and accepting model-generated code suggestions.\n\n### Use abstract prompts to get started\n\nProvide abstract prompts to Qiskit Code Assistant using `#comments`. Type `Alt .`, `Alt \\` or `Tab` following a `#comment` to obtain syntactically correct and contextually relevant content (up to 60 tokens) suited to your desired task.\n\n![inline complete example](https://github.com/Qiskit/qiskit-code-assistant-jupyterlab/raw/main/docs/images/inline-complete.png)\n\n### Use specific prompts for streamlined code completion\n\nUse `Alt .`, `Alt \\` or `Tab` with code to obtain specific model-generated suggestions for code completion based on semantic analysis of source code. Review code recommendations before accepting.\n\n## Get started\n\n### Obtain your IBM Quantum Platform API token\n\nOpen the [IBM Quantum Platform](https://quantum.cloud.ibm.com/) in your browser and log in with your IBM Quantum Cloud account. After logging in, an IBM Quantum API token is displayed on the upper right side of the web page.\n\n### Set the API token in the JupyterLab extension\n\nWhen you first open Jupyterlab in a new window or tab you may see that the status bar\nis highlighted orange, this shows that the service is not reachable.\n\n![statusbar warning](https://github.com/Qiskit/qiskit-code-assistant-jupyterlab/raw/main/docs/images/statusbar-no-model.png)\n\nIf you click the status bar or try to run the completer a dialog will display asking\nfor your API token, paste the token copied above here.\n\n![token dialog](https://github.com/Qiskit/qiskit-code-assistant-jupyterlab/raw/main/docs/images/enter-token.png)\n\nYou can also search for \"Qiskit\" in the command palette (`Alt Shift C`) to enter or\nupdate your API token.\n\nIn addition if the enviroment variable `QISKIT_IBM_TOKEN` is set or the Qiskit\nconfiguration file `~/.qiskit/qiskit-ibm.json` exists then the API token will be\npopulated at application start. If an API token is entered via the extension it will be\nstored in `~/.qiskit/qiskit-ibm.json` under a new config named `qiskit-code-assistant`\n\n### Accept the model disclaimer/EULA\n\nBy default, the model you will use is `granite-3.3-8b-qiskit`. It will appear in the Model Picker in the bottom of the status bar.\n\nThe first time you use the `granite-3-3.8b-qiskit` model, a model disclaimer/EULA will appear with information about the model and links to documentation and the model's license. It will also list some restrictions that you should be aware of when using the model, including a restriction against using proprietary code. Clicking `Accept` will enable the new model during code generation.\n\n### Generate code suggestions\n\nOnce you've accepted the model disclaimer/EULA, you can open a new file and start typing. If you type `Alt .`, some faded text should appear with model-generated suggestions.\n\n### Review and accept/reject code suggestions\n\nType `Alt Tab` or `Alt END` to accept the model-generated suggestion, or type `Esc` to cancel/reject the model-generated suggestion.\n\n### Using the Inline Completer\n\nThe inline completer can be triggered using the following key strokes.\n\n- `Alt .` or `Alt \\` will run the completer at the current cursor location\n- `Alt [` and `Alt ]` can be used to cycle through the list of suggestions if there are\n  more than one\n- `Alt Tab` or `Alt END` will \"accept\" the suggested code and insert it at the current\n  cursor location\n\nIn addition, once the completer runs you can use the buttons on the inline completer\nwidget to cycle or accept\n\n![inline complete example](https://github.com/Qiskit/qiskit-code-assistant-jupyterlab/raw/main/docs/images/inline-complete.png)\n\n### Using the Code Completer\n\nJupyterlab also includes a traditional completer than displays suggestion in a context\nmenu rather than inline. This completer can be triggered using `Tab` to run and display\nthe context menu.\n\nThe context menu will include suggestions from the default completer in addition to the\nQiskit Code Assistant suggestions. The context menu also sanitizes and trims the\nsuggestions, making it less useful for see the code suggestion before inserting it.\n\n![tab complete example](https://github.com/Qiskit/qiskit-code-assistant-jupyterlab/raw/main/docs/images/tab-complete.png)\n\n### Jupyterlab Settings\n\nThere are a few settings we recommend to edit in your user settings.\n\n1. Inline Completer `showWidget` can be set to `always` in order to always show the\n   inline completer widget to cycle through and select a completion item\n\n2. Code Completion `providerTimeout` can be increased, our suggested value is `15000` or\n   15 seconds. This is 1 second by default and the Qiskit Code Assistant API rarely returns\n   within 1 second. This setting only apply the the standard completer that is invoked with\n   `Tab`, the inline completer has a default of 15 seconds.\n\n3. If you want to change the instance of the Qiskit Code Assistant Service that the\n   extension should use you can edit the Qiskit Code Assistant setting `serviceUrl`.\n   This can also be set to any service exposing LLMs using OpenAI-compatible API endpoints.\n\n4. Keyboard shortcuts can be changed by searching for `completer` in the Keyboard Shortcuts\n   settings and adding new shortcuts for the relevant commands.\n\n5. Telemetry can be disabled by unchecking the `enableTelemetry` setting.\n\n   \u003e **NOTE**: The telemetry does not collect your code nor the suggested code completions.\n   \u003e What is collected is whether a code suggestion was accepted or dismissed.\n\n## Terms of use\n\n- [End User License Agreement (EULA)](https://github.com/Qiskit/qiskit-code-assistant-jupyterlab/blob/main/docs/EULA.md) acceptance required before starting to use the model acceptance required before starting to use the model\n- Terms of use: [https://quantum.ibm.com/terms](https://quantum.ibm.com/terms)\n- Privacy policy: [https://quantum.ibm.com/terms/privacy](https://quantum.ibm.com/terms/privacy)\n- Cloud Services Agreement [https://www.ibm.com/support/customer/csol/terms/?id=Z126-6304\u0026cc=us\u0026lc=en](https://www.ibm.com/support/customer/csol/terms/?id=Z126-6304\u0026cc=us\u0026lc=en)\n- IBM Cloud Service Description [https://www.ibm.com/support/customer/csol/terms/?id=i126-6605\u0026lc=en](https://www.ibm.com/support/customer/csol/terms/?id=i126-6605\u0026lc=en)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiskit%2Fqiskit-code-assistant-jupyterlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqiskit%2Fqiskit-code-assistant-jupyterlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiskit%2Fqiskit-code-assistant-jupyterlab/lists"}