Skip to main content

Interactive IBM Quantum backend selector for QHRF experiments

Project description

QHRF Backend Selector

Interactive IBM Quantum backend selector for Quantum Harmonic Resonance Framework (QHRF) experiments and quantum computing research.

Features

  • 🔬 Real-time backend status - See operational status and queue lengths
  • 🖥️ Simulator support - Includes both hardware and simulator backends
  • 📊 Detailed information - Qubits, processor type, connections, and more
  • 🎯 Smart recommendations - Automatic backend scoring and recommendations
  • 🚀 CLI interface - Command-line tool for quick backend selection
  • ⚙️ Easy integration - Simple API for use in your quantum experiments

Installation

pip install qhrf-backend-selector

Quick Start

Interactive Selection

from qhrf_backend_selector import list_and_select_backend, get_backend_details

# Select a backend interactively
service, backend = list_and_select_backend()

if service and backend:
    # Show detailed information
    get_backend_details(backend)
    
    # Use in your experiments
    # Your quantum circuit code here...

Programmatic Selection

from qhrf_backend_selector import recommend_backend, check_authentication
from qiskit_ibm_runtime import QiskitRuntimeService

# Check authentication first
if check_authentication():
    service = QiskitRuntimeService()
    backends = service.backends()
    
    # Get backend recommendations
    from qhrf_backend_selector.selector import _parse_backends
    backend_infos = _parse_backends(backends)
    
    # Recommend best backend for 5+ qubit experiments
    recommended = recommend_backend(backend_infos, min_qubits=5)
    
    if recommended:
        print(f"Recommended: {recommended.name}")

Command Line Interface

# Interactive backend selection
qhrf-backends

# Check authentication
qhrf-backends --check-auth

# Setup authentication
qhrf-backends --setup-auth

Authentication Setup

  1. Go to IBM Quantum
  2. Log in to your account
  3. Copy your API token from Account Settings
  4. Set up authentication:
from qiskit_ibm_runtime import QiskitRuntimeService
QiskitRuntimeService.save_account(token='your_token_here')

API Reference

Core Functions

  • list_and_select_backend() - Interactive backend selection
  • get_backend_details(backend) - Display detailed backend information
  • check_authentication() - Verify IBM Quantum connection
  • setup_authentication() - Authentication setup guide

Utility Functions

  • recommend_backend(backend_infos, min_qubits) - Get backend recommendations
  • get_backend_performance(backend_info) - Calculate performance metrics
  • format_backend_status(backend_info) - Format status display

Example Output

🔬 REAL QUANTUM COMPUTERS:
--------------------------------------------------
 1. ibm_brisbane       127 qubits  🟢 Queue: 12
 2. ibm_kyiv           127 qubits  🟢 Queue: 8  
 3. ibm_sherbrooke     127 qubits  🔴 OFFLINE
 4. ibm_torino         133 qubits  🟢 Queue: 15

🖥️  SIMULATORS:
--------------------------------------------------
 5. simulator_mps       100 qubits  🖥️  Simulator
 6. simulator_statevector 32 qubits  🖥️  Simulator

👆 Select backend (1-6): 2

🎯 Selected: ibm_kyiv
   📊 Qubits: 127
   🔄 Status: Operational
   ⏳ Queue: 8 jobs

Requirements

  • Python 3.8+
  • qiskit-ibm-runtime >= 0.17.0
  • qiskit >= 0.45.0

Development

# Clone repository
git clone https://github.com/yourusername/qhrf-backend-selector.git
cd qhrf-backend-selector

# Install in development mode
pip install -e .[dev]

# Run tests
pytest

# Format code
black src/

# Type checking
mypy src/

License

MIT License - see LICENSE file.

Author

Zach White
Quantum Harmonic Resonance Institute
Email: Xses.Science@gmail.com

Contributing

Contributions welcome! Please read CONTRIBUTING.md for guidelines.

Changelog

1.0.3 (2025-06-30)

  • Initial release
  • Interactive backend selection
  • CLI interface
  • Backend recommendations
  • Comprehensive backend information display

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

qhrf_backend_selector-1.0.3.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

qhrf_backend_selector-1.0.3-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file qhrf_backend_selector-1.0.3.tar.gz.

File metadata

  • Download URL: qhrf_backend_selector-1.0.3.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.5

File hashes

Hashes for qhrf_backend_selector-1.0.3.tar.gz
Algorithm Hash digest
SHA256 7a51c64c8b5c1cc4022ed54f2ad5b50f7c3474773d54838bb7f8edb278c90078
MD5 2eeafe6abe16d1f836906fb7dbd88b96
BLAKE2b-256 ce1575d8543115d614ab207d4156d8c55dae9e43ca589dd25c9096df192b6c7f

See more details on using hashes here.

File details

Details for the file qhrf_backend_selector-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for qhrf_backend_selector-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 acb5046d24ddaf7485d7d61ebf57588606a4ca8f01f23fd0efa7643d96fbd13a
MD5 96331c0b1c53b66d7b130c9215fc2bf3
BLAKE2b-256 cfb33efb4726f027e59a443fe9360f33cf51fd6d64dc27a8d4cd2cde2d7eee76

See more details on using hashes here.

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