Skip to main content

CLI Commands

Complete reference for all QCOS CLI commands.

Core Commands​

qcos execute​

Execute a quantum circuit.

qcos execute <circuit_file> [options]

Arguments:

  • circuit_file - Path to QASM file, or - for stdin

Options:

OptionShortDefaultDescription
--shots-s1024Number of measurement shots
--wait-wtrueWait for completion
--no-waitfalseSubmit and return immediately
--timeout-t60Max seconds to wait
--format-ftableOutput format: table, json, csv
--output-oSave result to file
--quiet-qfalseSuppress progress output

Examples:

# Basic execution
qcos execute bell.qasm --shots 2048

# Save JSON result
qcos execute bell.qasm -s 1024 -f json -o result.json

# Async execution
qcos execute bell.qasm --no-wait

# From stdin
cat circuit.qasm | qcos execute - --shots 512

qcos status​

Check job status.

qcos status <job_id> [options]

Options:

OptionShortDefaultDescription
--watch-wfalseContinuously poll status
--format-ftableOutput format

Examples:

# Check status
qcos status job_abc123

# Watch until complete
qcos status job_abc123 --watch

qcos results​

Get job results.

qcos results <job_id> [options]

Options:

OptionShortDefaultDescription
--wait-wfalseWait for completion
--timeout-t60Max wait time
--format-ftableOutput format
--output-oSave to file

Examples:

# Get results
qcos results job_abc123

# Wait and save
qcos results job_abc123 --wait --output results.json

qcos cancel​

Cancel a queued job.

qcos cancel <job_id>

Batch Commands​

qcos batch​

Execute multiple circuits.

qcos batch <directory> [options]
qcos batch --manifest batch.yaml [options]

Options:

OptionShortDefaultDescription
--shots-s1024Default shots for all
--parallel-p4Concurrent jobs
--manifest-mYAML manifest file
--output-dir-o./resultsOutput directory

Manifest Example:

# batch.yaml
jobs:
- name: bell-state
circuit: circuits/bell.qasm
shots: 2048

- name: ghz-5
circuit: circuits/ghz_5.qasm
shots: 4096

- name: qft-8
circuit: circuits/qft_8.qasm
shots: 1024

Examples:

# Execute all QASM files in directory
qcos batch ./circuits --shots 1024

# Execute from manifest
qcos batch --manifest batch.yaml --parallel 8

# Output:
# βœ“ Batch started: 5 jobs
# [====================] 100% (5/5)
# βœ“ All jobs completed
# Results saved to ./results/

Configuration Commands​

qcos configure​

Configure CLI settings.

qcos configure [options]

Options:

OptionDescription
--api-keySet API key
--api-urlSet API endpoint
--set KEY=VALUESet any config value
--unset KEYRemove config value
--listShow current config

Examples:

# Interactive setup
qcos configure

# Set specific values
qcos configure --api-key qcos-xxxx-xxxx
qcos configure --set default_shots=2048
qcos configure --set output_format=json

# View configuration
qcos configure --list

qcos auth​

Manage authentication.

qcos auth <subcommand>

Subcommands:

  • login - Authenticate via browser
  • logout - Clear credentials
  • status - Show auth status
  • create-key - Create new API key
  • list-keys - List API keys
  • revoke-key - Revoke an API key

Examples:

qcos auth login
# Opens browser for OAuth flow

qcos auth status
# βœ“ Authenticated as demo@example.com
# Tier: pro
# API Key: qcos-****-****-1234

qcos auth create-key --name "ci-cd"
# βœ“ API Key created: qcos-xxxx-yyyy-zzzz

Information Commands​

qcos user​

View user information.

qcos user [subcommand]

Subcommands:

  • info - Show account details
  • usage - Show usage statistics
  • jobs - List recent jobs

Examples:

qcos user info
# User: demo@example.com
# Tier: pro
# Daily limit: 100 jobs
# Max qubits: 50
# Max shots: 100,000

qcos user usage
# Today: 23/100 jobs
# This month: 456 jobs
# Total: 1,234 jobs

qcos user jobs --limit 10
# Recent Jobs:
# β”‚ ID β”‚ Status β”‚ Qubits β”‚ Time β”‚
# β”‚ job_abc123 β”‚ completed β”‚ 5 β”‚ 1.2s β”‚
# β”‚ job_def456 β”‚ completed β”‚ 10 β”‚ 2.5s β”‚

qcos health​

Check API health.

qcos health [options]

Options:

OptionDescription
--jsonOutput as JSON
--verboseShow detailed info

Examples:

qcos health
# βœ“ API Gateway: healthy (v1.0.0)
# βœ“ Queue Service: connected
# βœ“ GPU Workers: 8 available

qcos health --verbose
# ... detailed diagnostics

qcos pricing​

View pricing tiers.

qcos pricing

Output:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Tier β”‚ Jobs/Day β”‚ Max Qubits β”‚ Max Shots β”‚ Price β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Free β”‚ 10 β”‚ 20 β”‚ 10,000 β”‚ $0 β”‚
β”‚ Pro β”‚ 100 β”‚ 50 β”‚ 100,000 β”‚ $49/mo β”‚
β”‚ Enterprise β”‚ Unlimitedβ”‚ 100 β”‚ 1,000,000 β”‚ Custom β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Utility Commands​

qcos validate​

Validate a circuit without executing.

qcos validate <circuit_file>

Examples:

qcos validate circuit.qasm
# βœ“ Circuit is valid
# Qubits: 5
# Gates: 12
# Depth: 8

qcos validate invalid.qasm
# βœ— Invalid circuit
# Line 5: Unknown gate 'foo'

qcos convert​

Convert between circuit formats.

qcos convert <input> <output> [options]

Examples:

# QASM to JSON
qcos convert circuit.qasm circuit.json

# Qiskit to QASM
qcos convert circuit.py circuit.qasm --from qiskit

qcos completion​

Generate shell completion scripts.

qcos completion <shell>

Shells: bash, zsh, fish, powershell


Global Options​

Available for all commands:

OptionShortDescription
--api-keyOverride API key
--api-urlOverride API URL
--verbose-vVerbose output
--quiet-qSuppress output
--no-colorDisable colors
--help-hShow help
--version-VShow version

Exit Codes​

CodeMeaning
0Success
1General error
2Invalid arguments
3Authentication error
4Rate limit exceeded
5Quota exceeded
6Circuit error
7Timeout
8Network error