Quantum QAE round (measured) Classical Monte Carlo (measured) theory 1/M theory 1/√N

Quantum Amplitude Estimation for Investment Risk (2D)

This is the flat, chart-first companion to the 3D Grover-spiral simulator: instead of a rotating 3D state vector, it runs the real canonical quantum-amplitude-estimation math directly — computing the exact Brassard–Høyer–Mosca–Tapp measurement distribution for a Grover-operator phase-estimation circuit at growing oracle-query budgets M, drawing a genuine weighted-random outcome from it each round, and plotting the resulting estimate's real error against a parallel classical Monte Carlo estimator that is itself accumulating real Bernoulli draws. Watch the two error curves diverge on the log-log chart — quantum falling roughly twice as fast in log-log slope — which is exactly the quadratic query-complexity advantage (O(1/M) vs O(1/√N)) that motivates quantum approaches to pricing derivatives and estimating the probability a portfolio's loss crosses a Value-at-Risk threshold.