A Python project for working with the QuantumRings quantum computing platform.
This project uses uv for dependency management and virtual environment creation. uv can be installed via brew or other package managers.
# Create and activate virtual environment
uv venv
source .venv/bin/activate
uv manages dependencies based on pyproject.toml
and .python-version
. Key commands:
# Add a new dependency
uv add <package>
# Remove a dependency
uv remove <package>
# Update lock file (uv run/sync does this too)
uv lock
# Run a Python script
uv run <script.py>
# List installed packages
uv pip list
For more uv commands and options, see the uv CLI Reference.
Create a .env
file with your QuantumRings credentials:
cp .env.example .env
# Edit .env with your credentials:
[email protected]
# note: default is 128 qubits, 200 is bonus
TOKEN_128=your-rings-128-token
TOKEN_200=your-rings-200-token
Currently, this project provides helper utilities for the QR api and visualization for the Quantum Computers.
- The
utils
folder containers helper functions for connecting to the QuantumRings platform- the api file can be ran directly to view full info about a QR computer
- the
def get_provider_and_backend(num_qubits: int = 128) -> tuple[object, object]:
function can be imported also
- The
visuals
folder is for generating graphs of the coupling map amongst qubits on the QuantumRings computers- see
images
output folder
- see
More features and examples coming soon.
from utils.api import get_provider_and_backend
# default is 128 qubits for this optional arg; can specify 128 or 200 qubits
provider, backend = get_provider_and_backend(num_qubits=128)