Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.classiq.io/llms.txt

Use this file to discover all available pages before exploring further.

AI-assisted setup

The fastest way to set up Classiq is to copy the setup prompt into your AI coding assistant. Use this prompt if you want your assistant to install the SDK, check your Python environment, authenticate your account, and verify that Classiq is ready to use.

Install and authenticate Classiq

Manual Python SDK Installation

After registering to the platform, install the SDK package using pip:
The SDK is currently supported for Python versions 3.8 to 3.12.
pip install -U classiq
Run pip install -U classiq in your command line, or use !pip install -U classiq from your Python IDE.
Make sure you are within the appropriate Python environment.

Authentication

Authenticate the device with your Classiq account. In Python, run these lines:
import classiq
classiq.authenticate()
A confirmation window opens in your web browser. Confirm the authentication:
Once you receive the confirmation you are good to go! If you encounter an issue, look for a solution in the troubleshooting section or ask in the community Slack.

Platform Version Updates

Every few weeks a new version of the platform launches. The web-based IDE at platform.classiq.io automatically updates. Update the Python SDK package manually with this command:
pip install -U classiq
To update the Python SDK for a specific version, run this in the terminal:
pip install classiq=={DESIRED_VERSION}
and replace the DESIRED_VERSION with the number of your desired version, e.g. 0.40. You can check what version of Classiq is installed with:
pip show classiq
NOTE: Only the last three versions of Classiq are supported. For example, if the current version is 0.41, only versions 0.41, 0.40, and 0.39 are supported. *Once version 0.52 is released - execution of quantum programs with older SDK versions might result in errors or unexpected behavior. To ensure proper execution, upgrade your SDK to the latest version.

Python SDK Installation Troubleshooting

Check your user profile page on the platform (when logged in, click your avatar on the top-right, then “Profile Settings”). Look for the “SDK Configuration” section. If it’s not there, simply ignore this step.Otherwise, download the file from the profile and copy it to:
  • Mac & Linux: ~/.config/classiq/config.env
  • Windows: %APPDATA%\classiq\config.env
Try to use the following command in Python:
import classiq
classiq.authenticate(overwrite=True)
The authentication procedure on headless Linux systems stores the tokens locally in a credentials file. While you must still run the authentication once, it can be done on another system with a browser.
On some Apple computers, the following might pop up:
Make sure to type your device password and click Always Allow twice.