이 페이지는 아직 한국어로 번역되지 않았습니다. 영어 원본을 보고 있습니다.
Use Qiskit Code Assistant in JupyterLab
Learn how to install, use, configure, and uninstall the official Qiskit Code Assistant extension in JupyterLab.
Install the JupyterLab extension
To install the JupyterLab extension, run the following command from a terminal:
pip install qiskit-code-assistant-jupyterlab
After installing the extension, start JupyterLab:
jupyter lab
The extension loads automatically and is listed on the bottom of the JupyterLab window. Refer to the JupyterLab documentation for help working with JupyterLab.
Configure extension settings
It is recommended that you edit the following JupyterLab settings by going to Settings -> Settings Editor:
-
Click Inline Completer, find "Show widget" and choose Always. This means that the inline completer widget will always be shown so you can cycle through and select a completion item.
-
Click Code Completion and increase the value for "Default timeout for a provider." to
10000or 10 seconds. The default value is 1 second, but the Qiskit Code Assistant API might take longer than this to find a suggestion. This setting only applies to the standard context menu that is invoked withTab. The inline completer has a default of 10 seconds.
Other settings you might want to change:
-
Keyboard shortcuts can be changed from Settings > Settings Editor > Keyboard Shortcuts.
-
You can change the IBM Quantum API token to use in the JupyterLab command palette. To do that, type
Alt+Shift+C, search forqiskit, select the Qiskit Code Assistant: Set IBM Quantum API token command, and paste in your key. -
[Advanced] To change the instance of the Qiskit Code Assistant service that the extension should use, edit Qiskit Code Assistant
serviceUrlsetting. -
[Advanced] Keyboard shortcuts can be changed by searching for
completerin the Keyboard Shortcuts settings (Settings -> Settings Editor -> Keyboard Shortcuts) and adding new shortcuts for the relevant commands.