Skip to main content

Installation

This guide covers installing the QCOS Python SDK, CLI, and configuring API access.

System Requirements

  • Python: 3.9 or higher
  • Operating Systems: Linux, macOS, Windows
  • Dependencies: Automatically installed

Python SDK Installation

pip install qcos-sdk

Using Poetry

poetry add qcos-sdk

Using Conda

conda install -c softquantus qcos-sdk

From Source

git clone https://github.com/roytmanpiccoli/qcos_core.git
cd qcos_core
pip install -e .

CLI Installation

The QCOS CLI is included with the SDK but can also be installed separately:

pip install qcos-cli

Verify installation:

qcos --version
# QCOS CLI v1.0.0

Optional Dependencies

Install additional packages for specific features:

# Qiskit integration
pip install qcos-sdk[qiskit]

# Cirq integration
pip install qcos-sdk[cirq]

# All integrations
pip install qcos-sdk[all]

# Development tools
pip install qcos-sdk[dev]

Docker Installation

For containerized environments:

docker pull qcosregistry.azurecr.io/qcos-sdk:latest

docker run -it --rm \
-e QCOS_API_KEY=your-api-key \
qcosregistry.azurecr.io/qcos-sdk:latest \
python -c "from qcos import QCOSClient; print('Ready!')"

Jupyter Notebook

Install with Jupyter support:

pip install qcos-sdk[jupyter]

Then in your notebook:

from qcos import QCOSClient
from qcos.visualization import plot_histogram

client = QCOSClient()
result = client.execute(circuit, shots=1024)
plot_histogram(result.counts)

Verifying Installation

Test SDK

import qcos
print(qcos.__version__)
# 1.0.0

# Test connection
from qcos import QCOSClient
client = QCOSClient(api_key="your-api-key")
print(client.health())
# {'status': 'healthy', 'version': '1.0.0'}

Test CLI

qcos health
# ✓ API Gateway: healthy
# ✓ Queue Service: connected
# ✓ GPU Workers: 8 available

Environment Variables

Configure QCOS using environment variables:

# Required
export QCOS_API_KEY="your-api-key"

# Optional
export QCOS_API_URL="https://api.softquantus.com"
export QCOS_TIMEOUT=30
export QCOS_MAX_RETRIES=3
export QCOS_LOG_LEVEL="INFO"

Or use a .env file:

# .env
QCOS_API_KEY=your-api-key
QCOS_API_URL=https://api.softquantus.com

IDE Integration

VS Code

Install the QCOS extension for syntax highlighting and autocomplete:

code --install-extension softquantus.qcos-vscode

PyCharm

Add QCOS stubs for better autocomplete:

pip install qcos-stubs

Troubleshooting

SSL Certificate Errors

# Update certificates
pip install --upgrade certifi

Connection Timeout

Check your network and proxy settings:

export HTTPS_PROXY=http://your-proxy:8080

Import Errors

Ensure you have the correct Python version:

python --version  # Should be 3.9+

Next Steps