Get started with the Qiskit Code Assistant in under 5 minutes!
Use IBM's hosted service with the latest models.
Requirements:
- IBM Quantum premium account
- Internet connection
-
Install the Extension
- Open VSCode
- Go to Extensions (Cmd/Ctrl+Shift+X)
- Search for "Qiskit Code Assistant"
- Click Install
-
Create Your API Token (if you don't have one)
- Go to IBM Quantum Platform
- Login with your IBM Quantum account
- Click
Create +(upper-left in the API key section) - Enter Name
- Click Create
- Copy the API key
-
Configure the Extension
- Press Cmd/Ctrl+Shift+P in VSCode
- Type "Qiskit Code Assistant: Set IBM Quantum API token"
- Paste your token and press Enter
-
Accept the Model Disclaimer
- The first time you use the assistant, you'll see a model disclaimer
- Read and click "Accept"
-
Start Coding!
- Open a Python file
- Press
Ctrl+.to get AI suggestions - Press
Tabto accept,Escto reject
See GETTING_STARTED.md for detailed instructions.
Run everything on your local machine - no internet required for completions!
bash <(curl -fsSL https://raw.githubusercontent.com/Qiskit/qiskit-code-assistant-vscode/main/setup_local.sh)Pros:
- ✅ Complete privacy - code never leaves your machine
- ✅ No API token needed
- ✅ Works offline
- ✅ Free forever
Cons:
- Requires 8-16GB RAM depending on model
- Initial setup downloads ~5-15GB
Requirements:
- Visual Studio Code installed
- 8GB+ RAM (16GB+ recommended)
- ~15-20GB disk space
See LOCAL_SETUP.md for detailed instructions.
| Feature | Local Setup | Cloud Setup |
|---|---|---|
| Privacy | ✅ Complete | |
| Speed | Fast (depends on hardware) | Fast (depends on internet) |
| Cost | Free | Requires premium account |
| Setup Time | 5-10 minutes | 2 minutes |
| Offline | ✅ Yes | ❌ No |
| RAM Required | 8-16GB+ | Any |
| Disk Space | ~15-20GB | Minimal |
Once set up, use these shortcuts in any Python file:
| Shortcut | Action |
|---|---|
Ctrl+. |
Trigger code completion |
Tab |
Accept suggestion |
Esc |
Reject suggestion |
Alt+[ / Alt+] |
Cycle through suggestions |
Try typing this in a Python file:
from qiskit import QuantumCircuit
# Create a Bell state
qc = QuantumCircuit(2)
qc.h(0)
# Press Ctrl+. here for suggestionsThe AI will suggest completing your quantum circuit!
-
Choose a Model:
- Default: Qwen2.5-Coder 14B (best for code)
- Lightweight: Granite 3.3 8B (for limited RAM)
- Latest: Mistral Small 24B (for powerful systems)
-
Customize Settings:
- Open VSCode Settings (Cmd/Ctrl+,)
- Search for "Qiskit Code Assistant"
- Adjust streaming, timeout, etc.
-
Read the Docs:
- LOCAL_SETUP.md - Detailed setup and troubleshooting
- README.md - Feature overview
-
Explore Features:
- Code completion with
Ctrl+. - Code migration (click the sparkle icon)
- Inline suggestions
- Code completion with
-
Customize Shortcuts:
- Go to Preferences → Keyboard Shortcuts
- Search for "qiskit-vscode"
- Modify keybindings as needed
-
Read the Docs:
- GETTING_STARTED.md - Detailed setup
- README.md - Feature overview
Ollama Not Running?
curl http://localhost:11434
# Should return: "Ollama is running"
# If not, start it:
ollama serveExtension Not Working?
- Verify VSCode settings have
"qiskitCodeAssistant.url": "http://localhost:11434" - Restart VSCode completely (don't just reload window)
- Check extension is installed:
code --list-extensions | grep qiskit
See LOCAL_SETUP.md for more troubleshooting.
No API Token Accepted?
- Verify you're on IBM Quantum premium plan
- Check token is copied correctly (no extra spaces)
- Try regenerating token on IBM Quantum Platform
Extension Not Showing Up?
- Check Extensions tab - make sure it's enabled
- Reload VSCode window (Cmd/Ctrl+Shift+P → "Developer: Reload Window")
- Check status bar at bottom for Qiskit icon
See GETTING_STARTED.md for more troubleshooting.
- Documentation: Check LOCAL_SETUP.md or GETTING_STARTED.md
- Issues: Report bugs at https://github.com/Qiskit/qiskit-code-assistant-vscode/issues
- Community: Join Qiskit Slack for community support
You can easily switch between setups by changing one setting:
Use Local:
{
"qiskitCodeAssistant.url": "http://localhost:11434"
}Use Cloud:
{
"qiskitCodeAssistant.url": "https://qiskit-code-assistant.quantum.ibm.com"
}Restart VSCode after changing the URL.
# Lightweight (8GB RAM)
bash setup_local.sh granite-3.3-8b
# Best quality (16GB RAM)
bash setup_local.sh qwen2.5-coder-14b
# Latest model (24GB RAM)
bash setup_local.sh mistral-small-24b- Click thumbs up/down on suggestions to help improve the model
- Click feedback icon in status bar for general feedback
- Learn Qiskit 2.0: The assistant is trained on the latest Qiskit
- Try Different Prompts: Comment your intent and press Ctrl+.
- Explore Patterns: Check out Qiskit patterns for reusable code
- Share Feedback: Help improve the assistant by providing feedback
Happy quantum coding! 🚀