What is QPHAROS?
Production-ready quantum computing for pharmaceutical R&D, built on BioQL so scientists can tap IBM Quantum hardware without deep quantum expertise.
QPHAROS (Quantum Pharmaceutical Optimization System) delivers an opinionated, fully managed workflow for molecular docking, ADMET prediction, and de novo design. Every pipeline is tuned for real quantum devices and ships with validated reference datasets.
Researchers receive a consistent API surface, automated error correction, and preconfigured backends so they can move from hypothesis to quantum execution in minutes.
from qpharos.simple import quick_dock
# Dock berberine to GLP1R on IBM Torino
affinity = quick_dock(
'COc1ccc2cc3[n+](cc2c1OC)CCc1cc2c(cc1-3)OCO2',
'6B3J'
)
print(f"Binding Affinity: {affinity:.2f} kcal/mol")
5-Layer Quantum Architecture
A layered pipeline that encodes molecules, entangles ligand-receptor states, explores conformers, scores binding energy, and stabilizes results with quantum error correction.
Quantum Feature Encoding
Encodes molecular structures (SMILES, PDB) into quantum states preserving chemical information
Quantum Entanglement Mapping
Creates entangled states between ligand and receptor to model molecular interactions
Quantum Conformational Search
Explores conformational space using QAOA to find energetically favorable poses
Quantum Scoring Function
Calculates binding affinity using VQE and thermodynamic formulas (Ki, IC50)
Quantum Error Correction
Validates results using Surface Code QEC for reliable measurements on noisy hardware
4 Ways to Work with QPHAROS
A single codebase that scales from quick experiments to enterprise-grade orchestration and research customization.
Simple API
For beginners and chemists who need instant docking results.
Use when: You want one-line quantum docking without configuring backends.
from qpharos.simple import quick_dock
affinity = quick_dock('CCO', '6B3J')
# Returns: -6.2 kcal/mol
- 3-line workflows
- Automatic backend selection
- Pre-configured QEC
Functional API
For researchers who need full control over parameters.
Use when: You want to customize docking, backends, and ADMET settings.
from qpharos import dock
result = dock(
ligand='CCO',
receptor='6B3J',
backend='ibm_torino',
shots=2000,
qec=True
)
- Full parameter control
- Rich result objects
- Integrates with pipelines
OOP Engine
For engineering teams orchestrating production workloads.
Use when: You need session management, caching, and reusable workflows.
from qpharos import QPHAROSAnalyzer
engine = QPHAROSAnalyzer(config)
result = engine.full_pipeline('CCO', '6B3J')
engine.save_report('results.json')
- Persistent sessions
- Batch processing
- Automated reporting
Layer-by-Layer
For quantum experts customizing each QPHAROS layer.
Use when: You need research-grade control over encoding, entanglement, QAOA, and QEC.
from qpharos.layers import *
encoder = QuantumFeatureEncoder(backend)
ligand = encoder.encode_molecule('CCO')
scorer = QuantumScoringFunction(backend)
affinity = scorer.calculate_binding_affinity()
- Swap algorithms per layer
- Tune QAOA/VQE circuits
- Advanced QEC controls
Installation & First Run
Install the PyPI package, authenticate with your BioQL API key, and launch your first quantum docking workflow in minutes.
Install QPHAROS
pip install qpharos
export BIOQL_API_KEY='your_key_here'
python -c "import qpharos; print(qpharos.__version__)"
# Output: 1.1.0
Get your API key:
Sign up at bioql.bio/signup to get your free API key.
Quick Start
from qpharos.simple import test_molecule
# Dock berberine to GLP1R receptor
berberina = 'COc1ccc2cc3[n+](cc2c1OC)CCc1cc2c(cc1-3)OCO2'
result = test_molecule(berberina, '6B3J')
print(f"Affinity: {result['affinity']} kcal/mol")
print(f"Ki: {result['ki_nM']} nM")
print(f"Drug-like: {result['drug_like']}")
print(f"QED Score: {result['qed_score']}")
print(f"✅ {result['recommendation']}")
# Output:
# Affinity: -8.4 kcal/mol
# Ki: 0.67 nM
# Drug-like: True
# QED Score: 0.78
# ✅ Excellent candidate - ready for further testing
Running on Real Quantum Hardware:
This code executes on IBM Torino (133 qubits) with quantum error correction enabled by default!
Code Recipes for Every Schema
Copy‑ready demos that highlight how each abstraction layer works, from quick docking helpers to full quantum pipeline customization.
Molecular Docking (Simple)
Calculate binding affinity between a ligand and receptor
from qpharos.simple import quick_dock
# Dock aspirin to COX-2 receptor
affinity = quick_dock(
'CC(=O)Oc1ccccc1C(=O)O', # Aspirin SMILES
'1CVU' # COX-2 PDB ID
)
print(f"Binding Affinity: {affinity:.2f} kcal/mol")
# Runs on IBM Torino with 2000 shots and QEC
Custom Parameters (Functional)
Full control over quantum backend, shots, and QEC
from qpharos import dock, predict_admet
import os
api_key = os.getenv('BIOQL_API_KEY')
# Docking with custom parameters
result = dock(
ligand='CC(=O)Oc1ccccc1C(=O)O',
receptor='1CVU',
api_key=api_key,
backend='ibm_torino', # 133 qubits
shots=5000, # More shots = better accuracy
qec=True # Quantum error correction
)
print(f"Binding Affinity: {result.binding_affinity:.2f} kcal/mol")
print(f"Ki: {result.ki:.2f} nM")
print(f"IC50: {result.ic50:.2f} nM")
# ADMET prediction
admet = predict_admet(
smiles='CC(=O)Oc1ccccc1C(=O)O',
api_key=api_key,
backend='ibm_torino',
shots=1500
)
print(f"Lipinski Pass: {admet.lipinski_pass}")
print(f"QED Score: {admet.qed_score:.2f}")
print(f"BBB Permeability: {admet.bbb_permeability}")
Production Pipeline (OOP)
Build production workflows with session tracking and reports
from qpharos import QPHAROSAnalyzer, QPHAROSConfig
import os
# Configure analyzer
config = QPHAROSConfig(
backend='ibm_torino',
shots=2000,
api_key=os.getenv('BIOQL_API_KEY'),
qec_enabled=True
)
# Create analyzer with session management
analyzer = QPHAROSAnalyzer(config)
# Screen compound library
ligands = [
'CCO', # Ethanol
'CC(=O)Oc1ccccc1C(=O)O', # Aspirin
'CN1C=NC2=C1C(=O)N(C(=O)N2C)C' # Caffeine
]
hits = analyzer.screen(
ligands=ligands,
receptor='6B3J',
affinity_threshold=-7.0 # Only strong binders
)
print(f"Screened {len(ligands)} compounds")
print(f"Found {len(hits)} hits")
# Full pipeline for best hit
if hits:
result = analyzer.full_pipeline(hits[0].ligand_smiles, '6B3J')
print(f"Best hit recommendation: {result['recommendation']}")
# Generate reports
analyzer.save_report('screening_results.json', format='json')
analyzer.save_report('screening_results.txt', format='text')
# Session summary
summary = analyzer.get_session_summary()
print(f"Session ID: {summary['session_id']}")
print(f"Total analyses: {summary['total_analyses']}")
Quantum Expert Mode (Layer-by-Layer)
Direct access to all 5 quantum layers for research
from qpharos.layers import (
QuantumFeatureEncoder,
QuantumEntanglementMapper,
QuantumConformationalSearch,
QuantumScoringFunction,
QuantumErrorCorrection
)
from qpharos.core import quantum_backend
import os
# Initialize quantum backend
backend = quantum_backend.QuantumBackend(
backend_name='ibm_torino',
shots=2000,
api_key=os.getenv('BIOQL_API_KEY')
)
print("Running 5-Layer QPHAROS Architecture...")
# Layer 1: Quantum Feature Encoding
encoder = QuantumFeatureEncoder(backend)
ligand_encoded = encoder.encode_molecule('CCO')
receptor_encoded = encoder.encode_protein('6B3J')
print(f"Layer 1: Ligand qubits = {ligand_encoded.n_qubits}")
# Layer 2: Quantum Entanglement Mapping
mapper = QuantumEntanglementMapper(backend)
entangled_state = mapper.create_entanglement(ligand_encoded, receptor_encoded)
print(f"Layer 2: Circuit depth = {entangled_state.circuit_depth}")
# Layer 3: Quantum Conformational Search (QAOA)
search = QuantumConformationalSearch(backend)
conformers = search.find_conformers(entangled_state, n_conformers=5)
print(f"Layer 3: Found {len(conformers)} conformers")
# Layer 4: Quantum Scoring Function (VQE)
scorer = QuantumScoringFunction(backend)
affinity = scorer.calculate_binding_affinity(conformers[0])
print(f"Layer 4: Binding Affinity = {affinity:.2f} kcal/mol")
# Layer 5: Quantum Error Correction
qec = QuantumErrorCorrection(backend, code_type='surface_code')
corrected_affinity = qec.correct_measurement(affinity)
print(f"Layer 5: QEC Corrected = {corrected_affinity:.2f} kcal/mol")
print(f"Error margin: {abs(corrected_affinity - affinity):.4f} kcal/mol")
Why Teams Choose QPHAROS
Designed for regulated pharma workflows with built-in quantum error correction, device orchestration, and open-source transparency.
Production Ready
Published on PyPI, tested on real quantum hardware, ready for pharmaceutical R&D
For All Expertise Levels
4 schemas from beginners to quantum experts - everyone can use quantum computing
Quantum Error Correction
Surface Code QEC built-in for reliable results on noisy quantum hardware
Real Quantum Hardware
Runs on IBM Torino (133 qubits), IonQ Aria, and AWS Braket devices
Validated Results
Tested on real pharmaceutical targets with published validation data
Open Source
Apache 2.0 license, transparent implementation, community-driven development
Use QPHAROS in VS Code
The BioQL Agent v7.0.4 can generate QPHAROS code directly in VS Code!
Type in VS Code Chat:
@bioql Use QPHAROS simple to dock aspirin to COX2
Agent generates:
from qpharos.simple import quick_dock
affinity = quick_dock(
'CC(=O)Oc1ccccc1C(=O)O',
'1CVU'
)
print(f"Affinity: {affinity:.2f} kcal/mol")
Install BioQL Agent:
Download the VS Code extension at bioql.bio/agent
Supported Schemas:
- Simple:
@bioql Use QPHAROS simple... - Functional:
@bioql Use QPHAROS...(default) - OOP:
@bioql Use QPHAROS OOP class... - Layer:
@bioql Use QPHAROS layer expert...
Agent Features:
- Auto-detects SMILES and PDB codes
- Configures backend (IBM, IonQ, AWS)
- Sets optimal shots for accuracy
- Enables QEC by default
- Generates production-ready code
Resources & Documentation
Everything you need to deploy, extend, and support QPHAROS across your discovery organization.
Ready to Start?
Install QPHAROS and run your first quantum drug discovery in minutes