• Pharma

The Climate Corporation Quantum Machine Learning for Crop Yield Prediction

The Climate Corporation (Bayer)

The Climate Corporation researched quantum kernel methods for satellite imagery-based crop yield prediction, encoding multispectral vegetation indices into 8-qubit quantum feature maps and comparing quantum SVM performance against classical RBF kernels.

Key Outcome
Quantum kernel matched classical RBF SVM on test dataset; found no practical advantage at current scale but identified quantum chemistry pathway for fertilizer optimization.

The Problem

Predicting crop yields at field scale before harvest is one of the highest-value problems in precision agriculture. Accurate yield maps allow farmers to optimize input applications (fertilizer, irrigation, pesticide) and allow grain traders to forecast supply. The primary data source is multispectral satellite imagery: indices such as NDVI (normalized difference vegetation index) and NDWI (normalized difference water index) track canopy health over the growing season.

Classical machine learning models (gradient boosted trees, random forests, convolutional neural networks) perform well when trained on large labeled datasets from the same geography and crop type. Generalization across geographies is weaker because the spectral signature of a healthy soybean crop in Iowa differs from one in Brazil. The underlying feature correlations are high-dimensional and nonlinear. Quantum kernel methods theoretically offer an advantage in this setting: quantum feature maps can express kernel functions that are hard to compute classically, potentially capturing correlated spectral patterns more efficiently.

Quantum Kernel Design

The Climate Corporation team used PennyLane with angle encoding to map 8 normalized spectral features into an 8-qubit quantum circuit. Features included NDVI, NDWI, EVI (enhanced vegetation index), SAVI (soil-adjusted vegetation index), and four individual band reflectances (red, near-infrared, shortwave infrared 1, shortwave infrared 2). Each feature was encoded as a rotation angle applied to a single qubit, followed by an entangling layer of CNOT gates in a ring topology.

The quantum kernel K(x, y) between two data points is the squared overlap of their quantum feature states: K(x, y) = |<phi(x)|phi(y)>|^2. This is estimated by preparing both states and measuring their overlap via the SWAP test or by direct state-vector simulation.

import pennylane as qml
import numpy as np
from sklearn.svm import SVC
from sklearn.model_selection import cross_val_score
from sklearn.preprocessing import StandardScaler

# 8 spectral features per field sample
# [NDVI, NDWI, EVI, SAVI, Red, NIR, SWIR1, SWIR2]
n_qubits = 8
n_features = 8

dev = qml.device("qasm_simulator", wires=n_qubits, shots=1024)

def feature_map(x):
    """Angle encoding followed by entangling layer."""
    # Layer 1: encode each feature as RY rotation
    for i in range(n_qubits):
        qml.RY(np.pi * x[i], wires=i)

    # Layer 2: ring entanglement
    for i in range(n_qubits):
        qml.CNOT(wires=[i, (i + 1) % n_qubits])

    # Layer 3: second rotation with cross-feature products
    for i in range(n_qubits):
        qml.RZ(np.pi * x[i] * x[(i + 1) % n_qubits], wires=i)

@qml.qnode(dev)
def kernel_circuit(x1, x2):
    """Compute quantum kernel via adjoint method."""
    feature_map(x1)
    qml.adjoint(feature_map)(x2)
    return qml.probs(wires=range(n_qubits))

def quantum_kernel(x1, x2):
    """Kernel value is probability of measuring all-zeros state."""
    probs = kernel_circuit(x1, x2)
    return float(probs[0])  # <phi(x1)|phi(x2)>^2 estimated by |0><0| overlap

# Build kernel matrix for training set (N x N)
def build_kernel_matrix(X1, X2):
    n1, n2 = len(X1), len(X2)
    K = np.zeros((n1, n2))
    for i in range(n1):
        for j in range(n2):
            K[i, j] = quantum_kernel(X1[i], X2[j])
    return K

# Synthetic dataset: 200 field samples, binary yield class (above/below median)
np.random.seed(42)
X_raw = np.random.rand(200, n_features)
y = (X_raw[:, 0] + 0.5 * X_raw[:, 1] > 0.8).astype(int)  # NDVI-driven label

scaler = StandardScaler()
X = scaler.fit_transform(X_raw)
X_norm = (X - X.min(axis=0)) / (X.max(axis=0) - X.min(axis=0))  # scale to [0, 1]

# Train quantum kernel SVM on subset (kernel matrix computation is expensive)
n_train = 60
X_train, y_train = X_norm[:n_train], y[:n_train]
X_test, y_test = X_norm[n_train:n_train+40], y[n_train:n_train+40]

K_train = build_kernel_matrix(X_train, X_train)
K_test = build_kernel_matrix(X_test, X_train)

qsvm = SVC(kernel="precomputed", C=1.0)
qsvm.fit(K_train, y_train)
q_accuracy = qsvm.score(K_test, y_test)
print(f"Quantum kernel SVM accuracy: {q_accuracy:.3f}")

Cross-Validation Results

The team ran 5-fold cross-validation on 200 field samples from the U.S. Corn Belt, with binary labels indicating above- or below-median yield relative to county averages. The quantum kernel SVM achieved a mean accuracy of 0.74 (std 0.04). The classical RBF kernel SVM with grid-searched gamma and C parameters achieved 0.76 (std 0.03). The difference is within one standard deviation and not statistically significant.

More informative than the accuracy comparison was the runtime: constructing the 200x200 quantum kernel matrix via simulation required roughly 40 minutes on a CPU cluster. A classical RBF kernel matrix over the same data takes milliseconds. Even with quantum hardware, the number of circuit evaluations scales as O(N^2) in the training set size, suggesting that quantum kernel methods will need fundamentally different training algorithms (such as quantum kernel alignment with stochastic sampling) to be practical at the millions-of-samples scale needed for operational yield prediction.

The Fertilizer Optimization Pathway

While the machine learning results were inconclusive, the research identified a more promising quantum application in the same domain: quantum chemistry simulation of nitrogen fixation catalysts. The Haber-Bosch process for industrial fertilizer production is responsible for roughly 2% of global energy consumption. Biological nitrogen fixation by nitrogenase enzymes operates at ambient conditions using an iron-molybdenum cofactor (FeMoco) whose electronic structure is beyond the reach of classical quantum chemistry methods.

Accurately simulating FeMoco (a problem requiring approximately 54 qubits in a fault-tolerant setting, according to published resource estimates) would enable rational design of synthetic catalysts that replicate nitrogenase efficiency. The Climate Corporation flagged this as the highest-priority long-term quantum application in the agricultural value chain, connecting the quantum chemistry work of the pharma and materials sectors to agricultural productivity.

Framework and Infrastructure

PennyLane was selected for its native PyTorch integration, enabling the quantum kernel to be embedded in a differentiable ML pipeline alongside classical preprocessing layers. IBM’s Qasm simulator provided shot-based noise simulation without real hardware access constraints. The team used PennyLane’s qml.kernels module for kernel matrix computation, which handles batching and parallelization automatically in simulation mode.

Learn more: PennyLane Reference | Quantum Kernel Methods | Quantum Neural Networks