Commutator Studios Python SDK
Project description
Commutator Studios Python SDK
Commutator SDK is the official Python client for the Commutator Studios quantum ecosystem. It provides a seamless, developer-friendly interface to integrate quantum workloads, optimization engines, and identity management natively into your Python tech stack.
By connecting to the Centralized API Gateway (commutator.app), this SDK handles authentication, rate-limiting, and billing checks automatically, allowing you to focus on building quantum-accelerated applications.
Features
- Quantum Fleet Management: Discover, list, and check the status of available quantum backends (e.g.,
ibm_berlin,ibmq_qasm_simulator). - Hardware & Algorithmic Recommendations: Interface directly with
cs-optimizerto get smart recommendations for hardware and optimization levels (e.g., VQE) before you run your circuits. - Job Execution & Polling: Submit quantum circuits, execute jobs on actual quantum hardware, and download results natively into Python objects.
- Standardized Error Handling: Detailed, structured exceptions (
APIError,ValidationError,AuthenticationError) for predictable and easy debugging. - ...and more!
Installation
The SDK requires Python 3.11+. You can install it directly from PyPI using pip:
pip install commutator-sdk
Quick Start
Here is a simple example showing how to authenticate, create a job, execute a circuit, and fetch the results.
1. Authentication
You can authenticate using your API Key or Username/Password.
from commutator.client import CommutatorClient
# Initialize the client (Environment is auto-detected)
client = CommutatorClient(api_key="your_api_key_here")
2. Submitting a Quantum Job
Submit your quantum circuit JSON and execute it on a selected backend.
import json
# 1. Create the Job
job = client.create_job(
name="My First VQE Run",
algorithm="VQE",
file_path="circuit.json"
)
job_id = job["id"]
print(f"Job created successfully: {job_id}")
# 2. Execute the Job
client.execute_job(
job_id=job_id,
backend="ibm_berlin",
optimization_level=3
)
print("Job dispatched to the quantum backend!")
3. Optimizer Recommendations
Not sure which backend or optimization level to use? Ask the Recommendation Engine!
recommendation = client.recommend(
execution_id="your_execution_id",
plan_only=True,
target_dd=True
)
print(f"Recommended Backend: {recommendation['recommendedBackend']}")
print(f"Expected Fidelity: {recommendation['expectedFidelity']}")
Advanced Usage
For comprehensive documentation, including detailed API reference, Identity Management (list_api_keys, get_audit_logs), and advanced configuration options, please refer to the official Commutator Studios Documentation.
License
Copyright © 2026 Commutator Studios GmbH. All rights reserved.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file commutator_sdk-0.1.3.tar.gz.
File metadata
- Download URL: commutator_sdk-0.1.3.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b8a7c893f779b183b0147dee164164cd62b2bf5d54d579966b4ad6af30fbfc2
|
|
| MD5 |
f20098944ea9985877d1a4faec34435e
|
|
| BLAKE2b-256 |
632dc5d8cf12a219a55746cb17c75f8d9647d3b44f40855bee83ade632a00e72
|
File details
Details for the file commutator_sdk-0.1.3-py3-none-any.whl.
File metadata
- Download URL: commutator_sdk-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b8248718e21f66ecd1f5bc9a1c71fe56c2247df278b73a402d009d953fb4001
|
|
| MD5 |
9934de7ad1df9f810aaa7c7e5623925b
|
|
| BLAKE2b-256 |
44bde50177876502b93bc466ed99c4159d8fd1a984f22a5145e599ea753be562
|