• Pharma

Novartis: Quantum Kernel Methods for Genomic Patient Stratification

Novartis

Novartis tested quantum kernel methods for clustering high-dimensional genomic data, applying variational quantum circuits to patient stratification in oncology clinical trial datasets.

Key Outcome
Quantum kernel clustering matched or marginally exceeded classical RBF kernel on one oncology dataset. Results were not consistent across datasets. Novartis published the methodology and identified requirements for hardware advantage over classical simulation.

The Problem

Personalized medicine depends on identifying clinically meaningful patient subgroups from genomic data: single nucleotide polymorphisms (SNPs), gene expression profiles, copy number variations. A single patient sample can yield 10,000 to 500,000 features. Classical clustering algorithms (k-means, hierarchical clustering, Gaussian mixture models) struggle in high-dimensional spaces where distances become increasingly uniform (the curse of dimensionality).

Dimensionality reduction techniques like PCA and UMAP help, but they necessarily discard information. The question Novartis investigated: do quantum feature spaces, accessed via quantum kernel methods, preserve structure that classical kernels miss?

Quantum kernels exploit the exponentially large Hilbert space of a quantum system. A quantum circuit encodes a classical data vector into a quantum state. The kernel between two data points is the inner product between their quantum state representations, a quantity that would be exponentially expensive to compute classically for a large enough circuit. If that Hilbert space happens to capture clinically relevant structure, quantum kernels could outperform classical alternatives.

Dataset and Setup

Novartis applied this to an oncology clinical trial dataset: two cancer subtypes, 100 patients, genomic feature vectors reduced to 500 features via PCA. The goal was to recover the two-subtype structure from the genomic data alone, validated against known clinical labels.

The pipeline:

  1. PCA from 10,000 features to 500 (retaining 85% of variance)
  2. Normalization to [0, pi] for angle encoding
  3. Quantum kernel computation via PennyLane
  4. k-means clustering in kernel-induced feature space
  5. Comparison against classical SVM with RBF kernel and UMAP-based clustering
import numpy as np
import pennylane as qml
from sklearn.preprocessing import MinMaxScaler
from sklearn.decomposition import PCA
from sklearn.cluster import KMeans
from sklearn.metrics import adjusted_rand_score

# Reduce genomic features for quantum encoding
def preprocess_genomic_data(X, n_pca_components=8):
    """
    Reduce high-dimensional genomic feature matrix to n_pca_components
    suitable for angle encoding on n qubits.
    """
    pca = PCA(n_components=n_pca_components)
    X_pca = pca.fit_transform(X)
    scaler = MinMaxScaler(feature_range=(0, np.pi))
    X_scaled = scaler.fit_transform(X_pca)
    return X_scaled, pca, scaler


# Define quantum feature map circuit
n_qubits = 8
dev = qml.device("default.qubit", wires=n_qubits)

def feature_map(x):
    """
    Angle encoding: rotate each qubit by a feature value.
    Followed by entangling layer to create correlations between features.
    """
    for i in range(n_qubits):
        qml.RY(x[i], wires=i)
    for i in range(n_qubits - 1):
        qml.CNOT(wires=[i, i + 1])
    for i in range(n_qubits):
        qml.RZ(x[i], wires=i)

@qml.qnode(dev)
def kernel_circuit(x1, x2):
    """
    Compute quantum kernel between two data points.
    K(x1, x2) = |<phi(x1)|phi(x2)>|^2
    Implemented via the overlap test.
    """
    feature_map(x1)
    qml.adjoint(feature_map)(x2)
    return qml.probs(wires=range(n_qubits))

def quantum_kernel(x1, x2):
    probs = kernel_circuit(x1, x2)
    return float(probs[0])  # probability of measuring all-zeros = overlap

Computing the Kernel Matrix

The kernel matrix K where K[i,j] = quantum_kernel(x_i, x_j) is computed for all patient pairs. This is the most computationally expensive step: O(n^2) circuit evaluations.

def build_kernel_matrix(X):
    """
    Build the full n x n quantum kernel matrix.
    For 100 patients, this is 10,000 kernel evaluations.
    """
    n = len(X)
    K = np.zeros((n, n))
    for i in range(n):
        for j in range(i, n):
            val = quantum_kernel(X[i], X[j])
            K[i, j] = val
            K[j, i] = val  # symmetric
        if i % 10 == 0:
            print(f"Row {i}/{n} complete")
    return K


def cluster_patients(K, n_clusters=2):
    """
    K-means clustering using precomputed kernel matrix.
    The kernel matrix acts as a similarity measure in feature space.
    Uses kernel PCA to extract coordinates, then k-means.
    """
    from sklearn.kernel_approximation import Nystroem
    from sklearn.preprocessing import KernelCenterer

    # Center the kernel matrix
    centerer = KernelCenterer()
    K_centered = centerer.fit_transform(K)

    # Extract top eigenvectors for clustering coordinates
    eigenvalues, eigenvectors = np.linalg.eigh(K_centered)
    idx = np.argsort(eigenvalues)[::-1]
    embedding = eigenvectors[:, idx[:n_clusters]] * np.sqrt(
        np.abs(eigenvalues[idx[:n_clusters]])
    )

    kmeans = KMeans(n_clusters=n_clusters, random_state=42, n_init=20)
    labels = kmeans.fit_predict(embedding)
    return labels

Results

Novartis ran the pipeline on two datasets from an oncology trial. On the first (breast cancer subtypes), quantum kernel clustering achieved an adjusted Rand index of 0.61 against known clinical labels, compared to 0.57 for classical RBF kernel SVM and 0.58 for UMAP plus k-means. The difference was within statistical error given the 100-patient cohort.

On the second dataset (lung cancer), quantum kernel clustering scored 0.48 vs. 0.52 for the classical RBF baseline. The quantum method did not generalize its marginal advantage.

The key finding: the quantum kernel method is not consistently superior. On simulator hardware, it is also roughly 10,000 times slower to compute than classical kernels. Any advantage requires quantum hardware where the kernel evaluation is genuinely faster than classical simulation.

Why This Matters Despite the Null Result

The methodology paper is more valuable than the numerical result. Novartis demonstrated a complete pipeline for applying quantum kernel methods to a real clinical dataset, with proper cross-validation, a realistic baseline comparison, and honest reporting of limitations.

The conditions for quantum advantage are now better understood. A quantum kernel provides advantage when the feature map defines a distribution over quantum states that is hard to sample classically. For angle encoding with moderate circuit depth, that threshold is not reached on 8 qubits.

The Path Forward

Novartis identified three requirements for practically useful quantum genomic analysis:

  1. Inductive bias alignment: the quantum feature map must encode a prior about genomic data structure, not just generic rotation and entanglement
  2. Hardware efficiency: kernel evaluation on actual quantum hardware must be faster than GPU-accelerated classical kernel libraries
  3. Scale: cohort sizes of 1,000+ patients and feature spaces of 20+ qubits are needed for statistical conclusions

Their paper, submitted to npj Quantum Information, outlines a roadmap for revisiting the experiments on fault-tolerant hardware with tailored genomics-specific feature maps.

Learn more: PennyLane Reference