Gamma: Hybrid Quantum Optimization for Resilient Insurance Portfolios
The Problem
Insurance portfolio optimization is important but difficult and applying standard quantum methods faces significant hurdles:
- Cost & Complexity of Standard Methods: Algorithms like QAOA and VQE, while powerful for certain optimization tasks, are often resource-intensive for insurance portfolios.
- They typically require multiple quantum-classical loops.
- The variational circuits used grow in depth and complexity with the number of assets (N), demanding more capable quantum hardware.
- Discrete vs. Continuous Reality: QAOA/VQE are fundamentally designed for discrete optimization – selecting or not selecting an asset (all-or-nothing). However, real-world insurance strategy is often continuous. Portfolio managers need the flexibility for partial investments or allocations, like:
- Providing partial insurance coverage for homes in a high-risk area (like LA wildfire zones).
- Implementing nuanced coverage plans with varying levels to mitigate specific risks.
This mismatch between the discrete nature of common quantum algorithms and the continuous nature of the insurance problem motivated us to find a better-suited quantum approach.
Our Solution: Gamma
Gamma leverages the Harrow-Hassidim-Lloyd (HHL) algorithm [1], specifically in a novel Hybrid HHL++ framework, to address the continuous nature of insurance portfolio optimization. HHL is designed to solve systems of linear equations Ax=b, which form the mathematical core of many continuous optimization problems.
Why HHL for Insurance?
- Faster: HHL offers the potential for exponential speedup over classical methods for solving linear systems under specific conditions.
- More Quantum Scalable: HHL often requires less qubits than encoding large QUBOs for QAOA/VQE, especially when using hybrid quantum-classical approaches. This allows comparing more assets (larger N) with less quantum compute.
We were interested in the main question: Can we turn the quadratic QUBO into a linear system solvable by HHL? We think yes.
Therefore, Gamma implements the HHL++ algorithm to solve this derived linear system and yields a quantum state representing the optimal continuous portfolio allocation.
How we built it
Gamma employs a Hybrid HHL++ approach implemented in Python using Qiskit, NumPy, SciPy, and Matplotlib.
How the process works:
- Formulate Inputs:
- Construct the modified input matrix
Abased on the initial correlation matrix σ, risk appetite q, and penalty term λ. - Construct the modified desired output vector
bbased on expected returns$\vec{\mu}$, penalty term λ, and budget constraint$B$.
- Construct the modified input matrix
- Convert Output Vector: Prepare the normalized vector
$\vec{b}$as the initial quantum state$\ket{b}$. - Quantum Part (QPE): Perform Quantum Phase Estimation on the matrix
$\mathbf{A}$(via its unitary evolution$e^{i\mathbf{A}t}$) to estimate its eigenvalues, encoding them into the phase register. This uses standard QPE circuits. - Classical Part (Rotation Angle): Crucially, use the eigenvalue information (estimated from QPE or known classically in simulation) to classically compute the appropriate rotation angle
$\theta = f(\lambda_{est})$needed for the eigenvalue inversion step of HHL. This angle depends on the eigenvalue$\lambda$and a scaling constant. - Hybrid Step (Rotate & Measure): Apply a controlled rotation (
RY(θ)) to an ancilla qubit, conditioned on the measured state of the eigenvalue (phase) register. Measure the ancilla qubit. A measurement outcome of '1' indicates a successful run, projecting the system register into a state proportional to the solution$\vec{x} = \mathbf{A}^{-1}\vec{b}$. - Post-Processing: Analyze the measurement statistics (counts), filter for successful runs, reconstruct the solution vector, and calculate fidelity against the classical solution.
Our Pivot: We initially aimed for a standard HHL followed by classical refinement but pivoted to this HHL++ structure due to the complexity and deprecation issues surrounding standalone HHL implementations in Qiskit. Now, our hybrid approach simplifies the quantum part while still demonstrating the core HHL principles and the power of targeted classical intervention.
Gamma vs QAOA/VQE
| Feature | Gamma (Hybrid-HHL++) | QAOA / VQE |
|---|---|---|
| Input type | Linear systems (relaxed) | Discrete combinatorial |
| Solution format | Continuous | Binary |
| Qubit req. | Fewer (no binary encoding) | More (needs encoding) |
| Opt. loop | No (direct inversion) | Yes (variational) |
| Precision | Sensitive to QPE/params | Less sensitive (variational) |
| Quantum Adv. | Exponential (theoretical) | Polynomial (practical) |
A direct application to the challenge:
Gamma's continuous approach offers tangible benefits:
- Allows for partial coverage: Model scenarios where Hartford doesn't fully insure all assets in a category but allocates partial risk coverage (e.g., insuring 60% of potential wildfire losses for a group of LA homes).
- Handles more assets (N): The potential qubit efficiency of HHL++ compared to QAOA/VQE could allow Hartford to analyze larger, more complex portfolios within the limits of available quantum hardware.
Challenges we ran into
- HHL Implementation Hurdles: Qiskit deprecated HHL and so it was a challenge getting it up and running. Also, managing the intricacies of QPE and stable eigenvalue inversion was tricky.
- Conditional Quantum Logic: Implementing the measurement-conditioned rotations accurately.
- QUBO-to-HHL Theory: Ensuring the KKT relaxation accurately captured the essence of the original constrained problem in the linear system format.
Accomplishments that we're proud of
- First (to our knowledge) Hybrid HHL++ Approach for Insurance Optimization: Successfully applied this specific hybrid quantum-classical technique to the challenge.
- End-to-End Workflow: Built and tested the complete pipeline from problem formulation to quantum execution and result analysis.
- Demonstrated QUBO-to-Linear Conversion: Successfully mapped the challenge's native QUBO form to a solvable HHL problem.
- Comparative Benchmarking: Provided context by comparing against classical and QAOA-style approaches.
What we learned
We gained practical experience with the HHL algorithm's structure, its potential, and its implementation challenges. We learned the value of hybrid quantum-classical design patterns for mitigating quantum complexity and the importance of correctly mapping domain problems onto suitable quantum algorithms.
What's next for Gamma
- Real Hardware Execution: Adapt and run Gamma on available quantum processors. For our demo, we only simulated HHL (since we don't have access).
- Testing Scalability: Test what the resource requirements look for larger $N$ in practice.
- Enhance QPE/Fidelity: Implement more advanced QPE techniques / error mitigation.
Citations
[1] Harrow, A. W., Hassidim, A., & Lloyd, S. (2009). Quantum algorithm for linear systems of equations. Physical Review Letters, 103(15), 150502. https://doi.org/10.1103/physrevlett.103.150502
[2] Rebentrost, P., Lloyd, S. Quantum Computational Finance: Quantum Algorithm for Portfolio Optimization. Künstl Intell 38, 327–338 (2024). https://doi.org/10.1007/s13218-024-00870-9
[3] Li, Q., Wu, H., Qian, W., Li, X., Zhu, Q., Yang, S. (2022). Portfolio Optimization Based on Quantum HHL Algorithm. In: Sun, X., Zhang, X., Xia, Z., Bertino, E. (eds) Artificial Intelligence and Security. ICAIS 2022. Lecture Notes in Computer Science, vol 13339. Springer, Cham. https://doi.org/10.1007/978-3-031-06788-4_8
Log in or sign up for Devpost to join the conversation.