Skip to main content

RPC tooling for OQC QAT.

Project description

QAT-RPC

ZeroMQ-based RPC tooling for the OQC QAT (Quantum Assembly Toolchain) compiler and runtime. Enables remote execution of quantum programs (OpenQASM / QIR) through a client-server architecture with Prometheus metrics export.

Quick start

Starting the server

# In development (with Poetry)
poetry run qat_server

# Or directly via Python module
poetry run python -m qat_rpc.zmq.server

# After pip install (system-wide)
qat_server

The server is configured through environment variables:

Variable Description Default
RECEIVER_PORT ZMQ server port 5556
METRICS_PORT Prometheus exporter port 9250
QAT_CONFIG_PATH Path to QAT config file None - runs in echo mode
ENABLE_COMPILE_ENDPOINT Enable compile/execute endpoints true

Using the client

from qat_rpc.zmq import ZMQClient

client = ZMQClient()

# Compile and execute a program
results = client.execute_task(program, config)

# Or compile and execute separately
compiled = client.compile_program(program, config)
results = client.execute_compiled(compiled["package"], config)

# Query hardware information
version = client.api_version()
couplings = client.qpu_couplings()

CLI

# In development (with Poetry)
poetry run qat_comexe path/to/program.qasm --config '{"repeats": 100}'

# After pip install
qat_comexe path/to/program.qasm --config '{"repeats": 100}'

# QIR text or binary bitcode
poetry run qat_comexe path/to/program.ll
poetry run qat_comexe path/to/program.bc

# Pass a program string directly
poetry run qat_comexe "OPENQASM 2.0; ..." --host 192.168.1.10 --port 5556

Installation

We use Poetry for dependency management and require Python 3.10+.

poetry install

Development

Running checks

All checks are managed via Poe the Poet:

# Run all checks (format, lint, types, deps, licenses, vuln, test)
poetry run poe checks

# Individual tasks
poetry run poe format    # check formatting
poetry run poe lint      # ruff linting
poetry run poe types     # pyright type checking
poetry run poe test      # run tests
poetry run poe deps      # deptry + import-linter
poetry run poe vuln      # bandit + pip-audit

# Auto-fix formatting and lint issues
poetry run poe fix

Contributing

To take the first steps towards contributing to QAT-RPC, visit our contribution documents, which provides details about our process.

We also encourage new contributors to familiarise themselves with the code of conduct and to adhere to these expectations.

Assistance

For support, please reach out in the discussions tab of this repository or file an issue.

Licence

This code in this repository is licensed under the BSD 3-Clause Licence. Please see LICENSE for more information.

Feedback

Please let us know your feedback and any suggestions by reaching out in Discussions. Additionally, to report any concerns or code of conduct violations please use this form.

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

qat_rpc-1.0.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qat_rpc-1.0.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file qat_rpc-1.0.0.tar.gz.

File metadata

  • Download URL: qat_rpc-1.0.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qat_rpc-1.0.0.tar.gz
Algorithm Hash digest
SHA256 aefeaa1941f942c9637505b55567439a6d47007b1a00e36b448fe2b2296dfec5
MD5 9b42c5c0fd2e8574b5f32ab41500eaa6
BLAKE2b-256 c48ef8501e11327d704cd930472170b09540afa7ebdfafb675a714c126002f67

See more details on using hashes here.

Provenance

The following attestation bundles were made for qat_rpc-1.0.0.tar.gz:

Publisher: publish.yml on oqc-community/qat-rpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qat_rpc-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: qat_rpc-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qat_rpc-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b3f0f25e06ccd84285a684615be4808e5f671d1d442bfc9fa1422b32c381a95
MD5 b6589adccd569d2654fdd89f44a8bc06
BLAKE2b-256 7557b625b22bccf3a0d0211996f9a48397da354d9fdd0f40536f14e9cf00d465

See more details on using hashes here.

Provenance

The following attestation bundles were made for qat_rpc-1.0.0-py3-none-any.whl:

Publisher: publish.yml on oqc-community/qat-rpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page