Skip to content
Finance Lessons

Quantum Computing for Finance

QUBO and Portfolio Optimization

Recast portfolio selection as a QUBO, solve it with QAOA or quantum annealing, and see where discrete cardinality and lot constraints — not the math — make the quantum detour worth attempting.

18 min Updated Jun 23, 2026

Markowitz handed us a beautiful machine. Feed it expected returns and a covariance matrix, turn the crank, and out comes the portfolio with the least risk for a target return. For the continuous version of that problem — “hold any fraction of each asset” — the machine is genuinely solved: it is a convex quadratic program, and we can crack it in polynomial time before lunch.

Then a portfolio manager walks in and says: “Lovely. But I want to hold exactly 8 names, never a position smaller than 2%, and only in round lots of 100 shares.” And the beautiful convex machine seizes up. Those innocent-sounding requests turn a polynomial-time problem into a combinatorial one — the kind that, in the worst case, is NP-hard.

This lesson is about that phase change, and the bet quantum computing makes on it. We will recast the discrete portfolio problem as a QUBO (Quadratic Unconstrained Binary Optimization), see how a quantum annealer (D-Wave) and QAOA (gate model) attack a QUBO, and — crucially — keep a clear head about whether any of it currently beats a good classical solver. Spoiler from the start: the math is real and elegant; the advantage is, as of today, mostly aspirational.

Why continuous portfolios are easy and discrete ones are hard

Before you read — take a guess

Continuous mean–variance optimization (hold any fraction of each asset) is a convex quadratic program. Adding 'hold exactly k names' does what to its difficulty?

Analogy. The continuous problem is rolling a marble into the bottom of a smooth bowl: wherever you start, gravity slides you to the single lowest point. The discrete problem is finding the lowest valley across a vast mountain range while only being allowed to stand on a finite set of peaks. There is no slope to follow — you must, in principle, check combinations.

Definition — continuous mean–variance. With weights wRnw \in \mathbb{R}^n, expected returns μ\mu, covariance Σ\Sigma, and risk-aversion qq, Markowitz minimizes

minw  qwΣw    μws.t.iwi=1.\min_{w}\; q\, w^{\top}\Sigma\,w \;-\; \mu^{\top} w \quad\text{s.t.}\quad \sum_i w_i = 1.

Because Σ\Sigma is positive semidefinite, the objective is convex and the constraint is linear. Convex quadratic programs are solvable in polynomial time (interior-point methods). This is the “easy” world.

Where it breaks. Real mandates add constraints that are not convex:

  • Cardinality: hold exactly (or at most) kk of the nn names.
  • Minimum lot / position sizes: a holding is either 00 or at least some floor (e.g. at least 2% or at least 100 shares) — a “semi-continuous” variable.
  • Buy-in thresholds / round lots: weights must land on a discrete grid.

Each of these introduces a yes/no decision per asset. With nn assets there are up to 2n2^n on/off combinations, and the feasible region is no longer a single convex blob — it is a scatter of disconnected islands. Branch-and-bound can prune, but the worst case is exponential. This combinatorial core is exactly what QAOA and quantum annealing claim to attack.

Worked example — the explosion. Pick the best 5 names out of 30 by brute force: (305)=142,506\binom{30}{5} = 142{,}506 portfolios — trivial. Now best 15 out of 100: (10015)2.5×1017\binom{100}{15} \approx 2.5 \times 10^{17}. At a billion evaluations per second that is roughly 8 years of compute for one rebalance. The continuous version of the same 100-asset problem solves in milliseconds. The discreteness, not the size, is the enemy.

Warning:

The convexity cliff

It is tempting to “just round” the continuous solution to satisfy a cardinality limit — solve the smooth problem, then keep the 8 biggest weights. This is fast but provably suboptimal: the best 8-name portfolio is frequently not the 8 largest weights of the 30-name solution, because dropping names reshuffles the optimal mix among those that remain. Rounding gives you an answer, not the answer.

When to use it

Stay in the continuous convex world whenever you legitimately can — if the only “discrete” constraint is soft (a preference, not a hard rule), encode it as a penalty in a convex solver and move on. Reach for combinatorial machinery (and only then consider quantum) when the discreteness is a hard, binding business constraint: a fixed name count, a regulatory lot size, a minimum ticket that can’t be fractioned.

State the phase change in one line.

Pick the right option for each blank, then check.

Mean–variance optimization is a convex in the continuous case, but a cardinality or minimum-lot constraint makes it combinatorial and NP-hard.

QUBO: minimize x-transpose Q x over binary x

Before you read — take a guess

A QUBO minimizes x^T Q x over x in {0,1}^n. Since x_i is binary, x_i squared equals x_i. What does that let you fold into the diagonal of Q?

Analogy. A QUBO is a set of light switches (one per asset, each on or off) wired together so that every pair of switches has a reward or penalty for being on together, and each switch has its own solo reward for being on. You are hunting for the switch configuration with the lowest total “energy.” That is the whole model — pairs plus singles, nothing else.

Definition. A QUBO is

minx{0,1}n  xQx  =  minx  iQiixi  +  i<jQijxixj,\min_{x \in \{0,1\}^n}\; x^{\top} Q\, x \;=\; \min_{x}\; \sum_{i} Q_{ii}\, x_i \;+\; \sum_{i < j} Q_{ij}\, x_i x_j,

where QQ is an n×nn \times n matrix and we used xi2=xix_i^2 = x_i to merge linear terms into the diagonal. “Unconstrained” means there are no separate equality/inequality constraints — every preference and rule must be baked into QQ, usually as a quadratic penalty.

Mapping mean–variance + cardinality onto a QUBO. Let xi=1x_i = 1 if we hold asset ii (equal-weight the chosen names for simplicity). We want three things:

  1. Reward expected return — a linear term μixi-\mu_i x_i (negative because we minimize). Fold it into the diagonal: it lowers QiiQ_{ii}.
  2. Penalize risk — a quadratic term qσijxixjq\,\sigma_{ij} x_i x_j from the covariance. On-diagonal it adds variance; off-diagonal it adds covariance.
  3. Enforce the cardinality “choose exactly kk” with a penalty λ(ixik)2\lambda\big(\sum_i x_i - k\big)^2 for a large weight λ\lambda. This is zero when exactly kk switches are on and strictly positive otherwise.

Expanding the penalty is the key trick:

λ(ixik)2=λ(ixi2+2 ⁣ ⁣i<j ⁣xixj2k ⁣ixi+k2),\lambda\Big(\textstyle\sum_i x_i - k\Big)^2 = \lambda\Big(\sum_i x_i^2 + 2\!\!\sum_{i<j}\! x_i x_j - 2k\!\sum_i x_i + k^2\Big),

and using xi2=xix_i^2 = x_i this contributes λ(12k)\lambda(1 - 2k) to each diagonal QiiQ_{ii} and 2λ2\lambda to each off-diagonal pair QijQ_{ij} (the λk2\lambda k^2 is a constant offset that does not change which xx is best).

Worked example — a 3-asset QUBO. Three assets, choose exactly k=2k = 2. Take risk-aversion q=1q = 1, penalty λ=5\lambda = 5, and these (toy) numbers:

AssetExpected return μi\mu_iVariance σii\sigma_{ii}
A0.100.04
B0.080.02
C0.060.01

Pairwise covariances: σAB=0.01, σAC=0.00, σBC=0.005\sigma_{AB}=0.01,\ \sigma_{AC}=0.00,\ \sigma_{BC}=0.005.

Build QQ term by term. Diagonal Qii=μi+qσii+λ(12k)Q_{ii} = -\mu_i + q\,\sigma_{ii} + \lambda(1 - 2k). With k=2k=2, λ(12k)=5(14)=15\lambda(1-2k) = 5(1-4) = -15:

  • QAA=0.10+0.0415=15.06Q_{AA} = -0.10 + 0.04 - 15 = -15.06
  • QBB=0.08+0.0215=15.06Q_{BB} = -0.08 + 0.02 - 15 = -15.06
  • QCC=0.06+0.0115=15.05Q_{CC} = -0.06 + 0.01 - 15 = -15.05

Off-diagonal Qij=2qσij+2λQ_{ij} = 2q\,\sigma_{ij} + 2\lambda. With 2λ=102\lambda = 10:

  • QAB=2(0.01)+10=10.02Q_{AB} = 2(0.01) + 10 = 10.02
  • QAC=2(0.00)+10=10.00Q_{AC} = 2(0.00) + 10 = 10.00
  • QBC=2(0.005)+10=10.01Q_{BC} = 2(0.005) + 10 = 10.01

Now evaluate the energy E(x)=xQxE(x) = x^{\top} Q x for two candidate selections (the λk2=20\lambda k^2 = 20 constant is the same for every xx, so we drop it and compare relative energies). Energy = sum of diagonal entries of chosen assets + the off-diagonal term of each chosen pair.

Candidate 1 — pick A and B (x=(1,1,0)x = (1,1,0)), which meets the constraint (2 names):

EAB=QAA+QBB+QAB=15.0615.06+10.02=20.10.E_{AB} = Q_{AA} + Q_{BB} + Q_{AB} = -15.06 - 15.06 + 10.02 = -20.10.

Candidate 2 — pick A only (x=(1,0,0)x = (1,0,0)), which violates the constraint (1 name):

EA=QAA=15.06.E_{A} = Q_{AA} = -15.06.

The valid two-name portfolio has the lower (better) energy, 20.1015.06-20.10 \le -15.06 — the penalty did its job: under-filling leaves a big chunk of the 15-15 diagonal rewards unclaimed. For completeness, the three valid pairs:

SelectionEnergy xQxx^\top Q x (offset dropped)Constraint
A, B15.0615.06+10.02=20.10-15.06 - 15.06 + 10.02 = -20.10met (k = 2)
A, C15.0615.05+10.00=20.11-15.06 - 15.05 + 10.00 = -20.11met (k = 2)
B, C15.0615.05+10.01=20.10-15.06 - 15.05 + 10.01 = -20.10met (k = 2)
A only15.06-15.06violated

The optimum here is A + C at 20.11-20.11 — it grabs the two best return/risk diagonals while paying the lowest pairwise penalty (their covariance is zero). Notice how close the valid energies are: real QUBOs have a rugged landscape where the best and second-best differ by a hair, which is exactly what makes the search hard.

Warning:

Tuning lambda is the whole ballgame

The penalty weight λ\lambda must be large enough that violating the constraint always costs more than any return you could gain by cheating — but not so large it swamps the return/risk signal in floating-point noise and flattens the landscape. Too small and the “optimum” quietly breaks your cardinality rule; too large and the solver can’t tell good valid portfolios apart. Setting λ\lambda is a real engineering chore, not a footnote.

When to use it

Reach for a QUBO formulation when your problem is natively about on/off decisions with pairwise interactions — asset in-or-out, edge in-or-out, bit set-or-not — and when your constraints can be written as quadratic penalties. If your variables are genuinely continuous (fractional weights), forcing them into QUBO via binary expansion (one bit per 0.1% of weight) bloats the variable count and is usually a step backward.

Pick a term, then click its definition.

The Ising equivalence

Before you read — take a guess

Quantum annealers natively minimize an Ising energy with spins s_i in {-1, +1}, not binary x_i in {0, 1}. What converts one to the other?

A QUBO over xi{0,1}x_i \in \{0,1\} and an Ising model over spins si{1,+1}s_i \in \{-1,+1\} are the same optimization in different clothing. Substitute xi=(1+si)/2x_i = (1 + s_i)/2 and any QUBO becomes an Ising Hamiltonian

H(s)=i<jJijsisj  +  ihisi  +  const,H(s) = \sum_{i<j} J_{ij}\, s_i s_j \;+\; \sum_i h_i\, s_i \;+\; \text{const},

where JijJ_{ij} are coupling strengths and hih_i are local fields, both linear functions of the original QQ. This single line matters because quantum annealers minimize Ising energies natively — the hardware is a programmable spin glass. So “solve my portfolio QUBO” becomes “set these couplers and fields, then let the physics relax to the ground state.” Keep the equivalence in your pocket; the rest of the lesson uses QUBO and Ising interchangeably.

Name the bridge between the two formulations.

Pick the right option for each blank, then check.

The substitution x_i = (1 + s_i) / 2 converts a QUBO (binary 0/1) into an model (spins minus-one/plus-one), which is what annealing hardware minimizes.

Quantum annealing: the adiabatic descent

Before you read — take a guess

What is the core promise of the adiabatic theorem that quantum annealing leans on?

Analogy. Annealing is named after metallurgy for a reason. Heat a metal until its atoms jiggle freely, then cool it slowly: the atoms settle into a low-energy, well-ordered crystal. Cool it fast (quench it) and they freeze into a messy, high-energy glass. Quantum annealing does the same trick on a problem’s energy landscape — it “cools” a quantum system slowly enough that it slides into the lowest valley (the optimum) rather than getting stuck in a local dent.

Definition — adiabatic / quantum annealing. The machine prepares the ground state of a simple driver Hamiltonian H0H_0 (one whose lowest-energy state is easy and known — a uniform superposition of all configurations). It then slowly interpolates to the problem Hamiltonian HPH_P that encodes your Ising model:

H(t)=(1tT)H0  +  tTHP,0tT.H(t) = \Big(1 - \tfrac{t}{T}\Big) H_0 \;+\; \tfrac{t}{T}\, H_P, \qquad 0 \le t \le T.

By the adiabatic theorem, if the total time TT is long compared to 1/gmin21/g_{\min}^2 — where gming_{\min} is the smallest energy gap between the ground state and the first excited state along the way — the system stays in the ground state, and at t=Tt = T a measurement returns the optimum of HPH_P. That gap is the catch: for hard problems it can shrink exponentially, demanding an exponentially long anneal.

Portfolio choice as a QUBO, solved by annealingConstraint met
optimumworsebetter
energy per stepuphill jump (hot)optimum
Current energy
0.68
Best energy found
0.68
Temperature
0.02

A live QUBO descent. Each asset is one binary variable (one qubit): toggle names in or out, set the cardinality K, then press Run annealer. Watch the energy zig-zag downward — the hot uphill jumps early on are the 'temperature' letting the search escape local minima, exactly like slow cooling. The chips track current energy, the best energy found, the falling temperature, and whether the K-names constraint is met.

Play with the island above before reading on. Notice three things the physics buys you: the search accepts occasional uphill moves while hot (so it doesn’t get trapped in the first dip), those uphill jumps shrink as temperature falls (so it eventually commits), and the constraint chip can flicker red mid-search — a QUBO doesn’t forbid invalid states, it just makes them expensive, so the annealer wanders through them on its way down.

Worked example — why “slowly enough” can be ruinous. Suppose the minimum gap on a particular problem is gmin=0.01g_{\min} = 0.01 (energy units). The adiabatic condition demands roughly T1/gmin2=1/(0.01)2=10,000T \gtrsim 1/g_{\min}^2 = 1/(0.01)^2 = 10{,}000 time units. Halve the gap to 0.0050.005 and the required time quadruples to 40,00040{,}000. For genuinely hard instances the gap closes exponentially in problem size, so the “guaranteed” anneal time blows up exponentially — which is precisely why real D-Wave anneals are short and repeated and treated as a heuristic, not a guarantee.

Warning:

The hardware is sparse, your problem is dense

A D-Wave machine has thousands of qubits, but each qubit couples to only a handful of neighbors (its connectivity graph, e.g. Pegasus). A portfolio QUBO is typically dense — every asset pair has a covariance, so every variable couples to every other. To run a dense problem you must embed each logical variable across a chain of physical qubits to fake the missing connections. Chains eat qubits fast (a fully-connected problem of nn variables can need O(n2)O(n^2) physical qubits) and can break mid-anneal, corrupting the answer. The headline qubit count is not the problem size you can actually solve.

When to use it

Quantum annealing is worth a pilot when your problem is natively Ising-shaped, sparse (so embedding overhead stays manageable), and you are content with a good heuristic answer rather than a certified optimum. Treat it as you would simulated annealing or tabu search: run it many times, keep the best sample, and always benchmark against a strong classical solver on the same instance before claiming any benefit.

Think first

A portfolio QUBO over 200 assets is fully dense (every pair has covariance). Your annealer has 5,000 qubits, each connecting to ~15 neighbors. Why might you still not be able to run it?

QAOA: the gate-model variational cousin

Before you read — take a guess

QAOA is a variational algorithm with p alternating layers. As the depth p grows toward infinity, what is the theoretical guarantee?

Analogy. If annealing is a marble cooling into a valley, QAOA is a relay race between two coaches. One coach (the problem Hamiltonian) nudges the team toward low-cost configurations; the other (the mixer) shakes things up so the team explores. They alternate for pp rounds, and a classical optimizer outside the race tunes how long each coach gets the baton (the angles) to make the final lineup as low-cost as possible.

Definition — QAOA. The Quantum Approximate Optimization Algorithm prepares a state by alternating pp layers of a problem unitary eiγHPe^{-i\gamma_\ell H_P} (encoding your Ising cost) and a mixer unitary eiβHMe^{-i\beta_\ell H_M} (typically transverse-field spin flips):

γ,β==1peiβHMeiγHP+n.|\boldsymbol{\gamma},\boldsymbol{\beta}\rangle = \prod_{\ell=1}^{p} e^{-i\beta_\ell H_M}\, e^{-i\gamma_\ell H_P}\, |+\rangle^{\otimes n}.

A classical optimizer adjusts the 2p2p angles (γ,β)(\boldsymbol{\gamma},\boldsymbol{\beta}) to minimize the measured expected energy HP\langle H_P \rangle. It is a quantum–classical loop: the quantum chip evaluates the cost of a parameter setting, the classical optimizer proposes the next setting. As pp \to \infty the layers can mimic the slow adiabatic sweep, so QAOA can in principle reach the optimum.

Worked example — the cost of depth. At depth pp you must optimize 2p2p angles. For a modest p=5p = 5 that is 10 parameters — and each evaluation means running the circuit and sampling it thousands of times to estimate HP\langle H_P \rangle to acceptable precision. Say 5,000 shots per evaluation and 200 optimizer steps: that is 10×200×5,000=10,000,00010 \times 200 \times 5{,}000 = 10{,}000{,}000 circuit executions for one problem, on hardware where each multi-qubit gate injects noise. Deeper pp means deeper circuits, more noise accumulation, and a higher-dimensional angle landscape to search.

Warning:

Barren plateaus and noisy gradients

QAOA’s classical optimization is not a formality. For many problem classes and random initializations, the cost landscape exhibits barren plateaus — regions where the gradient is exponentially small in the number of qubits, so the optimizer wanders almost flat ground with no signal pointing downhill. Layer hardware noise on top (today’s gate devices are noisy, with no error correction at scale) and the measured energy is a blurry, biased estimate. “Just increase pp” makes the circuit deeper and noisier, often hurting more than it helps. This is why shallow QAOA has, so far, not demonstrated a clear win over good classical heuristics.

When to use it

Today, QAOA is primarily a research and learning tool, not a production portfolio optimizer. Use it to understand variational quantum algorithms, to benchmark small instances, and to track the field — but do not stake a rebalance on it expecting it to beat branch-and-bound or simulated annealing. If you are running QAOA in anger, keep pp shallow, warm-start the angles from known good values or the adiabatic schedule, and (again) always benchmark classically on the identical instance.

Sort each statement under the method it most accurately describes.

Place each item in the right group.

  • Slowly morphs an easy Hamiltonian into the problem Hamiltonian
  • A classical optimizer tunes 2p angles in a quantum–classical loop
  • Leans directly on the adiabatic theorem and the minimum spectral gap
  • Alternates problem and mixer layers for depth p
  • Needs chain embedding for dense, all-to-all problems
  • Can stall on barren plateaus during angle optimization

The sober verdict

Before you read — take a guess

Which statements honestly reflect the state of quantum portfolio optimization today? (Select all that apply.)

Time for the unglamorous truth. Classical combinatorial optimization is very good. Commercial mixed-integer programming (MIP) solvers using branch-and-bound and cutting-planes routinely crack cardinality-constrained portfolios with hundreds of assets to certified optimality, and metaheuristics like simulated annealing and tabu search deliver excellent near-optimal solutions fast when exactness isn’t required. Quantum annealing and QAOA are scientifically fascinating and may one day help on instances with especially nasty discrete structure — but as of today, no clear, reproducible advantage over these classical methods has been demonstrated on realistic portfolio problems.

MethodWhat it solvesGuarantee vs heuristicMaturityFinance relevance today
Branch-and-bound MIPExact integer/cardinality programsCertified optimum (with optimality gap)Mature, commercial (Gurobi, CPLEX)High — the default for hard discrete portfolios up to hundreds of names
Simulated annealingAny QUBO/Ising, large instancesHeuristic (good near-optimal samples)Mature, trivial to run on a laptopHigh — strong baseline and the thing quantum must beat
Quantum annealing (D-Wave)Sparse Ising/QUBO after embeddingHeuristic, no gap guaranteeReal hardware, sparse connectivity, embedding overheadLow–emerging — pilots only; dense portfolios fit poorly
QAOA (gate model)Small QUBO/Ising at shallow depth pHeuristic; optimum only as p → ∞Early, noisy hardware, barren plateausLow — research and benchmarking, not production

The disciplined posture is the same one this whole course preaches about machine learning: benchmark honestly, beware the hype, and let the classical baseline have the first and last word. If a vendor demos a quantum portfolio win, ask whether they ran the same instance through a tuned classical solver — the answer is usually that they didn’t, or that the classical solver also won.

Tip:

Where the quantum bet actually lives

The interesting case is not “quantum is faster at Markowitz.” It is narrow: problems whose discrete structure is so rugged that even good classical heuristics struggle, that are naturally sparse (so they embed cleanly), and where a slightly better heuristic sample has real economic value. That is a small, specific niche — not “all of portfolio optimization.” Knowing exactly how small that niche is, today, is the expert’s edge.

When to use it

Default to classical: a MIP solver when you need a certified optimum and the instance is tractable, simulated annealing or tabu when you need fast, good-enough answers on large QUBOs. Consider quantum annealing only for sparse, genuinely hard discrete instances and only as a benchmarked pilot. Treat QAOA as a research instrument. In every case, the rule is identical: run the classical baseline on the same instance, and believe the numbers over the narrative.

If classical solvers already win, why study QUBO at all?

Answer. Three reasons. First, the QUBO formulation itself is portable: writing your cardinality-constrained portfolio as a QUBO lets you throw it at any of these backends — including the very good classical simulated-annealing and tabu solvers — so the modeling skill pays off immediately, quantum or not. Second, hardware and algorithms are improving; the practitioner who already speaks QUBO/Ising fluently is positioned to evaluate (and debunk) advantage claims the day they arrive. Third, the discipline of encoding messy business constraints as quadratic penalties sharpens how you think about the problem, regardless of what minimizes the energy. You learn QUBO to be ready and to stay honest — not because the quantum hardware is winning today.

Recap

You watched a beautiful convex machine seize up the moment a portfolio manager asked for a fixed name count, a minimum lot, or a round-share grid — the convexity cliff that turns polynomial-time mean–variance into a combinatorial, NP-hard search. You recast that search as a QUBO (minimize xQxx^\top Q x over binary xx), folding return into the diagonal, risk into the quadratic term, and the cardinality rule into a λ(xik)2\lambda(\sum x_i - k)^2 penalty. You saw the one-line Ising equivalence that lets annealing hardware minimize it natively, the adiabatic descent of quantum annealing (and its gap-and-embedding caveats), and the variational QAOA loop (and its barren plateaus). And you ended where an expert should: classical solvers are strong, quantum advantage on real portfolios is not yet demonstrated, and the honest move is always to benchmark.

Big picture

QUBO and portfolio optimization

  • QUBO portfolio optimization
    • Why it gets hard
      • Continuous mean–variance = convex QP (easy)
      • Cardinality / min-lot = non-convex
      • Combinatorial, NP-hard worst case
    • QUBO recast
      • min x^T Q x over binary x
      • Return → diagonal (x^2 = x)
      • Risk → quadratic covariance term
      • Cardinality → lambda(sum x − k)^2 penalty
    • Ising equivalence
      • x_i = (1 + s_i)/2
      • What annealers minimize natively
    • Quantum annealing (D-Wave)
      • Adiabatic: easy H → problem H
      • Slow-cooling analogy
      • Gap-limited, sparse, embedding chains
      • Heuristic, not a guarantee
    • QAOA (gate model)
      • Problem + mixer layers, depth p
      • Classical optimizer tunes 2p angles
      • p → ∞ approaches optimum
      • Barren plateaus, noise, no clear win yet
    • Sober verdict
      • Classical MIP / SA / tabu are strong
      • No reproducible quantum advantage today
      • Niche: sparse, genuinely hard structure
Build the map: the hardness source, the QUBO recast, the two quantum attacks, and the sober verdict.

Mixed check: can you recast and stay honest?

Question 1 of 50 correct

Why does adding a 'hold exactly k names' rule make mean–variance hard?

Check your answer to continue.

Mark lesson as complete