Q-Cure: Quantum-Powered Drug Interaction Predictor

🌟 Inspiration

In modern healthcare, polypharmacy — the use of multiple drugs by a single patient — is both common and dangerous. Drug–drug interactions (DDIs) can cause serious adverse effects, leading to hospitalizations or worse.

While classical tools exist to evaluate DDIs, they often require massive datasets or fail to detect nuanced chemical similarities.

I wanted to explore whether quantum computing could enhance pharmacological predictions by simulating molecular state similarities in a fundamentally different way — through quantum fidelity.

Thus, Q-Cure was born — a quantum-powered tool to help predict potential drug interactions based on their encoded quantum representations.


🧪 What it does

Q-Cure lets users input any two drug molecules via:

  • Their SMILES representation, or
  • Common drug names (like “Aspirin”, “Ibuprofen”)

Then, it:

  1. Extracts molecular features using RDKit
  2. Encodes those features into a quantum circuit using Qiskit’s ZZFeatureMap
  3. Simulates each quantum state using the Qiskit AerSimulator
  4. Computes the quantum fidelity ( F(\psi, \phi) = |\langle \psi | \phi \rangle|^2 )
  5. Interprets the similarity as a risk level:
    • 🔴 High Risk
    • 🟠 Moderate Risk
    • 🟢 Low or No Risk

It also shows molecule images, works on Streamlit Cloud, and optionally runs on IBM Quantum hardware.


🔧 How we built it

The tech stack:

  • RDKit: Extract molecular descriptors (MolWt, LogP, H-bond donors/acceptors)
  • Qiskit: Encode these features into quantum circuits via ZZFeatureMap
  • Qiskit Aer: Simulate quantum statevectors
  • PubChem API: Fetch SMILES from common drug names
  • Streamlit: Build a clean, interactive frontend
  • IBMQ: Optional real quantum backend via user token
  • Pillow + matplotlib: For visualization

Structure:

  • Modular Python backend (molecule_utils.py, quantum_encoder.py, etc.)
  • CLI test runner (test_qcure.py)
  • streamlit_app.py frontend with toggles for classical/quantum modes
  • benchmark.py to compare quantum vs classical performance

🚧 Challenges we ran into

  • RDKit + PIL compatibility on Streamlit Cloud caused image rendering issues
  • Ensuring quantum fidelity scores remained interpretable across all SMILES inputs
  • Building a fallback when quantum hardware access wasn't available
  • Adapting classical descriptors into a format that fits Qiskit's quantum encoders
  • Debugging Streamlit crashes on remote deployment due to image or SMILES parsing

🏆 Accomplishments that we're proud of

  • Fully working quantum simulation pipeline for drug interaction risk
  • Successful live deployment on Streamlit Cloud
  • Real-world PubChem integration
  • Toggle between quantum vs classical scoring
  • Modular, testable code with professional README.md, .env, .gitignore, and even a PROJECT_STATUS.md
  • One of the few projects combining real chemistry + quantum circuits + live web UI

📚 What we learned

  • Hands-on Qiskit: encoding, statevector simulation, and fidelity
  • Feature engineering for molecular similarity
  • Real-world chemistry via SMILES and RDKit
  • Streamlit app design and deployment best practices
  • Handling quantum computing limitations (e.g., qubit limits, hardware access)
  • How to bridge classical pharmacology and quantum ML

🚀 What's next for Q-Cure

The current Q-Cure prototype focuses on pairwise drug interactions. In future updates, we plan to:

  • Support multi-drug interaction modeling
  • Integrate quantum SVMs (QSVM) for more advanced risk classification
  • Add more descriptors: polar surface area, rotatable bonds, ring structures
  • Train and fine-tune a hybrid quantum-classical drug safety model
  • Add side-effect prediction layers from real-world datasets
  • Create a mobile or API-first version of the tool

Q-Cure isn’t just a demo — it's a step toward quantum-enhanced, patient-safe pharmacology.


Thank you for the opportunity to build something meaningful with quantum computing!

Built With

  • api
  • cloud
  • conda
  • github
  • ibm
  • matplotlib
  • numpy
  • pillow
  • pubchem
  • python
  • qiskit
  • quantum
  • rdkit
  • streamlit
  • vscode
Share this project:

Updates

Submission history