Quick Start¶
Submit your first quantum job using the Core SDK in five steps.
Step 1: Create an Open Quantum Account¶
Sign up at the Open Quantum Portal. You will receive free Spark credits to get started.
Step 2: Generate an SDK Key¶
- Log in to the Open Quantum Portal.
- Go to the SDK Keys page.
- Click Create SDK Key.
- Copy the Client ID and Client Secret immediately.
Warning
The client secret is displayed only once at creation time. Store it in a secure location. If you lose it, delete the key and create a new one.
Step 3: Set Environment Variables¶
Set your credentials as environment variables:
Tip
Add these to your shell profile (.bashrc, .zshrc) or use a .env file with a tool like python-dotenv to avoid setting them every session.
Step 4: Create a QASM File¶
Create a file called bell_state.qasm:
OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
creg c[2];
h q[0];
cx q[0],q[1];
measure q[0] -> c[0];
measure q[1] -> c[1];
Step 5: Submit the Job¶
Create a file called run_job.py:
import os
from openquantum_sdk.auth import ClientCredentials, ClientCredentialsAuth
from openquantum_sdk.clients import SchedulerClient, JobSubmissionConfig
auth = ClientCredentialsAuth(
creds=ClientCredentials(
client_id=os.environ["OPENQUANTUM_CLIENT_ID"],
client_secret=os.environ["OPENQUANTUM_CLIENT_SECRET"],
),
)
scheduler = SchedulerClient(auth=auth)
config = JobSubmissionConfig(
backend_class_id="ionq:forte-1",
name="Bell State Job",
job_subcategory_id="phys:oth", # Physics
shots=1024,
)
job = scheduler.submit_job(config, file_path="bell_state.qasm")
print(f"Job ID: {job.id}")
print(f"Status: {job.status}")
output = scheduler.download_job_output(job)
print(f"Results: {output}")
scheduler.close()
Run it:
Monitor jobs from anywhere
Every job you submit is visible in the Jobs page on the portal. If your code is running on a remote server, you can still check status, view results, and download data from any browser or your phone. See Monitoring Jobs for details.
Next Steps¶
- Portal -- Submit jobs, monitor progress, manage keys and credits from the web UI.
- Sample Circuits & Notebooks -- Ready-to-run QASM files and Colab notebooks.
- Authentication -- Learn about all authentication options including saved accounts.
- Core SDK Overview -- Detailed guide to SchedulerClient and ManagementClient.
- Qiskit Plugin -- Use Open Quantum with Qiskit circuits.
- PennyLane Plugin -- Use Open Quantum with PennyLane circuits.