Quantum Portfolio Optimization on a Real IBM Quantum Computer

Dr. Muhammad Faryad

Tier-2 IBM Qiskit Advocate

Most QAOA tutorials stop at the simulator. That’s where the failures hide.

In this self-paced workshop you build the complete pipeline, from real Yahoo Finance data to a QUBO, an Ising Hamiltonian and QAOA in Qiskit 2.x, then run it on a real IBM quantum computer with nothing more than the free IBM Quantum Open Plan. Every result is checked against the exact classical optimum.

What happened when we ran it

• On IBM’s 156-qubit ibm_fez, the valid portfolio the quantum computer returned most often was the true optimum, and its top four picks matched the exact top four, in order.

• The full hardware run took 11 jobs on a free account.

• With 10 stocks on the simulator, QAOA’s five most frequent valid portfolios were the exact top five, in order.

No hype. At 6–10 stocks a laptop finds the exact answer in milliseconds, and the first notebook shows it. You’re here to master the pipeline and the hardware engineering that will decide whether quantum optimization ever pays off. Not for you if you want trading signals or a quantum-advantage story.

Do I need a paid IBM account? No. Everything runs on the free Open Plan.

Current Discount: 70% off with code Develop.

What you’ll learn

Go from a stock list to a verified quantum result, and become the person your team trusts to judge quantum-optimization claims.

  • Cast Markowitz portfolio selection (return vs. risk, fixed budget) as a QUBO

  • Calibrate the budget penalty so the optimum stays feasible without drowning the signal

  • Map the QUBO to an Ising Hamiltonian and verify it on every possible portfolio

  • Derive the ansatz from the adiabatic theorem via Trotterization

  • See how each covariance entry becomes a two-qubit CNOT–Rz–CNOT block

  • Map the full (γ, β) landscape at p = 1 and learn why grid resolution matters

  • Build the circuit with qaoa_ansatz and estimate energies with EstimatorV2 on the Aer simulator

  • Train with Powell from an adiabatic linear-ramp start, and see why L-BFGS-B fails silently on noisy estimates

  • Decode bitstrings into named portfolios and report honest metrics against the right baseline

  • Transpile for a real IBM processor (ibm_fez in the workshop run) and read the error budget before spending quantum time

  • Switch to SamplerV2, CVaR and a batched pattern search that counts jobs, not iterations

  • Verify your hardware result against the exact optimum and the noiseless simulator, for 6 stocks of your choice

Workshop agenda

  • 1 · The problem, classically (20 min)

    Pull a year of Yahoo Finance prices for 10 US stocks, from Nvidia to Walmart, build returns and covariances, and solve the problem exactly so every quantum result has a ground truth.

  • 2 · Quantum computing and Qiskit, fast (30 min)

    Gates, circuits, measurement and the Qiskit primitives: exactly what the rest of the workshop needs.

  • 3 · From QUBO to the Ising Hamiltonian (25 min)

    Turn the cost function into a Hamiltonian whose lowest-energy state is the best portfolio, and verify the mapping exactly.

  • 4 · QAOA mechanics (25 min)

    From the adiabatic theorem to alternating cost and mixer layers, and the full (γ, β) landscape.

  • 5 · Hands-on: 10 stocks on the simulator (25 min)

    Implement QAOA in Qiskit through checkpoints 1–5 on the Aer simulator. Each checkpoint ends in a working state, so you can stop and resume anywhere.

  • 6 · Hands-on: 6 stocks on IBM hardware (15 min)

    Checkpoint 6: the batched optimizer, CVaR and the honest hardware benchmark against the exact optimum and the noiseless simulator.

  • What you take home

    Four Jupyter notebooks (market data and exact optimum, Qiskit primitives, QAOA on 10 stocks with Aer, QAOA on 6 stocks on IBM hardware via the free Open Plan) and the full PDF slides.

Learn directly from Muhammad

Dr. Muhammad Faryad

Dr. Muhammad Faryad

Associate Professor of Physics, LUMS · Tier-2 IBM Qiskit Advocate

Abdus Salam International Centre for Theoretical Physics
Penn State College of Engineering
Qiskit
LUMS
See all products from Dr. Muhammad Faryad

Who this workshop is for

  • ML or data engineers in finance asked to evaluate quantum optimization. You know Python and ML; you don’t need any quantum background.

  • Quants, risk managers and CTOs who need to judge vendor claims. You’ll see what today’s hardware can and can’t do, with numbers.

  • Physicists, QC researchers and grad students who want a complete hardware project. End to end, honestly benchmarked.

What's included

Slides, Jupyter notebooks and recording

Everything is available the moment you enroll: the full workshop recording, all four Jupyter notebooks and the complete PDF slides.

Lifetime access

Rewatch the lessons and rerun the notebooks whenever Qiskit or your data changes.

Community of peers

Stay accountable and share insights with like-minded professionals.

Certificate of completion

Share your new skills with your employer or on LinkedIn.

Maven Guarantee

Your purchase is backed by the Maven Guarantee.

Free resources

What the simulator won’t teach you (and this workshop will)

1. Shot noise breaks gradient optimizers silently. On noisy estimates, L-BFGS-B can report success and hand back its starting point. You’ll learn why, and use derivative-free methods that hold up.

2. The average energy is the wrong target on hardware. You’ll optimize CVaR, the average over the best 25% of shots, where the signal survives the noise.

3. Hardware changes the architecture. A sequential optimizer means one queued job per step. You’ll use a batched pattern search that packs up to 10 candidate settings into a single job, so the whole hardware run fits in 11 jobs.

Real hardware run on IBM’s 156-qubit ibm_fez, free Open Plan

Blue: optimizer progress, one point per hardware job. Orange: same parameters, no noise.

The 6-stock problem on the simulator vs. the exact answer

Left: QAOA’s 5 most frequent portfolios. Right: the exact top 5. On ibm_fez, #1 was the optimum.

The full (γ, β) landscape for 10 stocks, computed exactly

One QAOA layer (p = 1). The red star marks the best setting.

Real data: covariance of 10 US stocks from Yahoo Finance

Each entry becomes a coupling between two qubits.

What learners say

“Overall, the workshop offered a technically rigorous and realistic view of the current scope of quantum optimization rather than presenting quantum advantage as an assumption.” — Shahid, Student, KAUST

“The session was comprehensive, self-contained, and truly worthwhile. … For anyone interested in Quantum Optimization, this session is highly recommended.” — Faisal, Assistant Professor, Habib University

“The session was highly practical and delivered the theoretical foundations necessary to understand and apply quantum optimization techniques effectively.” — Marcio, Technical Project Manager, Genesis Consulting

Frequently asked questions

Maven for Teams

Reimbursement

Get your company to pay

Everything L&D needs: email template, receipts, and certificate of completion.

Get reimbursed

Team discount

Learn with your teammates

Save 20%+ when 2 or more teammates enroll in the same cohort.

Save 20%+ with a team

Private cohort

Run a cohort for your org

A dedicated cohort with a custom schedule and curriculum, tailored to your team.

Book a private cohort

$200

USD

·Self-paced
Enroll