[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"blog-ro-quantum-chemistry-protein-scale-2026":3,"blog-translated-locales-quantum-chemistry-protein-scale-2026":177,"blog-all-ro":184},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"author":11,"tags":12,"readingTime":16,"body":17,"_type":171,"_id":172,"_source":173,"_file":174,"_stem":175,"_extension":176},"\u002Fblog\u002Fquantum-chemistry-protein-scale-2026","blog",false,"","Quantum Computers Simulated a Real Protein: Here's What That Means","Cleveland Clinic and IBM ran a quantum-classical hybrid simulation of a 303-atom miniprotein on IBM's Heron r2 chip, a real step up from the toy molecules most VQE demos use, with real caveats attached.","2026-08-01","FreeQuantumComputing",[13,14,15],"Chemistry","VQE","Hardware",7,{"type":18,"children":19,"toc":163},"root",[20,37,42,49,75,80,86,91,97,126,132,137,143],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25,28,35],{"type":26,"value":27},"text","Most VQE tutorials you'll find online (including ",{"type":21,"tag":29,"props":30,"children":32},"a",{"href":31},"\u002Fblog\u002Fvqe-pennylane-practical-guide",[33],{"type":26,"value":34},"our own",{"type":26,"value":36},") simulate hydrogen or lithium hydride: molecules with a handful of atoms, chosen because that's what today's hardware and noise levels handle. In March 2026, Cleveland Clinic and IBM published something categorically bigger: a quantum-classical hybrid workflow modelling the electronic structure of Trp-cage, a 303-atom miniprotein, using IBM's Heron r2 processor.",{"type":21,"tag":22,"props":38,"children":39},{},[40],{"type":26,"value":41},"It's a genuine step up in scale, and it's worth understanding both why that's hard and what the headline atom-count does and doesn't prove.",{"type":21,"tag":43,"props":44,"children":46},"h2",{"id":45},"why-molecule-size-is-the-whole-problem",[47],{"type":26,"value":48},"Why molecule size is the whole problem",{"type":21,"tag":22,"props":50,"children":51},{},[52,58,60,65,67,73],{"type":21,"tag":29,"props":53,"children":55},{"href":54},"\u002Fresearch\u002Ffeynman-simulating-physics-1982",[56],{"type":26,"value":57},"Feynman's original 1982 case for quantum computing",{"type":26,"value":59}," was precisely this: simulating quantum systems exactly, on a classical computer, costs resources that grow exponentially with system size, because the electronic wavefunction lives in a Hilbert space whose dimension explodes with the number of orbitals involved. Chemists routinely work around this with approximations, but the exact answer for anything beyond small molecules is classically out of reach. That's the whole motivation for ",{"type":21,"tag":29,"props":61,"children":63},{"href":62},"\u002Fglossary\u002Fvqe",[64],{"type":26,"value":14},{"type":26,"value":66},": ",{"type":21,"tag":29,"props":68,"children":70},{"href":69},"\u002Fresearch\u002Fperuzzo-vqe-2014",[71],{"type":26,"value":72},"Peruzzo's 2014 paper",{"type":26,"value":74}," that introduced it used a hybrid quantum-classical loop specifically because near-term hardware can't do the whole computation on its own.",{"type":21,"tag":22,"props":76,"children":77},{},[78],{"type":26,"value":79},"This is also why \"how many atoms?\" is a genuinely meaningful yardstick for quantum chemistry demonstrations, in a way it wouldn't be for, say, a random circuit sampling benchmark. Going from a 2-atom molecule to a 303-atom one isn't a marketing exaggeration of the same result. It's a real jump in the size of the problem being attacked.",{"type":21,"tag":43,"props":81,"children":83},{"id":82},"what-trp-cage-is-and-why-it-was-chosen",[84],{"type":26,"value":85},"What Trp-cage is, and why it was chosen",{"type":21,"tag":22,"props":87,"children":88},{},[89],{"type":26,"value":90},"Trp-cage isn't an arbitrary large molecule picked for a press release. It's a well-studied, 20-residue miniprotein that's been a standard benchmark in molecular dynamics and protein-folding research for years, precisely because it's small enough to be tractable but real enough to behave like an actual protein. Using an established reference system rather than a novel one makes the result easier to sanity-check against decades of existing classical simulation data.",{"type":21,"tag":43,"props":92,"children":94},{"id":93},"what-hybrid-workflow-most-likely-means-here",[95],{"type":26,"value":96},"What \"hybrid workflow\" most likely means here",{"type":21,"tag":22,"props":98,"children":99},{},[100,102,108,110,116,118,124],{"type":26,"value":101},"Read the atom count carefully. A 303-atom system's ",{"type":21,"tag":103,"props":104,"children":105},"em",{},[106],{"type":26,"value":107},"full",{"type":26,"value":109}," electronic structure is far beyond what any current QPU touches directly, and it's unlikely that all 303 atoms' electrons were represented on the quantum processor itself. The realistic picture (consistent with IBM's published approach to similar large-molecule work) is a hybrid embedding scheme: a carefully chosen active space (the electrons and orbitals that matter most for the property being studied) runs through the quantum hardware, while the rest of the system is handled classically and stitched back together. That's not a knock on the result. It's how every \"quantum computer simulates a real molecule\" claim in this size range currently works, and it's exactly the ",{"type":21,"tag":29,"props":111,"children":113},{"href":112},"\u002Fglossary\u002Fhybrid-algorithm",[114],{"type":26,"value":115},"hybrid-algorithm",{"type":26,"value":117}," pattern the field has settled on for the ",{"type":21,"tag":29,"props":119,"children":121},{"href":120},"\u002Fglossary\u002Fnisq",[122],{"type":26,"value":123},"NISQ era",{"type":26,"value":125},". The honest takeaway is that the headline number describes the system being studied, not proof that the QPU did equal work on every atom in it.",{"type":21,"tag":43,"props":127,"children":129},{"id":128},"why-its-still-a-meaningful-milestone",[130],{"type":26,"value":131},"Why it's still a meaningful milestone",{"type":21,"tag":22,"props":133,"children":134},{},[135],{"type":26,"value":136},"Caveats aside, this is a real advance in what these hybrid pipelines handle. Most prior \"quantum computer does chemistry\" demonstrations topped out at minimal-basis-set molecules with a handful of atoms. Scaling the same class of technique to a biologically relevant, extensively characterized 303-atom system, and running the quantum portion on real hardware rather than as a classical proxy, shows the pipeline itself scaling, which is the actual bottleneck vendors are racing to solve. It sits alongside other 2026 chemistry milestones in the same direction, including Qubit Pharmaceuticals and Pasqal's demonstration of quantum-algorithmic water-molecule placement in a protein pocket, a molecular-biology-grade task, not a textbook one.",{"type":21,"tag":43,"props":138,"children":140},{"id":139},"what-this-means-if-youre-learning-today",[141],{"type":26,"value":142},"What this means if you're learning today",{"type":21,"tag":22,"props":144,"children":145},{},[146,148,154,156,161],{"type":26,"value":147},"You don't need Heron r2 access, or any real QPU at all, to learn the actual technique being used here. The same VQE building blocks (ansatz construction, active-space selection, the classical optimization loop) apply whether you're fitting H₂ on a ",{"type":21,"tag":29,"props":149,"children":151},{"href":150},"\u002Fsimulators",[152],{"type":26,"value":153},"free local simulator",{"type":26,"value":155}," or reading about a 303-atom protein. Start with our ",{"type":21,"tag":29,"props":157,"children":158},{"href":31},[159],{"type":26,"value":160},"PennyLane VQE guide",{"type":26,"value":162}," if you want to run the small-molecule version yourself, and treat headline atom-counts in coverage like this one the way you'd treat any other hardware claim: a real result, worth understanding precisely, and not yet the whole story.",{"title":7,"searchDepth":164,"depth":164,"links":165},2,[166,167,168,169,170],{"id":45,"depth":164,"text":48},{"id":82,"depth":164,"text":85},{"id":93,"depth":164,"text":96},{"id":128,"depth":164,"text":131},{"id":139,"depth":164,"text":142},"markdown","content:blog:quantum-chemistry-protein-scale-2026.md","content","blog\u002Fquantum-chemistry-protein-scale-2026.md","blog\u002Fquantum-chemistry-protein-scale-2026","md",[178,179,180,181,182,183],"en","es","de","zh","ja","hi",[185,282,360,502,608,848,1006,1129,1284,1401,1503,1664,1771,2460,2612,2887,2977,3085,6275,8021,8482,9590,10164,11087,11585,13840,15699,16076,18178,19273,20334,21222,23745,24839,27443,29307,32119,34168,36321],{"_path":186,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":187,"description":188,"date":10,"author":11,"tags":189,"readingTime":16,"body":190,"_type":171,"_id":279,"_source":173,"_file":280,"_stem":281,"_extension":176},"\u002Fblog\u002Fadapt-gqe-ai-quantum-circuit-design","AI Now Designs Quantum Chemistry Circuits Faster Than the Standard Method","Quantinuum, NVIDIA, and Pfizer built ADAPT-GQE, a transformer and reinforcement-learning system that generates VQE ansatz circuits an order of magnitude faster than ADAPT-VQE, demonstrated on a real drug molecule and run on Quantinuum's Helios hardware.",[13,14,15],{"type":18,"children":191,"toc":273},[192,203,209,214,219,225,238,244,256,262],{"type":21,"tag":22,"props":193,"children":194},{},[195,197,201],{"type":26,"value":196},"Building a good ",{"type":21,"tag":29,"props":198,"children":199},{"href":62},[200],{"type":26,"value":14},{"type":26,"value":202}," circuit for a specific molecule is itself a hard, expensive search problem, before you ever run the circuit. Researchers from Quantinuum, NVIDIA, and Pfizer published a result on July 30, 2026 that automates that search: a system called ADAPT-GQE, which learns to generate the ansatz circuit directly instead of building it one operator at a time.",{"type":21,"tag":43,"props":204,"children":206},{"id":205},"the-problem-adapt-gqe-targets",[207],{"type":26,"value":208},"The problem ADAPT-GQE targets",{"type":21,"tag":22,"props":210,"children":211},{},[212],{"type":26,"value":213},"The standard method, ADAPT-VQE, builds a molecule-specific ansatz by testing a pool of candidate operators at every step, picking the one that improves the energy estimate most, and repeating. That greedy search works, but it gets expensive fast as molecules grow, since every step re-evaluates the whole operator pool from scratch.",{"type":21,"tag":22,"props":215,"children":216},{},[217],{"type":26,"value":218},"ADAPT-GQE replaces that per-molecule greedy search with a trained model: a transformer combined with reinforcement learning, trained to generate the state-preparation circuit for a molecule's electronic ground state directly. Once trained, generating a new circuit is a forward pass through a model instead of a fresh greedy search.",{"type":21,"tag":43,"props":220,"children":222},{"id":221},"what-the-results-show",[223],{"type":26,"value":224},"What the results show",{"type":21,"tag":22,"props":226,"children":227},{},[228,230,236],{"type":26,"value":229},"The team reports a 234 times speed-up in generating training data for complex molecules, and roughly one order of magnitude reduction in circuit generation time compared to ADAPT-VQE, while matching or improving accuracy in preparing molecular ground states on their benchmarks. They demonstrated the approach on imipramine, an approved tricyclic antidepressant used here as a realistic pharmaceutical test molecule, and ran the AI-generated circuits on Quantinuum's Helios trapped-ion system, the same hardware we covered in our ",{"type":21,"tag":29,"props":231,"children":233},{"href":232},"\u002Fblog\u002Fquantinuum-helios-logical-qubits-2026",[234],{"type":26,"value":235},"piece on Helios's logical qubit encoding",{"type":26,"value":237},".",{"type":21,"tag":43,"props":239,"children":241},{"id":240},"read-the-claim-at-the-scale-it-was-tested",[242],{"type":26,"value":243},"Read the claim at the scale it was tested",{"type":21,"tag":22,"props":245,"children":246},{},[247,249,254],{"type":26,"value":248},"This result is about circuit generation, not about simulating a bigger molecule than anyone has before. It is a different kind of advance from the ",{"type":21,"tag":29,"props":250,"children":251},{"href":4},[252],{"type":26,"value":253},"Cleveland Clinic and IBM protein-scale simulation",{"type":26,"value":255}," we covered separately, which pushed the size of the system being simulated. ADAPT-GQE instead pushes the speed and cost of building the circuit for a given molecule, tested here on one well-characterized drug compound. Whether the trained model generalizes to structurally different molecules without retraining, and how it performs as molecule size grows well past imipramine, are the open questions worth watching in follow-up work rather than assuming from this result alone.",{"type":21,"tag":43,"props":257,"children":259},{"id":258},"why-this-fits-a-pattern-worth-naming",[260],{"type":26,"value":261},"Why this fits a pattern worth naming",{"type":21,"tag":22,"props":263,"children":264},{},[265,267,271],{"type":26,"value":266},"Pfizer's involvement gives this a real commercial angle instead of a research-only demonstration, and it points at a broader shift already visible across 2026 quantum chemistry news: less effort spent proving quantum computers touch a toy molecule, more effort spent removing the practical bottlenecks, molecule size in IBM's case, circuit design cost here, standing between a working method and something a pharmaceutical team would use. If you want to build the small-molecule version of this yourself on a free simulator, our ",{"type":21,"tag":29,"props":268,"children":269},{"href":31},[270],{"type":26,"value":160},{"type":26,"value":272}," walks through the manual ansatz-construction approach ADAPT-GQE is trying to replace.",{"title":7,"searchDepth":164,"depth":164,"links":274},[275,276,277,278],{"id":205,"depth":164,"text":208},{"id":221,"depth":164,"text":224},{"id":240,"depth":164,"text":243},{"id":258,"depth":164,"text":261},"content:blog:adapt-gqe-ai-quantum-circuit-design.md","blog\u002Fadapt-gqe-ai-quantum-circuit-design.md","blog\u002Fadapt-gqe-ai-quantum-circuit-design",{"_path":283,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":284,"description":285,"date":10,"author":11,"tags":286,"readingTime":288,"body":289,"_type":171,"_id":357,"_source":173,"_file":358,"_stem":359,"_extension":176},"\u002Fblog\u002Fglobalfoundries-chips-silicon-photonics-award","GlobalFoundries Gets $300 Million to Build Silicon Photonics in the US","GlobalFoundries signed a letter of intent for a $300 million CHIPS Act award to scale US silicon photonics manufacturing. It is not a quantum computing grant, but the manufacturing capacity it builds matters for photonic quantum hardware and quantum networking too.",[287,15],"Industry",6,{"type":18,"children":290,"toc":352},[291,296,302,307,313,341,347],{"type":21,"tag":22,"props":292,"children":293},{},[294],{"type":26,"value":295},"GlobalFoundries signed a letter of intent with the US Department of Commerce on July 29, 2026, for a $300 million CHIPS Act award to scale up US silicon photonics manufacturing. Read the headline carefully: this is not quantum computing funding. It is an AI-infrastructure story first. It belongs on this site because the manufacturing capacity it builds is the same capacity photonic quantum computing and quantum networking depend on.",{"type":21,"tag":43,"props":297,"children":299},{"id":298},"what-the-award-funds",[300],{"type":26,"value":301},"What the award funds",{"type":21,"tag":22,"props":303,"children":304},{},[305],{"type":26,"value":306},"Silicon photonics moves data using light instead of electrical signals, which gives AI systems more bandwidth per watt of power drawn. The funding covers co-packaged optics, an approach that places photonic circuitry directly next to processors instead of routing signals through separate optical modules, along with next-generation optical materials, wafer technology, and advanced packaging. GlobalFoundries states target performance of 400 gigabits per second in throughput and energy consumption cut to a fifth of current-generation systems. The Department of Commerce receives roughly a 1 percent equity stake in GlobalFoundries as part of the deal. Work will run through GlobalFoundries' existing facilities in Malta, New York, and Burlington, Vermont.",{"type":21,"tag":43,"props":308,"children":310},{"id":309},"why-a-chipmakers-ai-deal-shows-up-on-a-quantum-computing-site",[311],{"type":26,"value":312},"Why a chipmaker's AI deal shows up on a quantum computing site",{"type":21,"tag":22,"props":314,"children":315},{},[316,318,324,326,332,334,340],{"type":26,"value":317},"Much of today's silicon photonics and advanced optical packaging supply chain sits outside the United States, which is the same domestic-manufacturing motivation behind ",{"type":21,"tag":29,"props":319,"children":321},{"href":320},"\u002Fblog\u002Fionq-skywater-acquisition-explained",[322],{"type":26,"value":323},"IonQ's acquisition of SkyWater Technology",{"type":26,"value":325},". The connection to quantum computing is indirect but real: photonic quantum computing companies like Xanadu and PsiQuantum, tracked on our ",{"type":21,"tag":29,"props":327,"children":329},{"href":328},"\u002Flandscape",[330],{"type":26,"value":331},"industry landscape",{"type":26,"value":333},", depend on exactly this kind of silicon photonics fabrication and packaging capacity. So do quantum networking efforts aimed at linking separate QPUs with optical interconnects, the subject of our piece on ",{"type":21,"tag":29,"props":335,"children":337},{"href":336},"\u002Fblog\u002Fquantum-networking-distributed-computing",[338],{"type":26,"value":339},"quantum networking and distributed quantum computing",{"type":26,"value":237},{"type":21,"tag":43,"props":342,"children":344},{"id":343},"what-this-does-and-does-not-tell-you-about-quantum-hardware",[345],{"type":26,"value":346},"What this does and does not tell you about quantum hardware",{"type":21,"tag":22,"props":348,"children":349},{},[350],{"type":26,"value":351},"This award funds general-purpose silicon photonics aimed at AI data centers, not a quantum-specific fabrication line. No quantum hardware vendor is named as a direct beneficiary in the announcement. What it does tell you is that the underlying manufacturing base for photonic and optically networked quantum hardware is getting real government investment and real domestic capacity, for reasons that have nothing to do with quantum computing at all. That is worth knowing if you are trying to judge how much of the \"domestic quantum supply chain\" story making the rounds in 2026 is quantum-specific policy versus a broader chip and AI-infrastructure push that quantum hardware happens to benefit from as a side effect.",{"title":7,"searchDepth":164,"depth":164,"links":353},[354,355,356],{"id":298,"depth":164,"text":301},{"id":309,"depth":164,"text":312},{"id":343,"depth":164,"text":346},"content:blog:globalfoundries-chips-silicon-photonics-award.md","blog\u002Fglobalfoundries-chips-silicon-photonics-award.md","blog\u002Fglobalfoundries-chips-silicon-photonics-award",{"_path":361,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":362,"description":363,"date":10,"author":11,"tags":364,"readingTime":366,"body":367,"_type":171,"_id":499,"_source":173,"_file":500,"_stem":501,"_extension":176},"\u002Fblog\u002Fgoogle-willow-reinforcement-learning-calibration","Google Taught Willow to Calibrate Itself While It Runs Error Correction","Google Quantum AI and DeepMind published a Nature paper showing a reinforcement learning agent recalibrates the Willow processor using the same error-detection data error correction already produces, setting a new logical error rate record for the surface code.",[15,365,287],"Error Correction",8,{"type":18,"children":368,"toc":493},[369,393,399,404,415,421,434,439,445,450,463,469,474],{"type":21,"tag":22,"props":370,"children":371},{},[372,374,382,384,391],{"type":26,"value":373},"Google Quantum AI and Google DeepMind published a paper in Nature on July 10, 2026 showing that a reinforcement learning agent keeps a quantum processor calibrated using data the processor was already producing, rather than pausing to run a separate tune-up routine, according to ",{"type":21,"tag":29,"props":375,"children":379},{"href":376,"rel":377},"https:\u002F\u002Fthequantuminsider.com\u002F2026\u002F07\u002F10\u002Fgoogle-study-shows-quantum-computer-can-learn-from-its-own-errors-while-it-computes\u002F",[378],"nofollow",[380],{"type":26,"value":381},"The Quantum Insider",{"type":26,"value":383}," and ",{"type":21,"tag":29,"props":385,"children":388},{"href":386,"rel":387},"https:\u002F\u002Fwww.nature.com\u002Farticles\u002Fs41586-026-10759-2",[378],[389],{"type":26,"value":390},"the paper itself",{"type":26,"value":392},". The work ran on Google's Willow superconducting processor and was led by Volodymyr Sivak and Alexis Morvan, with 299 authors credited in total.",{"type":21,"tag":43,"props":394,"children":396},{"id":395},"the-problem-this-solves",[397],{"type":26,"value":398},"The problem this solves",{"type":21,"tag":22,"props":400,"children":401},{},[402],{"type":26,"value":403},"Every quantum processor drifts. Control parameters, the microwave pulse amplitudes, frequencies, and coupling strengths that drive each qubit, slowly shift due to temperature changes, material aging, and electronic noise. The standard fix is periodic recalibration: pause the machine, run a dedicated tune-up sequence, then resume. That works, but it treats calibration and computation as separate activities competing for the same hardware time, and it only catches drift at the moments you choose to check for it.",{"type":21,"tag":22,"props":405,"children":406},{},[407,413],{"type":21,"tag":29,"props":408,"children":410},{"href":409},"\u002Fglossary\u002Fquantum-error-correction",[411],{"type":26,"value":412},"Quantum error correction",{"type":26,"value":414}," already generates a stream of error-detection events as a normal part of running any error-corrected circuit. Google's insight was that this data is not only useful for correcting the logical qubit's state. It also tells you, continuously, how well the underlying hardware is behaving, which is exactly the signal a calibration system needs.",{"type":21,"tag":43,"props":416,"children":418},{"id":417},"what-the-reinforcement-learning-agent-does",[419],{"type":26,"value":420},"What the reinforcement learning agent does",{"type":21,"tag":22,"props":422,"children":423},{},[424,426,432],{"type":26,"value":425},"The system trains a reinforcement learning agent to read the error-detection events produced during normal error-correction cycles and use them to continuously adjust more than 1,000 control parameters, without stopping the computation to do it. Google tested the approach on distance-5 and distance-7 ",{"type":21,"tag":29,"props":427,"children":429},{"href":428},"\u002Fblog\u002Funderstanding-quantum-error-correction",[430],{"type":26,"value":431},"surface codes",{"type":26,"value":433}," and a distance-5 color code on the 105-qubit Willow chip, and ran simulations extending to a distance-15 surface code involving roughly 40,000 parameters, to check whether the approach holds up at a scale beyond what current hardware supports.",{"type":21,"tag":22,"props":435,"children":436},{},[437],{"type":26,"value":438},"The results at the tested scale: a 20% reduction in logical error rate beyond what conventional calibration achieves, even after exhaustive manual tuning. Under artificially injected hardware drift, meant to simulate the kind of degradation a real system experiences over hours of operation, the reinforcement learning approach cut the logical error rate by 24% and made performance 2.4 times more stable than static calibration. Adding decoder-parameter adaptation on top pushed that to a 31% error reduction and 3.5 times more stability. On the distance-7 surface code specifically, the system reached a logical error rate of 7.72 × 10⁻⁴ per cycle, which the authors report as a new record for that code family.",{"type":21,"tag":43,"props":440,"children":442},{"id":441},"why-this-matters-more-than-the-specific-numbers",[443],{"type":26,"value":444},"Why this matters more than the specific numbers",{"type":21,"tag":22,"props":446,"children":447},{},[448],{"type":26,"value":449},"This is the first demonstration of reinforcement learning controlling error correction at the scale of a full error-corrected processor. Earlier experimental work applied similar reinforcement learning techniques to isolated gates or to bosonic codes, smaller, more contained systems. Running it across a full surface-code processor with over 1,000 live control parameters is a meaningfully harder engineering problem, and the fact that it improved on hand-tuned calibration rather than merely matching it is the part worth sitting with.",{"type":21,"tag":22,"props":451,"children":452},{},[453,455,461],{"type":26,"value":454},"Drift is a problem that gets worse, not better, as machines scale up. A processor with a few dozen qubits is recalibrated by hand often enough to stay ahead of drift. A processor with thousands of qubits, the scale ",{"type":21,"tag":29,"props":456,"children":458},{"href":457},"\u002Fblog\u002Fibm-quantum-advantage-triple-announcement-2026",[459],{"type":26,"value":460},"IBM's roadmap",{"type":26,"value":462}," and others are explicitly building toward, cannot rely on manual tune-up passes keeping pace with how many parameters need adjusting. A system that recalibrates itself continuously, using data the machine produces anyway, is a more plausible path to keeping a much larger processor stable than scaling up the current manual approach.",{"type":21,"tag":43,"props":464,"children":466},{"id":465},"what-is-still-unproven",[467],{"type":26,"value":468},"What is still unproven",{"type":21,"tag":22,"props":470,"children":471},{},[472],{"type":26,"value":473},"This result was demonstrated on Google's own Willow hardware and published in a peer-reviewed venue, which puts it on firmer ground than a vendor press release. It does not yet tell you whether the same reinforcement learning approach transfers cleanly to a different qubit modality, a different code family beyond the ones tested, or a processor an order of magnitude larger than Willow's 105 qubits. The distance-15 simulation results are exactly that: simulations, not a demonstration on real hardware at that scale.",{"type":21,"tag":22,"props":475,"children":476},{},[477,479,484,485,491],{"type":26,"value":478},"What is established is narrower and still significant: on real hardware, at the scale tested, learning from the error-correction data a processor already generates beats static calibration, and does so by a wide enough margin to set a new record for the surface code. Our ",{"type":21,"tag":29,"props":480,"children":481},{"href":428},[482],{"type":26,"value":483},"error correction explainer",{"type":26,"value":383},{"type":21,"tag":29,"props":486,"children":488},{"href":487},"\u002Fblog\u002Flogical-qubits-fault-tolerance-explained",[489],{"type":26,"value":490},"logical qubits and fault tolerance piece",{"type":26,"value":492}," cover the broader context for why keeping a large processor calibrated is as hard a problem as building the qubits in the first place.",{"title":7,"searchDepth":164,"depth":164,"links":494},[495,496,497,498],{"id":395,"depth":164,"text":398},{"id":417,"depth":164,"text":420},{"id":441,"depth":164,"text":444},{"id":465,"depth":164,"text":468},"content:blog:google-willow-reinforcement-learning-calibration.md","blog\u002Fgoogle-willow-reinforcement-learning-calibration.md","blog\u002Fgoogle-willow-reinforcement-learning-calibration",{"_path":503,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":504,"description":505,"date":10,"author":11,"tags":506,"readingTime":16,"body":507,"_type":171,"_id":605,"_source":173,"_file":606,"_stem":607,"_extension":176},"\u002Fblog\u002Fhrl-self-operating-silicon-quantum-processor","HRL Built a Silicon Quantum Processor That Runs Its Own Error Correction","HRL Laboratories published a silicon quantum processor in Nature that runs error correction with a control chip inside the cryostat, cutting the room-temperature wiring that limits how many qubits a machine holds.",[15,365,287],{"type":18,"children":508,"toc":600},[509,521,527,532,550,556,561,566,572,583],{"type":21,"tag":22,"props":510,"children":511},{},[512,514,519],{"type":26,"value":513},"Most quantum computers depend on racks of room-temperature electronics wired down into a cryostat, one connection per control signal, per qubit. That wiring, not qubit physics, is one of the real limits on how many qubits a machine holds. On July 29, 2026, HRL Laboratories published a result in Nature that attacks this problem directly: a silicon quantum processor with its own control chip living inside the cryostat, running ",{"type":21,"tag":29,"props":515,"children":516},{"href":409},[517],{"type":26,"value":518},"error correction",{"type":26,"value":520}," on its own.",{"type":21,"tag":43,"props":522,"children":524},{"id":523},"what-hrl-built",[525],{"type":26,"value":526},"What HRL built",{"type":21,"tag":22,"props":528,"children":529},{},[530],{"type":26,"value":531},"The device holds 18 qubits. Next to them, inside the same cryostat, sits a custom CMOS controller operating at around minus 450 degrees Fahrenheit, close to the qubits themselves rather than at room temperature. That controller generates every signal the error-correction routine needs and runs the whole cycle with no real-time input from outside the cold chamber. A high-density ribbon cable, 296 channels of superconducting niobium on polyimide, connects the pieces while managing the heat load a control chip normally cannot tolerate at those temperatures.",{"type":21,"tag":22,"props":533,"children":534},{},[535,537,542,543,548],{"type":26,"value":536},"The controller chip itself was manufactured at a commercial foundry, the same kind of manufacturing step behind ",{"type":21,"tag":29,"props":538,"children":539},{"href":320},[540],{"type":26,"value":541},"IonQ's recent purchase of SkyWater Technology",{"type":26,"value":383},{"type":21,"tag":29,"props":544,"children":545},{"href":283},[546],{"type":26,"value":547},"GlobalFoundries' new silicon photonics funding",{"type":26,"value":549},". None of these stories are about qubit physics. All three are about the unglamorous manufacturing and packaging work that decides whether a lab result becomes a machine you scale.",{"type":21,"tag":43,"props":551,"children":553},{"id":552},"why-moving-the-controller-matters-more-than-it-sounds",[554],{"type":26,"value":555},"Why moving the controller matters more than it sounds",{"type":21,"tag":22,"props":557,"children":558},{},[559],{"type":26,"value":560},"Every wire running from room temperature into a cryostat carries heat with it, and heat is the enemy of a qubit that needs to stay near absolute zero. Today's largest machines manage this by keeping wiring counts down, which caps how many qubits fit on one system before the cooling and wiring overhead becomes the bottleneck rather than the qubits themselves. A control chip that lives in the cold zone and runs error correction locally removes a big share of that wiring, one wired connection per function instead of one per qubit.",{"type":21,"tag":22,"props":562,"children":563},{},[564],{"type":26,"value":565},"That is a real, checkable engineering claim, and it is a different kind of claim than a qubit count or a fidelity number. It says nothing about how good HRL's 18 qubits are compared to a superconducting or trapped-ion qubit elsewhere. It says something about whether a silicon-based approach scales its control infrastructure without the wiring problem growing linearly with qubit count.",{"type":21,"tag":43,"props":567,"children":569},{"id":568},"where-this-sits-next-to-other-2026-scaling-work",[570],{"type":26,"value":571},"Where this sits next to other 2026 scaling work",{"type":21,"tag":22,"props":573,"children":574},{},[575,581],{"type":21,"tag":29,"props":576,"children":578},{"href":577},"\u002Fblog\u002Fwarwick-quantum-phononic-links",[579],{"type":26,"value":580},"Warwick researchers published a different answer",{"type":26,"value":582}," to a related scaling problem the same week: how to let distant qubits on one chip communicate at all, rather than only their nearest neighbors. Read together, the two results point at the same underlying truth. Qubit count and gate fidelity get the headlines, but wiring, control electronics, and qubit-to-qubit communication are the problems that decide whether a design reaches a million qubits or stalls in the hundreds.",{"type":21,"tag":22,"props":584,"children":585},{},[586,588,594,595,599],{"type":26,"value":587},"HRL's result is a working 18-qubit device with a published, peer-reviewed result behind it, not a concept paper. That distinction is worth holding onto as you read coverage of scaling claims generally. A demonstrated device at a small scale is a different kind of evidence than a proposed mechanism aimed at a much larger one, even when both are genuine contributions. For more on how silicon-based qubits compare to the trapped-ion, superconducting, and photonic approaches competing for the same scaling problem, see our ",{"type":21,"tag":29,"props":589,"children":591},{"href":590},"\u002Fhardware",[592],{"type":26,"value":593},"hardware overview",{"type":26,"value":383},{"type":21,"tag":29,"props":596,"children":597},{"href":328},[598],{"type":26,"value":331},{"type":26,"value":237},{"title":7,"searchDepth":164,"depth":164,"links":601},[602,603,604],{"id":523,"depth":164,"text":526},{"id":552,"depth":164,"text":555},{"id":568,"depth":164,"text":571},"content:blog:hrl-self-operating-silicon-quantum-processor.md","blog\u002Fhrl-self-operating-silicon-quantum-processor.md","blog\u002Fhrl-self-operating-silicon-quantum-processor",{"_path":609,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":610,"description":611,"date":10,"author":11,"tags":612,"readingTime":366,"body":613,"_type":171,"_id":845,"_source":173,"_file":846,"_stem":847,"_extension":176},"\u002Fblog\u002Fibm-hrl-laboratories-acquisition-explained","IBM Is Acquiring HRL Laboratories: What the Silicon Spin Qubit Deal Adds","IBM has signed a definitive agreement to acquire HRL Laboratories from Boeing and General Motors, days before HRL's own paper on a self-correcting 18-qubit silicon processor. Here is what the deal covers and what it does not.",[287,15,365],{"type":18,"children":614,"toc":838},[615,629,641,647,675,695,700,706,711,716,721,727,732,737,743,748,753,759,764,780],{"type":21,"tag":22,"props":616,"children":617},{},[618,620,627],{"type":26,"value":619},"IBM announced on July 23, 2026 that it signed a definitive agreement to acquire HRL Laboratories, a research institution jointly owned by Boeing and General Motors, according to ",{"type":21,"tag":29,"props":621,"children":624},{"href":622,"rel":623},"https:\u002F\u002Fnewsroom.ibm.com\u002F2026-07-23-ibm-to-acquire-hrl-laboratories-to-power-the-future-of-quantum",[378],[625],{"type":26,"value":626},"IBM's newsroom announcement",{"type":26,"value":628},". Deal terms were not disclosed. The transaction is expected to close by the end of the third quarter of 2026, subject to regulatory approval. Boeing and GM will continue to partner with IBM on quantum applications after the deal closes.",{"type":21,"tag":22,"props":630,"children":631},{},[632,634,639],{"type":26,"value":633},"Six days later, HRL published the result that explains why IBM wanted the lab: a silicon quantum processor that runs its own error correction, ",{"type":21,"tag":29,"props":635,"children":636},{"href":503},[637],{"type":26,"value":638},"which we covered here",{"type":26,"value":640},". The timing is not a coincidence worth over-reading, since large acquisitions and peer-reviewed papers run on separate clocks, but it does mean the acquisition announcement and the technical proof point landed in the same week.",{"type":21,"tag":43,"props":642,"children":644},{"id":643},"what-hrl-brings",[645],{"type":26,"value":646},"What HRL brings",{"type":21,"tag":22,"props":648,"children":649},{},[650,652,659,661,666,668,674],{"type":26,"value":651},"HRL specializes in silicon-spin qubit engineering, quantum sensing, and quantum materials, according to ",{"type":21,"tag":29,"props":653,"children":656},{"href":654,"rel":655},"https:\u002F\u002Fresearch.ibm.com\u002Fblog\u002Fhrl-laboratories-ibm",[378],[657],{"type":26,"value":658},"IBM Research's own writeup",{"type":26,"value":660},". That is a different qubit modality from IBM's existing superconducting transmon platform, the one behind ",{"type":21,"tag":29,"props":662,"children":663},{"href":457},[664],{"type":26,"value":665},"Nighthawk",{"type":26,"value":667}," and the ",{"type":21,"tag":29,"props":669,"children":671},{"href":670},"\u002Fblog\u002Fquantum-benchmarking-eo-14413",[672],{"type":26,"value":673},"Starling and Blue Jay roadmap",{"type":26,"value":237},{"type":21,"tag":22,"props":676,"children":677},{},[678,680,686,688,693],{"type":26,"value":679},"Spin qubits encode information in the spin state of individual electrons held in quantum dots, tiny confined regions on a silicon chip. IBM Research describes HRL's most recent processor as 56 quantum dots configured to run as 18 ",{"type":21,"tag":29,"props":681,"children":683},{"href":682},"\u002Fglossary\u002Fqubit",[684],{"type":26,"value":685},"qubits",{"type":26,"value":687},", with a CMOS control chip inside the cryostat handling error correction locally instead of routing every signal through room-temperature electronics. Our ",{"type":21,"tag":29,"props":689,"children":690},{"href":503},[691],{"type":26,"value":692},"earlier piece on that result",{"type":26,"value":694}," goes into why moving the controller into the cold zone matters: it cuts the wiring count that otherwise limits how many qubits a machine holds.",{"type":21,"tag":22,"props":696,"children":697},{},[698],{"type":26,"value":699},"The pitch for spin qubits next to superconducting ones is manufacturing, not raw performance. Both approaches need cryogenic cooling, and both are built with silicon fabrication techniques closer to conventional chipmaking than to anything exotic. Spin qubits also occupy a smaller physical footprint per qubit than superconducting circuits, at least in principle, since a quantum dot is a nanometer-scale feature rather than a micron-scale resonator. Whether that footprint advantage survives contact with a full error-corrected system at scale is exactly the kind of claim this site treats skeptically until independent results confirm it. A demonstrated 18-qubit device is real progress. It is not yet evidence about what a 10,000-qubit spin system costs to build or run.",{"type":21,"tag":43,"props":701,"children":703},{"id":702},"why-ibm-is-buying-instead-of-partnering",[704],{"type":26,"value":705},"Why IBM is buying instead of partnering",{"type":21,"tag":22,"props":707,"children":708},{},[709],{"type":26,"value":710},"IBM already runs the industry's broadest quantum platform on superconducting hardware. Betting on a second qubit modality by acquisition rather than an ordinary research partnership signals that IBM wants the engineering team and the intellectual property inside its own roadmap, not only access to a paper.",{"type":21,"tag":22,"props":712,"children":713},{},[714],{"type":26,"value":715},"This deal is not IBM's first move in that direction this year. In May 2026, IBM and the U.S. Department of Commerce announced Anderon, described as the first purpose-built quantum wafer foundry in the country, a 300-millimeter facility in Albany, New York, backed by a proposed $1 billion CHIPS Act award alongside $1 billion in IBM's own cash. Then on June 2, 2026, IBM committed more than $10 billion to quantum computing over five years, spanning research, manufacturing, ecosystem partnerships, and explicitly, mergers and acquisitions. The HRL deal, announced seven weeks later, is that acquisitions line item turning into an actual transaction.",{"type":21,"tag":22,"props":717,"children":718},{},[719],{"type":26,"value":720},"Read together, the sequence looks like a company building the manufacturing base first (Anderon), backing it with capital (the $10 billion commitment), and then acquiring a qubit modality it did not already have in-house (HRL). None of that guarantees the bet pays off. It does mean the acquisition fits a pattern rather than arriving as an isolated headline.",{"type":21,"tag":43,"props":722,"children":724},{"id":723},"the-people-making-the-case",[725],{"type":26,"value":726},"The people making the case",{"type":21,"tag":22,"props":728,"children":729},{},[730],{"type":26,"value":731},"Jay Gambetta, IBM's Director of Research and an IBM Fellow, framed the deal as HRL helping IBM \"advance toward the frontiers of quantum innovation\" and strengthening its \"long-term plans to deliver quantum computing, sensing and networking advances,\" per IBM's announcement. HRL's president and CEO, Rob Vasquez, called the move the \"natural next chapter\" for a team that has spent years exploring how future quantum computers might be built at scales that seem impossible today.",{"type":21,"tag":22,"props":733,"children":734},{},[735],{"type":26,"value":736},"Those are the kinds of quotes every acquisition announcement produces, and they are worth reading as exactly that: the framing both companies agreed to put in front of the press, not an independent assessment. The parts of this deal that are checkable are the corporate facts (signed agreement, expected close date, the ownership change from Boeing and GM to IBM) and HRL's public research record. The parts that are not yet checkable are whether silicon-spin qubits reach useful scale faster inside IBM than they would have independently.",{"type":21,"tag":43,"props":738,"children":740},{"id":739},"hrls-history-is-longer-than-the-quantum-story-suggests",[741],{"type":26,"value":742},"HRL's history is longer than the quantum story suggests",{"type":21,"tag":22,"props":744,"children":745},{},[746],{"type":26,"value":747},"HRL traces back to Hughes Research Laboratories, founded by Howard Hughes in 1948. Its best-known achievement predates quantum computing by six decades: Theodore Maiman built the world's first working laser at the lab's Malibu facility on May 16, 1960, using a synthetic ruby crystal. The lab reorganized as HRL Laboratories, LLC in 1997, after Hughes Aircraft's ownership was restructured, and has operated since under joint ownership by Boeing and General Motors, serving both commercial and U.S. government customers across sensing, communications, advanced manufacturing, and materials science, not only quantum computing.",{"type":21,"tag":22,"props":749,"children":750},{},[751],{"type":26,"value":752},"That history matters for one reason: HRL is an established, credentialed lab with a long track record of peer-reviewed, independently reproduced results, not a startup selling a roadmap. When it publishes a Nature paper, as it did on the self-operating silicon processor, the result carries the weight of that track record. That is a different kind of credibility than a press release, and it is worth distinguishing the two when reading coverage of this acquisition.",{"type":21,"tag":43,"props":754,"children":756},{"id":755},"what-to-watch-once-the-deal-closes",[757],{"type":26,"value":758},"What to watch once the deal closes",{"type":21,"tag":22,"props":760,"children":761},{},[762],{"type":26,"value":763},"The close itself, expected by the end of Q3 2026, is the first checkable milestone. After that, watch whether IBM folds HRL's spin-qubit work into a named point on its public roadmap, the way Starling and Blue Jay are already named and dated, or keeps it as a longer-horizon research bet without a committed delivery date. Also watch whether Anderon's foundry plans expand beyond superconducting wafers to cover spin-qubit fabrication, since that would be the concrete sign that IBM intends to manufacture both modalities at scale rather than run HRL as a separate research track.",{"type":21,"tag":22,"props":765,"children":766},{},[767,769,773,774,778],{"type":26,"value":768},"For now, the honest summary is narrower than the headlines: IBM bought a credentialed silicon-spin qubit research team and its intellectual property, for an undisclosed price, weeks after committing capital to exactly this kind of move. The technology bet is real. Whether it changes IBM's timeline to a useful quantum computer is not something this announcement, or HRL's paper, answers on its own. Our ",{"type":21,"tag":29,"props":770,"children":771},{"href":590},[772],{"type":26,"value":593},{"type":26,"value":383},{"type":21,"tag":29,"props":775,"children":776},{"href":328},[777],{"type":26,"value":331},{"type":26,"value":779}," are the places to track how this compares against the trapped-ion, photonic, and neutral-atom approaches other companies are betting on instead.",{"type":21,"tag":22,"props":781,"children":782},{},[783,789,791,797,799,805,806,813,814,821,822,829,830,837],{"type":21,"tag":784,"props":785,"children":786},"strong",{},[787],{"type":26,"value":788},"Sources:",{"type":26,"value":790}," ",{"type":21,"tag":29,"props":792,"children":794},{"href":622,"rel":793},[378],[795],{"type":26,"value":796},"IBM newsroom announcement",{"type":26,"value":798},", ",{"type":21,"tag":29,"props":800,"children":802},{"href":654,"rel":801},[378],[803],{"type":26,"value":804},"IBM Research blog",{"type":26,"value":798},{"type":21,"tag":29,"props":807,"children":810},{"href":808,"rel":809},"https:\u002F\u002Fsiliconangle.com\u002F2026\u002F07\u002F23\u002Fibm-acquires-quantum-computing-research-lab-hrl\u002F",[378],[811],{"type":26,"value":812},"SiliconANGLE",{"type":26,"value":798},{"type":21,"tag":29,"props":815,"children":818},{"href":816,"rel":817},"https:\u002F\u002Fwww.govconwire.com\u002Farticles\u002Fibm-buy-hrl-laboratories-quantum-computing",[378],[819],{"type":26,"value":820},"GovConWire",{"type":26,"value":798},{"type":21,"tag":29,"props":823,"children":826},{"href":824,"rel":825},"https:\u002F\u002Fnewsroom.ibm.com\u002F2026-06-02-ibm-commits-more-than-10-billion-to-quantum-computing,-funding-its-roadmap-from-todays-leading-systems-to-the-worlds-first-fault-tolerant-quantum-computers",[378],[827],{"type":26,"value":828},"IBM's $10 billion quantum investment announcement",{"type":26,"value":798},{"type":21,"tag":29,"props":831,"children":834},{"href":832,"rel":833},"https:\u002F\u002Fwww.hrl.com\u002Fabout\u002Fhistory",[378],[835],{"type":26,"value":836},"HRL Laboratories history",{"type":26,"value":237},{"title":7,"searchDepth":164,"depth":164,"links":839},[840,841,842,843,844],{"id":643,"depth":164,"text":646},{"id":702,"depth":164,"text":705},{"id":723,"depth":164,"text":726},{"id":739,"depth":164,"text":742},{"id":755,"depth":164,"text":758},"content:blog:ibm-hrl-laboratories-acquisition-explained.md","blog\u002Fibm-hrl-laboratories-acquisition-explained.md","blog\u002Fibm-hrl-laboratories-acquisition-explained",{"_path":457,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":849,"description":850,"date":10,"author":11,"tags":851,"readingTime":853,"body":854,"_type":171,"_id":1003,"_source":173,"_file":1004,"_stem":1005,"_extension":176},"IBM Claimed Quantum Advantage Three Times in One Day: What Each Result Shows","On July 30, 2026, IBM announced three separate quantum advantage results with three different partners. Here is what each one demonstrated, and why the verification method matters more than the headline.",[287,15,852],"Qiskit",9,{"type":18,"children":855,"toc":996},[856,861,867,880,892,898,903,908,914,919,924,930,951,956,962,967],{"type":21,"tag":22,"props":857,"children":858},{},[859],{"type":26,"value":860},"On July 30, 2026, IBM announced three quantum advantage results in a single day. Three different partners. Three different physics problems. Three different verification methods. Notice that pattern before you read any single headline. IBM Research director Jay Gambetta called this \"the quantum advantage era.\" Treat that claim the way we treat every vendor headline on this site. Take the pieces apart. Check each one. Decide what it means for you.",{"type":21,"tag":43,"props":862,"children":864},{"id":863},"result-one-ibm-and-the-university-of-chicago-logical-qubits-at-scale",[865],{"type":26,"value":866},"Result one: IBM and the University of Chicago, logical qubits at scale",{"type":21,"tag":22,"props":868,"children":869},{},[870,872,878],{"type":26,"value":871},"The team ran an encoded circuit using 70 ",{"type":21,"tag":29,"props":873,"children":875},{"href":874},"\u002Fglossary\u002Flogical-qubit",[876],{"type":26,"value":877},"logical qubits",{"type":26,"value":879}," through thousands of logical operations, with a logical error rate roughly 10 times lower than the physical error rate underneath it. The task finished in about 15 minutes on IBM hardware. Leading classical simulation methods faced runtimes described as prohibitive for the same task.",{"type":21,"tag":22,"props":881,"children":882},{},[883,885,890],{"type":26,"value":884},"Notice what the coverage did not state: the physical qubit count behind those 70 logical qubits. Our ",{"type":21,"tag":29,"props":886,"children":887},{"href":487},[888],{"type":26,"value":889},"companion piece on logical qubits and fault tolerance",{"type":26,"value":891}," covers why that ratio, not the logical qubit count alone, decides whether a result is efficient or brute-forced. Until that number surfaces, read \"70 logical qubits\" as a real result with one open question attached.",{"type":21,"tag":43,"props":893,"children":895},{"id":894},"result-two-ibm-and-qedma-a-real-physics-question-checked-two-ways",[896],{"type":26,"value":897},"Result two: IBM and Qedma, a real physics question checked two ways",{"type":21,"tag":22,"props":899,"children":900},{},[901],{"type":26,"value":902},"This team simulated a 74-qubit two-dimensional Floquet Ising model on IBM Heron processors, using Qedma's QESEM error-mitigation software. RIKEN contributed, and BlueQubit supported the study. The team compared results against classical simulation methods, including Japan's Fugaku supercomputer, and found the quantum results held steady past the point where classical approaches stopped agreeing with each other.",{"type":21,"tag":22,"props":904,"children":905},{},[906],{"type":26,"value":907},"The trust-building step here is the part worth remembering. Two independent error-mitigation estimators, one heuristic and one rigorous, agreed with each other. The team then partially reproduced the experiment on a Quantinuum system, a competitor's hardware, and got consistent results. Cross-platform agreement is a stronger form of evidence than one vendor reporting a number from its own machine.",{"type":21,"tag":43,"props":909,"children":911},{"id":910},"result-three-ibm-and-algorithmiq-checking-an-answer-nothing-else-verifies",[912],{"type":26,"value":913},"Result three: IBM and Algorithmiq, checking an answer nothing else verifies",{"type":21,"tag":22,"props":915,"children":916},{},[917],{"type":26,"value":918},"This is the hardest version of the problem. When no classical computer verifies a result at all, how do you know the quantum answer is right? IBM and Algorithmiq simulated a heterogeneous quantum material on IBM Heron hardware and built their case on noise modeling, error mitigation, and cross-platform testing rather than a classical ground truth.",{"type":21,"tag":22,"props":920,"children":921},{},[922],{"type":26,"value":923},"Algorithmiq also open-sourced a classical simulation package called monoprop, built specifically so outside researchers independently test future advantage claims instead of taking a press release at its word. That release matters more than it might look. It is the one part of this announcement any reader of this site is able to check directly.",{"type":21,"tag":43,"props":925,"children":927},{"id":926},"why-the-trust-framing-matters-more-than-the-speed-framing",[928],{"type":26,"value":929},"Why the trust framing matters more than the speed framing",{"type":21,"tag":22,"props":931,"children":932},{},[933,935,941,943,949],{"type":26,"value":934},"\"Beyond classical simulation\" is not a new claim. Google made a related claim in 2019 with its ",{"type":21,"tag":29,"props":936,"children":938},{"href":937},"\u002Fresearch\u002Fgoogle-quantum-supremacy-2019",[939],{"type":26,"value":940},"quantum supremacy result",{"type":26,"value":942},", and better classical algorithms later closed part of that gap. IBM made a related but weaker claim in 2023 with ",{"type":21,"tag":29,"props":944,"children":946},{"href":945},"\u002Fresearch\u002Fibm-quantum-utility-2023",[947],{"type":26,"value":948},"quantum utility",{"type":26,"value":950},", which did not require beating classical computation outright, only being useful and comparable to it.",{"type":21,"tag":22,"props":952,"children":953},{},[954],{"type":26,"value":955},"This round targets a harder bar than either: not only \"we finished faster than classical methods,\" but \"here is independently checkable evidence for why you should trust the answer.\" That second half, the verification method, is the actual news in all three results. The raw qubit and gate counts are the part every previous announcement already led with.",{"type":21,"tag":43,"props":957,"children":959},{"id":958},"what-happens-next",[960],{"type":26,"value":961},"What happens next",{"type":21,"tag":22,"props":963,"children":964},{},[965],{"type":26,"value":966},"Peer review and independent replication are the steps that eventually narrowed Google's 2019 claim, and they are the steps to watch for here too. Three same-day press announcements are not the same thing as three peer-reviewed, independently replicated results. Given Algorithmiq's open monoprop release, at least one path to that independent check already exists. Watch whether other research groups pick it up and whether their numbers match.",{"type":21,"tag":22,"props":968,"children":969},{},[970,972,976,977,981,983,988,989,994],{"type":26,"value":971},"For a broader sense of how IBM's hardware and error-mitigation approach compares with competing modalities, see our ",{"type":21,"tag":29,"props":973,"children":974},{"href":590},[975],{"type":26,"value":593},{"type":26,"value":383},{"type":21,"tag":29,"props":978,"children":979},{"href":328},[980],{"type":26,"value":331},{"type":26,"value":982},". For the mechanics behind logical qubits and why overhead numbers matter more than headline qubit counts, our ",{"type":21,"tag":29,"props":984,"children":985},{"href":487},[986],{"type":26,"value":987},"fault tolerance explainer",{"type":26,"value":383},{"type":21,"tag":29,"props":990,"children":991},{"href":232},[992],{"type":26,"value":993},"Quantinuum Helios piece",{"type":26,"value":995}," cover the same questions from a different vendor's claims.",{"title":7,"searchDepth":164,"depth":164,"links":997},[998,999,1000,1001,1002],{"id":863,"depth":164,"text":866},{"id":894,"depth":164,"text":897},{"id":910,"depth":164,"text":913},{"id":926,"depth":164,"text":929},{"id":958,"depth":164,"text":961},"content:blog:ibm-quantum-advantage-triple-announcement-2026.md","blog\u002Fibm-quantum-advantage-triple-announcement-2026.md","blog\u002Fibm-quantum-advantage-triple-announcement-2026",{"_path":1007,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":1008,"description":1009,"date":10,"author":11,"tags":1010,"readingTime":16,"body":1011,"_type":171,"_id":1126,"_source":173,"_file":1127,"_stem":1128,"_extension":176},"\u002Fblog\u002Finfleqtion-sqale-illinois-quantum-park","Infleqtion Will Put a 50-Logical-Qubit Machine in Chicago by 2027","Infleqtion is deploying Sqale, a neutral-atom quantum computer targeting 50 logical qubits, at the Illinois Quantum and Microelectronics Park in 2027. The company is also opening a Chicago center aimed specifically at energy-grid optimization problems.",[15,287],{"type":18,"children":1012,"toc":1121},[1013,1034,1040,1058,1078,1084,1089,1094,1100,1105],{"type":21,"tag":22,"props":1014,"children":1015},{},[1016,1018,1025,1026,1032],{"type":26,"value":1017},"On July 21, 2026, Infleqtion announced it will deploy a fault-tolerant, neutral-atom quantum computer named Sqale at the Illinois Quantum and Microelectronics Park (IQMP), with hardware delivery planned for 2027, according to ",{"type":21,"tag":29,"props":1019,"children":1022},{"href":1020,"rel":1021},"https:\u002F\u002Finfleqtion.com\u002Finfleqtion-to-deploy-fault-tolerant-neutral-atom-quantum-computer-in-illinois\u002F",[378],[1023],{"type":26,"value":1024},"the company's own announcement",{"type":26,"value":383},{"type":21,"tag":29,"props":1027,"children":1030},{"href":1028,"rel":1029},"https:\u002F\u002Fthequantuminsider.com\u002F2026\u002F07\u002F23\u002Finfleqtion-neutral-atom-quantum-computer-illinois\u002F",[378],[1031],{"type":26,"value":381},{"type":26,"value":1033},". What makes this worth a post rather than a routine roadmap update is how specific the commitment is: a named site, a named delivery year, and a named application area the company is building toward, rather than a general statement about future ambitions.",{"type":21,"tag":43,"props":1035,"children":1037},{"id":1036},"what-sqale-is-supposed-to-do",[1038],{"type":26,"value":1039},"What Sqale is supposed to do",{"type":21,"tag":22,"props":1041,"children":1042},{},[1043,1045,1049,1051,1056],{"type":26,"value":1044},"Sqale is designed to demonstrate more than 50 ",{"type":21,"tag":29,"props":1046,"children":1047},{"href":874},[1048],{"type":26,"value":877},{"type":26,"value":1050}," at launch, with a stated path to 100, built on a physical architecture Infleqtion says scales beyond 1,000 physical qubits. Like other ",{"type":21,"tag":29,"props":1052,"children":1053},{"href":590},[1054],{"type":26,"value":1055},"neutral-atom systems",{"type":26,"value":1057},", it uses lasers to trap and control individual atoms, and Infleqtion says the system will couple with NVIDIA's NVQLink for low-latency communication with classical GPU hardware, a pairing several vendors are now building toward as quantum systems increasingly need fast classical co-processing for error correction and control.",{"type":21,"tag":22,"props":1059,"children":1060},{},[1061,1063,1068,1070,1076],{"type":26,"value":1062},"Fifty logical qubits would be a meaningful jump if it holds up. For comparison, ",{"type":21,"tag":29,"props":1064,"children":1065},{"href":232},[1066],{"type":26,"value":1067},"Quantinuum's Helios system claims 48 logical qubits",{"type":26,"value":1069}," from roughly 96 physical qubits, and ",{"type":21,"tag":29,"props":1071,"children":1073},{"href":1072},"\u002Fblog\u002Ftop-quantum-computing-companies-2026",[1074],{"type":26,"value":1075},"QuEra reported 96 logical qubits",{"type":26,"value":1077}," on 448 physical qubits in a January 2026 Nature paper. Sqale's ratio, more than 50 logical qubits on an architecture scaling past 1,000 physical qubits, would sit at a notably higher overhead than either of those results, at least based on the numbers disclosed so far. None of these figures are directly comparable without knowing the exact error rates and code distances each system targets, and Sqale's numbers are a 2027 target, not a measured result.",{"type":21,"tag":43,"props":1079,"children":1081},{"id":1080},"the-energy-grid-angle-is-the-more-interesting-part",[1082],{"type":26,"value":1083},"The energy grid angle is the more interesting part",{"type":21,"tag":22,"props":1085,"children":1086},{},[1087],{"type":26,"value":1088},"Infleqtion is also opening a Chicago Quantum Innovation Center focused specifically on applying quantum optimization to the electrical grid: unit commitment (deciding which power plants run when), contingency analysis (planning for equipment failures), and nuclear fuel loading. Partners named in the announcement include the National Quantum Algorithm Center, University of Chicago professor Fred Chong, Constellation Energy, and EPRI, alongside existing ARPA-E funding for a related project called ENCODE.",{"type":21,"tag":22,"props":1090,"children":1091},{},[1092],{"type":26,"value":1093},"CTO Pranav Gokhale framed the choice deliberately: \"Energy is one of the best proving grounds for quantum computing because the problems are consequential and immediate.\" That is a more specific and checkable claim than most quantum-for-industry pitches, since grid optimization problems already have well-defined classical benchmarks. If a quantum approach beats those benchmarks on a real utility's data, that is a concrete result. If it does not, that will also be visible, which is more accountability than most quantum use-case announcements carry.",{"type":21,"tag":43,"props":1095,"children":1097},{"id":1096},"what-is-confirmed-and-what-is-not",[1098],{"type":26,"value":1099},"What is confirmed and what is not",{"type":21,"tag":22,"props":1101,"children":1102},{},[1103],{"type":26,"value":1104},"The site, the delivery year, and the named partners are concrete facts. The 50-logical-qubit target and the path to 100 are Infleqtion's own projections for a system that has not shipped yet. Infleqtion does have a track record to weigh those projections against: the company already operates the only 100-physical-qubit neutral-atom system at the UK's National Quantum Computing Centre, plus a deployment in Japan, so this is a company with working hardware in the field already, not a pre-revenue startup making a first claim.",{"type":21,"tag":22,"props":1106,"children":1107},{},[1108,1110,1114,1115,1119],{"type":26,"value":1109},"CEO Matthew Kinsella called the deployment \"a landmark moment for quantum computing in Chicago,\" which is the kind of framing every regional deployment announcement uses about itself. The part worth tracking independently of that framing is whether Sqale ships on the stated 2027 timeline, and whether the energy-grid partnership produces a published result against a real utility's optimization problem rather than a simulated one. Our ",{"type":21,"tag":29,"props":1111,"children":1112},{"href":590},[1113],{"type":26,"value":593},{"type":26,"value":383},{"type":21,"tag":29,"props":1116,"children":1117},{"href":328},[1118],{"type":26,"value":331},{"type":26,"value":1120}," track how neutral-atom systems like this one compare against the trapped-ion, superconducting, and photonic platforms other companies are betting on.",{"title":7,"searchDepth":164,"depth":164,"links":1122},[1123,1124,1125],{"id":1036,"depth":164,"text":1039},{"id":1080,"depth":164,"text":1083},{"id":1096,"depth":164,"text":1099},"content:blog:infleqtion-sqale-illinois-quantum-park.md","blog\u002Finfleqtion-sqale-illinois-quantum-park.md","blog\u002Finfleqtion-sqale-illinois-quantum-park",{"_path":320,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":1130,"description":1131,"date":10,"author":11,"tags":1132,"readingTime":366,"body":1134,"_type":171,"_id":1281,"_source":173,"_file":1282,"_stem":1283,"_extension":176},"IonQ Bought a $1.8 Billion Semiconductor Foundry: Here Is What Changes","IonQ completed its acquisition of SkyWater Technology, the largest US-based semiconductor foundry, and calls itself the only vertically integrated full-stack quantum platform company. Here is what that claim means and what it does not.",[287,15,1133],"Trapped-Ion",{"type":18,"children":1135,"toc":1273},[1136,1150,1156,1161,1167,1172,1177,1182,1188,1193,1212,1218,1223,1229,1248,1254],{"type":21,"tag":22,"props":1137,"children":1138},{},[1139,1141,1148],{"type":26,"value":1140},"IonQ completed its acquisition of SkyWater Technology on July 31, 2026. SkyWater is the largest semiconductor foundry operating entirely inside the United States. IonQ announced the deal in January 2026. Total equity value: roughly ",{"type":21,"tag":29,"props":1142,"children":1145},{"href":1143,"rel":1144},"https:\u002F\u002Finvestors.ionq.com\u002Fnews\u002Fnews-details\u002F2026\u002FIonQ-Completes-Acquisition-of-SkyWater-Technology\u002Fdefault.aspx",[378],[1146],{"type":26,"value":1147},"$1.8 billion",{"type":26,"value":1149},". SkyWater shareholders got $15.00 in cash plus IonQ stock, subject to a collar, for each share held. IonQ calls the combined company the only vertically integrated full-stack quantum platform company. That claim is specific and checkable. Read the parts separately before you accept the headline.",{"type":21,"tag":43,"props":1151,"children":1153},{"id":1152},"what-skywater-builds",[1154],{"type":26,"value":1155},"What SkyWater builds",{"type":21,"tag":22,"props":1157,"children":1158},{},[1159],{"type":26,"value":1160},"SkyWater does not chase the newest logic node against TSMC or Samsung. Its specialty is foundational semiconductor nodes and advanced packaging: mature process technology, not leading edge. Facilities sit in Minnesota, Florida, and Texas. Customers include commercial buyers and federal defense agencies. This distinction decides whether the acquisition targets what IonQ's hardware needs.",{"type":21,"tag":43,"props":1162,"children":1164},{"id":1163},"the-part-of-ionqs-stack-this-touches",[1165],{"type":26,"value":1166},"The part of IonQ's stack this touches",{"type":21,"tag":22,"props":1168,"children":1169},{},[1170],{"type":26,"value":1171},"Most coverage of this deal skipped one detail. A trapped-ion qubit is a single atom held in an electromagnetic field. Nobody fabricates the qubit. Ytterbium and barium ions occur naturally. They are identical to each other. No factory improves them. So what does a semiconductor foundry have to do with trapped-ion hardware?",{"type":21,"tag":22,"props":1173,"children":1174},{},[1175],{"type":26,"value":1176},"Everything around the ion. The ion trap chip is a microfabricated electrode structure that confines and shuttles ions across a surface. It is a real semiconductor device. So are the photonic components used for laser addressing and readout, and the cryogenic and RF control electronics that drive the whole system. None of that needs a 3-nanometer process. It needs the mature-node fabrication and advanced packaging SkyWater already sells to other industries.",{"type":21,"tag":22,"props":1178,"children":1179},{},[1180],{"type":26,"value":1181},"Read that way, the acquisition targets a real supply chain need. IonQ is pulling a piece of its existing supply chain in-house instead of buying it from a third party.",{"type":21,"tag":43,"props":1183,"children":1185},{"id":1184},"what-vertically-integrated-means-precisely",[1186],{"type":26,"value":1187},"What \"vertically integrated\" means, precisely",{"type":21,"tag":22,"props":1189,"children":1190},{},[1191],{"type":26,"value":1192},"No other quantum hardware company owns its foundry outright as a subsidiary. IBM has a long history with its own fabs and partners with Albany NanoTech. PsiQuantum's photonic chips come from a partnership with GlobalFoundries, not an owned subsidiary. Quantinuum's manufacturing traces back through Honeywell's aerospace and controls businesses. Owned-and-operated differs from having a good manufacturing partner, and IonQ's claim holds up on that narrow point.",{"type":21,"tag":22,"props":1194,"children":1195},{},[1196,1198,1202,1204,1210],{"type":26,"value":1197},"The claim does not hold up as a physics claim. Owning a foundry produces no new logical qubit and no fidelity gain by itself. Our ",{"type":21,"tag":29,"props":1199,"children":1200},{"href":590},[1201],{"type":26,"value":593},{"type":26,"value":1203}," and our ",{"type":21,"tag":29,"props":1205,"children":1207},{"href":1206},"\u002Fcompare",[1208],{"type":26,"value":1209},"SDK and modality comparison",{"type":26,"value":1211}," cover how IonQ stacks up against competitors across every technology, not only this one.",{"type":21,"tag":43,"props":1213,"children":1215},{"id":1214},"why-the-size-of-the-deal-matters",[1216],{"type":26,"value":1217},"Why the size of the deal matters",{"type":21,"tag":22,"props":1219,"children":1220},{},[1221],{"type":26,"value":1222},"$1.8 billion is large next to IonQ's quantum computing revenue history. A large share of the payment was IonQ stock, not cash. SkyWater brings its own profitable semiconductor business, serving customers who have nothing to do with quantum computing. After this deal, IonQ is not a pure quantum computing company anymore. A real share of its revenue now comes from ordinary foundry services. Whether that helps the hardware roadmap or distracts from it is an open question. Future earnings reports will answer that, not this press release.",{"type":21,"tag":43,"props":1224,"children":1226},{"id":1225},"the-domestic-supply-chain-story-holds-up-best",[1227],{"type":26,"value":1228},"The domestic supply chain story holds up best",{"type":21,"tag":22,"props":1230,"children":1231},{},[1232,1234,1240,1241,1246],{"type":26,"value":1233},"SkyWater's federal defense customers and its US-only footprint match a pattern we track elsewhere on this site: the federal push toward domestically controlled, security-vetted quantum and cryptographic infrastructure. See our posts on the ",{"type":21,"tag":29,"props":1235,"children":1237},{"href":1236},"\u002Fblog\u002Fpost-quantum-migration-deadlines",[1238],{"type":26,"value":1239},"accelerated post-quantum migration deadlines",{"type":26,"value":667},{"type":21,"tag":29,"props":1242,"children":1243},{"href":670},[1244],{"type":26,"value":1245},"quantum benchmarking executive order",{"type":26,"value":1247},". A quantum hardware vendor with a fully domestic, defense-cleared fabrication and packaging pipeline has a real selling point with government buyers that competitors sourcing through shared or offshore fabs do not have. This part of IonQ's case holds up under scrutiny. It addresses a real, separate requirement: supply chain security, which increasingly gates government contracts regardless of qubit count.",{"type":21,"tag":43,"props":1249,"children":1251},{"id":1250},"what-to-watch-next",[1252],{"type":26,"value":1253},"What to watch next",{"type":21,"tag":22,"props":1255,"children":1256},{},[1257,1259,1264,1266,1271],{"type":26,"value":1258},"A foundry shortens iteration cycles and cuts supply chain risk. It does not improve gate fidelity, connectivity, or logical qubit overhead on its own. Those are the numbers that show whether trapped-ion hardware is progressing. We cover them in ",{"type":21,"tag":29,"props":1260,"children":1261},{"href":487},[1262],{"type":26,"value":1263},"logical qubits and fault tolerance",{"type":26,"value":1265}," and in our look at ",{"type":21,"tag":29,"props":1267,"children":1268},{"href":232},[1269],{"type":26,"value":1270},"Quantinuum's Helios encoding ratio",{"type":26,"value":1272},". The real test of this acquisition is whether IonQ's next generation of Aria- or Forte-class systems ships faster, or with better specs, than it would have on the old supply chain. That is a multi-year claim, not a same-day one. Until the data arrives, treat \"vertically integrated full-stack quantum platform company\" the way you would treat any vendor headline. Check the structural fact first. SkyWater is now a wholly owned subsidiary. Set the framing aside until results confirm it.",{"title":7,"searchDepth":164,"depth":164,"links":1274},[1275,1276,1277,1278,1279,1280],{"id":1152,"depth":164,"text":1155},{"id":1163,"depth":164,"text":1166},{"id":1184,"depth":164,"text":1187},{"id":1214,"depth":164,"text":1217},{"id":1225,"depth":164,"text":1228},{"id":1250,"depth":164,"text":1253},"content:blog:ionq-skywater-acquisition-explained.md","blog\u002Fionq-skywater-acquisition-explained.md","blog\u002Fionq-skywater-acquisition-explained",{"_path":1285,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":1286,"description":1287,"date":10,"author":11,"tags":1288,"readingTime":16,"body":1289,"_type":171,"_id":1398,"_source":173,"_file":1399,"_stem":1400,"_extension":176},"\u002Fblog\u002Fpsiquantum-darpa-quantum-benchmarking-125-million","DARPA Is Paying PsiQuantum $125 Million to Check Its Own Claims","PsiQuantum signed an expanded $125 million agreement with DARPA's Quantum Benchmarking Initiative, its largest U.S. government contract to date. The money funds outside verification of PsiQuantum's fault-tolerance roadmap, not new research.",[287,15],{"type":18,"children":1290,"toc":1392},[1291,1312,1317,1323,1328,1333,1339,1344,1356,1362,1367,1372,1376],{"type":21,"tag":22,"props":1292,"children":1293},{},[1294,1296,1302,1303,1310],{"type":26,"value":1295},"On July 22, 2026, PsiQuantum signed an expanded $125 million agreement with the Defense Advanced Research Projects Agency, its largest U.S. government contract to date, according to ",{"type":21,"tag":29,"props":1297,"children":1300},{"href":1298,"rel":1299},"https:\u002F\u002Fthequantuminsider.com\u002F2026\u002F07\u002F22\u002Fpsiquantum-signs-125-million-agreement-with-darpa\u002F",[378],[1301],{"type":26,"value":381},{"type":26,"value":383},{"type":21,"tag":29,"props":1304,"children":1307},{"href":1305,"rel":1306},"https:\u002F\u002Fwww.psiquantum.com\u002Fnews-import\u002Fpsiquantum-signs-125-million-agreement-with-darpa",[378],[1308],{"type":26,"value":1309},"PsiQuantum's own announcement",{"type":26,"value":1311},". The money sits under DARPA's Quantum Benchmarking Initiative (QBI), a program built around a specific, unglamorous question: is a practically useful quantum computer achievable by 2033, and does any company's roadmap survive an outside party checking it.",{"type":21,"tag":22,"props":1313,"children":1314},{},[1315],{"type":26,"value":1316},"That framing matters more than the dollar figure. This is not research funding for PsiQuantum to build something new. It funds DARPA and independent evaluators testing whether what PsiQuantum has already built and claimed holds up.",{"type":21,"tag":43,"props":1318,"children":1320},{"id":1319},"what-qbi-tests",[1321],{"type":26,"value":1322},"What QBI tests",{"type":21,"tag":22,"props":1324,"children":1325},{},[1326],{"type":26,"value":1327},"DARPA started the Quantum Benchmarking Initiative's predecessor program, Underexplored Systems for Utility-Scale Quantum Computing, in January 2023, when it first selected PsiQuantum for an initial evaluation stage. The program has since progressed in stages: PsiQuantum advanced to a second stage in January 2024, then to Stage C in February 2025, the most advanced tier. In November 2025, DARPA moved 11 companies into an earlier stage of the broader QBI program, and PsiQuantum is one of only two companies reported to have reached Stage C, the tier reserved for the most credible utility-scale claims.",{"type":21,"tag":22,"props":1329,"children":1330},{},[1331],{"type":26,"value":1332},"Getting to Stage C is itself informative. DARPA does not let every company's roadmap through to detailed, funded, adversarial testing. A company that fails an earlier stage is quietly out. Reaching the final tier is a signal that PsiQuantum's claims survived scrutiny that most quantum hardware announcements never face at all.",{"type":21,"tag":43,"props":1334,"children":1336},{"id":1335},"what-the-money-funds",[1337],{"type":26,"value":1338},"What the money funds",{"type":21,"tag":22,"props":1340,"children":1341},{},[1342],{"type":26,"value":1343},"The $125 million follows a smaller $31.8 million agreement from September 2025 that funded on-site testing at PsiQuantum's facilities. This expanded agreement funds testing across PsiQuantum's hardware, software, system architecture, and infrastructure, spanning its Milpitas, California and Chicago, Illinois sites. It is structured as a performance-based award, meaning PsiQuantum gets paid for hitting defined technical milestones DARPA and its evaluators check, not simply for showing up.",{"type":21,"tag":22,"props":1345,"children":1346},{},[1347,1349,1354],{"type":26,"value":1348},"That structure is the point. ",{"type":21,"tag":29,"props":1350,"children":1351},{"href":1072},[1352],{"type":26,"value":1353},"PsiQuantum's photonic, fault-tolerance-first approach",{"type":26,"value":1355}," has never shipped a commercial system, and its timeline for a working fault-tolerant machine has already slipped once, from 2027 to 2029. A company at that stage benefits enormously from being able to say a federal agency is independently verifying its numbers rather than taking PsiQuantum's word for them.",{"type":21,"tag":43,"props":1357,"children":1359},{"id":1358},"why-this-is-a-different-kind-of-evidence-than-a-press-release",[1360],{"type":26,"value":1361},"Why this is a different kind of evidence than a press release",{"type":21,"tag":22,"props":1363,"children":1364},{},[1365],{"type":26,"value":1366},"Most of what this site covers about early-stage quantum hardware comes from company announcements: a qubit count, a fidelity number, a funding round. Those numbers are real, but they are self-reported, and this site treats them accordingly until someone outside the company checks them.",{"type":21,"tag":22,"props":1368,"children":1369},{},[1370],{"type":26,"value":1371},"A DARPA QBI contract is structurally different. The agency's stated purpose is separating hype from reality in quantum computing roadmaps, and it does that by paying independent evaluators to test specific claims rather than accepting a company's own benchmarks. That does not mean PsiQuantum's fault-tolerance timeline will hold. It means the timeline is now subject to a level of outside checking that most competitors in this space do not have applied to their own roadmaps.",{"type":21,"tag":43,"props":1373,"children":1374},{"id":1250},[1375],{"type":26,"value":1253},{"type":21,"tag":22,"props":1377,"children":1378},{},[1379,1381,1385,1386,1390],{"type":26,"value":1380},"QBI's own stated horizon is 2033, so there is no near-term result here to wait for. What is worth tracking is whether PsiQuantum publishes or DARPA discloses any of the specific benchmark results from this testing, rather than only the fact that testing is happening. A contract confirms that evaluation is underway. It does not tell you what the evaluation found. Our ",{"type":21,"tag":29,"props":1382,"children":1383},{"href":590},[1384],{"type":26,"value":593},{"type":26,"value":383},{"type":21,"tag":29,"props":1387,"children":1388},{"href":328},[1389],{"type":26,"value":331},{"type":26,"value":1391}," track how PsiQuantum's photonic approach compares with the superconducting, trapped-ion, and neutral-atom platforms other companies are betting on for the same fault-tolerance goal.",{"title":7,"searchDepth":164,"depth":164,"links":1393},[1394,1395,1396,1397],{"id":1319,"depth":164,"text":1322},{"id":1335,"depth":164,"text":1338},{"id":1358,"depth":164,"text":1361},{"id":1250,"depth":164,"text":1253},"content:blog:psiquantum-darpa-quantum-benchmarking-125-million.md","blog\u002Fpsiquantum-darpa-quantum-benchmarking-125-million.md","blog\u002Fpsiquantum-darpa-quantum-benchmarking-125-million",{"_path":1402,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":1403,"description":1404,"date":10,"author":11,"tags":1405,"readingTime":288,"body":1406,"_type":171,"_id":1500,"_source":173,"_file":1501,"_stem":1502,"_extension":176},"\u002Fblog\u002Fquantinuum-bmw-multi-year-partnership","Quantinuum and BMW Turned a Five-Year Research Project Into a Roadmap Commitment","Quantinuum and BMW Group expanded their quantum chemistry collaboration, running since 2021, into a multi-year partnership that gives BMW access to Quantinuum's Helios, Sol, and Apollo hardware generations through 2029. Here is what five years of actual results looks like next to a typical pilot announcement.",[287,15],{"type":18,"children":1407,"toc":1495},[1408,1429,1435,1440,1445,1451,1463,1468,1474,1479],{"type":21,"tag":22,"props":1409,"children":1410},{},[1411,1413,1420,1421,1427],{"type":26,"value":1412},"On May 5, 2026, Quantinuum and BMW Group announced they were expanding their quantum computing collaboration into a formal multi-year partnership, according to ",{"type":21,"tag":29,"props":1414,"children":1417},{"href":1415,"rel":1416},"https:\u002F\u002Fwww.quantinuum.com\u002Fpress-releases\u002Fquantinuum-and-bmw-group-expand-landmark-quantum-computing-collaboration-with-new-multi-year-partnership",[378],[1418],{"type":26,"value":1419},"Quantinuum's press release",{"type":26,"value":383},{"type":21,"tag":29,"props":1422,"children":1425},{"href":1423,"rel":1424},"https:\u002F\u002Fthequantuminsider.com\u002F2026\u002F05\u002F05\u002Fquantinuum-and-bmw-group-expand-quantum-computing-collaboration-with-new-multi-year-partnership\u002F",[378],[1426],{"type":26,"value":381},{"type":26,"value":1428},". This is not a new story breaking this week. It is worth covering anyway, because most quantum-for-industry partnerships announced with this much fanfare are pilots with no track record behind them, and this one has run since 2021.",{"type":21,"tag":43,"props":1430,"children":1432},{"id":1431},"five-years-is-the-actual-story-here",[1433],{"type":26,"value":1434},"Five years is the actual story here",{"type":21,"tag":22,"props":1436,"children":1437},{},[1438],{"type":26,"value":1439},"Quantinuum and BMW have collaborated on industrial chemistry problems since 2021, moving from early algorithm development to simulating real molecular systems relevant to next-generation mobility. The specific research area is electrochemistry for fuel cells and batteries, including modeling the oxygen reduction reaction at platinum catalysts, a problem that determines fuel cell efficiency and where classical simulation methods struggle with the electron correlation effects involved.",{"type":21,"tag":22,"props":1441,"children":1442},{},[1443],{"type":26,"value":1444},"That history matters more than the announcement itself. Most quantum industry partnerships get covered at the moment they are signed, before there is any way to know whether the collaboration produces results or quietly fades. A five-year run with published progress from early algorithm work to real molecular simulation is a track record, not a press release promise.",{"type":21,"tag":43,"props":1446,"children":1448},{"id":1447},"what-bmw-gets",[1449],{"type":26,"value":1450},"What BMW gets",{"type":21,"tag":22,"props":1452,"children":1453},{},[1454,1456,1461],{"type":26,"value":1455},"The expanded partnership gives BMW access to successive generations of Quantinuum's ",{"type":21,"tag":29,"props":1457,"children":1458},{"href":232},[1459],{"type":26,"value":1460},"trapped-ion",{"type":26,"value":1462}," hardware on a defined timeline: Helios (the current 96-qubit system, available now as hardware-as-a-service), Sol (planned for 2027 as Quantinuum's first commercially available system built on a two-dimensional qubit grid), and Apollo (targeted for 2029 as a fully fault-tolerant system capable of executing millions of gates).",{"type":21,"tag":22,"props":1464,"children":1465},{},[1466],{"type":26,"value":1467},"Quantinuum CEO Rajeeb Hazra framed the deal around \"driving commercial adoption of quantum computing through close collaboration with industry leaders on high-impact applications.\" BMW's Vice President of New Technologies, Martin Tietze, said the companies \"translate advances in quantum hardware into real-world applications.\" Both statements are the kind of framing a joint press release always uses. The part that is independently checkable is the hardware access itself: BMW is committed to Quantinuum's roadmap through at least 2029, which is an unusually long horizon for a customer relationship in a field where most vendor roadmaps get revised within a year or two.",{"type":21,"tag":43,"props":1469,"children":1471},{"id":1470},"why-this-is-a-useful-comparison-point",[1472],{"type":26,"value":1473},"Why this is a useful comparison point",{"type":21,"tag":22,"props":1475,"children":1476},{},[1477],{"type":26,"value":1478},"Announcements about quantum computing partnerships with automakers, banks, and pharmaceutical companies are common, and most of them describe an exploratory pilot with no committed timeline and no disclosed technical result. This partnership is a useful yardstick against those: a five-year history of published, incremental research progress, a named scientific problem (the oxygen reduction reaction) rather than a vague reference to \"materials science,\" and a hardware access commitment tied to specific, dated system generations rather than an open-ended promise to keep exploring.",{"type":21,"tag":22,"props":1480,"children":1481},{},[1482,1484,1488,1489,1493],{"type":26,"value":1483},"None of that guarantees the electrochemistry results translate into a better BMW battery or fuel cell. It does mean this collaboration has a longer, more specific paper trail than the average industry quantum pilot, and it is worth checking back against as Sol and Apollo ship, since the value of a roadmap commitment depends entirely on whether the hardware behind it arrives on schedule. Our ",{"type":21,"tag":29,"props":1485,"children":1486},{"href":590},[1487],{"type":26,"value":593},{"type":26,"value":383},{"type":21,"tag":29,"props":1490,"children":1491},{"href":328},[1492],{"type":26,"value":331},{"type":26,"value":1494}," track how Quantinuum's trapped-ion roadmap compares with the superconducting, neutral-atom, and photonic platforms other vendors are building toward the same industrial-chemistry use cases.",{"title":7,"searchDepth":164,"depth":164,"links":1496},[1497,1498,1499],{"id":1431,"depth":164,"text":1434},{"id":1447,"depth":164,"text":1450},{"id":1470,"depth":164,"text":1473},"content:blog:quantinuum-bmw-multi-year-partnership.md","blog\u002Fquantinuum-bmw-multi-year-partnership.md","blog\u002Fquantinuum-bmw-multi-year-partnership",{"_path":232,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":1504,"description":1505,"date":10,"author":11,"tags":1506,"readingTime":16,"body":1507,"_type":171,"_id":1661,"_source":173,"_file":1662,"_stem":1663,"_extension":176},"Quantinuum's Helios: 48 Logical Qubits at 2:1 Encoding, Explained","Quantinuum's newest trapped-ion system claims 48 error-corrected logical qubits from around 96 physical ones. The qubit count isn't the headline. The ratio is.",[365,15,1133],{"type":18,"children":1508,"toc":1655},[1509,1521,1533,1539,1551,1557,1569,1593,1599,1618,1623,1629],{"type":21,"tag":22,"props":1510,"children":1511},{},[1512,1514,1519],{"type":26,"value":1513},"Quantinuum shipped its newest trapped-ion system, Helios, claiming 48 error-corrected logical qubits encoded at roughly ",{"type":21,"tag":784,"props":1515,"children":1516},{},[1517],{"type":26,"value":1518},"2:1",{"type":26,"value":1520},", about 96 physical qubits doing the work of 48 logical ones. Coverage of the announcement mostly led with the qubit count. The number worth sitting with is the ratio.",{"type":21,"tag":22,"props":1522,"children":1523},{},[1524,1526,1531],{"type":26,"value":1525},"If you've read our ",{"type":21,"tag":29,"props":1527,"children":1528},{"href":487},[1529],{"type":26,"value":1530},"companion post on logical qubits and fault tolerance",{"type":26,"value":1532},", you already know why. Surface-code estimates on superconducting hardware typically run from hundreds to a few thousand physical qubits per logical qubit, depending on how far below the error threshold the underlying hardware sits. A vendor-reported ratio close to 2:1 is not an incremental improvement on that. It's a different part of the design space entirely, and it's worth understanding what makes it possible before taking the number at face value.",{"type":21,"tag":43,"props":1534,"children":1536},{"id":1535},"what-helios-is",[1537],{"type":26,"value":1538},"What Helios is",{"type":21,"tag":22,"props":1540,"children":1541},{},[1542,1544,1549],{"type":26,"value":1543},"Helios is Quantinuum's latest H-Series-generation trapped-ion machine: the same lineage that has repeatedly held quantum volume records and that IonQ, Quantinuum's main trapped-ion competitor, keeps as its primary benchmark to beat. Trapped-ion hardware traps individual ions in an electromagnetic field and manipulates them with laser pulses, which trades gate speed (microseconds to milliseconds, versus nanoseconds for superconducting qubits) for two things that matter enormously for error correction: higher per-gate fidelity, and ",{"type":21,"tag":784,"props":1545,"children":1546},{},[1547],{"type":26,"value":1548},"all-to-all connectivity",{"type":26,"value":1550},": any ion in the chain entangles with any other, without routing through intermediate qubits.",{"type":21,"tag":43,"props":1552,"children":1554},{"id":1553},"why-the-ratio-is-possible-here",[1555],{"type":26,"value":1556},"Why the ratio is possible here",{"type":21,"tag":22,"props":1558,"children":1559},{},[1560,1562,1567],{"type":26,"value":1561},"The surface code (the workhorse error-correcting code for superconducting chips like Google's Willow) is built around ",{"type":21,"tag":784,"props":1563,"children":1564},{},[1565],{"type":26,"value":1566},"nearest-neighbour",{"type":26,"value":1568}," parity checks, because that's what a flat, 2D superconducting chip physically supports. That constraint is a large part of why its overhead is so high: protecting one logical qubit against realistic error rates needs a sizeable 2D lattice of physical qubits.",{"type":21,"tag":22,"props":1570,"children":1571},{},[1572,1574,1579,1581,1585,1586,1591],{"type":26,"value":1573},"Trapped ions don't have that constraint. Because any ion interacts with any other, codes that need ",{"type":21,"tag":784,"props":1575,"children":1576},{},[1577],{"type":26,"value":1578},"non-local",{"type":26,"value":1580}," parity checks (the kind that would be prohibitively expensive to wire up on a planar chip) become directly implementable. That opens the door to more qubit-efficient code families (broadly, qLDPC-style constructions) that trade slower gates for dramatically lower physical-to-logical overhead. Our ",{"type":21,"tag":29,"props":1582,"children":1583},{"href":590},[1584],{"type":26,"value":593},{"type":26,"value":383},{"type":21,"tag":29,"props":1587,"children":1588},{"href":1206},[1589],{"type":26,"value":1590},"modality comparison",{"type":26,"value":1592}," cover this trade-off in more general terms. Helios is the sharpest concrete illustration of it currently shipping.",{"type":21,"tag":43,"props":1594,"children":1596},{"id":1595},"what-the-ratio-doesnt-tell-you",[1597],{"type":26,"value":1598},"What the ratio doesn't tell you",{"type":21,"tag":22,"props":1600,"children":1601},{},[1602,1604,1609,1611,1616],{"type":26,"value":1603},"Overhead is one axis. It is not the only one, and a low physical-qubit count per logical qubit doesn't automatically translate into a more useful machine. As we covered in the logical-qubits post, a logical qubit should be judged on several numbers together: overhead, idle logical error rate, logical ",{"type":21,"tag":784,"props":1605,"children":1606},{},[1607],{"type":26,"value":1608},"gate",{"type":26,"value":1610}," fidelity, logical gate ",{"type":21,"tag":784,"props":1612,"children":1613},{},[1614],{"type":26,"value":1615},"speed",{"type":26,"value":1617},", and gate-set universality. Trapped-ion gates are orders of magnitude slower than superconducting gates, so a 2:1-encoded logical qubit that takes milliseconds per operation is not simply \"better\" than a more expensive logical qubit that runs a thousand times faster. The right comparison depends entirely on how many logical operations your algorithm needs before decoherence catches up with you.",{"type":21,"tag":22,"props":1619,"children":1620},{},[1621],{"type":26,"value":1622},"It's also, as with every hardware claim in this industry, worth reading as a vendor number until independently reproduced. \"48 logical qubits at 2:1\" describes a specific demonstration under specific operating conditions, not a generally available, push-button capability.",{"type":21,"tag":43,"props":1624,"children":1626},{"id":1625},"where-this-leaves-someone-learning-today",[1627],{"type":26,"value":1628},"Where this leaves someone learning today",{"type":21,"tag":22,"props":1630,"children":1631},{},[1632,1634,1640,1642,1646,1648,1653],{"type":26,"value":1633},"Helios-class hardware isn't something you queue for on a free tier the way you do with ",{"type":21,"tag":29,"props":1635,"children":1637},{"href":1636},"\u002Fblog\u002Fibm-quantum-free-tier-2026",[1638],{"type":26,"value":1639},"IBM's Open Plan",{"type":26,"value":1641},", but the ideas transfer regardless of which hardware eventually wins. Quantinuum's TKET compiler is open source and free to use today, independent of which backend you target, and the concepts in this post (encoding overhead, connectivity constraints, the threshold theorem) are the same ones you'll use to evaluate whatever the next announcement claims. Our ",{"type":21,"tag":29,"props":1643,"children":1644},{"href":428},[1645],{"type":26,"value":483},{"type":26,"value":1647}," covers the underlying mechanics, and the ",{"type":21,"tag":29,"props":1649,"children":1650},{"href":328},[1651],{"type":26,"value":1652},"quantum landscape",{"type":26,"value":1654}," tracks who's building what across every modality, not only this one.",{"title":7,"searchDepth":164,"depth":164,"links":1656},[1657,1658,1659,1660],{"id":1535,"depth":164,"text":1538},{"id":1553,"depth":164,"text":1556},{"id":1595,"depth":164,"text":1598},{"id":1625,"depth":164,"text":1628},"content:blog:quantinuum-helios-logical-qubits-2026.md","blog\u002Fquantinuum-helios-logical-qubits-2026.md","blog\u002Fquantinuum-helios-logical-qubits-2026",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"author":11,"tags":1665,"readingTime":16,"body":1666,"_type":171,"_id":172,"_source":173,"_file":174,"_stem":175,"_extension":176},[13,14,15],{"type":18,"children":1667,"toc":1764},[1668,1677,1681,1685,1703,1707,1711,1715,1719,1738,1742,1746,1750],{"type":21,"tag":22,"props":1669,"children":1670},{},[1671,1672,1676],{"type":26,"value":27},{"type":21,"tag":29,"props":1673,"children":1674},{"href":31},[1675],{"type":26,"value":34},{"type":26,"value":36},{"type":21,"tag":22,"props":1678,"children":1679},{},[1680],{"type":26,"value":41},{"type":21,"tag":43,"props":1682,"children":1683},{"id":45},[1684],{"type":26,"value":48},{"type":21,"tag":22,"props":1686,"children":1687},{},[1688,1692,1693,1697,1698,1702],{"type":21,"tag":29,"props":1689,"children":1690},{"href":54},[1691],{"type":26,"value":57},{"type":26,"value":59},{"type":21,"tag":29,"props":1694,"children":1695},{"href":62},[1696],{"type":26,"value":14},{"type":26,"value":66},{"type":21,"tag":29,"props":1699,"children":1700},{"href":69},[1701],{"type":26,"value":72},{"type":26,"value":74},{"type":21,"tag":22,"props":1704,"children":1705},{},[1706],{"type":26,"value":79},{"type":21,"tag":43,"props":1708,"children":1709},{"id":82},[1710],{"type":26,"value":85},{"type":21,"tag":22,"props":1712,"children":1713},{},[1714],{"type":26,"value":90},{"type":21,"tag":43,"props":1716,"children":1717},{"id":93},[1718],{"type":26,"value":96},{"type":21,"tag":22,"props":1720,"children":1721},{},[1722,1723,1727,1728,1732,1733,1737],{"type":26,"value":101},{"type":21,"tag":103,"props":1724,"children":1725},{},[1726],{"type":26,"value":107},{"type":26,"value":109},{"type":21,"tag":29,"props":1729,"children":1730},{"href":112},[1731],{"type":26,"value":115},{"type":26,"value":117},{"type":21,"tag":29,"props":1734,"children":1735},{"href":120},[1736],{"type":26,"value":123},{"type":26,"value":125},{"type":21,"tag":43,"props":1739,"children":1740},{"id":128},[1741],{"type":26,"value":131},{"type":21,"tag":22,"props":1743,"children":1744},{},[1745],{"type":26,"value":136},{"type":21,"tag":43,"props":1747,"children":1748},{"id":139},[1749],{"type":26,"value":142},{"type":21,"tag":22,"props":1751,"children":1752},{},[1753,1754,1758,1759,1763],{"type":26,"value":147},{"type":21,"tag":29,"props":1755,"children":1756},{"href":150},[1757],{"type":26,"value":153},{"type":26,"value":155},{"type":21,"tag":29,"props":1760,"children":1761},{"href":31},[1762],{"type":26,"value":160},{"type":26,"value":162},{"title":7,"searchDepth":164,"depth":164,"links":1765},[1766,1767,1768,1769,1770],{"id":45,"depth":164,"text":48},{"id":82,"depth":164,"text":85},{"id":93,"depth":164,"text":96},{"id":128,"depth":164,"text":131},{"id":139,"depth":164,"text":142},{"_path":1772,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":1773,"description":1774,"date":10,"author":11,"tags":1775,"readingTime":853,"body":1779,"_type":171,"_id":2457,"_source":173,"_file":2458,"_stem":2459,"_extension":176},"\u002Fblog\u002Fquantum-portfolio-optimization-business-case","How to Build a Business Case for Quantum Portfolio Optimization","PortfolioQ is a small open-source tool that runs classical, penalty-method QAOA, and constraint-preserving QAOA side by side on real portfolio data, and produces the one chart every quantum business case needs.",[1776,1777,1778],"Optimization","QAOA","Use Cases",{"type":18,"children":1780,"toc":2450},[1781,1793,1812,1818,1855,1861,1866,1876,1901,1935,1940,1946,1951,1968,1996,2002,2027,2061,2264,2362,2379,2389,2395,2407,2444],{"type":21,"tag":22,"props":1782,"children":1783},{},[1784,1786,1791],{"type":26,"value":1785},"Writing a QAOA circuit is a solved problem. Dozens of tutorials, including ",{"type":21,"tag":29,"props":1787,"children":1789},{"href":1788},"\u002Fblog\u002Fqaoa-max-cut-tutorial",[1790],{"type":26,"value":34},{"type":26,"value":1792},", will get you there in an afternoon. Writing the two-page memo that convinces a risk committee to fund a pilot is a completely different skill, and almost nothing teaches it. Most \"quantum computing for finance\" content either stays purely technical (build a circuit, print a result) or purely promotional (quantum will transform portfolio optimization). Neither produces the artifact a real business case needs.",{"type":21,"tag":22,"props":1794,"children":1795},{},[1796,1803,1805,1810],{"type":21,"tag":29,"props":1797,"children":1800},{"href":1798,"rel":1799},"https:\u002F\u002Fgithub.com\u002FAlinDanielFerenczi\u002FPortfolioQ",[378],[1801],{"type":26,"value":1802},"PortfolioQ",{"type":26,"value":1804}," is a small, open-source FastAPI project built specifically to produce that artifact. It's worth walking through, not because it's a production optimizer (its own README says explicitly that it isn't), but because its structure is a genuinely useful template for how to evaluate ",{"type":21,"tag":103,"props":1806,"children":1807},{},[1808],{"type":26,"value":1809},"any",{"type":26,"value":1811}," quantum optimization claim honestly, portfolio selection or otherwise.",{"type":21,"tag":43,"props":1813,"children":1815},{"id":1814},"the-problem-it-solves",[1816],{"type":26,"value":1817},"The problem it solves",{"type":21,"tag":22,"props":1819,"children":1820},{},[1821,1823,1828,1830,1837,1839,1845,1847,1853],{"type":26,"value":1822},"PortfolioQ targets ",{"type":21,"tag":784,"props":1824,"children":1825},{},[1826],{"type":26,"value":1827},"cardinality-constrained portfolio selection",{"type":26,"value":1829},": pick exactly K assets out of N candidates to minimize risk and maximize expected return, using the standard Markowitz mean-variance formulation: minimize ",{"type":21,"tag":1831,"props":1832,"children":1834},"code",{"className":1833},[],[1835],{"type":26,"value":1836},"risk_factor * wᵀΣw - μᵀw",{"type":26,"value":1838}," subject to ",{"type":21,"tag":1831,"props":1840,"children":1842},{"className":1841},[],[1843],{"type":26,"value":1844},"sum(w) == budget",{"type":26,"value":1846},", with each ",{"type":21,"tag":1831,"props":1848,"children":1850},{"className":1849},[],[1851],{"type":26,"value":1852},"w",{"type":26,"value":1854}," binary. That constraint (exactly K assets, not \"up to K\") is what makes this a good test case: it's a real, common portfolio-construction requirement, and it's exactly the kind of constraint that's easy to get wrong in a naive QAOA implementation.",{"type":21,"tag":43,"props":1856,"children":1858},{"id":1857},"three-solvers-run-side-by-side",[1859],{"type":26,"value":1860},"Three solvers, run side by side",{"type":21,"tag":22,"props":1862,"children":1863},{},[1864],{"type":26,"value":1865},"This is the part most quantum finance demos skip, and it's the part that matters for a business case: PortfolioQ doesn't run one method and report a number. It runs three, on the same data, and compares them.",{"type":21,"tag":22,"props":1867,"children":1868},{},[1869,1874],{"type":21,"tag":784,"props":1870,"children":1871},{},[1872],{"type":26,"value":1873},"Classical exact enumeration.",{"type":26,"value":1875}," Brute-forces every feasible K-of-N combination directly. It's not a strawman. For portfolios in the 10-30 asset range this is fast and exact, which is precisely why it's the right baseline. Any quantum approach has to be measured against this, not against \"no answer at all.\"",{"type":21,"tag":22,"props":1877,"children":1878},{},[1879,1884,1886,1892,1894,1899],{"type":21,"tag":784,"props":1880,"children":1881},{},[1882],{"type":26,"value":1883},"Penalty-method QAOA.",{"type":26,"value":1885}," The standard textbook approach: convert the constrained problem to a QUBO via ",{"type":21,"tag":1831,"props":1887,"children":1889},{"className":1888},[],[1890],{"type":26,"value":1891},"QuadraticProgramToQubo",{"type":26,"value":1893},", encode it as an Ising Hamiltonian, run ",{"type":21,"tag":29,"props":1895,"children":1897},{"href":1896},"\u002Fglossary\u002Fqaoa",[1898],{"type":26,"value":1777},{"type":26,"value":1900},". It works, but it spends circuit depth and classical tuning effort enforcing the budget constraint through a penalty term, and some fraction of measured samples violates the constraint outright, silently scored badly rather than rejected. If you're presenting quantum results to people without an SDK background, this is the mode most likely to embarrass you: \"why does the quantum solution sometimes pick the wrong number of stocks?\"",{"type":21,"tag":22,"props":1902,"children":1903},{},[1904,1909,1911,1917,1919,1925,1927,1933],{"type":21,"tag":784,"props":1905,"children":1906},{},[1907],{"type":26,"value":1908},"Dicke-state \u002F XY-mixer QAOA.",{"type":26,"value":1910}," The constraint-preserving alternative. A Dicke-state initialization (built with a small ancilla \"running count\" register that provably lands on exactly ",{"type":21,"tag":1831,"props":1912,"children":1914},{"className":1913},[],[1915],{"type":26,"value":1916},"|budget⟩",{"type":26,"value":1918},") combined with an XY-mixer (",{"type":21,"tag":1831,"props":1920,"children":1922},{"className":1921},[],[1923],{"type":26,"value":1924},"RXX",{"type":26,"value":1926},"\u002F",{"type":21,"tag":1831,"props":1928,"children":1930},{"className":1929},[],[1931],{"type":26,"value":1932},"RYY",{"type":26,"value":1934}," gates) keeps every single measurement inside the feasible K-of-N subspace by construction. No penalty tuning, no invalid answers to explain away. It's a heavier circuit, but it's the version you'd want in front of a non-technical audience. Every result respects the constraint they asked for, because the ansatz makes anything else geometrically impossible.",{"type":21,"tag":22,"props":1936,"children":1937},{},[1938],{"type":26,"value":1939},"That comparison (one classical baseline, two structurally different quantum approaches) is the shape a credible business case needs. A single quantum result with no classical comparison and no discussion of why the encoding was chosen isn't evidence of anything.",{"type":21,"tag":43,"props":1941,"children":1943},{"id":1942},"the-chart-thats-the-actual-deliverable",[1944],{"type":26,"value":1945},"The chart that's the actual deliverable",{"type":21,"tag":22,"props":1947,"children":1948},{},[1949],{"type":26,"value":1950},"Here's the part of PortfolioQ's own documentation worth repeating verbatim, because it's the most honest sentence you'll read about applied quantum optimization this year:",{"type":21,"tag":1952,"props":1953,"children":1954},"blockquote",{},[1955],{"type":21,"tag":22,"props":1956,"children":1957},{},[1958,1960,1966],{"type":26,"value":1959},"Run the same request against a real IBM backend and chart result quality vs. gate count as you increase ",{"type":21,"tag":1831,"props":1961,"children":1963},{"className":1962},[],[1964],{"type":26,"value":1965},"reps",{"type":26,"value":1967},". This is the \"signal vs. noise crossover\" chart that's the actual deliverable for a business-case pitch.",{"type":21,"tag":22,"props":1969,"children":1970},{},[1971,1973,1979,1981,1987,1988,1994],{"type":26,"value":1972},"That's the whole exercise. Not \"we ran QAOA and it worked.\" Not \"quantum is X% faster.\" A chart with two axes: how close the quantum answer gets to the true optimum (",{"type":21,"tag":1831,"props":1974,"children":1976},{"className":1975},[],[1977],{"type":26,"value":1978},"pct_of_optimal",{"type":26,"value":1980},": 100% means it matched classical exactly), against how much circuit you had to run to get there (",{"type":21,"tag":1831,"props":1982,"children":1984},{"className":1983},[],[1985],{"type":26,"value":1986},"circuit_depth",{"type":26,"value":383},{"type":21,"tag":1831,"props":1989,"children":1991},{"className":1990},[],[1992],{"type":26,"value":1993},"two_qubit_gates",{"type":26,"value":1995},", both reported alongside every result). Run it on the simulator first, then on real hardware, and watch where the lines cross, or don't.",{"type":21,"tag":43,"props":1997,"children":1999},{"id":1998},"building-the-case-step-by-step",[2000],{"type":26,"value":2001},"Building the case, step by step",{"type":21,"tag":22,"props":2003,"children":2004},{},[2005,2010,2012,2017,2019,2025],{"type":21,"tag":784,"props":2006,"children":2007},{},[2008],{"type":26,"value":2009},"1. Cap your problem size honestly.",{"type":26,"value":2011}," PortfolioQ's own README recommends 10-30 assets for anything run on real hardware, and explains why: current ",{"type":21,"tag":29,"props":2013,"children":2014},{"href":120},[2015],{"type":26,"value":2016},"NISQ",{"type":26,"value":2018}," devices simply don't have the qubit count or gate fidelity to go further without the noise dominating the signal. A business case that quietly assumes a 500-stock universe on today's hardware isn't a business case, it's fiction. Start with the candidate universe you'd genuinely consider: real tickers, real historical prices (the tool fetches these automatically via ",{"type":21,"tag":1831,"props":2020,"children":2022},{"className":2021},[],[2023],{"type":26,"value":2024},"yfinance",{"type":26,"value":2026}," if you don't supply your own).",{"type":21,"tag":22,"props":2028,"children":2029},{},[2030,2035,2037,2043,2045,2051,2053,2059],{"type":21,"tag":784,"props":2031,"children":2032},{},[2033],{"type":26,"value":2034},"2. Establish the in-principle baseline on a simulator.",{"type":26,"value":2036}," Run ",{"type":21,"tag":1831,"props":2038,"children":2040},{"className":2039},[],[2041],{"type":26,"value":2042},"\u002Foptimize\u002Fcompare-all",{"type":26,"value":2044}," on ",{"type":21,"tag":1831,"props":2046,"children":2048},{"className":2047},[],[2049],{"type":26,"value":2050},"aer_simulator",{"type":26,"value":2052}," before touching real hardware. Check that ",{"type":21,"tag":1831,"props":2054,"children":2056},{"className":2055},[],[2057],{"type":26,"value":2058},"feasible_fraction",{"type":26,"value":2060}," on the XY-mixer result is exactly 1.0. That's your sanity check that the constraint-preserving construction works as designed, with no hardware noise yet in the picture.",{"type":21,"tag":2062,"props":2063,"children":2067},"pre",{"className":2064,"code":2065,"language":2066,"meta":7,"style":7},"language-json shiki shiki-themes github-dark","POST \u002Foptimize\u002Fcompare-all\n{\n  \"tickers\": [\"AAPL\", \"MSFT\", \"GOOGL\", \"AMZN\", \"NVDA\"],\n  \"budget\": 2,\n  \"risk_factor\": 0.5,\n  \"reps\": 2,\n  \"shots\": 1024,\n  \"backend\": \"aer_simulator\"\n}\n","json",[2068],{"type":21,"tag":1831,"props":2069,"children":2070},{"__ignoreMap":7},[2071,2083,2091,2153,2176,2198,2218,2239,2256],{"type":21,"tag":2072,"props":2073,"children":2076},"span",{"class":2074,"line":2075},"line",1,[2077],{"type":21,"tag":2072,"props":2078,"children":2080},{"style":2079},"--shiki-default:#E1E4E8",[2081],{"type":26,"value":2082},"POST \u002Foptimize\u002Fcompare-all\n",{"type":21,"tag":2072,"props":2084,"children":2085},{"class":2074,"line":164},[2086],{"type":21,"tag":2072,"props":2087,"children":2088},{"style":2079},[2089],{"type":26,"value":2090},"{\n",{"type":21,"tag":2072,"props":2092,"children":2094},{"class":2074,"line":2093},3,[2095,2101,2106,2112,2116,2121,2125,2130,2134,2139,2143,2148],{"type":21,"tag":2072,"props":2096,"children":2098},{"style":2097},"--shiki-default:#79B8FF",[2099],{"type":26,"value":2100},"  \"tickers\"",{"type":21,"tag":2072,"props":2102,"children":2103},{"style":2079},[2104],{"type":26,"value":2105},": [",{"type":21,"tag":2072,"props":2107,"children":2109},{"style":2108},"--shiki-default:#9ECBFF",[2110],{"type":26,"value":2111},"\"AAPL\"",{"type":21,"tag":2072,"props":2113,"children":2114},{"style":2079},[2115],{"type":26,"value":798},{"type":21,"tag":2072,"props":2117,"children":2118},{"style":2108},[2119],{"type":26,"value":2120},"\"MSFT\"",{"type":21,"tag":2072,"props":2122,"children":2123},{"style":2079},[2124],{"type":26,"value":798},{"type":21,"tag":2072,"props":2126,"children":2127},{"style":2108},[2128],{"type":26,"value":2129},"\"GOOGL\"",{"type":21,"tag":2072,"props":2131,"children":2132},{"style":2079},[2133],{"type":26,"value":798},{"type":21,"tag":2072,"props":2135,"children":2136},{"style":2108},[2137],{"type":26,"value":2138},"\"AMZN\"",{"type":21,"tag":2072,"props":2140,"children":2141},{"style":2079},[2142],{"type":26,"value":798},{"type":21,"tag":2072,"props":2144,"children":2145},{"style":2108},[2146],{"type":26,"value":2147},"\"NVDA\"",{"type":21,"tag":2072,"props":2149,"children":2150},{"style":2079},[2151],{"type":26,"value":2152},"],\n",{"type":21,"tag":2072,"props":2154,"children":2156},{"class":2074,"line":2155},4,[2157,2162,2166,2171],{"type":21,"tag":2072,"props":2158,"children":2159},{"style":2097},[2160],{"type":26,"value":2161},"  \"budget\"",{"type":21,"tag":2072,"props":2163,"children":2164},{"style":2079},[2165],{"type":26,"value":66},{"type":21,"tag":2072,"props":2167,"children":2168},{"style":2097},[2169],{"type":26,"value":2170},"2",{"type":21,"tag":2072,"props":2172,"children":2173},{"style":2079},[2174],{"type":26,"value":2175},",\n",{"type":21,"tag":2072,"props":2177,"children":2179},{"class":2074,"line":2178},5,[2180,2185,2189,2194],{"type":21,"tag":2072,"props":2181,"children":2182},{"style":2097},[2183],{"type":26,"value":2184},"  \"risk_factor\"",{"type":21,"tag":2072,"props":2186,"children":2187},{"style":2079},[2188],{"type":26,"value":66},{"type":21,"tag":2072,"props":2190,"children":2191},{"style":2097},[2192],{"type":26,"value":2193},"0.5",{"type":21,"tag":2072,"props":2195,"children":2196},{"style":2079},[2197],{"type":26,"value":2175},{"type":21,"tag":2072,"props":2199,"children":2200},{"class":2074,"line":288},[2201,2206,2210,2214],{"type":21,"tag":2072,"props":2202,"children":2203},{"style":2097},[2204],{"type":26,"value":2205},"  \"reps\"",{"type":21,"tag":2072,"props":2207,"children":2208},{"style":2079},[2209],{"type":26,"value":66},{"type":21,"tag":2072,"props":2211,"children":2212},{"style":2097},[2213],{"type":26,"value":2170},{"type":21,"tag":2072,"props":2215,"children":2216},{"style":2079},[2217],{"type":26,"value":2175},{"type":21,"tag":2072,"props":2219,"children":2220},{"class":2074,"line":16},[2221,2226,2230,2235],{"type":21,"tag":2072,"props":2222,"children":2223},{"style":2097},[2224],{"type":26,"value":2225},"  \"shots\"",{"type":21,"tag":2072,"props":2227,"children":2228},{"style":2079},[2229],{"type":26,"value":66},{"type":21,"tag":2072,"props":2231,"children":2232},{"style":2097},[2233],{"type":26,"value":2234},"1024",{"type":21,"tag":2072,"props":2236,"children":2237},{"style":2079},[2238],{"type":26,"value":2175},{"type":21,"tag":2072,"props":2240,"children":2241},{"class":2074,"line":366},[2242,2247,2251],{"type":21,"tag":2072,"props":2243,"children":2244},{"style":2097},[2245],{"type":26,"value":2246},"  \"backend\"",{"type":21,"tag":2072,"props":2248,"children":2249},{"style":2079},[2250],{"type":26,"value":66},{"type":21,"tag":2072,"props":2252,"children":2253},{"style":2108},[2254],{"type":26,"value":2255},"\"aer_simulator\"\n",{"type":21,"tag":2072,"props":2257,"children":2258},{"class":2074,"line":853},[2259],{"type":21,"tag":2072,"props":2260,"children":2261},{"style":2079},[2262],{"type":26,"value":2263},"}\n",{"type":21,"tag":22,"props":2265,"children":2266},{},[2267,2278,2280,2286,2288,2294,2296,2301,2303,2308,2310,2316,2317,2322,2324,2329,2331,2336,2338,2344,2346,2352,2354,2360],{"type":21,"tag":784,"props":2268,"children":2269},{},[2270,2272,2277],{"type":26,"value":2271},"3. Move to real hardware and vary ",{"type":21,"tag":1831,"props":2273,"children":2275},{"className":2274},[],[2276],{"type":26,"value":1965},{"type":26,"value":237},{"type":26,"value":2279}," This is where the actual data comes from. Point ",{"type":21,"tag":1831,"props":2281,"children":2283},{"className":2282},[],[2284],{"type":26,"value":2285},"\"backend\"",{"type":26,"value":2287}," at a real device (",{"type":21,"tag":1831,"props":2289,"children":2291},{"className":2290},[],[2292],{"type":26,"value":2293},"\"ibm_torino\"",{"type":26,"value":2295},", for example. See our ",{"type":21,"tag":29,"props":2297,"children":2298},{"href":1636},[2299],{"type":26,"value":2300},"IBM Quantum free tier guide",{"type":26,"value":2302}," if you don't have hardware access set up yet) and rerun the same comparison as you increase ",{"type":21,"tag":1831,"props":2304,"children":2306},{"className":2305},[],[2307],{"type":26,"value":1965},{"type":26,"value":2309},". ",{"type":21,"tag":1831,"props":2311,"children":2313},{"className":2312},[],[2314],{"type":26,"value":2315},"qaoa_xy_pct_of_optimal",{"type":26,"value":383},{"type":21,"tag":1831,"props":2318,"children":2320},{"className":2319},[],[2321],{"type":26,"value":1993},{"type":26,"value":2323}," climbing together across a handful of ",{"type":21,"tag":1831,"props":2325,"children":2327},{"className":2326},[],[2328],{"type":26,"value":1965},{"type":26,"value":2330}," values ",{"type":21,"tag":103,"props":2332,"children":2333},{},[2334],{"type":26,"value":2335},"is",{"type":26,"value":2337}," the chart. Because each COBYLA iteration blocks on a real hardware job, use PortfolioQ's async ",{"type":21,"tag":1831,"props":2339,"children":2341},{"className":2340},[],[2342],{"type":26,"value":2343},"\u002Fsubmit",{"type":26,"value":2345}," + ",{"type":21,"tag":1831,"props":2347,"children":2349},{"className":2348},[],[2350],{"type":26,"value":2351},"\u002Fjobs\u002F{id}",{"type":26,"value":2353}," endpoints rather than the blocking ones. A ",{"type":21,"tag":1831,"props":2355,"children":2357},{"className":2356},[],[2358],{"type":26,"value":2359},"maxiter",{"type":26,"value":2361}," of 100 means up to 100 hardware round-trips per optimization run, which will outlast most HTTP client timeouts on a queued device.",{"type":21,"tag":22,"props":2363,"children":2364},{},[2365,2370,2372,2377],{"type":21,"tag":784,"props":2366,"children":2367},{},[2368],{"type":26,"value":2369},"4. Report the noise honestly, including where it breaks the guarantee.",{"type":26,"value":2371}," Expect ",{"type":21,"tag":1831,"props":2373,"children":2375},{"className":2374},[],[2376],{"type":26,"value":2058},{"type":26,"value":2378}," to drop below 1.0 on real hardware even for the XY-mixer, despite the simulator showing a clean 1.0. That's not a bug and it's not a reason to hide the result. On real hardware, noise, not the algorithm, is what breaks the Hamming-weight preservation the Dicke-state construction guarantees in theory. That gap between simulator and hardware feasibility is itself a meaningful, quotable data point: it's a direct, measured picture of how much today's error rates cost you, expressed in a metric a risk committee reads directly.",{"type":21,"tag":22,"props":2380,"children":2381},{},[2382,2387],{"type":21,"tag":784,"props":2383,"children":2384},{},[2385],{"type":26,"value":2386},"5. Write the recommendation the data supports.",{"type":26,"value":2388}," For 10-30 assets on current hardware, that recommendation is almost never \"replace the greedy heuristic in production today\". PortfolioQ's own greedy baseline exists precisely as \"what we'd run in production today,\" and it's fast, classical, and usually close to optimal at this scale. The honest, defensible business case is: here is the exact crossover point we measured, here is what has to improve (gate fidelity, qubit count, queue economics) before it moves, and here is the monitoring plan for re-running this comparison as hardware improves. That's a real deliverable. \"We're not there yet, and here's precisely how we'll know when we are\" is a stronger memo than an inflated claim that won't survive the first follow-up question.",{"type":21,"tag":43,"props":2390,"children":2392},{"id":2391},"what-this-template-generalizes-to",[2393],{"type":26,"value":2394},"What this template generalizes to",{"type":21,"tag":22,"props":2396,"children":2397},{},[2398,2400,2405],{"type":26,"value":2399},"None of the above is specific to portfolios. The same shape (a credible classical baseline, more than one quantum encoding compared honestly, a simulator sanity check before hardware, and a quality-vs-noise chart instead of a single cherry-picked run) is exactly how you'd build a defensible case for QAOA on any other constrained optimization problem: routing, scheduling, or the Max-Cut-style problems in our ",{"type":21,"tag":29,"props":2401,"children":2402},{"href":1788},[2403],{"type":26,"value":2404},"QAOA tutorial",{"type":26,"value":2406},". The specific circuits change. The discipline of comparing against what you already have, and reporting where the noise wins, doesn't.",{"type":21,"tag":22,"props":2408,"children":2409},{},[2410,2412,2418,2420,2426,2428,2434,2436,2442],{"type":26,"value":2411},"If you want to see this pattern extended, PortfolioQ's ",{"type":21,"tag":29,"props":2413,"children":2415},{"href":1798,"rel":2414},[378],[2416],{"type":26,"value":2417},"source on GitHub",{"type":26,"value":2419}," is small enough to read end to end in an afternoon: ",{"type":21,"tag":1831,"props":2421,"children":2423},{"className":2422},[],[2424],{"type":26,"value":2425},"portfolio.py",{"type":26,"value":2427}," for the QUBO construction, ",{"type":21,"tag":1831,"props":2429,"children":2431},{"className":2430},[],[2432],{"type":26,"value":2433},"xy_mixer_solver.py",{"type":26,"value":2435}," for the constraint-preserving ansatz, and ",{"type":21,"tag":1831,"props":2437,"children":2439},{"className":2438},[],[2440],{"type":26,"value":2441},"main.py",{"type":26,"value":2443}," for how the comparison endpoints are wired together. It's explicitly a pilot and capability-building scaffold rather than a production system, which, for the purpose of building a business case rather than shipping a trading system, is exactly the point.",{"type":21,"tag":2445,"props":2446,"children":2447},"style",{},[2448],{"type":26,"value":2449},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":164,"depth":164,"links":2451},[2452,2453,2454,2455,2456],{"id":1814,"depth":164,"text":1817},{"id":1857,"depth":164,"text":1860},{"id":1942,"depth":164,"text":1945},{"id":1998,"depth":164,"text":2001},{"id":2391,"depth":164,"text":2394},"content:blog:quantum-portfolio-optimization-business-case.md","blog\u002Fquantum-portfolio-optimization-business-case.md","blog\u002Fquantum-portfolio-optimization-business-case",{"_path":2461,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2462,"description":2463,"date":10,"author":11,"tags":2464,"readingTime":16,"body":2465,"_type":171,"_id":2609,"_source":173,"_file":2610,"_stem":2611,"_extension":176},"\u002Fblog\u002Fsaxon-q-room-temperature-diamond-quantum-computer","SAXON Q Is Selling a Quantum Computer That Skips the Cryostat Entirely","SAXON Q, a Leipzig University spinout, launched the SXQ128 and SXQ512, diamond-based nitrogen-vacancy quantum computers that run at room temperature with no cryogenic cooling. Here is how the qubits work and what the claimed numbers mean.",[15,287],{"type":18,"children":2466,"toc":2603},[2467,2488,2493,2499,2513,2518,2524,2536,2541,2547,2559,2564,2570,2582,2598],{"type":21,"tag":22,"props":2468,"children":2469},{},[2470,2472,2478,2479,2486],{"type":26,"value":2471},"On July 21, 2026, SAXON Q announced commercial availability of the SXQ128 and SXQ512, diamond-based quantum computers built around nitrogen-vacancy (NV) centers, according to ",{"type":21,"tag":29,"props":2473,"children":2476},{"href":2474,"rel":2475},"https:\u002F\u002Fthequantuminsider.com\u002F2026\u002F07\u002F21\u002Fsaxon-q-diamond-nv-center-quantum-computers\u002F",[378],[2477],{"type":26,"value":381},{"type":26,"value":383},{"type":21,"tag":29,"props":2480,"children":2483},{"href":2481,"rel":2482},"https:\u002F\u002Fwww.hpcwire.com\u002Foff-the-wire\u002Fsaxon-q-brings-room-temperature-diamond-quantum-computing-to-commercial-market\u002F",[378],[2484],{"type":26,"value":2485},"HPCwire",{"type":26,"value":2487},". The headline claim is the one worth checking first: both systems run at room temperature, with no cryostat, no vacuum chamber, and no dilution refrigerator, plugged into an ordinary electrical outlet in a standard server rack.",{"type":21,"tag":22,"props":2489,"children":2490},{},[2491],{"type":26,"value":2492},"That single fact separates NV-center qubits from every hardware modality this site usually covers. Superconducting qubits and trapped ions both need cooling to near absolute zero, and most of the engineering difficulty in scaling those platforms traces back to that requirement. A qubit that works at room temperature sidesteps an entire category of problems, if the claim holds up.",{"type":21,"tag":43,"props":2494,"children":2496},{"id":2495},"what-saxon-q-built",[2497],{"type":26,"value":2498},"What SAXON Q built",{"type":21,"tag":22,"props":2500,"children":2501},{},[2502,2504,2511],{"type":26,"value":2503},"SAXON Q is a 2021 spinout from Leipzig University, founded by physicists who spent decades researching NV centers before commercializing the work. Marius Grundmann and Frank Schlichting hold the CEO title jointly, according to ",{"type":21,"tag":29,"props":2505,"children":2508},{"href":2506,"rel":2507},"https:\u002F\u002Fwww.saxonq.com\u002Fen\u002Funternehmen\u002F",[378],[2509],{"type":26,"value":2510},"the company's own site",{"type":26,"value":2512},", alongside co-founders Jan Meijer (CTO) and Bernd Burchard (CIPO).",{"type":21,"tag":22,"props":2514,"children":2515},{},[2516],{"type":26,"value":2517},"The SXQ128 packs 128 qubits, arranged as multiple cores of eight fully entangled qubits each. The SXQ512 scales that to 512 qubits across cores of 16. Both are available to order now, with SXQ128 deliveries beginning within three months and SXQ512 shipments starting in the second quarter of 2027.",{"type":21,"tag":43,"props":2519,"children":2521},{"id":2520},"what-an-nv-center-is",[2522],{"type":26,"value":2523},"What an NV center is",{"type":21,"tag":22,"props":2525,"children":2526},{},[2527,2529,2534],{"type":26,"value":2528},"A nitrogen-vacancy center is a specific defect in a diamond's carbon lattice: a nitrogen atom sits next to an empty spot where a carbon atom should be. That defect traps a single electron whose spin state is initialized, manipulated, and read out with lasers and microwaves, and it behaves as a ",{"type":21,"tag":29,"props":2530,"children":2531},{"href":682},[2532],{"type":26,"value":2533},"qubit",{"type":26,"value":2535}," at room temperature because diamond's rigid lattice isolates the trapped electron from the thermal noise that would otherwise destroy its quantum state.",{"type":21,"tag":22,"props":2537,"children":2538},{},[2539],{"type":26,"value":2540},"The company reports a fidelity of up to 99.92% and describes creating these defects through a proprietary sulfur co-implantation process during ion beam implantation, claiming a conversion yield above 85% (the share of implanted atoms that become working qubits) against a reported 1 to 10% for prior implantation methods. That yield number is the more interesting engineering claim here, since NV centers themselves are decades-old physics. The obstacle was always building enough of them reliably in one piece of diamond, not discovering that they exist.",{"type":21,"tag":43,"props":2542,"children":2544},{"id":2543},"what-to-treat-as-unverified",[2545],{"type":26,"value":2546},"What to treat as unverified",{"type":21,"tag":22,"props":2548,"children":2549},{},[2550,2552,2557],{"type":26,"value":2551},"Every number above comes from SAXON Q's own announcement. None of it has been independently reproduced or published in a peer-reviewed venue the way HRL's recent ",{"type":21,"tag":29,"props":2553,"children":2554},{"href":503},[2555],{"type":26,"value":2556},"self-operating silicon processor",{"type":26,"value":2558}," was. A fidelity figure is only useful next to a clearly stated definition of which operation it measures, and a yield percentage is only useful once someone outside the company that reports it gets to check the diamond.",{"type":21,"tag":22,"props":2560,"children":2561},{},[2562],{"type":26,"value":2563},"The one data point that is not only a press release is a deployment: Fraunhofer IWU installed a SAXON Q system in mid-2025 for industrial optimization work in material processing and robotics, and the company says it has run continuously at room temperature since. A working deployment at a respected applied-research institute is a stronger signal than a spec sheet, though it still says nothing about how the same architecture performs at 128 or 512 qubits.",{"type":21,"tag":43,"props":2565,"children":2567},{"id":2566},"where-room-temperature-qubits-fit-against-everything-else",[2568],{"type":26,"value":2569},"Where room-temperature qubits fit against everything else",{"type":21,"tag":22,"props":2571,"children":2572},{},[2573,2575,2580],{"type":26,"value":2574},"Room-temperature operation does not automatically mean SAXON Q's qubits outperform cryogenic ones on the metrics that decide whether a quantum computer is useful: gate fidelity under load, coherence time during a real circuit, and how the system behaves as qubit count grows. Trapped ions and superconducting qubits have a multi-year head start on demonstrating those things at scale, with ",{"type":21,"tag":29,"props":2576,"children":2577},{"href":670},[2578],{"type":26,"value":2579},"independently scrutinized results",{"type":26,"value":2581}," that NV-center systems do not yet have.",{"type":21,"tag":22,"props":2583,"children":2584},{},[2585,2587,2591,2592,2596],{"type":26,"value":2586},"What room temperature does buy, if the claims hold, is dramatically simpler infrastructure. No cryostat means no multi-week cooldown cycle, no liquid helium supply chain, and a system that fits in a standard rack instead of a dedicated lab. For applications like industrial optimization at a manufacturing site, that operational simplicity sometimes matters more than an extra order of magnitude of fidelity. Our ",{"type":21,"tag":29,"props":2588,"children":2589},{"href":590},[2590],{"type":26,"value":593},{"type":26,"value":383},{"type":21,"tag":29,"props":2593,"children":2594},{"href":328},[2595],{"type":26,"value":331},{"type":26,"value":2597}," track how each modality trades those priorities differently.",{"type":21,"tag":22,"props":2599,"children":2600},{},[2601],{"type":26,"value":2602},"The honest read on SAXON Q today: a real, shipping product from a team with a genuine research background in the underlying physics, with commercial claims that have not yet been checked by anyone outside the company. That is a normal place for a new hardware vendor to be. It is not yet evidence that diamond NV centers compete with the platforms that have already survived a decade of outside scrutiny.",{"title":7,"searchDepth":164,"depth":164,"links":2604},[2605,2606,2607,2608],{"id":2495,"depth":164,"text":2498},{"id":2520,"depth":164,"text":2523},{"id":2543,"depth":164,"text":2546},{"id":2566,"depth":164,"text":2569},"content:blog:saxon-q-room-temperature-diamond-quantum-computer.md","blog\u002Fsaxon-q-room-temperature-diamond-quantum-computer.md","blog\u002Fsaxon-q-room-temperature-diamond-quantum-computer",{"_path":1072,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2613,"description":2614,"date":10,"author":11,"tags":2615,"readingTime":2616,"body":2617,"_type":171,"_id":2884,"_source":173,"_file":2885,"_stem":2886,"_extension":176},"The Top Quantum Computing Companies in July 2026, Ranked and Explained","A grounded ranking of the quantum computing companies that matter most in July 2026: real revenue, real hardware milestones, and real cash positions, not press-release enthusiasm. IonQ's numbers earn its spot. Rigetti's don't yet match its peers.",[287,15],12,{"type":18,"children":2618,"toc":2870},[2619,2624,2636,2642,2660,2666,2671,2677,2682,2702,2707,2713,2725,2731,2736,2742,2747,2752,2758,2763,2769,2774,2780,2785,2791,2796,2802,2840,2846],{"type":21,"tag":22,"props":2620,"children":2621},{},[2622],{"type":26,"value":2623},"Most \"top quantum computing companies\" lists rank by headline qubit count or by how recently a company issued a press release. Neither measures much. A qubit count with no fidelity number attached tells you nothing about whether a machine does useful work, and a press release measures a marketing budget, not a hardware roadmap.",{"type":21,"tag":22,"props":2625,"children":2626},{},[2627,2629,2634],{"type":26,"value":2628},"This ranking uses three things instead: demonstrated technical progress (fidelity, logical qubits, independently reproducible results, not headline claims alone), commercial traction (revenue, contracts, backlog), and financial durability (cash position relative to burn rate). Where a company's own claims are the only source for a number, that's said explicitly. Our ",{"type":21,"tag":29,"props":2630,"children":2631},{"href":328},[2632],{"type":26,"value":2633},"full industry directory",{"type":26,"value":2635}," catalogs over 60 companies across every category. This piece is the opposite of that: a short, opinionated list of who's ahead, and why some of the loudest names aren't.",{"type":21,"tag":43,"props":2637,"children":2639},{"id":2638},"_1-ibm-quantum",[2640],{"type":26,"value":2641},"1. IBM Quantum",{"type":21,"tag":22,"props":2643,"children":2644},{},[2645,2647,2652,2654,2658],{"type":26,"value":2646},"IBM remains the broadest platform in the industry, and July 2026 was one of its stronger months on record: three separate quantum advantage results announced the same day, spanning three different partners and three different verification strategies. We ",{"type":21,"tag":29,"props":2648,"children":2649},{"href":457},[2650],{"type":26,"value":2651},"covered the full announcement here",{"type":26,"value":2653},". The Nighthawk processor (120 qubits, 218 tunable couplers) is in the field, and IBM's public roadmap targets fault tolerance by 2029 through a sequence of intermediate systems, moving to qLDPC-style codes that cut error-correction overhead by roughly 90% versus the surface code. IBM's Open Plan also remains the easiest way for anyone to run a circuit on real hardware for free, which keeps it central to how the next generation of quantum developers learns. See our ",{"type":21,"tag":29,"props":2655,"children":2656},{"href":1636},[2657],{"type":26,"value":2300},{"type":26,"value":2659}," if you want to try that yourself. IBM's weakness is the flip side of its breadth: with so many things happening at once, individual results get less scrutiny than they would from a smaller, more focused competitor.",{"type":21,"tag":43,"props":2661,"children":2663},{"id":2662},"_2-google-quantum-ai",[2664],{"type":26,"value":2665},"2. Google Quantum AI",{"type":21,"tag":22,"props":2667,"children":2668},{},[2669],{"type":26,"value":2670},"Google's Willow processor delivered the Quantum Echoes result in late 2025 (published in Nature), a computation the paper estimates at roughly 13,000 times faster than the best available classical method, and the below-threshold error correction demonstration a year earlier remains one of the few fully independently scrutinized milestones in the field. Google added a neutral-atom research effort in March 2026 alongside its superconducting work, hedging against the possibility that transmon qubits aren't the final answer. Google publishes less frequently than its competitors, and says less between publications, which is a defensible research strategy but makes it harder to track month to month.",{"type":21,"tag":43,"props":2672,"children":2674},{"id":2673},"_3-ionq",[2675],{"type":26,"value":2676},"3. IonQ",{"type":21,"tag":22,"props":2678,"children":2679},{},[2680],{"type":26,"value":2681},"IonQ's numbers are the strongest in the industry among pure-play quantum hardware companies, and that's a factual statement, not a promotional one. Q1 2026 revenue hit $64.7 million, up 755% year over year, with full-year guidance raised to $260-270 million and remaining performance obligations of $470 million, up 554%. That is not the profile of a company running on hope. Government traction backs it up: a Missile Defense Agency contract vehicle with a ceiling up to $151 billion (a ceiling, not a guarantee of spend, but still an unusually large one to win), a new DARPA award in April 2026, and a sovereign quantum-HPC deal with South Korea's KISTI institute.",{"type":21,"tag":22,"props":2683,"children":2684},{},[2685,2687,2693,2695,2700],{"type":26,"value":2686},"On hardware, IonQ's trapped-ion approach benefits from the Oxford Ionics acquisition's \"smooth gate\" technique, which the company says clears two-qubit gate fidelity above 99.99% without needing full ground-state cooling, a real engineering shortcut if it holds up under independent testing. IonQ also published a decoder result in December 2025 (Beam Search, for quantum LDPC codes) claiming a 5.6-17x reduction in logical error rate against the standard BP-OSD baseline, with sub-millisecond decoding on an ordinary CPU core. If that scales the way IonQ projects, it's a meaningfully cheaper path to real-time decoding than the FPGA and ASIC routes competitors are pursuing, a topic we go deeper on in ",{"type":21,"tag":29,"props":2688,"children":2690},{"href":2689},"\u002Fblog\u002Fquantum-error-decoding-bottleneck",[2691],{"type":26,"value":2692},"the real-time decoding bottleneck",{"type":26,"value":2694},". And the SkyWater Technology foundry acquisition, ",{"type":21,"tag":29,"props":2696,"children":2697},{"href":320},[2698],{"type":26,"value":2699},"which we examined in detail",{"type":26,"value":2701},", gives IonQ a fully domestic, defense-cleared supply chain for the electrodes, photonics, and control hardware surrounding its qubits, a real advantage with government buyers regardless of qubit physics.",{"type":21,"tag":22,"props":2703,"children":2704},{},[2705],{"type":26,"value":2706},"None of this is independently verified in the way Google's below-threshold result was. IonQ's fidelity, decoder, and gate-speed claims are IonQ's own numbers. But the commercial and government traction is externally reported and auditable in a way marketing claims aren't, and it's rare for a hardware company this young to show real revenue growth at this scale rather than research funding alone. That combination, demonstrated commercial pull plus a coherent hardware roadmap, is why IonQ ranks above competitors with arguably comparable or better lab results but a much thinner commercial story.",{"type":21,"tag":43,"props":2708,"children":2710},{"id":2709},"_4-quantinuum",[2711],{"type":26,"value":2712},"4. Quantinuum",{"type":21,"tag":22,"props":2714,"children":2715},{},[2716,2718,2723],{"type":26,"value":2717},"Quantinuum's Helios system claims 48 error-corrected logical qubits from roughly 96 physical qubits, a 2:1 ratio that would be significant if it holds up, since surface-code estimates on superconducting hardware typically run into the hundreds or thousands of physical qubits per logical qubit. We ",{"type":21,"tag":29,"props":2719,"children":2720},{"href":232},[2721],{"type":26,"value":2722},"explained why that ratio is even possible here",{"type":26,"value":2724},": trapped-ion all-to-all connectivity supports non-local parity checks that a flat superconducting chip can't wire up. Quantinuum went public in 2026 at a $15.6 billion valuation, more than 50% above its last private round months earlier, with Honeywell retaining roughly 48% of voting power. That IPO reception says the market believes the technical story. The 2:1 figure, like IonQ's fidelity claims, is vendor-reported and not yet independently reproduced.",{"type":21,"tag":43,"props":2726,"children":2728},{"id":2727},"_5-d-wave",[2729],{"type":26,"value":2730},"5. D-Wave",{"type":21,"tag":22,"props":2732,"children":2733},{},[2734],{"type":26,"value":2735},"D-Wave occupies a different category, annealing rather than gate-model computation, and it's easy to underrate for that reason. Q1 2026 bookings grew almost 20x year over year to $33.4 million, against a comparatively small $2.9 million in recognized revenue, meaning the backlog is real but the recognition lag is long. A $588 million cash position gives it room to wait that out. Deals with Florida Atlantic University and a Fortune 100 customer for quantum-cloud access show its niche, optimization problems that map naturally onto annealing, still has active commercial demand.",{"type":21,"tag":43,"props":2737,"children":2739},{"id":2738},"_6-rigetti-computing",[2740],{"type":26,"value":2741},"6. Rigetti Computing",{"type":21,"tag":22,"props":2743,"children":2744},{},[2745],{"type":26,"value":2746},"Rigetti is the company on this list where the gap between narrative and numbers is widest. Its Cepheus-1, a 108-qubit superconducting system, reached general availability in April 2026 after slipping from an original Q4 2025 target, delayed over tunable-coupler fidelity issues. Once it shipped, the reported two-qubit fidelity landed around 99-99.1%, below Rigetti's own 99.5% target and well below both IonQ's and Quantinuum's claimed figures for their respective platforms. Q1 2026 revenue was $4.4 million, a fraction of IonQ's $64.7 million in the same quarter. Public reporting also describes a setback on a DARPA program milestone, adding pressure on a company that's largely self-funding its roadmap at this point.",{"type":21,"tag":22,"props":2748,"children":2749},{},[2750],{"type":26,"value":2751},"The one genuine strength is the balance sheet: roughly $569 million in cash, no debt, and a burn rate around $26 million a quarter, which buys real runway. That's worth acknowledging directly, since a strong cash position is a real asset, not a consolation prize. But cash buys time, not competitive position, and on the metrics that predict whether a quantum computer does useful work, fidelity, logical qubit progress, independent commercial traction, Rigetti is running behind IBM, Google, IonQ, and Quantinuum, not alongside them. Its own public roadmap toward 1,000+ qubits reads, on the numbers, like a multi-year catch-up rather than a parallel track.",{"type":21,"tag":43,"props":2753,"children":2755},{"id":2754},"_7-psiquantum",[2756],{"type":26,"value":2757},"7. PsiQuantum",{"type":21,"tag":22,"props":2759,"children":2760},{},[2761],{"type":26,"value":2762},"PsiQuantum's photonic, fault-tolerance-first approach raised a $1 billion Series E in September 2025 and secured roughly $940 million (about $620 million USD) in Australian and Queensland government commitments. Construction on its Brisbane facility began in June 2026, but the delivery timeline has slipped from an original 2027 target to 2029. PsiQuantum has never shipped a commercial system and is betting everything on a fault-tolerant machine working the first time it's built at scale, a genuinely different risk profile from every gate-model competitor on this list, all of which have working (if noisy) hardware in the field today.",{"type":21,"tag":43,"props":2764,"children":2766},{"id":2765},"_8-xanadu",[2767],{"type":26,"value":2768},"8. Xanadu",{"type":21,"tag":22,"props":2770,"children":2771},{},[2772],{"type":26,"value":2773},"Xanadu listed on Nasdaq and the TSX in March 2026, raising $302 million, and its Aurora modular photonic system claims real-time error correction, a meaningful technical step if independently verified. Its PennyLane framework remains one of the most widely used open-source tools in quantum machine learning regardless of whose hardware it targets, which gives Xanadu an ecosystem foothold that doesn't depend on its own chips winning.",{"type":21,"tag":43,"props":2775,"children":2777},{"id":2776},"_9-pasqal",[2778],{"type":26,"value":2779},"9. Pasqal",{"type":21,"tag":22,"props":2781,"children":2782},{},[2783],{"type":26,"value":2784},"Pasqal's neutral-atom approach raised €340 million and priced a SPAC merger at a $2 billion valuation closing in the second half of 2026. Its public roadmap targets a 250-qubit advantage demonstration in 2026 and a path toward 10,000+ qubits with its Vela and Centaurus systems. Neutral atoms remain earlier-stage commercially than trapped ions or superconducting qubits, but Pasqal's funding and government relationships (particularly in Europe) give it real staying power to reach that scale.",{"type":21,"tag":43,"props":2786,"children":2788},{"id":2787},"_10-quera-computing",[2789],{"type":26,"value":2790},"10. QuEra Computing",{"type":21,"tag":22,"props":2792,"children":2793},{},[2794],{"type":26,"value":2795},"QuEra reported 96 logical qubits encoded across 448 physical qubits in a January 2026 Nature paper, a ratio that, if it holds up to scrutiny the way Google's below-threshold result did, would put QuEra's logical qubit count ahead of Quantinuum's Helios result. Over $507 million in total funding from backers including Google and SoftBank gives it the resources to keep pushing the neutral-atom approach toward scale.",{"type":21,"tag":43,"props":2797,"children":2799},{"id":2798},"the-rest-of-the-field-briefly",[2800],{"type":26,"value":2801},"The rest of the field, briefly",{"type":21,"tag":22,"props":2803,"children":2804},{},[2805,2810,2812,2817,2819,2824,2826,2831,2833,2838],{"type":21,"tag":784,"props":2806,"children":2807},{},[2808],{"type":26,"value":2809},"Atom Computing",{"type":26,"value":2811}," is chasing 50 logical qubits on 1,200+ physical qubits by late 2026, working with Microsoft's QuNorth group on error correction. ",{"type":21,"tag":784,"props":2813,"children":2814},{},[2815],{"type":26,"value":2816},"IQM",{"type":26,"value":2818}," raised €50 million from BlackRock and a $1.8 billion SPAC valuation, positioning itself as the first EU-listed pure quantum hardware company, with 21 systems already sold to 13 customers. ",{"type":21,"tag":784,"props":2820,"children":2821},{},[2822],{"type":26,"value":2823},"Infleqtion",{"type":26,"value":2825}," listed on the NYSE in February 2026 and reports 1,600 physical qubits at 99.73% fidelity. ",{"type":21,"tag":784,"props":2827,"children":2828},{},[2829],{"type":26,"value":2830},"Microsoft",{"type":26,"value":2832}," shipped its Majorana 2 topological qubit update in June 2026, claiming a 1,000x improvement in qubit lifetime, a result still facing real scrutiny from the physics community given how contested topological qubit claims have been historically. ",{"type":21,"tag":784,"props":2834,"children":2835},{},[2836],{"type":26,"value":2837},"NVIDIA",{"type":26,"value":2839}," builds no qubits at all but has positioned its NVQLink infrastructure as the connective layer between classical supercomputing and QPUs from Rigetti, SEEQC, Quantinuum, and IQM, a bet that it owns the plumbing regardless of which hardware modality wins.",{"type":21,"tag":43,"props":2841,"children":2843},{"id":2842},"how-to-use-this-list",[2844],{"type":26,"value":2845},"How to use this list",{"type":21,"tag":22,"props":2847,"children":2848},{},[2849,2851,2856,2858,2862,2863,2868],{"type":26,"value":2850},"Rankings like this age fast, and every number here came from a specific quarter or announcement that will look dated within a year. What won't age as fast is the method: check revenue against guidance, check fidelity against the company's own stated targets, check whether a \"logical qubit\" or \"advantage\" claim has been independently reproduced or is still sitting on a single vendor's word. Apply that same method to whatever announcement you read next, our ",{"type":21,"tag":29,"props":2852,"children":2853},{"href":670},[2854],{"type":26,"value":2855},"quantum benchmarking piece",{"type":26,"value":2857}," goes deeper on why the field still lacks a trustworthy, vendor-independent way to compare hardware at all. Our ",{"type":21,"tag":29,"props":2859,"children":2860},{"href":590},[2861],{"type":26,"value":593},{"type":26,"value":383},{"type":21,"tag":29,"props":2864,"children":2865},{"href":1206},[2866],{"type":26,"value":2867},"SDK comparison",{"type":26,"value":2869}," are the place to go next if you're deciding which platform to build on rather than which one to watch.",{"title":7,"searchDepth":164,"depth":164,"links":2871},[2872,2873,2874,2875,2876,2877,2878,2879,2880,2881,2882,2883],{"id":2638,"depth":164,"text":2641},{"id":2662,"depth":164,"text":2665},{"id":2673,"depth":164,"text":2676},{"id":2709,"depth":164,"text":2712},{"id":2727,"depth":164,"text":2730},{"id":2738,"depth":164,"text":2741},{"id":2754,"depth":164,"text":2757},{"id":2765,"depth":164,"text":2768},{"id":2776,"depth":164,"text":2779},{"id":2787,"depth":164,"text":2790},{"id":2798,"depth":164,"text":2801},{"id":2842,"depth":164,"text":2845},"content:blog:top-quantum-computing-companies-2026.md","blog\u002Ftop-quantum-computing-companies-2026.md","blog\u002Ftop-quantum-computing-companies-2026",{"_path":577,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2888,"description":2889,"date":10,"author":11,"tags":2890,"readingTime":288,"body":2892,"_type":171,"_id":2974,"_source":173,"_file":2975,"_stem":2976,"_extension":176},"Warwick's New Chip Concept Aims to Wire Together a Million Qubits","Warwick and NRC Canada proposed Quantum Phononic Links, a way to carry quantum information across an entire chip using engineered vibrations instead of only connecting neighboring qubits.",[15,287,2891],"Fundamentals",{"type":18,"children":2893,"toc":2969},[2894,2899,2905,2910,2929,2935,2947,2952,2958],{"type":21,"tag":22,"props":2895,"children":2896},{},[2897],{"type":26,"value":2898},"Today's leading quantum chips mostly connect a qubit to its immediate neighbors and nothing else. A useful large-scale quantum computer needs coordination across millions of qubits spread over an entire chip, not only clusters sitting next to each other. Researchers at the University of Warwick and NRC Canada published a proposed answer to that gap on July 29, 2026, in APL Quantum: a concept they call Quantum Phononic Links.",{"type":21,"tag":43,"props":2900,"children":2902},{"id":2901},"what-a-phononic-link-is",[2903],{"type":26,"value":2904},"What a phononic link is",{"type":21,"tag":22,"props":2906,"children":2907},{},[2908],{"type":26,"value":2909},"The idea uses phonons, sound-like vibrations traveling through a solid material, to carry quantum information between qubits that sit far apart on the same chip. The material behind it, compressively strained germanium on silicon, was developed at Warwick using advanced epitaxial growth techniques. Engineered correctly, the vibrations carry information whether the qubits involved sit side by side or are separated across a full semiconductor wafer up to 300 millimeters across.",{"type":21,"tag":22,"props":2911,"children":2912},{},[2913,2915,2920,2922,2927],{"type":26,"value":2914},"That distance matters. Nearest-neighbor-only connectivity is exactly the constraint that shapes which ",{"type":21,"tag":29,"props":2916,"children":2917},{"href":409},[2918],{"type":26,"value":2919},"error-correcting codes",{"type":26,"value":2921}," a chip even attempts. Our ",{"type":21,"tag":29,"props":2923,"children":2924},{"href":232},[2925],{"type":26,"value":2926},"companion piece on Quantinuum's Helios",{"type":26,"value":2928}," covers why trapped-ion hardware's all-to-all connectivity opens up error-correction codes that a nearest-neighbor superconducting chip cannot use efficiently. A phononic link aimed at chip-scale, non-local connectivity is targeting the same structural limitation from the silicon side.",{"type":21,"tag":43,"props":2930,"children":2932},{"id":2931},"read-the-maturity-level-accurately",[2933],{"type":26,"value":2934},"Read the maturity level accurately",{"type":21,"tag":22,"props":2936,"children":2937},{},[2938,2940,2945],{"type":26,"value":2939},"This is a concept and materials result, not an operating multi-qubit device. The paper proposes a mechanism and demonstrates the underlying material properties. It does not yet show a working chip moving quantum information between distant qubits using this method. That puts it in a different category of evidence than ",{"type":21,"tag":29,"props":2941,"children":2942},{"href":503},[2943],{"type":26,"value":2944},"HRL's self-operating silicon processor",{"type":26,"value":2946},", published the same week, which is a working 18-qubit device with a control chip already running inside its cryostat.",{"type":21,"tag":22,"props":2948,"children":2949},{},[2950],{"type":26,"value":2951},"Both results matter, and they matter for different reasons. HRL solved a real engineering problem for a small, existing device. Warwick proposed a mechanism aimed at a target two or three orders of magnitude larger, with the harder work of building and testing an actual chip still ahead of it. Neither is more important than the other. They sit at different points on the path from proposal to product, and coverage that treats them as equally proven misses that distinction.",{"type":21,"tag":43,"props":2953,"children":2955},{"id":2954},"why-the-target-size-is-the-real-headline",[2956],{"type":26,"value":2957},"Why the target size is the real headline",{"type":21,"tag":22,"props":2959,"children":2960},{},[2961,2963,2967],{"type":26,"value":2962},"A million qubits is well beyond any current device, superconducting, trapped-ion, or silicon. Getting there needs progress on several fronts at once: qubit quality, error correction overhead, control electronics, and exactly the qubit-to-qubit communication problem this proposal addresses. No single result solves all of it. What is worth tracking is whether Warwick's group, or others building on the same cs-GoS material, demonstrates the mechanism working on an actual multi-qubit chip. That demonstration, not the concept paper, will be the point where this result earns a place next to HRL's on the list of things that shipped. See our ",{"type":21,"tag":29,"props":2964,"children":2965},{"href":590},[2966],{"type":26,"value":593},{"type":26,"value":2968}," for how silicon-based approaches compare to the rest of the field.",{"title":7,"searchDepth":164,"depth":164,"links":2970},[2971,2972,2973],{"id":2901,"depth":164,"text":2904},{"id":2931,"depth":164,"text":2934},{"id":2954,"depth":164,"text":2957},"content:blog:warwick-quantum-phononic-links.md","blog\u002Fwarwick-quantum-phononic-links.md","blog\u002Fwarwick-quantum-phononic-links",{"_path":2978,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2979,"description":2980,"date":10,"author":11,"tags":2981,"readingTime":16,"body":2982,"_type":171,"_id":3082,"_source":173,"_file":3083,"_stem":3084,"_extension":176},"\u002Fblog\u002Fzuriq-2d-trapped-ion-seed-funding","ZuriQ Wants to Fix Trapped-Ion Scaling by Going 2D Instead of 1D","ZuriQ, an ETH Zurich spinout, raised $25.5 million to scale a two-dimensional trapped-ion architecture built on Penning micro-traps, a departure from the linear ion chains IonQ and Quantinuum use. Here is what the nine-ion demonstrator shows.",[15,287,1133],{"type":18,"children":2983,"toc":3077},[2984,3004,3015,3021,3033,3038,3044,3049,3054,3060,3065],{"type":21,"tag":22,"props":2985,"children":2986},{},[2987,2989,2995,2996,3002],{"type":26,"value":2988},"On July 28, 2026, ZuriQ announced a $25.5 million seed round to scale a trapped-ion architecture that departs from how every other trapped-ion company builds its qubits, according to ",{"type":21,"tag":29,"props":2990,"children":2993},{"href":2991,"rel":2992},"https:\u002F\u002Fthequantuminsider.com\u002F2026\u002F07\u002F28\u002Fzuriq-raises-25-5-million-2d-trapped-ion-quantum-processors\u002F",[378],[2994],{"type":26,"value":381},{"type":26,"value":383},{"type":21,"tag":29,"props":2997,"children":3000},{"href":2998,"rel":2999},"https:\u002F\u002Fsiliconangle.com\u002F2026\u002F07\u002F28\u002Fquantum-computing-startup-zuriq-gets-25-5m-scale-2d-trapped-ion-processor-design\u002F",[378],[3001],{"type":26,"value":812},{"type":26,"value":3003},". The round was led by Quantonation, with Forward.one, Extantia, and Firgun Ventures joining alongside existing investors, following a $4.2 million pre-seed round in 2025.",{"type":21,"tag":22,"props":3005,"children":3006},{},[3007,3009,3013],{"type":26,"value":3008},"ZuriQ is a spinout from ETH Zurich, led by CEO Pavel Hrmo, who spent more than a decade in trapped-ion research before founding the company. Its pitch is narrow and specific: the standard way of building a ",{"type":21,"tag":29,"props":3010,"children":3011},{"href":590},[3012],{"type":26,"value":1460},{"type":26,"value":3014}," quantum computer, a linear chain of ions connected through junctions, runs into a scaling wall that a two-dimensional layout avoids.",{"type":21,"tag":43,"props":3016,"children":3018},{"id":3017},"why-linear-chains-are-the-default-and-why-they-cap-out",[3019],{"type":26,"value":3020},"Why linear chains are the default and why they cap out",{"type":21,"tag":22,"props":3022,"children":3023},{},[3024,3026,3031],{"type":26,"value":3025},"IonQ and Quantinuum, ",{"type":21,"tag":29,"props":3027,"children":3028},{"href":1072},[3029],{"type":26,"value":3030},"the two companies furthest along commercially",{"type":26,"value":3032}," with trapped ions, both build on one-dimensional ion chains. Ions sit in a line inside a trap, and moving ions between different zones of the chip requires junctions, physical structures where chains merge and split. Junctions work, but every one adds engineering complexity, and a chip built from linear segments scales roughly with how many segments you wire together, not with the raw area of the chip.",{"type":21,"tag":22,"props":3034,"children":3035},{},[3036],{"type":26,"value":3037},"ZuriQ's approach uses Penning micro-traps, which confine ions with static magnetic fields instead of the oscillating electric fields used in standard linear traps. According to the company, this lets ions move freely across two dimensions rather than being confined to a single line, so qubit density grows with the area of the chip rather than the number of chained segments. That is a real architectural difference, not a rebranding of the same idea, and it is the kind of claim worth watching for independent confirmation as the company scales past its current demonstrator.",{"type":21,"tag":43,"props":3039,"children":3041},{"id":3040},"what-has-been-built-so-far",[3042],{"type":26,"value":3043},"What has been built so far",{"type":21,"tag":22,"props":3045,"children":3046},{},[3047],{"type":26,"value":3048},"The concrete result behind the funding is a working 3-by-3 array of nine individually controlled ions, built in collaboration with ETH Zurich over 18 months and fabricated on Infineon's production lines. ZuriQ describes it as the largest two-dimensional trapped-ion array demonstrated to date, which is a claim about being first at a specific, small scale rather than a claim about being competitive with IonQ's or Quantinuum's qubit counts today.",{"type":21,"tag":22,"props":3050,"children":3051},{},[3052],{"type":26,"value":3053},"Nine ions is a long way from a useful quantum computer. What the demonstrator establishes is that the Penning-trap approach works in a real fabricated chip rather than only on paper, and that Infineon's existing manufacturing lines produce the hardware, which matters for whether the architecture eventually scales past a lab bench. Quantonation partner Nicolas Jurczak framed the round as evidence that real physics breakthroughs are still available in quantum hardware architecture, which is the kind of statement every early-stage investor makes about their own bet and is worth reading as exactly that.",{"type":21,"tag":43,"props":3055,"children":3057},{"id":3056},"what-this-does-and-does-not-tell-you",[3058],{"type":26,"value":3059},"What this does and does not tell you",{"type":21,"tag":22,"props":3061,"children":3062},{},[3063],{"type":26,"value":3064},"This is a seed-stage company with a nine-qubit demonstrator, not a commercial system. The claims about how the architecture scales are ZuriQ's own projections, not measured results at any meaningful qubit count. What makes it worth tracking rather than dismissing is the specificity: a named physical mechanism (Penning micro-traps), a working fabricated device, and an industrial manufacturing partner, rather than a roadmap slide with no hardware behind it.",{"type":21,"tag":22,"props":3066,"children":3067},{},[3068,3070,3075],{"type":26,"value":3069},"If ZuriQ's 2D architecture scales the way it projects, it would address one of the structural bottlenecks in ",{"type":21,"tag":29,"props":3071,"children":3072},{"href":336},[3073],{"type":26,"value":3074},"trapped-ion scaling",{"type":26,"value":3076}," that this site has covered before: connecting qubits without every additional connection point adding its own error budget. Whether it gets there is a multi-year question. For now, the honest summary is a well-funded, technically specific bet from a team with real trapped-ion research credentials, at a scale that proves the mechanism works and nothing more.",{"title":7,"searchDepth":164,"depth":164,"links":3078},[3079,3080,3081],{"id":3017,"depth":164,"text":3020},{"id":3040,"depth":164,"text":3043},{"id":3056,"depth":164,"text":3059},"content:blog:zuriq-2d-trapped-ion-seed-funding.md","blog\u002Fzuriq-2d-trapped-ion-seed-funding.md","blog\u002Fzuriq-2d-trapped-ion-seed-funding",{"_path":3086,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":3087,"description":3088,"date":3089,"author":11,"tags":3090,"readingTime":3092,"body":3093,"_type":171,"_id":6272,"_source":173,"_file":6273,"_stem":6274,"_extension":176},"\u002Fblog\u002Ferror-mitigation-practical-guide","Quantum Error Mitigation: A Practical Guide (And When It Lies to You)","Hands-on error mitigation for NISQ hardware: readout calibration, zero-noise extrapolation, Pauli twirling, and dynamical decoupling, plus the ZNE failure mode that manufactures fake improvements.","2026-07-18",[365,852,3091],"Performance",10,{"type":18,"children":3094,"toc":6261},[3095,3100,3105,3111,3116,3142,3163,3168,3283,3302,3308,3313,3358,4777,4787,4795,4823,4850,4856,4877,4890,5085,5090,5096,5108,5113,5125,5131,5143,5171,5914,5924,5932,5937,5943,5948,5956,5968,5995,6007,6017,6023,6028,6046,6078,6095,6101,6113,6126,6132,6137,6192,6216,6229,6257],{"type":21,"tag":22,"props":3096,"children":3097},{},[3098],{"type":26,"value":3099},"You ran your circuit on real hardware. The answer is wrong. Not catastrophically wrong. Wrong enough to be useless. Error mitigation is the set of tricks that gets you from \"wrong\" to \"usable\" without waiting a decade for fault tolerance.",{"type":21,"tag":22,"props":3101,"children":3102},{},[3103],{"type":26,"value":3104},"This guide covers what works, in the order you should try it, with runnable Qiskit code. It also covers the part most tutorials skip: how the most popular mitigation technique sometimes produces a convincing improvement that is entirely fictitious, and the one-line sanity check that catches it.",{"type":21,"tag":43,"props":3106,"children":3108},{"id":3107},"mitigation-is-not-correction",[3109],{"type":26,"value":3110},"Mitigation Is Not Correction",{"type":21,"tag":22,"props":3112,"children":3113},{},[3114],{"type":26,"value":3115},"These get conflated constantly, so let's be precise.",{"type":21,"tag":22,"props":3117,"children":3118},{},[3119,3126,3128,3133,3135,3140],{"type":21,"tag":784,"props":3120,"children":3121},{},[3122],{"type":21,"tag":29,"props":3123,"children":3124},{"href":409},[3125],{"type":26,"value":412},{"type":26,"value":3127}," detects and fixes errors ",{"type":21,"tag":103,"props":3129,"children":3130},{},[3131],{"type":26,"value":3132},"during",{"type":26,"value":3134}," the computation. It encodes one logical qubit across many physical qubits, measures syndromes with ancillas, and applies corrections in real time. It preserves arbitrary quantum states to arbitrary depth, but it demands hardware below the fault-tolerance threshold and roughly 1,000 times qubit overhead. Our ",{"type":21,"tag":29,"props":3136,"children":3137},{"href":428},[3138],{"type":26,"value":3139},"error correction primer",{"type":26,"value":3141}," walks through how the surface code does this.",{"type":21,"tag":22,"props":3143,"children":3144},{},[3145,3154,3156,3161],{"type":21,"tag":784,"props":3146,"children":3147},{},[3148],{"type":21,"tag":29,"props":3149,"children":3151},{"href":3150},"\u002Fglossary\u002Ferror-mitigation",[3152],{"type":26,"value":3153},"Error mitigation",{"type":26,"value":3155}," does nothing during the computation. It runs the noisy circuit, collects noisy results, and applies classical statistics afterwards to ",{"type":21,"tag":103,"props":3157,"children":3158},{},[3159],{"type":26,"value":3160},"estimate",{"type":26,"value":3162}," what a noiseless machine would have said.",{"type":21,"tag":22,"props":3164,"children":3165},{},[3166],{"type":26,"value":3167},"The practical differences matter:",{"type":21,"tag":3169,"props":3170,"children":3171},"table",{},[3172,3194],{"type":21,"tag":3173,"props":3174,"children":3175},"thead",{},[3176],{"type":21,"tag":3177,"props":3178,"children":3179},"tr",{},[3180,3184,3189],{"type":21,"tag":3181,"props":3182,"children":3183},"th",{},[],{"type":21,"tag":3181,"props":3185,"children":3186},{},[3187],{"type":26,"value":3188},"Correction",{"type":21,"tag":3181,"props":3190,"children":3191},{},[3192],{"type":26,"value":3193},"Mitigation",{"type":21,"tag":3195,"props":3196,"children":3197},"tbody",{},[3198,3229,3247,3265],{"type":21,"tag":3177,"props":3199,"children":3200},{},[3201,3207,3218],{"type":21,"tag":3202,"props":3203,"children":3204},"td",{},[3205],{"type":26,"value":3206},"Cost",{"type":21,"tag":3202,"props":3208,"children":3209},{},[3210,3212,3216],{"type":26,"value":3211},"Extra ",{"type":21,"tag":784,"props":3213,"children":3214},{},[3215],{"type":26,"value":685},{"type":26,"value":3217}," (~1000×)",{"type":21,"tag":3202,"props":3219,"children":3220},{},[3221,3222,3227],{"type":26,"value":3211},{"type":21,"tag":784,"props":3223,"children":3224},{},[3225],{"type":26,"value":3226},"shots",{"type":26,"value":3228}," (2–100×)",{"type":21,"tag":3177,"props":3230,"children":3231},{},[3232,3237,3242],{"type":21,"tag":3202,"props":3233,"children":3234},{},[3235],{"type":26,"value":3236},"Recovers",{"type":21,"tag":3202,"props":3238,"children":3239},{},[3240],{"type":26,"value":3241},"The quantum state",{"type":21,"tag":3202,"props":3243,"children":3244},{},[3245],{"type":26,"value":3246},"An expectation value",{"type":21,"tag":3177,"props":3248,"children":3249},{},[3250,3255,3260],{"type":21,"tag":3202,"props":3251,"children":3252},{},[3253],{"type":26,"value":3254},"Scales to",{"type":21,"tag":3202,"props":3256,"children":3257},{},[3258],{"type":26,"value":3259},"Arbitrary depth",{"type":21,"tag":3202,"props":3261,"children":3262},{},[3263],{"type":26,"value":3264},"Shallow-to-moderate depth only",{"type":21,"tag":3177,"props":3266,"children":3267},{},[3268,3273,3278],{"type":21,"tag":3202,"props":3269,"children":3270},{},[3271],{"type":26,"value":3272},"Available today",{"type":21,"tag":3202,"props":3274,"children":3275},{},[3276],{"type":26,"value":3277},"Barely",{"type":21,"tag":3202,"props":3279,"children":3280},{},[3281],{"type":26,"value":3282},"Yes, right now",{"type":21,"tag":22,"props":3284,"children":3285},{},[3286,3288,3293,3295,3300],{"type":26,"value":3287},"That last row is why mitigation dominates ",{"type":21,"tag":29,"props":3289,"children":3290},{"href":120},[3291],{"type":26,"value":3292},"NISQ-era",{"type":26,"value":3294}," work. But note row three: mitigation's overhead grows ",{"type":21,"tag":103,"props":3296,"children":3297},{},[3298],{"type":26,"value":3299},"exponentially",{"type":26,"value":3301}," with circuit depth and error rate. There is a depth beyond which no amount of shots rescues you. Knowing where that wall is (for your circuit, on your device) is the entire skill.",{"type":21,"tag":43,"props":3303,"children":3305},{"id":3304},"step-1-readout-error-mitigation-do-this-first",[3306],{"type":26,"value":3307},"Step 1: Readout Error Mitigation (Do This First)",{"type":21,"tag":22,"props":3309,"children":3310},{},[3311],{"type":26,"value":3312},"Measurement errors are the cheapest thing to fix and often the biggest single contributor. A superconducting qubit typically misreads 1–5% of the time. On 4 qubits at 3% each, you're losing ~11% of your signal before any gate error is counted.",{"type":21,"tag":22,"props":3314,"children":3315},{},[3316,3318,3324,3326,3332,3334,3340,3342,3348,3350,3356],{"type":26,"value":3317},"The fix: characterize the readout with calibration circuits, then invert. Prepare each computational basis state, measure it, and record where the counts land. That gives you an assignment matrix ",{"type":21,"tag":1831,"props":3319,"children":3321},{"className":3320},[],[3322],{"type":26,"value":3323},"M",{"type":26,"value":3325}," where ",{"type":21,"tag":1831,"props":3327,"children":3329},{"className":3328},[],[3330],{"type":26,"value":3331},"M[i][j]",{"type":26,"value":3333}," is the probability of reading ",{"type":21,"tag":1831,"props":3335,"children":3337},{"className":3336},[],[3338],{"type":26,"value":3339},"i",{"type":26,"value":3341}," when the true state was ",{"type":21,"tag":1831,"props":3343,"children":3345},{"className":3344},[],[3346],{"type":26,"value":3347},"j",{"type":26,"value":3349},". Your observed distribution is ",{"type":21,"tag":1831,"props":3351,"children":3353},{"className":3352},[],[3354],{"type":26,"value":3355},"M @ p_true",{"type":26,"value":3357},", so apply the pseudo-inverse.",{"type":21,"tag":2062,"props":3359,"children":3363},{"code":3360,"language":3361,"meta":7,"className":3362,"style":7},"import numpy as np\nfrom qiskit import QuantumCircuit, transpile\nfrom qiskit_aer import AerSimulator\nfrom qiskit_aer.noise import NoiseModel, depolarizing_error, ReadoutError\n\ndef build_noise(p1=0.002, p2=0.02, p_read=0.05):\n    nm = NoiseModel()\n    nm.add_all_qubit_quantum_error(depolarizing_error(p1, 1), [\"rz\", \"sx\", \"x\", \"h\"])\n    nm.add_all_qubit_quantum_error(depolarizing_error(p2, 2), [\"cx\", \"cz\", \"ecr\"])\n    nm.add_all_qubit_readout_error(\n        ReadoutError([[1 - p_read, p_read], [p_read, 1 - p_read]])\n    )\n    return nm\n\nbackend = AerSimulator(noise_model=build_noise())\nSHOTS = 40000\n\ndef calibration_matrix(n, backend, shots=20000):\n    M = np.zeros((2**n, 2**n))\n    for i in range(2**n):\n        qc = QuantumCircuit(n, n)\n        bits = format(i, f\"0{n}b\")[::-1]      # Qiskit is little-endian\n        for q, b in enumerate(bits):\n            if b == \"1\":\n                qc.x(q)\n        qc.measure(range(n), range(n))\n        counts = backend.run(transpile(qc, backend), shots=shots).result().get_counts()\n        for key, v in counts.items():\n            M[int(key, 2), i] = v \u002F shots\n    return M\n\nn = 2\nMinv = np.linalg.pinv(calibration_matrix(n, backend))\n\nbell = QuantumCircuit(2, 2)\nbell.h(0)\nbell.cx(0, 1)\nbell.measure([0, 1], [0, 1])\n\nraw = backend.run(transpile(bell, backend), shots=SHOTS).result().get_counts()\nvec = np.array([raw.get(format(i, f\"0{n}b\"), 0) for i in range(2**n)], float) \u002F SHOTS\n\nmit = np.clip(Minv @ vec, 0, None)\nmit \u002F= mit.sum()\n\nprint(\"raw      :\", {format(i, \"02b\"): round(vec[i], 4) for i in range(4)})\nprint(\"mitigated:\", {format(i, \"02b\"): round(mit[i], 4) for i in range(4)})\n","python","language-python shiki shiki-themes github-dark",[3364],{"type":21,"tag":1831,"props":3365,"children":3366},{"__ignoreMap":7},[3367,3391,3413,3434,3455,3464,3526,3543,3598,3641,3649,3685,3693,3707,3715,3748,3767,3775,3806,3851,3893,3911,3989,4017,4046,4055,4083,4114,4136,4182,4195,4203,4221,4239,4247,4282,4300,4325,4367,4375,4410,4527,4535,4580,4598,4606,4695],{"type":21,"tag":2072,"props":3368,"children":3369},{"class":2074,"line":2075},[3370,3376,3381,3386],{"type":21,"tag":2072,"props":3371,"children":3373},{"style":3372},"--shiki-default:#F97583",[3374],{"type":26,"value":3375},"import",{"type":21,"tag":2072,"props":3377,"children":3378},{"style":2079},[3379],{"type":26,"value":3380}," numpy ",{"type":21,"tag":2072,"props":3382,"children":3383},{"style":3372},[3384],{"type":26,"value":3385},"as",{"type":21,"tag":2072,"props":3387,"children":3388},{"style":2079},[3389],{"type":26,"value":3390}," np\n",{"type":21,"tag":2072,"props":3392,"children":3393},{"class":2074,"line":164},[3394,3399,3404,3408],{"type":21,"tag":2072,"props":3395,"children":3396},{"style":3372},[3397],{"type":26,"value":3398},"from",{"type":21,"tag":2072,"props":3400,"children":3401},{"style":2079},[3402],{"type":26,"value":3403}," qiskit ",{"type":21,"tag":2072,"props":3405,"children":3406},{"style":3372},[3407],{"type":26,"value":3375},{"type":21,"tag":2072,"props":3409,"children":3410},{"style":2079},[3411],{"type":26,"value":3412}," QuantumCircuit, transpile\n",{"type":21,"tag":2072,"props":3414,"children":3415},{"class":2074,"line":2093},[3416,3420,3425,3429],{"type":21,"tag":2072,"props":3417,"children":3418},{"style":3372},[3419],{"type":26,"value":3398},{"type":21,"tag":2072,"props":3421,"children":3422},{"style":2079},[3423],{"type":26,"value":3424}," qiskit_aer ",{"type":21,"tag":2072,"props":3426,"children":3427},{"style":3372},[3428],{"type":26,"value":3375},{"type":21,"tag":2072,"props":3430,"children":3431},{"style":2079},[3432],{"type":26,"value":3433}," AerSimulator\n",{"type":21,"tag":2072,"props":3435,"children":3436},{"class":2074,"line":2155},[3437,3441,3446,3450],{"type":21,"tag":2072,"props":3438,"children":3439},{"style":3372},[3440],{"type":26,"value":3398},{"type":21,"tag":2072,"props":3442,"children":3443},{"style":2079},[3444],{"type":26,"value":3445}," qiskit_aer.noise ",{"type":21,"tag":2072,"props":3447,"children":3448},{"style":3372},[3449],{"type":26,"value":3375},{"type":21,"tag":2072,"props":3451,"children":3452},{"style":2079},[3453],{"type":26,"value":3454}," NoiseModel, depolarizing_error, ReadoutError\n",{"type":21,"tag":2072,"props":3456,"children":3457},{"class":2074,"line":2178},[3458],{"type":21,"tag":2072,"props":3459,"children":3461},{"emptyLinePlaceholder":3460},true,[3462],{"type":26,"value":3463},"\n",{"type":21,"tag":2072,"props":3465,"children":3466},{"class":2074,"line":288},[3467,3472,3478,3483,3488,3493,3498,3502,3507,3512,3516,3521],{"type":21,"tag":2072,"props":3468,"children":3469},{"style":3372},[3470],{"type":26,"value":3471},"def",{"type":21,"tag":2072,"props":3473,"children":3475},{"style":3474},"--shiki-default:#B392F0",[3476],{"type":26,"value":3477}," build_noise",{"type":21,"tag":2072,"props":3479,"children":3480},{"style":2079},[3481],{"type":26,"value":3482},"(p1",{"type":21,"tag":2072,"props":3484,"children":3485},{"style":3372},[3486],{"type":26,"value":3487},"=",{"type":21,"tag":2072,"props":3489,"children":3490},{"style":2097},[3491],{"type":26,"value":3492},"0.002",{"type":21,"tag":2072,"props":3494,"children":3495},{"style":2079},[3496],{"type":26,"value":3497},", p2",{"type":21,"tag":2072,"props":3499,"children":3500},{"style":3372},[3501],{"type":26,"value":3487},{"type":21,"tag":2072,"props":3503,"children":3504},{"style":2097},[3505],{"type":26,"value":3506},"0.02",{"type":21,"tag":2072,"props":3508,"children":3509},{"style":2079},[3510],{"type":26,"value":3511},", p_read",{"type":21,"tag":2072,"props":3513,"children":3514},{"style":3372},[3515],{"type":26,"value":3487},{"type":21,"tag":2072,"props":3517,"children":3518},{"style":2097},[3519],{"type":26,"value":3520},"0.05",{"type":21,"tag":2072,"props":3522,"children":3523},{"style":2079},[3524],{"type":26,"value":3525},"):\n",{"type":21,"tag":2072,"props":3527,"children":3528},{"class":2074,"line":16},[3529,3534,3538],{"type":21,"tag":2072,"props":3530,"children":3531},{"style":2079},[3532],{"type":26,"value":3533},"    nm ",{"type":21,"tag":2072,"props":3535,"children":3536},{"style":3372},[3537],{"type":26,"value":3487},{"type":21,"tag":2072,"props":3539,"children":3540},{"style":2079},[3541],{"type":26,"value":3542}," NoiseModel()\n",{"type":21,"tag":2072,"props":3544,"children":3545},{"class":2074,"line":366},[3546,3551,3556,3561,3566,3570,3575,3579,3584,3588,3593],{"type":21,"tag":2072,"props":3547,"children":3548},{"style":2079},[3549],{"type":26,"value":3550},"    nm.add_all_qubit_quantum_error(depolarizing_error(p1, ",{"type":21,"tag":2072,"props":3552,"children":3553},{"style":2097},[3554],{"type":26,"value":3555},"1",{"type":21,"tag":2072,"props":3557,"children":3558},{"style":2079},[3559],{"type":26,"value":3560},"), [",{"type":21,"tag":2072,"props":3562,"children":3563},{"style":2108},[3564],{"type":26,"value":3565},"\"rz\"",{"type":21,"tag":2072,"props":3567,"children":3568},{"style":2079},[3569],{"type":26,"value":798},{"type":21,"tag":2072,"props":3571,"children":3572},{"style":2108},[3573],{"type":26,"value":3574},"\"sx\"",{"type":21,"tag":2072,"props":3576,"children":3577},{"style":2079},[3578],{"type":26,"value":798},{"type":21,"tag":2072,"props":3580,"children":3581},{"style":2108},[3582],{"type":26,"value":3583},"\"x\"",{"type":21,"tag":2072,"props":3585,"children":3586},{"style":2079},[3587],{"type":26,"value":798},{"type":21,"tag":2072,"props":3589,"children":3590},{"style":2108},[3591],{"type":26,"value":3592},"\"h\"",{"type":21,"tag":2072,"props":3594,"children":3595},{"style":2079},[3596],{"type":26,"value":3597},"])\n",{"type":21,"tag":2072,"props":3599,"children":3600},{"class":2074,"line":853},[3601,3606,3610,3614,3619,3623,3628,3632,3637],{"type":21,"tag":2072,"props":3602,"children":3603},{"style":2079},[3604],{"type":26,"value":3605},"    nm.add_all_qubit_quantum_error(depolarizing_error(p2, ",{"type":21,"tag":2072,"props":3607,"children":3608},{"style":2097},[3609],{"type":26,"value":2170},{"type":21,"tag":2072,"props":3611,"children":3612},{"style":2079},[3613],{"type":26,"value":3560},{"type":21,"tag":2072,"props":3615,"children":3616},{"style":2108},[3617],{"type":26,"value":3618},"\"cx\"",{"type":21,"tag":2072,"props":3620,"children":3621},{"style":2079},[3622],{"type":26,"value":798},{"type":21,"tag":2072,"props":3624,"children":3625},{"style":2108},[3626],{"type":26,"value":3627},"\"cz\"",{"type":21,"tag":2072,"props":3629,"children":3630},{"style":2079},[3631],{"type":26,"value":798},{"type":21,"tag":2072,"props":3633,"children":3634},{"style":2108},[3635],{"type":26,"value":3636},"\"ecr\"",{"type":21,"tag":2072,"props":3638,"children":3639},{"style":2079},[3640],{"type":26,"value":3597},{"type":21,"tag":2072,"props":3642,"children":3643},{"class":2074,"line":3092},[3644],{"type":21,"tag":2072,"props":3645,"children":3646},{"style":2079},[3647],{"type":26,"value":3648},"    nm.add_all_qubit_readout_error(\n",{"type":21,"tag":2072,"props":3650,"children":3652},{"class":2074,"line":3651},11,[3653,3658,3662,3667,3672,3676,3680],{"type":21,"tag":2072,"props":3654,"children":3655},{"style":2079},[3656],{"type":26,"value":3657},"        ReadoutError([[",{"type":21,"tag":2072,"props":3659,"children":3660},{"style":2097},[3661],{"type":26,"value":3555},{"type":21,"tag":2072,"props":3663,"children":3664},{"style":3372},[3665],{"type":26,"value":3666}," -",{"type":21,"tag":2072,"props":3668,"children":3669},{"style":2079},[3670],{"type":26,"value":3671}," p_read, p_read], [p_read, ",{"type":21,"tag":2072,"props":3673,"children":3674},{"style":2097},[3675],{"type":26,"value":3555},{"type":21,"tag":2072,"props":3677,"children":3678},{"style":3372},[3679],{"type":26,"value":3666},{"type":21,"tag":2072,"props":3681,"children":3682},{"style":2079},[3683],{"type":26,"value":3684}," p_read]])\n",{"type":21,"tag":2072,"props":3686,"children":3687},{"class":2074,"line":2616},[3688],{"type":21,"tag":2072,"props":3689,"children":3690},{"style":2079},[3691],{"type":26,"value":3692},"    )\n",{"type":21,"tag":2072,"props":3694,"children":3696},{"class":2074,"line":3695},13,[3697,3702],{"type":21,"tag":2072,"props":3698,"children":3699},{"style":3372},[3700],{"type":26,"value":3701},"    return",{"type":21,"tag":2072,"props":3703,"children":3704},{"style":2079},[3705],{"type":26,"value":3706}," nm\n",{"type":21,"tag":2072,"props":3708,"children":3710},{"class":2074,"line":3709},14,[3711],{"type":21,"tag":2072,"props":3712,"children":3713},{"emptyLinePlaceholder":3460},[3714],{"type":26,"value":3463},{"type":21,"tag":2072,"props":3716,"children":3718},{"class":2074,"line":3717},15,[3719,3724,3728,3733,3739,3743],{"type":21,"tag":2072,"props":3720,"children":3721},{"style":2079},[3722],{"type":26,"value":3723},"backend ",{"type":21,"tag":2072,"props":3725,"children":3726},{"style":3372},[3727],{"type":26,"value":3487},{"type":21,"tag":2072,"props":3729,"children":3730},{"style":2079},[3731],{"type":26,"value":3732}," AerSimulator(",{"type":21,"tag":2072,"props":3734,"children":3736},{"style":3735},"--shiki-default:#FFAB70",[3737],{"type":26,"value":3738},"noise_model",{"type":21,"tag":2072,"props":3740,"children":3741},{"style":3372},[3742],{"type":26,"value":3487},{"type":21,"tag":2072,"props":3744,"children":3745},{"style":2079},[3746],{"type":26,"value":3747},"build_noise())\n",{"type":21,"tag":2072,"props":3749,"children":3751},{"class":2074,"line":3750},16,[3752,3757,3762],{"type":21,"tag":2072,"props":3753,"children":3754},{"style":2097},[3755],{"type":26,"value":3756},"SHOTS",{"type":21,"tag":2072,"props":3758,"children":3759},{"style":3372},[3760],{"type":26,"value":3761}," =",{"type":21,"tag":2072,"props":3763,"children":3764},{"style":2097},[3765],{"type":26,"value":3766}," 40000\n",{"type":21,"tag":2072,"props":3768,"children":3770},{"class":2074,"line":3769},17,[3771],{"type":21,"tag":2072,"props":3772,"children":3773},{"emptyLinePlaceholder":3460},[3774],{"type":26,"value":3463},{"type":21,"tag":2072,"props":3776,"children":3778},{"class":2074,"line":3777},18,[3779,3783,3788,3793,3797,3802],{"type":21,"tag":2072,"props":3780,"children":3781},{"style":3372},[3782],{"type":26,"value":3471},{"type":21,"tag":2072,"props":3784,"children":3785},{"style":3474},[3786],{"type":26,"value":3787}," calibration_matrix",{"type":21,"tag":2072,"props":3789,"children":3790},{"style":2079},[3791],{"type":26,"value":3792},"(n, backend, shots",{"type":21,"tag":2072,"props":3794,"children":3795},{"style":3372},[3796],{"type":26,"value":3487},{"type":21,"tag":2072,"props":3798,"children":3799},{"style":2097},[3800],{"type":26,"value":3801},"20000",{"type":21,"tag":2072,"props":3803,"children":3804},{"style":2079},[3805],{"type":26,"value":3525},{"type":21,"tag":2072,"props":3807,"children":3809},{"class":2074,"line":3808},19,[3810,3815,3819,3824,3828,3833,3838,3842,3846],{"type":21,"tag":2072,"props":3811,"children":3812},{"style":2079},[3813],{"type":26,"value":3814},"    M ",{"type":21,"tag":2072,"props":3816,"children":3817},{"style":3372},[3818],{"type":26,"value":3487},{"type":21,"tag":2072,"props":3820,"children":3821},{"style":2079},[3822],{"type":26,"value":3823}," np.zeros((",{"type":21,"tag":2072,"props":3825,"children":3826},{"style":2097},[3827],{"type":26,"value":2170},{"type":21,"tag":2072,"props":3829,"children":3830},{"style":3372},[3831],{"type":26,"value":3832},"**",{"type":21,"tag":2072,"props":3834,"children":3835},{"style":2079},[3836],{"type":26,"value":3837},"n, ",{"type":21,"tag":2072,"props":3839,"children":3840},{"style":2097},[3841],{"type":26,"value":2170},{"type":21,"tag":2072,"props":3843,"children":3844},{"style":3372},[3845],{"type":26,"value":3832},{"type":21,"tag":2072,"props":3847,"children":3848},{"style":2079},[3849],{"type":26,"value":3850},"n))\n",{"type":21,"tag":2072,"props":3852,"children":3854},{"class":2074,"line":3853},20,[3855,3860,3865,3870,3875,3880,3884,3888],{"type":21,"tag":2072,"props":3856,"children":3857},{"style":3372},[3858],{"type":26,"value":3859},"    for",{"type":21,"tag":2072,"props":3861,"children":3862},{"style":2079},[3863],{"type":26,"value":3864}," i ",{"type":21,"tag":2072,"props":3866,"children":3867},{"style":3372},[3868],{"type":26,"value":3869},"in",{"type":21,"tag":2072,"props":3871,"children":3872},{"style":2097},[3873],{"type":26,"value":3874}," range",{"type":21,"tag":2072,"props":3876,"children":3877},{"style":2079},[3878],{"type":26,"value":3879},"(",{"type":21,"tag":2072,"props":3881,"children":3882},{"style":2097},[3883],{"type":26,"value":2170},{"type":21,"tag":2072,"props":3885,"children":3886},{"style":3372},[3887],{"type":26,"value":3832},{"type":21,"tag":2072,"props":3889,"children":3890},{"style":2079},[3891],{"type":26,"value":3892},"n):\n",{"type":21,"tag":2072,"props":3894,"children":3896},{"class":2074,"line":3895},21,[3897,3902,3906],{"type":21,"tag":2072,"props":3898,"children":3899},{"style":2079},[3900],{"type":26,"value":3901},"        qc ",{"type":21,"tag":2072,"props":3903,"children":3904},{"style":3372},[3905],{"type":26,"value":3487},{"type":21,"tag":2072,"props":3907,"children":3908},{"style":2079},[3909],{"type":26,"value":3910}," QuantumCircuit(n, n)\n",{"type":21,"tag":2072,"props":3912,"children":3914},{"class":2074,"line":3913},22,[3915,3920,3924,3929,3934,3939,3944,3949,3954,3959,3964,3969,3974,3978,3983],{"type":21,"tag":2072,"props":3916,"children":3917},{"style":2079},[3918],{"type":26,"value":3919},"        bits ",{"type":21,"tag":2072,"props":3921,"children":3922},{"style":3372},[3923],{"type":26,"value":3487},{"type":21,"tag":2072,"props":3925,"children":3926},{"style":2097},[3927],{"type":26,"value":3928}," format",{"type":21,"tag":2072,"props":3930,"children":3931},{"style":2079},[3932],{"type":26,"value":3933},"(i, ",{"type":21,"tag":2072,"props":3935,"children":3936},{"style":3372},[3937],{"type":26,"value":3938},"f",{"type":21,"tag":2072,"props":3940,"children":3941},{"style":2108},[3942],{"type":26,"value":3943},"\"0",{"type":21,"tag":2072,"props":3945,"children":3946},{"style":2097},[3947],{"type":26,"value":3948},"{",{"type":21,"tag":2072,"props":3950,"children":3951},{"style":2079},[3952],{"type":26,"value":3953},"n",{"type":21,"tag":2072,"props":3955,"children":3956},{"style":2097},[3957],{"type":26,"value":3958},"}",{"type":21,"tag":2072,"props":3960,"children":3961},{"style":2108},[3962],{"type":26,"value":3963},"b\"",{"type":21,"tag":2072,"props":3965,"children":3966},{"style":2079},[3967],{"type":26,"value":3968},")[::",{"type":21,"tag":2072,"props":3970,"children":3971},{"style":3372},[3972],{"type":26,"value":3973},"-",{"type":21,"tag":2072,"props":3975,"children":3976},{"style":2097},[3977],{"type":26,"value":3555},{"type":21,"tag":2072,"props":3979,"children":3980},{"style":2079},[3981],{"type":26,"value":3982},"]      ",{"type":21,"tag":2072,"props":3984,"children":3986},{"style":3985},"--shiki-default:#6A737D",[3987],{"type":26,"value":3988},"# Qiskit is little-endian\n",{"type":21,"tag":2072,"props":3990,"children":3992},{"class":2074,"line":3991},23,[3993,3998,4003,4007,4012],{"type":21,"tag":2072,"props":3994,"children":3995},{"style":3372},[3996],{"type":26,"value":3997},"        for",{"type":21,"tag":2072,"props":3999,"children":4000},{"style":2079},[4001],{"type":26,"value":4002}," q, b ",{"type":21,"tag":2072,"props":4004,"children":4005},{"style":3372},[4006],{"type":26,"value":3869},{"type":21,"tag":2072,"props":4008,"children":4009},{"style":2097},[4010],{"type":26,"value":4011}," enumerate",{"type":21,"tag":2072,"props":4013,"children":4014},{"style":2079},[4015],{"type":26,"value":4016},"(bits):\n",{"type":21,"tag":2072,"props":4018,"children":4020},{"class":2074,"line":4019},24,[4021,4026,4031,4036,4041],{"type":21,"tag":2072,"props":4022,"children":4023},{"style":3372},[4024],{"type":26,"value":4025},"            if",{"type":21,"tag":2072,"props":4027,"children":4028},{"style":2079},[4029],{"type":26,"value":4030}," b ",{"type":21,"tag":2072,"props":4032,"children":4033},{"style":3372},[4034],{"type":26,"value":4035},"==",{"type":21,"tag":2072,"props":4037,"children":4038},{"style":2108},[4039],{"type":26,"value":4040}," \"1\"",{"type":21,"tag":2072,"props":4042,"children":4043},{"style":2079},[4044],{"type":26,"value":4045},":\n",{"type":21,"tag":2072,"props":4047,"children":4049},{"class":2074,"line":4048},25,[4050],{"type":21,"tag":2072,"props":4051,"children":4052},{"style":2079},[4053],{"type":26,"value":4054},"                qc.x(q)\n",{"type":21,"tag":2072,"props":4056,"children":4058},{"class":2074,"line":4057},26,[4059,4064,4069,4074,4078],{"type":21,"tag":2072,"props":4060,"children":4061},{"style":2079},[4062],{"type":26,"value":4063},"        qc.measure(",{"type":21,"tag":2072,"props":4065,"children":4066},{"style":2097},[4067],{"type":26,"value":4068},"range",{"type":21,"tag":2072,"props":4070,"children":4071},{"style":2079},[4072],{"type":26,"value":4073},"(n), ",{"type":21,"tag":2072,"props":4075,"children":4076},{"style":2097},[4077],{"type":26,"value":4068},{"type":21,"tag":2072,"props":4079,"children":4080},{"style":2079},[4081],{"type":26,"value":4082},"(n))\n",{"type":21,"tag":2072,"props":4084,"children":4086},{"class":2074,"line":4085},27,[4087,4092,4096,4101,4105,4109],{"type":21,"tag":2072,"props":4088,"children":4089},{"style":2079},[4090],{"type":26,"value":4091},"        counts ",{"type":21,"tag":2072,"props":4093,"children":4094},{"style":3372},[4095],{"type":26,"value":3487},{"type":21,"tag":2072,"props":4097,"children":4098},{"style":2079},[4099],{"type":26,"value":4100}," backend.run(transpile(qc, backend), ",{"type":21,"tag":2072,"props":4102,"children":4103},{"style":3735},[4104],{"type":26,"value":3226},{"type":21,"tag":2072,"props":4106,"children":4107},{"style":3372},[4108],{"type":26,"value":3487},{"type":21,"tag":2072,"props":4110,"children":4111},{"style":2079},[4112],{"type":26,"value":4113},"shots).result().get_counts()\n",{"type":21,"tag":2072,"props":4115,"children":4117},{"class":2074,"line":4116},28,[4118,4122,4127,4131],{"type":21,"tag":2072,"props":4119,"children":4120},{"style":3372},[4121],{"type":26,"value":3997},{"type":21,"tag":2072,"props":4123,"children":4124},{"style":2079},[4125],{"type":26,"value":4126}," key, v ",{"type":21,"tag":2072,"props":4128,"children":4129},{"style":3372},[4130],{"type":26,"value":3869},{"type":21,"tag":2072,"props":4132,"children":4133},{"style":2079},[4134],{"type":26,"value":4135}," counts.items():\n",{"type":21,"tag":2072,"props":4137,"children":4139},{"class":2074,"line":4138},29,[4140,4145,4150,4155,4159,4164,4168,4173,4177],{"type":21,"tag":2072,"props":4141,"children":4142},{"style":2079},[4143],{"type":26,"value":4144},"            M[",{"type":21,"tag":2072,"props":4146,"children":4147},{"style":2097},[4148],{"type":26,"value":4149},"int",{"type":21,"tag":2072,"props":4151,"children":4152},{"style":2079},[4153],{"type":26,"value":4154},"(key, ",{"type":21,"tag":2072,"props":4156,"children":4157},{"style":2097},[4158],{"type":26,"value":2170},{"type":21,"tag":2072,"props":4160,"children":4161},{"style":2079},[4162],{"type":26,"value":4163},"), i] ",{"type":21,"tag":2072,"props":4165,"children":4166},{"style":3372},[4167],{"type":26,"value":3487},{"type":21,"tag":2072,"props":4169,"children":4170},{"style":2079},[4171],{"type":26,"value":4172}," v ",{"type":21,"tag":2072,"props":4174,"children":4175},{"style":3372},[4176],{"type":26,"value":1926},{"type":21,"tag":2072,"props":4178,"children":4179},{"style":2079},[4180],{"type":26,"value":4181}," shots\n",{"type":21,"tag":2072,"props":4183,"children":4185},{"class":2074,"line":4184},30,[4186,4190],{"type":21,"tag":2072,"props":4187,"children":4188},{"style":3372},[4189],{"type":26,"value":3701},{"type":21,"tag":2072,"props":4191,"children":4192},{"style":2079},[4193],{"type":26,"value":4194}," M\n",{"type":21,"tag":2072,"props":4196,"children":4198},{"class":2074,"line":4197},31,[4199],{"type":21,"tag":2072,"props":4200,"children":4201},{"emptyLinePlaceholder":3460},[4202],{"type":26,"value":3463},{"type":21,"tag":2072,"props":4204,"children":4206},{"class":2074,"line":4205},32,[4207,4212,4216],{"type":21,"tag":2072,"props":4208,"children":4209},{"style":2079},[4210],{"type":26,"value":4211},"n ",{"type":21,"tag":2072,"props":4213,"children":4214},{"style":3372},[4215],{"type":26,"value":3487},{"type":21,"tag":2072,"props":4217,"children":4218},{"style":2097},[4219],{"type":26,"value":4220}," 2\n",{"type":21,"tag":2072,"props":4222,"children":4224},{"class":2074,"line":4223},33,[4225,4230,4234],{"type":21,"tag":2072,"props":4226,"children":4227},{"style":2079},[4228],{"type":26,"value":4229},"Minv ",{"type":21,"tag":2072,"props":4231,"children":4232},{"style":3372},[4233],{"type":26,"value":3487},{"type":21,"tag":2072,"props":4235,"children":4236},{"style":2079},[4237],{"type":26,"value":4238}," np.linalg.pinv(calibration_matrix(n, backend))\n",{"type":21,"tag":2072,"props":4240,"children":4242},{"class":2074,"line":4241},34,[4243],{"type":21,"tag":2072,"props":4244,"children":4245},{"emptyLinePlaceholder":3460},[4246],{"type":26,"value":3463},{"type":21,"tag":2072,"props":4248,"children":4250},{"class":2074,"line":4249},35,[4251,4256,4260,4265,4269,4273,4277],{"type":21,"tag":2072,"props":4252,"children":4253},{"style":2079},[4254],{"type":26,"value":4255},"bell ",{"type":21,"tag":2072,"props":4257,"children":4258},{"style":3372},[4259],{"type":26,"value":3487},{"type":21,"tag":2072,"props":4261,"children":4262},{"style":2079},[4263],{"type":26,"value":4264}," QuantumCircuit(",{"type":21,"tag":2072,"props":4266,"children":4267},{"style":2097},[4268],{"type":26,"value":2170},{"type":21,"tag":2072,"props":4270,"children":4271},{"style":2079},[4272],{"type":26,"value":798},{"type":21,"tag":2072,"props":4274,"children":4275},{"style":2097},[4276],{"type":26,"value":2170},{"type":21,"tag":2072,"props":4278,"children":4279},{"style":2079},[4280],{"type":26,"value":4281},")\n",{"type":21,"tag":2072,"props":4283,"children":4285},{"class":2074,"line":4284},36,[4286,4291,4296],{"type":21,"tag":2072,"props":4287,"children":4288},{"style":2079},[4289],{"type":26,"value":4290},"bell.h(",{"type":21,"tag":2072,"props":4292,"children":4293},{"style":2097},[4294],{"type":26,"value":4295},"0",{"type":21,"tag":2072,"props":4297,"children":4298},{"style":2079},[4299],{"type":26,"value":4281},{"type":21,"tag":2072,"props":4301,"children":4303},{"class":2074,"line":4302},37,[4304,4309,4313,4317,4321],{"type":21,"tag":2072,"props":4305,"children":4306},{"style":2079},[4307],{"type":26,"value":4308},"bell.cx(",{"type":21,"tag":2072,"props":4310,"children":4311},{"style":2097},[4312],{"type":26,"value":4295},{"type":21,"tag":2072,"props":4314,"children":4315},{"style":2079},[4316],{"type":26,"value":798},{"type":21,"tag":2072,"props":4318,"children":4319},{"style":2097},[4320],{"type":26,"value":3555},{"type":21,"tag":2072,"props":4322,"children":4323},{"style":2079},[4324],{"type":26,"value":4281},{"type":21,"tag":2072,"props":4326,"children":4328},{"class":2074,"line":4327},38,[4329,4334,4338,4342,4346,4351,4355,4359,4363],{"type":21,"tag":2072,"props":4330,"children":4331},{"style":2079},[4332],{"type":26,"value":4333},"bell.measure([",{"type":21,"tag":2072,"props":4335,"children":4336},{"style":2097},[4337],{"type":26,"value":4295},{"type":21,"tag":2072,"props":4339,"children":4340},{"style":2079},[4341],{"type":26,"value":798},{"type":21,"tag":2072,"props":4343,"children":4344},{"style":2097},[4345],{"type":26,"value":3555},{"type":21,"tag":2072,"props":4347,"children":4348},{"style":2079},[4349],{"type":26,"value":4350},"], [",{"type":21,"tag":2072,"props":4352,"children":4353},{"style":2097},[4354],{"type":26,"value":4295},{"type":21,"tag":2072,"props":4356,"children":4357},{"style":2079},[4358],{"type":26,"value":798},{"type":21,"tag":2072,"props":4360,"children":4361},{"style":2097},[4362],{"type":26,"value":3555},{"type":21,"tag":2072,"props":4364,"children":4365},{"style":2079},[4366],{"type":26,"value":3597},{"type":21,"tag":2072,"props":4368,"children":4370},{"class":2074,"line":4369},39,[4371],{"type":21,"tag":2072,"props":4372,"children":4373},{"emptyLinePlaceholder":3460},[4374],{"type":26,"value":3463},{"type":21,"tag":2072,"props":4376,"children":4378},{"class":2074,"line":4377},40,[4379,4384,4388,4393,4397,4401,4405],{"type":21,"tag":2072,"props":4380,"children":4381},{"style":2079},[4382],{"type":26,"value":4383},"raw ",{"type":21,"tag":2072,"props":4385,"children":4386},{"style":3372},[4387],{"type":26,"value":3487},{"type":21,"tag":2072,"props":4389,"children":4390},{"style":2079},[4391],{"type":26,"value":4392}," backend.run(transpile(bell, backend), ",{"type":21,"tag":2072,"props":4394,"children":4395},{"style":3735},[4396],{"type":26,"value":3226},{"type":21,"tag":2072,"props":4398,"children":4399},{"style":3372},[4400],{"type":26,"value":3487},{"type":21,"tag":2072,"props":4402,"children":4403},{"style":2097},[4404],{"type":26,"value":3756},{"type":21,"tag":2072,"props":4406,"children":4407},{"style":2079},[4408],{"type":26,"value":4409},").result().get_counts()\n",{"type":21,"tag":2072,"props":4411,"children":4413},{"class":2074,"line":4412},41,[4414,4419,4423,4428,4433,4437,4441,4445,4449,4453,4457,4461,4466,4470,4475,4480,4484,4488,4492,4496,4500,4504,4509,4514,4518,4522],{"type":21,"tag":2072,"props":4415,"children":4416},{"style":2079},[4417],{"type":26,"value":4418},"vec ",{"type":21,"tag":2072,"props":4420,"children":4421},{"style":3372},[4422],{"type":26,"value":3487},{"type":21,"tag":2072,"props":4424,"children":4425},{"style":2079},[4426],{"type":26,"value":4427}," np.array([raw.get(",{"type":21,"tag":2072,"props":4429,"children":4430},{"style":2097},[4431],{"type":26,"value":4432},"format",{"type":21,"tag":2072,"props":4434,"children":4435},{"style":2079},[4436],{"type":26,"value":3933},{"type":21,"tag":2072,"props":4438,"children":4439},{"style":3372},[4440],{"type":26,"value":3938},{"type":21,"tag":2072,"props":4442,"children":4443},{"style":2108},[4444],{"type":26,"value":3943},{"type":21,"tag":2072,"props":4446,"children":4447},{"style":2097},[4448],{"type":26,"value":3948},{"type":21,"tag":2072,"props":4450,"children":4451},{"style":2079},[4452],{"type":26,"value":3953},{"type":21,"tag":2072,"props":4454,"children":4455},{"style":2097},[4456],{"type":26,"value":3958},{"type":21,"tag":2072,"props":4458,"children":4459},{"style":2108},[4460],{"type":26,"value":3963},{"type":21,"tag":2072,"props":4462,"children":4463},{"style":2079},[4464],{"type":26,"value":4465},"), ",{"type":21,"tag":2072,"props":4467,"children":4468},{"style":2097},[4469],{"type":26,"value":4295},{"type":21,"tag":2072,"props":4471,"children":4472},{"style":2079},[4473],{"type":26,"value":4474},") ",{"type":21,"tag":2072,"props":4476,"children":4477},{"style":3372},[4478],{"type":26,"value":4479},"for",{"type":21,"tag":2072,"props":4481,"children":4482},{"style":2079},[4483],{"type":26,"value":3864},{"type":21,"tag":2072,"props":4485,"children":4486},{"style":3372},[4487],{"type":26,"value":3869},{"type":21,"tag":2072,"props":4489,"children":4490},{"style":2097},[4491],{"type":26,"value":3874},{"type":21,"tag":2072,"props":4493,"children":4494},{"style":2079},[4495],{"type":26,"value":3879},{"type":21,"tag":2072,"props":4497,"children":4498},{"style":2097},[4499],{"type":26,"value":2170},{"type":21,"tag":2072,"props":4501,"children":4502},{"style":3372},[4503],{"type":26,"value":3832},{"type":21,"tag":2072,"props":4505,"children":4506},{"style":2079},[4507],{"type":26,"value":4508},"n)], ",{"type":21,"tag":2072,"props":4510,"children":4511},{"style":2097},[4512],{"type":26,"value":4513},"float",{"type":21,"tag":2072,"props":4515,"children":4516},{"style":2079},[4517],{"type":26,"value":4474},{"type":21,"tag":2072,"props":4519,"children":4520},{"style":3372},[4521],{"type":26,"value":1926},{"type":21,"tag":2072,"props":4523,"children":4524},{"style":2097},[4525],{"type":26,"value":4526}," SHOTS\n",{"type":21,"tag":2072,"props":4528,"children":4530},{"class":2074,"line":4529},42,[4531],{"type":21,"tag":2072,"props":4532,"children":4533},{"emptyLinePlaceholder":3460},[4534],{"type":26,"value":3463},{"type":21,"tag":2072,"props":4536,"children":4538},{"class":2074,"line":4537},43,[4539,4544,4548,4553,4558,4563,4567,4571,4576],{"type":21,"tag":2072,"props":4540,"children":4541},{"style":2079},[4542],{"type":26,"value":4543},"mit ",{"type":21,"tag":2072,"props":4545,"children":4546},{"style":3372},[4547],{"type":26,"value":3487},{"type":21,"tag":2072,"props":4549,"children":4550},{"style":2079},[4551],{"type":26,"value":4552}," np.clip(Minv ",{"type":21,"tag":2072,"props":4554,"children":4555},{"style":3372},[4556],{"type":26,"value":4557},"@",{"type":21,"tag":2072,"props":4559,"children":4560},{"style":2079},[4561],{"type":26,"value":4562}," vec, ",{"type":21,"tag":2072,"props":4564,"children":4565},{"style":2097},[4566],{"type":26,"value":4295},{"type":21,"tag":2072,"props":4568,"children":4569},{"style":2079},[4570],{"type":26,"value":798},{"type":21,"tag":2072,"props":4572,"children":4573},{"style":2097},[4574],{"type":26,"value":4575},"None",{"type":21,"tag":2072,"props":4577,"children":4578},{"style":2079},[4579],{"type":26,"value":4281},{"type":21,"tag":2072,"props":4581,"children":4583},{"class":2074,"line":4582},44,[4584,4588,4593],{"type":21,"tag":2072,"props":4585,"children":4586},{"style":2079},[4587],{"type":26,"value":4543},{"type":21,"tag":2072,"props":4589,"children":4590},{"style":3372},[4591],{"type":26,"value":4592},"\u002F=",{"type":21,"tag":2072,"props":4594,"children":4595},{"style":2079},[4596],{"type":26,"value":4597}," mit.sum()\n",{"type":21,"tag":2072,"props":4599,"children":4601},{"class":2074,"line":4600},45,[4602],{"type":21,"tag":2072,"props":4603,"children":4604},{"emptyLinePlaceholder":3460},[4605],{"type":26,"value":3463},{"type":21,"tag":2072,"props":4607,"children":4609},{"class":2074,"line":4608},46,[4610,4615,4619,4624,4629,4633,4637,4642,4647,4652,4657,4662,4666,4670,4674,4678,4682,4686,4690],{"type":21,"tag":2072,"props":4611,"children":4612},{"style":2097},[4613],{"type":26,"value":4614},"print",{"type":21,"tag":2072,"props":4616,"children":4617},{"style":2079},[4618],{"type":26,"value":3879},{"type":21,"tag":2072,"props":4620,"children":4621},{"style":2108},[4622],{"type":26,"value":4623},"\"raw      :\"",{"type":21,"tag":2072,"props":4625,"children":4626},{"style":2079},[4627],{"type":26,"value":4628},", {",{"type":21,"tag":2072,"props":4630,"children":4631},{"style":2097},[4632],{"type":26,"value":4432},{"type":21,"tag":2072,"props":4634,"children":4635},{"style":2079},[4636],{"type":26,"value":3933},{"type":21,"tag":2072,"props":4638,"children":4639},{"style":2108},[4640],{"type":26,"value":4641},"\"02b\"",{"type":21,"tag":2072,"props":4643,"children":4644},{"style":2079},[4645],{"type":26,"value":4646},"): ",{"type":21,"tag":2072,"props":4648,"children":4649},{"style":2097},[4650],{"type":26,"value":4651},"round",{"type":21,"tag":2072,"props":4653,"children":4654},{"style":2079},[4655],{"type":26,"value":4656},"(vec[i], ",{"type":21,"tag":2072,"props":4658,"children":4659},{"style":2097},[4660],{"type":26,"value":4661},"4",{"type":21,"tag":2072,"props":4663,"children":4664},{"style":2079},[4665],{"type":26,"value":4474},{"type":21,"tag":2072,"props":4667,"children":4668},{"style":3372},[4669],{"type":26,"value":4479},{"type":21,"tag":2072,"props":4671,"children":4672},{"style":2079},[4673],{"type":26,"value":3864},{"type":21,"tag":2072,"props":4675,"children":4676},{"style":3372},[4677],{"type":26,"value":3869},{"type":21,"tag":2072,"props":4679,"children":4680},{"style":2097},[4681],{"type":26,"value":3874},{"type":21,"tag":2072,"props":4683,"children":4684},{"style":2079},[4685],{"type":26,"value":3879},{"type":21,"tag":2072,"props":4687,"children":4688},{"style":2097},[4689],{"type":26,"value":4661},{"type":21,"tag":2072,"props":4691,"children":4692},{"style":2079},[4693],{"type":26,"value":4694},")})\n",{"type":21,"tag":2072,"props":4696,"children":4698},{"class":2074,"line":4697},47,[4699,4703,4707,4712,4716,4720,4724,4728,4732,4736,4741,4745,4749,4753,4757,4761,4765,4769,4773],{"type":21,"tag":2072,"props":4700,"children":4701},{"style":2097},[4702],{"type":26,"value":4614},{"type":21,"tag":2072,"props":4704,"children":4705},{"style":2079},[4706],{"type":26,"value":3879},{"type":21,"tag":2072,"props":4708,"children":4709},{"style":2108},[4710],{"type":26,"value":4711},"\"mitigated:\"",{"type":21,"tag":2072,"props":4713,"children":4714},{"style":2079},[4715],{"type":26,"value":4628},{"type":21,"tag":2072,"props":4717,"children":4718},{"style":2097},[4719],{"type":26,"value":4432},{"type":21,"tag":2072,"props":4721,"children":4722},{"style":2079},[4723],{"type":26,"value":3933},{"type":21,"tag":2072,"props":4725,"children":4726},{"style":2108},[4727],{"type":26,"value":4641},{"type":21,"tag":2072,"props":4729,"children":4730},{"style":2079},[4731],{"type":26,"value":4646},{"type":21,"tag":2072,"props":4733,"children":4734},{"style":2097},[4735],{"type":26,"value":4651},{"type":21,"tag":2072,"props":4737,"children":4738},{"style":2079},[4739],{"type":26,"value":4740},"(mit[i], ",{"type":21,"tag":2072,"props":4742,"children":4743},{"style":2097},[4744],{"type":26,"value":4661},{"type":21,"tag":2072,"props":4746,"children":4747},{"style":2079},[4748],{"type":26,"value":4474},{"type":21,"tag":2072,"props":4750,"children":4751},{"style":3372},[4752],{"type":26,"value":4479},{"type":21,"tag":2072,"props":4754,"children":4755},{"style":2079},[4756],{"type":26,"value":3864},{"type":21,"tag":2072,"props":4758,"children":4759},{"style":3372},[4760],{"type":26,"value":3869},{"type":21,"tag":2072,"props":4762,"children":4763},{"style":2097},[4764],{"type":26,"value":3874},{"type":21,"tag":2072,"props":4766,"children":4767},{"style":2079},[4768],{"type":26,"value":3879},{"type":21,"tag":2072,"props":4770,"children":4771},{"style":2097},[4772],{"type":26,"value":4661},{"type":21,"tag":2072,"props":4774,"children":4775},{"style":2079},[4776],{"type":26,"value":4694},{"type":21,"tag":22,"props":4778,"children":4779},{},[4780,4785],{"type":21,"tag":784,"props":4781,"children":4782},{},[4783],{"type":26,"value":4784},"Actual output from running this",{"type":26,"value":4786}," (Qiskit 2.5.0, Aer 0.17.2, 5% readout error):",{"type":21,"tag":2062,"props":4788,"children":4790},{"code":4789},"raw      : {'00': 0.4456, '01': 0.053, '10': 0.0501, '11': 0.4513}\nmitigated: {'00': 0.4931, '01': 0.0048, '10': 0.0033, '11': 0.4988}\n",[4791],{"type":21,"tag":1831,"props":4792,"children":4793},{"__ignoreMap":7},[4794],{"type":26,"value":4789},{"type":21,"tag":22,"props":4796,"children":4797},{},[4798,4800,4806,4807,4813,4815,4821],{"type":26,"value":4799},"A Bell state should produce only ",{"type":21,"tag":1831,"props":4801,"children":4803},{"className":4802},[],[4804],{"type":26,"value":4805},"00",{"type":26,"value":383},{"type":21,"tag":1831,"props":4808,"children":4810},{"className":4809},[],[4811],{"type":26,"value":4812},"11",{"type":26,"value":4814},". The raw run leaks 10.3% into forbidden outcomes. After mitigation, 0.8%. That is a 13× reduction in spurious counts for the cost of ",{"type":21,"tag":1831,"props":4816,"children":4818},{"className":4817},[],[4819],{"type":26,"value":4820},"2^n",{"type":26,"value":4822}," short calibration circuits.",{"type":21,"tag":22,"props":4824,"children":4825},{},[4826,4828,4833,4835,4841,4843,4848],{"type":26,"value":4827},"Two caveats. The ",{"type":21,"tag":1831,"props":4829,"children":4831},{"className":4830},[],[4832],{"type":26,"value":4820},{"type":26,"value":4834}," scaling means full calibration matrices die above ~10 qubits. Beyond that, use tensored (per-qubit) or correlated-subset calibration. And matrix inversion amplifies ",{"type":21,"tag":29,"props":4836,"children":4838},{"href":4837},"\u002Fglossary\u002Fshot-noise",[4839],{"type":26,"value":4840},"shot noise",{"type":26,"value":4842},", which is why the code clips negatives. Run your calibration circuits with ",{"type":21,"tag":103,"props":4844,"children":4845},{},[4846],{"type":26,"value":4847},"more",{"type":26,"value":4849}," shots than your actual experiment, not fewer.",{"type":21,"tag":43,"props":4851,"children":4853},{"id":4852},"step-2-dynamical-decoupling-nearly-free",[4854],{"type":26,"value":4855},"Step 2: Dynamical Decoupling (Nearly Free)",{"type":21,"tag":22,"props":4857,"children":4858},{},[4859,4861,4867,4869,4875],{"type":26,"value":4860},"Idle qubits are not safe qubits. While one part of your circuit executes, everything else is dephasing at its ",{"type":21,"tag":29,"props":4862,"children":4864},{"href":4863},"\u002Fglossary\u002Ft1-t2-time",[4865],{"type":26,"value":4866},"T2 rate",{"type":26,"value":4868},". Dynamical decoupling inserts pulse sequences (typically ",{"type":21,"tag":1831,"props":4870,"children":4872},{"className":4871},[],[4873],{"type":26,"value":4874},"X–delay–X–delay",{"type":26,"value":4876},") into idle windows, echoing away slow, low-frequency noise.",{"type":21,"tag":22,"props":4878,"children":4879},{},[4880,4882,4888],{"type":26,"value":4881},"In Qiskit this is a ",{"type":21,"tag":29,"props":4883,"children":4885},{"href":4884},"\u002Fglossary\u002Ftranspilation",[4886],{"type":26,"value":4887},"transpilation",{"type":26,"value":4889}," pass, not an algorithm change:",{"type":21,"tag":2062,"props":4891,"children":4893},{"code":4892,"language":3361,"meta":7,"className":3362,"style":7},"from qiskit.transpiler import PassManager\nfrom qiskit.transpiler.passes import ALAPScheduleAnalysis, PadDynamicalDecoupling\nfrom qiskit.circuit.library import XGate\n\npm = PassManager([\n    ALAPScheduleAnalysis(durations=backend.instruction_durations),\n    PadDynamicalDecoupling(\n        durations=backend.instruction_durations,\n        dd_sequence=[XGate(), XGate()],   # XX sequence\n    ),\n])\ndd_circuit = pm.run(transpiled_circuit)\n",[4894],{"type":21,"tag":1831,"props":4895,"children":4896},{"__ignoreMap":7},[4897,4918,4939,4960,4967,4984,5006,5014,5031,5053,5061,5068],{"type":21,"tag":2072,"props":4898,"children":4899},{"class":2074,"line":2075},[4900,4904,4909,4913],{"type":21,"tag":2072,"props":4901,"children":4902},{"style":3372},[4903],{"type":26,"value":3398},{"type":21,"tag":2072,"props":4905,"children":4906},{"style":2079},[4907],{"type":26,"value":4908}," qiskit.transpiler ",{"type":21,"tag":2072,"props":4910,"children":4911},{"style":3372},[4912],{"type":26,"value":3375},{"type":21,"tag":2072,"props":4914,"children":4915},{"style":2079},[4916],{"type":26,"value":4917}," PassManager\n",{"type":21,"tag":2072,"props":4919,"children":4920},{"class":2074,"line":164},[4921,4925,4930,4934],{"type":21,"tag":2072,"props":4922,"children":4923},{"style":3372},[4924],{"type":26,"value":3398},{"type":21,"tag":2072,"props":4926,"children":4927},{"style":2079},[4928],{"type":26,"value":4929}," qiskit.transpiler.passes ",{"type":21,"tag":2072,"props":4931,"children":4932},{"style":3372},[4933],{"type":26,"value":3375},{"type":21,"tag":2072,"props":4935,"children":4936},{"style":2079},[4937],{"type":26,"value":4938}," ALAPScheduleAnalysis, PadDynamicalDecoupling\n",{"type":21,"tag":2072,"props":4940,"children":4941},{"class":2074,"line":2093},[4942,4946,4951,4955],{"type":21,"tag":2072,"props":4943,"children":4944},{"style":3372},[4945],{"type":26,"value":3398},{"type":21,"tag":2072,"props":4947,"children":4948},{"style":2079},[4949],{"type":26,"value":4950}," qiskit.circuit.library ",{"type":21,"tag":2072,"props":4952,"children":4953},{"style":3372},[4954],{"type":26,"value":3375},{"type":21,"tag":2072,"props":4956,"children":4957},{"style":2079},[4958],{"type":26,"value":4959}," XGate\n",{"type":21,"tag":2072,"props":4961,"children":4962},{"class":2074,"line":2155},[4963],{"type":21,"tag":2072,"props":4964,"children":4965},{"emptyLinePlaceholder":3460},[4966],{"type":26,"value":3463},{"type":21,"tag":2072,"props":4968,"children":4969},{"class":2074,"line":2178},[4970,4975,4979],{"type":21,"tag":2072,"props":4971,"children":4972},{"style":2079},[4973],{"type":26,"value":4974},"pm ",{"type":21,"tag":2072,"props":4976,"children":4977},{"style":3372},[4978],{"type":26,"value":3487},{"type":21,"tag":2072,"props":4980,"children":4981},{"style":2079},[4982],{"type":26,"value":4983}," PassManager([\n",{"type":21,"tag":2072,"props":4985,"children":4986},{"class":2074,"line":288},[4987,4992,4997,5001],{"type":21,"tag":2072,"props":4988,"children":4989},{"style":2079},[4990],{"type":26,"value":4991},"    ALAPScheduleAnalysis(",{"type":21,"tag":2072,"props":4993,"children":4994},{"style":3735},[4995],{"type":26,"value":4996},"durations",{"type":21,"tag":2072,"props":4998,"children":4999},{"style":3372},[5000],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5002,"children":5003},{"style":2079},[5004],{"type":26,"value":5005},"backend.instruction_durations),\n",{"type":21,"tag":2072,"props":5007,"children":5008},{"class":2074,"line":16},[5009],{"type":21,"tag":2072,"props":5010,"children":5011},{"style":2079},[5012],{"type":26,"value":5013},"    PadDynamicalDecoupling(\n",{"type":21,"tag":2072,"props":5015,"children":5016},{"class":2074,"line":366},[5017,5022,5026],{"type":21,"tag":2072,"props":5018,"children":5019},{"style":3735},[5020],{"type":26,"value":5021},"        durations",{"type":21,"tag":2072,"props":5023,"children":5024},{"style":3372},[5025],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5027,"children":5028},{"style":2079},[5029],{"type":26,"value":5030},"backend.instruction_durations,\n",{"type":21,"tag":2072,"props":5032,"children":5033},{"class":2074,"line":853},[5034,5039,5043,5048],{"type":21,"tag":2072,"props":5035,"children":5036},{"style":3735},[5037],{"type":26,"value":5038},"        dd_sequence",{"type":21,"tag":2072,"props":5040,"children":5041},{"style":3372},[5042],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5044,"children":5045},{"style":2079},[5046],{"type":26,"value":5047},"[XGate(), XGate()],   ",{"type":21,"tag":2072,"props":5049,"children":5050},{"style":3985},[5051],{"type":26,"value":5052},"# XX sequence\n",{"type":21,"tag":2072,"props":5054,"children":5055},{"class":2074,"line":3092},[5056],{"type":21,"tag":2072,"props":5057,"children":5058},{"style":2079},[5059],{"type":26,"value":5060},"    ),\n",{"type":21,"tag":2072,"props":5062,"children":5063},{"class":2074,"line":3651},[5064],{"type":21,"tag":2072,"props":5065,"children":5066},{"style":2079},[5067],{"type":26,"value":3597},{"type":21,"tag":2072,"props":5069,"children":5070},{"class":2074,"line":2616},[5071,5076,5080],{"type":21,"tag":2072,"props":5072,"children":5073},{"style":2079},[5074],{"type":26,"value":5075},"dd_circuit ",{"type":21,"tag":2072,"props":5077,"children":5078},{"style":3372},[5079],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5081,"children":5082},{"style":2079},[5083],{"type":26,"value":5084}," pm.run(transpiled_circuit)\n",{"type":21,"tag":22,"props":5086,"children":5087},{},[5088],{"type":26,"value":5089},"Cost: zero extra shots. Typical gain: 5–20% fidelity improvement on circuits with heterogeneous qubit usage. Circuits where every qubit is busy every cycle see nothing. Try it. It's the best effort-to-payoff ratio in the whole toolkit.",{"type":21,"tag":43,"props":5091,"children":5093},{"id":5092},"step-3-pauli-twirling-randomized-compiling",[5094],{"type":26,"value":5095},"Step 3: Pauli Twirling \u002F Randomized Compiling",{"type":21,"tag":22,"props":5097,"children":5098},{},[5099,5101,5106],{"type":26,"value":5100},"Coherent errors are the nasty kind. A systematic over-rotation of 0.5° per gate doesn't average out. It accumulates ",{"type":21,"tag":103,"props":5102,"children":5103},{},[5104],{"type":26,"value":5105},"linearly",{"type":26,"value":5107}," in amplitude, so error in the expectation value grows quadratically with depth. Stochastic errors merely accumulate additively.",{"type":21,"tag":22,"props":5109,"children":5110},{},[5111],{"type":26,"value":5112},"Twirling converts the former into the latter. You compile many logically equivalent copies of your circuit, each wrapping the two-qubit gates in randomly chosen Pauli operators (with compensating Paulis so the ideal unitary is unchanged), then average the results. Coherent error terms average toward zero. What survives is a well-behaved stochastic Pauli channel.",{"type":21,"tag":22,"props":5114,"children":5115},{},[5116,5118,5123],{"type":26,"value":5117},"Twirling rarely improves accuracy much on its own. Its real value is that it makes the noise ",{"type":21,"tag":103,"props":5119,"children":5120},{},[5121],{"type":26,"value":5122},"model-able",{"type":26,"value":5124},", and every other technique on this list (ZNE, PEC) assumes a stochastic noise channel. Twirling is what makes that assumption true. Run it underneath your other mitigation, not instead of it.",{"type":21,"tag":43,"props":5126,"children":5128},{"id":5127},"step-4-zero-noise-extrapolation",[5129],{"type":26,"value":5130},"Step 4: Zero-Noise Extrapolation",{"type":21,"tag":22,"props":5132,"children":5133},{},[5134,5136,5141],{"type":26,"value":5135},"ZNE is the technique behind most headline NISQ results, including IBM's ",{"type":21,"tag":29,"props":5137,"children":5138},{"href":945},[5139],{"type":26,"value":5140},"quantum utility demonstration",{"type":26,"value":5142}," on a 127-qubit Eagle processor.",{"type":21,"tag":22,"props":5144,"children":5145},{},[5146,5148,5153,5155,5161,5163,5169],{"type":26,"value":5147},"The idea: you can't reduce hardware noise, but you ",{"type":21,"tag":103,"props":5149,"children":5150},{},[5151],{"type":26,"value":5152},"increase",{"type":26,"value":5154}," it in a controlled way. Run the same circuit at noise scale factors λ = 1, 3, 5 (via unitary folding: replace ",{"type":21,"tag":1831,"props":5156,"children":5158},{"className":5157},[],[5159],{"type":26,"value":5160},"U",{"type":26,"value":5162}," with ",{"type":21,"tag":1831,"props":5164,"children":5166},{"className":5165},[],[5167],{"type":26,"value":5168},"U(U†U)^k",{"type":26,"value":5170},", which is logically identity-preserving but physically 3× or 5× as noisy), then fit a curve through the results and extrapolate back to λ = 0.",{"type":21,"tag":2062,"props":5172,"children":5174},{"code":5173,"language":3361,"meta":7,"className":3362,"style":7},"def fold_global(qc, scale):\n    \"\"\"Odd integer scale: U -> U (U^dag U)^k\"\"\"\n    k = (scale - 1) \u002F\u002F 2\n    out, inv = qc.copy(), qc.inverse()\n    for _ in range(k):\n        out = out.compose(inv).compose(qc)\n    return out\n\ndef expval_parity(qc, backend, shots=40000):\n    c = qc.copy()\n    c.measure_all()\n    counts = backend.run(\n        transpile(c, backend, optimization_level=0), shots=shots\n    ).result().get_counts()\n    return sum((-1) ** (k.replace(\" \", \"\").count(\"1\") % 2) * v\n               for k, v in counts.items()) \u002F shots\n\n# 4-qubit GHZ padded with cancelling CX pairs, ideal \u003CZZZZ> = +1.0\nbase = QuantumCircuit(4)\nbase.h(0)\nfor q in range(3):\n    base.cx(q, q + 1)\nfor _ in range(4):\n    for q in range(3):\n        base.cx(q, q + 1)\n        base.cx(q, q + 1)\n\nscales = [1, 3, 5]\nvals = [expval_parity(fold_global(base, s), backend) for s in scales]\nzne = np.polyval(np.polyfit(scales, vals, 2), 0)   # Richardson, order 2\nprint(vals, \"->\", zne)\n",[5175],{"type":21,"tag":1831,"props":5176,"children":5177},{"__ignoreMap":7},[5178,5195,5203,5242,5259,5284,5301,5313,5320,5350,5367,5375,5392,5430,5438,5528,5558,5565,5573,5597,5613,5646,5667,5698,5729,5749,5768,5775,5818,5853,5892],{"type":21,"tag":2072,"props":5179,"children":5180},{"class":2074,"line":2075},[5181,5185,5190],{"type":21,"tag":2072,"props":5182,"children":5183},{"style":3372},[5184],{"type":26,"value":3471},{"type":21,"tag":2072,"props":5186,"children":5187},{"style":3474},[5188],{"type":26,"value":5189}," fold_global",{"type":21,"tag":2072,"props":5191,"children":5192},{"style":2079},[5193],{"type":26,"value":5194},"(qc, scale):\n",{"type":21,"tag":2072,"props":5196,"children":5197},{"class":2074,"line":164},[5198],{"type":21,"tag":2072,"props":5199,"children":5200},{"style":2108},[5201],{"type":26,"value":5202},"    \"\"\"Odd integer scale: U -> U (U^dag U)^k\"\"\"\n",{"type":21,"tag":2072,"props":5204,"children":5205},{"class":2074,"line":2093},[5206,5211,5215,5220,5224,5229,5233,5238],{"type":21,"tag":2072,"props":5207,"children":5208},{"style":2079},[5209],{"type":26,"value":5210},"    k ",{"type":21,"tag":2072,"props":5212,"children":5213},{"style":3372},[5214],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5216,"children":5217},{"style":2079},[5218],{"type":26,"value":5219}," (scale ",{"type":21,"tag":2072,"props":5221,"children":5222},{"style":3372},[5223],{"type":26,"value":3973},{"type":21,"tag":2072,"props":5225,"children":5226},{"style":2097},[5227],{"type":26,"value":5228}," 1",{"type":21,"tag":2072,"props":5230,"children":5231},{"style":2079},[5232],{"type":26,"value":4474},{"type":21,"tag":2072,"props":5234,"children":5235},{"style":3372},[5236],{"type":26,"value":5237},"\u002F\u002F",{"type":21,"tag":2072,"props":5239,"children":5240},{"style":2097},[5241],{"type":26,"value":4220},{"type":21,"tag":2072,"props":5243,"children":5244},{"class":2074,"line":2155},[5245,5250,5254],{"type":21,"tag":2072,"props":5246,"children":5247},{"style":2079},[5248],{"type":26,"value":5249},"    out, inv ",{"type":21,"tag":2072,"props":5251,"children":5252},{"style":3372},[5253],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5255,"children":5256},{"style":2079},[5257],{"type":26,"value":5258}," qc.copy(), qc.inverse()\n",{"type":21,"tag":2072,"props":5260,"children":5261},{"class":2074,"line":2178},[5262,5266,5271,5275,5279],{"type":21,"tag":2072,"props":5263,"children":5264},{"style":3372},[5265],{"type":26,"value":3859},{"type":21,"tag":2072,"props":5267,"children":5268},{"style":2079},[5269],{"type":26,"value":5270}," _ ",{"type":21,"tag":2072,"props":5272,"children":5273},{"style":3372},[5274],{"type":26,"value":3869},{"type":21,"tag":2072,"props":5276,"children":5277},{"style":2097},[5278],{"type":26,"value":3874},{"type":21,"tag":2072,"props":5280,"children":5281},{"style":2079},[5282],{"type":26,"value":5283},"(k):\n",{"type":21,"tag":2072,"props":5285,"children":5286},{"class":2074,"line":288},[5287,5292,5296],{"type":21,"tag":2072,"props":5288,"children":5289},{"style":2079},[5290],{"type":26,"value":5291},"        out ",{"type":21,"tag":2072,"props":5293,"children":5294},{"style":3372},[5295],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5297,"children":5298},{"style":2079},[5299],{"type":26,"value":5300}," out.compose(inv).compose(qc)\n",{"type":21,"tag":2072,"props":5302,"children":5303},{"class":2074,"line":16},[5304,5308],{"type":21,"tag":2072,"props":5305,"children":5306},{"style":3372},[5307],{"type":26,"value":3701},{"type":21,"tag":2072,"props":5309,"children":5310},{"style":2079},[5311],{"type":26,"value":5312}," out\n",{"type":21,"tag":2072,"props":5314,"children":5315},{"class":2074,"line":366},[5316],{"type":21,"tag":2072,"props":5317,"children":5318},{"emptyLinePlaceholder":3460},[5319],{"type":26,"value":3463},{"type":21,"tag":2072,"props":5321,"children":5322},{"class":2074,"line":853},[5323,5327,5332,5337,5341,5346],{"type":21,"tag":2072,"props":5324,"children":5325},{"style":3372},[5326],{"type":26,"value":3471},{"type":21,"tag":2072,"props":5328,"children":5329},{"style":3474},[5330],{"type":26,"value":5331}," expval_parity",{"type":21,"tag":2072,"props":5333,"children":5334},{"style":2079},[5335],{"type":26,"value":5336},"(qc, backend, shots",{"type":21,"tag":2072,"props":5338,"children":5339},{"style":3372},[5340],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5342,"children":5343},{"style":2097},[5344],{"type":26,"value":5345},"40000",{"type":21,"tag":2072,"props":5347,"children":5348},{"style":2079},[5349],{"type":26,"value":3525},{"type":21,"tag":2072,"props":5351,"children":5352},{"class":2074,"line":3092},[5353,5358,5362],{"type":21,"tag":2072,"props":5354,"children":5355},{"style":2079},[5356],{"type":26,"value":5357},"    c ",{"type":21,"tag":2072,"props":5359,"children":5360},{"style":3372},[5361],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5363,"children":5364},{"style":2079},[5365],{"type":26,"value":5366}," qc.copy()\n",{"type":21,"tag":2072,"props":5368,"children":5369},{"class":2074,"line":3651},[5370],{"type":21,"tag":2072,"props":5371,"children":5372},{"style":2079},[5373],{"type":26,"value":5374},"    c.measure_all()\n",{"type":21,"tag":2072,"props":5376,"children":5377},{"class":2074,"line":2616},[5378,5383,5387],{"type":21,"tag":2072,"props":5379,"children":5380},{"style":2079},[5381],{"type":26,"value":5382},"    counts ",{"type":21,"tag":2072,"props":5384,"children":5385},{"style":3372},[5386],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5388,"children":5389},{"style":2079},[5390],{"type":26,"value":5391}," backend.run(\n",{"type":21,"tag":2072,"props":5393,"children":5394},{"class":2074,"line":3695},[5395,5400,5405,5409,5413,5417,5421,5425],{"type":21,"tag":2072,"props":5396,"children":5397},{"style":2079},[5398],{"type":26,"value":5399},"        transpile(c, backend, ",{"type":21,"tag":2072,"props":5401,"children":5402},{"style":3735},[5403],{"type":26,"value":5404},"optimization_level",{"type":21,"tag":2072,"props":5406,"children":5407},{"style":3372},[5408],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5410,"children":5411},{"style":2097},[5412],{"type":26,"value":4295},{"type":21,"tag":2072,"props":5414,"children":5415},{"style":2079},[5416],{"type":26,"value":4465},{"type":21,"tag":2072,"props":5418,"children":5419},{"style":3735},[5420],{"type":26,"value":3226},{"type":21,"tag":2072,"props":5422,"children":5423},{"style":3372},[5424],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5426,"children":5427},{"style":2079},[5428],{"type":26,"value":5429},"shots\n",{"type":21,"tag":2072,"props":5431,"children":5432},{"class":2074,"line":3709},[5433],{"type":21,"tag":2072,"props":5434,"children":5435},{"style":2079},[5436],{"type":26,"value":5437},"    ).result().get_counts()\n",{"type":21,"tag":2072,"props":5439,"children":5440},{"class":2074,"line":3717},[5441,5445,5450,5455,5459,5463,5467,5471,5476,5481,5485,5490,5495,5500,5504,5509,5514,5518,5523],{"type":21,"tag":2072,"props":5442,"children":5443},{"style":3372},[5444],{"type":26,"value":3701},{"type":21,"tag":2072,"props":5446,"children":5447},{"style":2097},[5448],{"type":26,"value":5449}," sum",{"type":21,"tag":2072,"props":5451,"children":5452},{"style":2079},[5453],{"type":26,"value":5454},"((",{"type":21,"tag":2072,"props":5456,"children":5457},{"style":3372},[5458],{"type":26,"value":3973},{"type":21,"tag":2072,"props":5460,"children":5461},{"style":2097},[5462],{"type":26,"value":3555},{"type":21,"tag":2072,"props":5464,"children":5465},{"style":2079},[5466],{"type":26,"value":4474},{"type":21,"tag":2072,"props":5468,"children":5469},{"style":3372},[5470],{"type":26,"value":3832},{"type":21,"tag":2072,"props":5472,"children":5473},{"style":2079},[5474],{"type":26,"value":5475}," (k.replace(",{"type":21,"tag":2072,"props":5477,"children":5478},{"style":2108},[5479],{"type":26,"value":5480},"\" \"",{"type":21,"tag":2072,"props":5482,"children":5483},{"style":2079},[5484],{"type":26,"value":798},{"type":21,"tag":2072,"props":5486,"children":5487},{"style":2108},[5488],{"type":26,"value":5489},"\"\"",{"type":21,"tag":2072,"props":5491,"children":5492},{"style":2079},[5493],{"type":26,"value":5494},").count(",{"type":21,"tag":2072,"props":5496,"children":5497},{"style":2108},[5498],{"type":26,"value":5499},"\"1\"",{"type":21,"tag":2072,"props":5501,"children":5502},{"style":2079},[5503],{"type":26,"value":4474},{"type":21,"tag":2072,"props":5505,"children":5506},{"style":3372},[5507],{"type":26,"value":5508},"%",{"type":21,"tag":2072,"props":5510,"children":5511},{"style":2097},[5512],{"type":26,"value":5513}," 2",{"type":21,"tag":2072,"props":5515,"children":5516},{"style":2079},[5517],{"type":26,"value":4474},{"type":21,"tag":2072,"props":5519,"children":5520},{"style":3372},[5521],{"type":26,"value":5522},"*",{"type":21,"tag":2072,"props":5524,"children":5525},{"style":2079},[5526],{"type":26,"value":5527}," v\n",{"type":21,"tag":2072,"props":5529,"children":5530},{"class":2074,"line":3750},[5531,5536,5541,5545,5550,5554],{"type":21,"tag":2072,"props":5532,"children":5533},{"style":3372},[5534],{"type":26,"value":5535},"               for",{"type":21,"tag":2072,"props":5537,"children":5538},{"style":2079},[5539],{"type":26,"value":5540}," k, v ",{"type":21,"tag":2072,"props":5542,"children":5543},{"style":3372},[5544],{"type":26,"value":3869},{"type":21,"tag":2072,"props":5546,"children":5547},{"style":2079},[5548],{"type":26,"value":5549}," counts.items()) ",{"type":21,"tag":2072,"props":5551,"children":5552},{"style":3372},[5553],{"type":26,"value":1926},{"type":21,"tag":2072,"props":5555,"children":5556},{"style":2079},[5557],{"type":26,"value":4181},{"type":21,"tag":2072,"props":5559,"children":5560},{"class":2074,"line":3769},[5561],{"type":21,"tag":2072,"props":5562,"children":5563},{"emptyLinePlaceholder":3460},[5564],{"type":26,"value":3463},{"type":21,"tag":2072,"props":5566,"children":5567},{"class":2074,"line":3777},[5568],{"type":21,"tag":2072,"props":5569,"children":5570},{"style":3985},[5571],{"type":26,"value":5572},"# 4-qubit GHZ padded with cancelling CX pairs, ideal \u003CZZZZ> = +1.0\n",{"type":21,"tag":2072,"props":5574,"children":5575},{"class":2074,"line":3808},[5576,5581,5585,5589,5593],{"type":21,"tag":2072,"props":5577,"children":5578},{"style":2079},[5579],{"type":26,"value":5580},"base ",{"type":21,"tag":2072,"props":5582,"children":5583},{"style":3372},[5584],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5586,"children":5587},{"style":2079},[5588],{"type":26,"value":4264},{"type":21,"tag":2072,"props":5590,"children":5591},{"style":2097},[5592],{"type":26,"value":4661},{"type":21,"tag":2072,"props":5594,"children":5595},{"style":2079},[5596],{"type":26,"value":4281},{"type":21,"tag":2072,"props":5598,"children":5599},{"class":2074,"line":3853},[5600,5605,5609],{"type":21,"tag":2072,"props":5601,"children":5602},{"style":2079},[5603],{"type":26,"value":5604},"base.h(",{"type":21,"tag":2072,"props":5606,"children":5607},{"style":2097},[5608],{"type":26,"value":4295},{"type":21,"tag":2072,"props":5610,"children":5611},{"style":2079},[5612],{"type":26,"value":4281},{"type":21,"tag":2072,"props":5614,"children":5615},{"class":2074,"line":3895},[5616,5620,5625,5629,5633,5637,5642],{"type":21,"tag":2072,"props":5617,"children":5618},{"style":3372},[5619],{"type":26,"value":4479},{"type":21,"tag":2072,"props":5621,"children":5622},{"style":2079},[5623],{"type":26,"value":5624}," q ",{"type":21,"tag":2072,"props":5626,"children":5627},{"style":3372},[5628],{"type":26,"value":3869},{"type":21,"tag":2072,"props":5630,"children":5631},{"style":2097},[5632],{"type":26,"value":3874},{"type":21,"tag":2072,"props":5634,"children":5635},{"style":2079},[5636],{"type":26,"value":3879},{"type":21,"tag":2072,"props":5638,"children":5639},{"style":2097},[5640],{"type":26,"value":5641},"3",{"type":21,"tag":2072,"props":5643,"children":5644},{"style":2079},[5645],{"type":26,"value":3525},{"type":21,"tag":2072,"props":5647,"children":5648},{"class":2074,"line":3913},[5649,5654,5659,5663],{"type":21,"tag":2072,"props":5650,"children":5651},{"style":2079},[5652],{"type":26,"value":5653},"    base.cx(q, q ",{"type":21,"tag":2072,"props":5655,"children":5656},{"style":3372},[5657],{"type":26,"value":5658},"+",{"type":21,"tag":2072,"props":5660,"children":5661},{"style":2097},[5662],{"type":26,"value":5228},{"type":21,"tag":2072,"props":5664,"children":5665},{"style":2079},[5666],{"type":26,"value":4281},{"type":21,"tag":2072,"props":5668,"children":5669},{"class":2074,"line":3991},[5670,5674,5678,5682,5686,5690,5694],{"type":21,"tag":2072,"props":5671,"children":5672},{"style":3372},[5673],{"type":26,"value":4479},{"type":21,"tag":2072,"props":5675,"children":5676},{"style":2079},[5677],{"type":26,"value":5270},{"type":21,"tag":2072,"props":5679,"children":5680},{"style":3372},[5681],{"type":26,"value":3869},{"type":21,"tag":2072,"props":5683,"children":5684},{"style":2097},[5685],{"type":26,"value":3874},{"type":21,"tag":2072,"props":5687,"children":5688},{"style":2079},[5689],{"type":26,"value":3879},{"type":21,"tag":2072,"props":5691,"children":5692},{"style":2097},[5693],{"type":26,"value":4661},{"type":21,"tag":2072,"props":5695,"children":5696},{"style":2079},[5697],{"type":26,"value":3525},{"type":21,"tag":2072,"props":5699,"children":5700},{"class":2074,"line":4019},[5701,5705,5709,5713,5717,5721,5725],{"type":21,"tag":2072,"props":5702,"children":5703},{"style":3372},[5704],{"type":26,"value":3859},{"type":21,"tag":2072,"props":5706,"children":5707},{"style":2079},[5708],{"type":26,"value":5624},{"type":21,"tag":2072,"props":5710,"children":5711},{"style":3372},[5712],{"type":26,"value":3869},{"type":21,"tag":2072,"props":5714,"children":5715},{"style":2097},[5716],{"type":26,"value":3874},{"type":21,"tag":2072,"props":5718,"children":5719},{"style":2079},[5720],{"type":26,"value":3879},{"type":21,"tag":2072,"props":5722,"children":5723},{"style":2097},[5724],{"type":26,"value":5641},{"type":21,"tag":2072,"props":5726,"children":5727},{"style":2079},[5728],{"type":26,"value":3525},{"type":21,"tag":2072,"props":5730,"children":5731},{"class":2074,"line":4048},[5732,5737,5741,5745],{"type":21,"tag":2072,"props":5733,"children":5734},{"style":2079},[5735],{"type":26,"value":5736},"        base.cx(q, q ",{"type":21,"tag":2072,"props":5738,"children":5739},{"style":3372},[5740],{"type":26,"value":5658},{"type":21,"tag":2072,"props":5742,"children":5743},{"style":2097},[5744],{"type":26,"value":5228},{"type":21,"tag":2072,"props":5746,"children":5747},{"style":2079},[5748],{"type":26,"value":4281},{"type":21,"tag":2072,"props":5750,"children":5751},{"class":2074,"line":4057},[5752,5756,5760,5764],{"type":21,"tag":2072,"props":5753,"children":5754},{"style":2079},[5755],{"type":26,"value":5736},{"type":21,"tag":2072,"props":5757,"children":5758},{"style":3372},[5759],{"type":26,"value":5658},{"type":21,"tag":2072,"props":5761,"children":5762},{"style":2097},[5763],{"type":26,"value":5228},{"type":21,"tag":2072,"props":5765,"children":5766},{"style":2079},[5767],{"type":26,"value":4281},{"type":21,"tag":2072,"props":5769,"children":5770},{"class":2074,"line":4085},[5771],{"type":21,"tag":2072,"props":5772,"children":5773},{"emptyLinePlaceholder":3460},[5774],{"type":26,"value":3463},{"type":21,"tag":2072,"props":5776,"children":5777},{"class":2074,"line":4116},[5778,5783,5787,5792,5796,5800,5804,5808,5813],{"type":21,"tag":2072,"props":5779,"children":5780},{"style":2079},[5781],{"type":26,"value":5782},"scales ",{"type":21,"tag":2072,"props":5784,"children":5785},{"style":3372},[5786],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5788,"children":5789},{"style":2079},[5790],{"type":26,"value":5791}," [",{"type":21,"tag":2072,"props":5793,"children":5794},{"style":2097},[5795],{"type":26,"value":3555},{"type":21,"tag":2072,"props":5797,"children":5798},{"style":2079},[5799],{"type":26,"value":798},{"type":21,"tag":2072,"props":5801,"children":5802},{"style":2097},[5803],{"type":26,"value":5641},{"type":21,"tag":2072,"props":5805,"children":5806},{"style":2079},[5807],{"type":26,"value":798},{"type":21,"tag":2072,"props":5809,"children":5810},{"style":2097},[5811],{"type":26,"value":5812},"5",{"type":21,"tag":2072,"props":5814,"children":5815},{"style":2079},[5816],{"type":26,"value":5817},"]\n",{"type":21,"tag":2072,"props":5819,"children":5820},{"class":2074,"line":4138},[5821,5826,5830,5835,5839,5844,5848],{"type":21,"tag":2072,"props":5822,"children":5823},{"style":2079},[5824],{"type":26,"value":5825},"vals ",{"type":21,"tag":2072,"props":5827,"children":5828},{"style":3372},[5829],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5831,"children":5832},{"style":2079},[5833],{"type":26,"value":5834}," [expval_parity(fold_global(base, s), backend) ",{"type":21,"tag":2072,"props":5836,"children":5837},{"style":3372},[5838],{"type":26,"value":4479},{"type":21,"tag":2072,"props":5840,"children":5841},{"style":2079},[5842],{"type":26,"value":5843}," s ",{"type":21,"tag":2072,"props":5845,"children":5846},{"style":3372},[5847],{"type":26,"value":3869},{"type":21,"tag":2072,"props":5849,"children":5850},{"style":2079},[5851],{"type":26,"value":5852}," scales]\n",{"type":21,"tag":2072,"props":5854,"children":5855},{"class":2074,"line":4184},[5856,5861,5865,5870,5874,5878,5882,5887],{"type":21,"tag":2072,"props":5857,"children":5858},{"style":2079},[5859],{"type":26,"value":5860},"zne ",{"type":21,"tag":2072,"props":5862,"children":5863},{"style":3372},[5864],{"type":26,"value":3487},{"type":21,"tag":2072,"props":5866,"children":5867},{"style":2079},[5868],{"type":26,"value":5869}," np.polyval(np.polyfit(scales, vals, ",{"type":21,"tag":2072,"props":5871,"children":5872},{"style":2097},[5873],{"type":26,"value":2170},{"type":21,"tag":2072,"props":5875,"children":5876},{"style":2079},[5877],{"type":26,"value":4465},{"type":21,"tag":2072,"props":5879,"children":5880},{"style":2097},[5881],{"type":26,"value":4295},{"type":21,"tag":2072,"props":5883,"children":5884},{"style":2079},[5885],{"type":26,"value":5886},")   ",{"type":21,"tag":2072,"props":5888,"children":5889},{"style":3985},[5890],{"type":26,"value":5891},"# Richardson, order 2\n",{"type":21,"tag":2072,"props":5893,"children":5894},{"class":2074,"line":4197},[5895,5899,5904,5909],{"type":21,"tag":2072,"props":5896,"children":5897},{"style":2097},[5898],{"type":26,"value":4614},{"type":21,"tag":2072,"props":5900,"children":5901},{"style":2079},[5902],{"type":26,"value":5903},"(vals, ",{"type":21,"tag":2072,"props":5905,"children":5906},{"style":2108},[5907],{"type":26,"value":5908},"\"->\"",{"type":21,"tag":2072,"props":5910,"children":5911},{"style":2079},[5912],{"type":26,"value":5913},", zne)\n",{"type":21,"tag":22,"props":5915,"children":5916},{},[5917,5922],{"type":21,"tag":784,"props":5918,"children":5919},{},[5920],{"type":26,"value":5921},"Real measured output",{"type":26,"value":5923},", same versions, readout error switched off to isolate gate noise. With a 0.4% two-qubit error rate:",{"type":21,"tag":2062,"props":5925,"children":5927},{"code":5926},"scale 1: 0.8973   scale 3: 0.7286   scale 5: 0.5767\nZNE estimate: 0.988   (exact: 1.000)\n",[5928],{"type":21,"tag":1831,"props":5929,"children":5930},{"__ignoreMap":7},[5931],{"type":26,"value":5926},{"type":21,"tag":22,"props":5933,"children":5934},{},[5935],{"type":26,"value":5936},"Raw error 0.103, mitigated error 0.012. ZNE removed 88% of the bias. This is what the technique looks like when it works.",{"type":21,"tag":43,"props":5938,"children":5940},{"id":5939},"when-zne-lies",[5941],{"type":26,"value":5942},"When ZNE Lies",{"type":21,"tag":22,"props":5944,"children":5945},{},[5946],{"type":26,"value":5947},"Now turn the two-qubit error rate up to 4% and rerun the identical code:",{"type":21,"tag":2062,"props":5949,"children":5951},{"code":5950},"scale 1: 0.3311   scale 3: 0.0320   scale 5: 0.0008\nZNE estimate: 0.581   (exact: 1.000)\n",[5952],{"type":21,"tag":1831,"props":5953,"children":5954},{"__ignoreMap":7},[5955],{"type":26,"value":5950},{"type":21,"tag":22,"props":5957,"children":5958},{},[5959,5961,5966],{"type":26,"value":5960},"Look at what a results table would show: raw 0.33, mitigated 0.58, ideal 1.00. Mitigation \"recovered\" 76% more signal! It looks like a triumph. It is garbage. The λ=5 point is 0.0008. The signal is ",{"type":21,"tag":103,"props":5962,"children":5963},{},[5964],{"type":26,"value":5965},"gone",{"type":26,"value":5967},". The fit is being driven by two nearly-zero numbers and one noisy one, and it happens to land somewhere between raw and truth because the curve shape forces it to.",{"type":21,"tag":22,"props":5969,"children":5970},{},[5971,5973,5979,5981,5986,5988,5993],{"type":26,"value":5972},"This is precisely the failure mode Köster and Mauerer characterize in ",{"type":21,"tag":29,"props":5974,"children":5976},{"href":5975},"\u002Fresearch\u002Fzne-artefactual-improvements-2026",[5977],{"type":26,"value":5978},"Artefactual Improvements in Zero-Noise Extrapolation",{"type":26,"value":5980}," (2026). Their finding: once noise amplification pushes past usable signal, ",{"type":21,"tag":784,"props":5982,"children":5983},{},[5984],{"type":26,"value":5985},"Richardson extrapolation degenerates into a fixed rescaling of a single noisy measurement",{"type":26,"value":5987},". The output is no longer a function of the noise amplification it supposedly corrects for. The amplified points contribute nothing but their own vanishing. On real hardware they measured runs that ",{"type":21,"tag":103,"props":5989,"children":5990},{},[5991],{"type":26,"value":5992},"overshot",{"type":26,"value":5994}," the ideal value by up to 21%.",{"type":21,"tag":22,"props":5996,"children":5997},{},[5998,6000,6005],{"type":26,"value":5999},"Their sharpest result is a negative control. They defined \"garbage folding\" (circuit modifications with no relationship to the identity-insertion ZNE requires, i.e. deliberately meaningless) and pushed those through the same pipeline. It produced ",{"type":21,"tag":103,"props":6001,"children":6002},{},[6003],{"type":26,"value":6004},"larger",{"type":26,"value":6006}," apparent improvements than legitimate folding. If nonsense scores better than the real method, the score is not measuring what you think it is.",{"type":21,"tag":22,"props":6008,"children":6009},{},[6010,6015],{"type":21,"tag":784,"props":6011,"children":6012},{},[6013],{"type":26,"value":6014},"The operational lesson: improvement magnitude never validates a mitigation result.",{"type":26,"value":6016}," A number moving toward the expected answer is not evidence the method worked. It might instead be evidence the method collapsed into a rescaling that happens to move numbers in that direction.",{"type":21,"tag":43,"props":6018,"children":6020},{"id":6019},"the-sanity-checks-that-catch-this",[6021],{"type":26,"value":6022},"The Sanity Checks That Catch This",{"type":21,"tag":22,"props":6024,"children":6025},{},[6026],{"type":26,"value":6027},"Three of them, none expensive:",{"type":21,"tag":22,"props":6029,"children":6030},{},[6031,6036,6038,6044],{"type":21,"tag":784,"props":6032,"children":6033},{},[6034],{"type":26,"value":6035},"1. Inspect the raw scale-factor points, always.",{"type":26,"value":6037}," If your highest-λ value has collapsed toward the fully-depolarized value (0 for a parity observable, 1\u002F2^n for a probability), discard it. Fitting through dead points is fitting noise. In the failing run above, one glance at ",{"type":21,"tag":1831,"props":6039,"children":6041},{"className":6040},[],[6042],{"type":26,"value":6043},"0.0008",{"type":26,"value":6045}," tells you the extrapolation is unsupported.",{"type":21,"tag":22,"props":6047,"children":6048},{},[6049,6054,6056,6061,6063,6069,6071,6076],{"type":21,"tag":784,"props":6050,"children":6051},{},[6052],{"type":26,"value":6053},"2. Run a negative control.",{"type":26,"value":6055}," Build a variant of your folding that ",{"type":21,"tag":103,"props":6057,"children":6058},{},[6059],{"type":26,"value":6060},"shouldn't",{"type":26,"value":6062}," work (random gates of comparable depth instead of ",{"type":21,"tag":1831,"props":6064,"children":6066},{"className":6065},[],[6067],{"type":26,"value":6068},"U†U",{"type":26,"value":6070}," pairs) and push it through the identical pipeline. In my failing case, garbage folding returned 0.186 against a raw value of 0.329: it moved the answer ",{"type":21,"tag":103,"props":6072,"children":6073},{},[6074],{"type":26,"value":6075},"away",{"type":26,"value":6077}," from truth. That divergence is the flag. Whether your control produces spurious improvement or spurious degradation, any large response to meaningless input means your pipeline is fitting artifacts.",{"type":21,"tag":22,"props":6079,"children":6080},{},[6081,6093],{"type":21,"tag":784,"props":6082,"children":6083},{},[6084,6086,6091],{"type":26,"value":6085},"3. Verify against a ",{"type":21,"tag":29,"props":6087,"children":6088},{"href":150},[6089],{"type":26,"value":6090},"simulator",{"type":26,"value":6092}," at small scale.",{"type":26,"value":6094}," Run the same mitigation pipeline on a problem size you compute exactly. If ZNE doesn't recover the known answer at 6 qubits, nothing about 60 qubits will be trustworthy.",{"type":21,"tag":43,"props":6096,"children":6098},{"id":6097},"probabilistic-error-cancellation-briefly",[6099],{"type":26,"value":6100},"Probabilistic Error Cancellation (Briefly)",{"type":21,"tag":22,"props":6102,"children":6103},{},[6104,6106,6111],{"type":26,"value":6105},"PEC is the rigorous option. Characterize the noise channel precisely, express the ",{"type":21,"tag":103,"props":6107,"children":6108},{},[6109],{"type":26,"value":6110},"inverse",{"type":26,"value":6112}," channel as a quasi-probability distribution over implementable operations, then sample from it with signed weights. It's unbiased in principle. No extrapolation guesswork.",{"type":21,"tag":22,"props":6114,"children":6115},{},[6116,6118,6124],{"type":26,"value":6117},"The cost is brutal. Sampling overhead scales as γ², where γ grows exponentially in circuit depth × error rate. A modest circuit sometimes needs 100-10,000 times more shots than the unmitigated run, on top of an expensive noise-characterization phase (gate set tomography or cycle benchmarking). PEC is appropriate for small, high-value circuits where you need a trustworthy number and afford the ",{"type":21,"tag":29,"props":6119,"children":6121},{"href":6120},"\u002Fglossary\u002Fshot-budget",[6122],{"type":26,"value":6123},"shot budget",{"type":26,"value":6125},". For most work, it isn't.",{"type":21,"tag":43,"props":6127,"children":6129},{"id":6128},"what-to-do",[6130],{"type":26,"value":6131},"What To Do",{"type":21,"tag":22,"props":6133,"children":6134},{},[6135],{"type":26,"value":6136},"In order:",{"type":21,"tag":6138,"props":6139,"children":6140},"ol",{},[6141,6152,6162,6172,6182],{"type":21,"tag":6142,"props":6143,"children":6144},"li",{},[6145,6150],{"type":21,"tag":784,"props":6146,"children":6147},{},[6148],{"type":26,"value":6149},"Readout mitigation",{"type":26,"value":6151},": always. Cheap, bounded, low-risk.",{"type":21,"tag":6142,"props":6153,"children":6154},{},[6155,6160],{"type":21,"tag":784,"props":6156,"children":6157},{},[6158],{"type":26,"value":6159},"Dynamical decoupling",{"type":26,"value":6161},": always, if your circuit has idle qubits. Free.",{"type":21,"tag":6142,"props":6163,"children":6164},{},[6165,6170],{"type":21,"tag":784,"props":6166,"children":6167},{},[6168],{"type":26,"value":6169},"Twirling",{"type":26,"value":6171},": if you plan to use ZNE or PEC, so the noise is stochastic.",{"type":21,"tag":6142,"props":6173,"children":6174},{},[6175,6180],{"type":21,"tag":784,"props":6176,"children":6177},{},[6178],{"type":26,"value":6179},"ZNE",{"type":26,"value":6181},": only with scale-factor inspection and a negative control.",{"type":21,"tag":6142,"props":6183,"children":6184},{},[6185,6190],{"type":21,"tag":784,"props":6186,"children":6187},{},[6188],{"type":26,"value":6189},"PEC",{"type":26,"value":6191},": only when the circuit is small and the answer matters more than the cost.",{"type":21,"tag":22,"props":6193,"children":6194},{},[6195,6200,6202,6207,6209,6215],{"type":21,"tag":784,"props":6196,"children":6197},{},[6198],{"type":26,"value":6199},"Skip mitigation entirely when:",{"type":26,"value":6201}," your raw signal is already below ~0.2 of its ideal magnitude (nothing to extrapolate from), your circuit is deep enough that the λ=3 run is fully depolarized, or you're doing variational optimization where the optimizer only needs the ",{"type":21,"tag":103,"props":6203,"children":6204},{},[6205],{"type":26,"value":6206},"gradient direction",{"type":26,"value":6208},": bias that's roughly constant across parameter space often cancels out, and you're better off spending those shots on more iterations. Techniques for that are in ",{"type":21,"tag":29,"props":6210,"children":6212},{"href":6211},"\u002Fblog\u002Freduce-shot-count",[6213],{"type":26,"value":6214},"cutting your shot count",{"type":26,"value":237},{"type":21,"tag":22,"props":6217,"children":6218},{},[6219,6221,6227],{"type":26,"value":6220},"Mitigation buys you a few years of useful computation on machines that shouldn't be useful yet. It does not buy you fault tolerance, and it will happily hand you a confident wrong answer if you skip the controls. Get comfortable with the ",{"type":21,"tag":29,"props":6222,"children":6224},{"href":6223},"\u002Fsdks\u002Fqiskit",[6225],{"type":26,"value":6226},"Qiskit tooling",{"type":26,"value":6228},", always sanity-check against exact simulation, and treat any unvalidated improvement as a hypothesis rather than a result.",{"type":21,"tag":22,"props":6230,"children":6231},{},[6232,6237,6238,6243,6245,6250,6251],{"type":21,"tag":784,"props":6233,"children":6234},{},[6235],{"type":26,"value":6236},"Related:",{"type":26,"value":790},{"type":21,"tag":29,"props":6239,"children":6240},{"href":428},[6241],{"type":26,"value":6242},"Error correction explained",{"type":26,"value":6244}," · ",{"type":21,"tag":29,"props":6246,"children":6247},{"href":5975},[6248],{"type":26,"value":6249},"ZNE artefacts paper",{"type":26,"value":6244},{"type":21,"tag":29,"props":6252,"children":6254},{"href":6253},"\u002Fglossary\u002Fquantum-utility",[6255],{"type":26,"value":6256},"Quantum utility",{"type":21,"tag":2445,"props":6258,"children":6259},{},[6260],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":6262},[6263,6264,6265,6266,6267,6268,6269,6270,6271],{"id":3107,"depth":164,"text":3110},{"id":3304,"depth":164,"text":3307},{"id":4852,"depth":164,"text":4855},{"id":5092,"depth":164,"text":5095},{"id":5127,"depth":164,"text":5130},{"id":5939,"depth":164,"text":5942},{"id":6019,"depth":164,"text":6022},{"id":6097,"depth":164,"text":6100},{"id":6128,"depth":164,"text":6131},"content:blog:error-mitigation-practical-guide.md","blog\u002Ferror-mitigation-practical-guide.md","blog\u002Ferror-mitigation-practical-guide",{"_path":6276,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":6277,"description":6278,"date":3089,"author":11,"tags":6279,"readingTime":3092,"body":6282,"_type":171,"_id":8018,"_source":173,"_file":8019,"_stem":8020,"_extension":176},"\u002Fblog\u002Fgrover-algorithm-tutorial","Grover's Algorithm in Qiskit: A Practical Tutorial","Build Grover's search algorithm from scratch in Qiskit: oracle, diffuser, and the optimal iteration count, with complete runnable code and honest limits on the quadratic speedup.",[6280,852,6281],"Algorithms","Beginners",{"type":18,"children":6283,"toc":8006},[6284,6295,6300,6306,6311,6316,6328,6334,6339,6369,6374,6380,6393,6545,6558,6564,6569,6590,6911,6939,6945,6950,7172,7185,7191,7196,7204,7214,7219,7639,7644,7652,7664,7670,7682,7687,7695,7707,7719,7725,7730,7748,7758,7782,7794,7800,7812,7880,7899,7918,7924,8002],{"type":21,"tag":22,"props":6285,"children":6286},{},[6287,6293],{"type":21,"tag":29,"props":6288,"children":6290},{"href":6289},"\u002Fglossary\u002Fgrover-algorithm",[6291],{"type":26,"value":6292},"Grover's algorithm",{"type":26,"value":6294}," is the second-most-famous quantum algorithm after Shor's, and it is by far the easier one to build. You implement a working version in about forty lines of Qiskit and watch the marked state emerge from the noise floor.",{"type":21,"tag":22,"props":6296,"children":6297},{},[6298],{"type":26,"value":6299},"It's also the algorithm most commonly misunderstood. This guide builds it step by step, shows the mistake that almost every beginner makes, and is honest about what the speedup does and does not buy you.",{"type":21,"tag":43,"props":6301,"children":6303},{"id":6302},"the-problem-unstructured-search",[6304],{"type":26,"value":6305},"The Problem: Unstructured Search",{"type":21,"tag":22,"props":6307,"children":6308},{},[6309],{"type":26,"value":6310},"You have N possibilities. Exactly one of them (or a few) satisfies some condition. You have no structure to exploit: no sorting, no index, no gradient, nothing that lets you rule out half the space with one look. Your only tool is a checker function: hand it a candidate, it tells you yes or no.",{"type":21,"tag":22,"props":6312,"children":6313},{},[6314],{"type":26,"value":6315},"Classically, you have no choice but to try candidates one at a time. On average that's N\u002F2 checks, and N in the worst case. Grover's algorithm finds the answer in roughly (π\u002F4)√N checks. For N = 1,000,000 that's about 785 instead of 500,000.",{"type":21,"tag":22,"props":6317,"children":6318},{},[6319,6321,6326],{"type":26,"value":6320},"The word ",{"type":21,"tag":784,"props":6322,"children":6323},{},[6324],{"type":26,"value":6325},"unstructured",{"type":26,"value":6327}," is doing enormous work here. It does not mean \"hard\". It means \"the only thing you do is test candidates\". If your problem has any exploitable structure (sorted data, a hash index, a metric that lets you prune), classical algorithms will use it and will crush Grover. The classic \"search a database of N records\" framing is genuinely misleading, and we'll come back to why.",{"type":21,"tag":43,"props":6329,"children":6331},{"id":6330},"the-core-idea-amplitude-amplification",[6332],{"type":26,"value":6333},"The Core Idea: Amplitude Amplification",{"type":21,"tag":22,"props":6335,"children":6336},{},[6337],{"type":26,"value":6338},"Start with every state equally likely. Then repeat two operations:",{"type":21,"tag":6138,"props":6340,"children":6341},{},[6342,6359],{"type":21,"tag":6142,"props":6343,"children":6344},{},[6345,6350,6352,6357],{"type":21,"tag":784,"props":6346,"children":6347},{},[6348],{"type":26,"value":6349},"The oracle",{"type":26,"value":6351}," flips the ",{"type":21,"tag":103,"props":6353,"children":6354},{},[6355],{"type":26,"value":6356},"sign",{"type":26,"value":6358}," of the amplitude of the marked state, leaving everything else alone. Probabilities don't change (all amplitudes are still ±1\u002F√N) but the marked one now points the other way.",{"type":21,"tag":6142,"props":6360,"children":6361},{},[6362,6367],{"type":21,"tag":784,"props":6363,"children":6364},{},[6365],{"type":26,"value":6366},"The diffusion operator",{"type":26,"value":6368}," reflects every amplitude about their mean. Since the marked amplitude is negative it sits far below the mean, so reflecting it sends it well above. Every other amplitude drops slightly.",{"type":21,"tag":22,"props":6370,"children":6371},{},[6372],{"type":26,"value":6373},"Each round is a rotation of the state vector toward the target by a fixed angle. That's the whole algorithm. The rotation angle is fixed, which is exactly why overshooting is possible. More on that shortly.",{"type":21,"tag":43,"props":6375,"children":6377},{"id":6376},"step-1-uniform-superposition",[6378],{"type":26,"value":6379},"Step 1: Uniform Superposition",{"type":21,"tag":22,"props":6381,"children":6382},{},[6383,6385,6391],{"type":26,"value":6384},"Apply a ",{"type":21,"tag":29,"props":6386,"children":6388},{"href":6387},"\u002Fglossary\u002Fhadamard-gate",[6389],{"type":26,"value":6390},"Hadamard gate",{"type":26,"value":6392}," to every qubit. Three qubits give eight basis states each with amplitude 1\u002F√8.",{"type":21,"tag":2062,"props":6394,"children":6396},{"code":6395,"language":3361,"meta":7,"className":3362,"style":7},"from qiskit import QuantumCircuit, transpile\nfrom qiskit_aer import AerSimulator\nimport math\n\nn = 3                # 3 qubits -> N = 8 states\nmarked = \"101\"       # the state we want to find\n\nqc = QuantumCircuit(n, n)\nqc.h(range(n))       # uniform superposition\n",[6397],{"type":21,"tag":1831,"props":6398,"children":6399},{"__ignoreMap":7},[6400,6419,6438,6450,6457,6478,6500,6507,6523],{"type":21,"tag":2072,"props":6401,"children":6402},{"class":2074,"line":2075},[6403,6407,6411,6415],{"type":21,"tag":2072,"props":6404,"children":6405},{"style":3372},[6406],{"type":26,"value":3398},{"type":21,"tag":2072,"props":6408,"children":6409},{"style":2079},[6410],{"type":26,"value":3403},{"type":21,"tag":2072,"props":6412,"children":6413},{"style":3372},[6414],{"type":26,"value":3375},{"type":21,"tag":2072,"props":6416,"children":6417},{"style":2079},[6418],{"type":26,"value":3412},{"type":21,"tag":2072,"props":6420,"children":6421},{"class":2074,"line":164},[6422,6426,6430,6434],{"type":21,"tag":2072,"props":6423,"children":6424},{"style":3372},[6425],{"type":26,"value":3398},{"type":21,"tag":2072,"props":6427,"children":6428},{"style":2079},[6429],{"type":26,"value":3424},{"type":21,"tag":2072,"props":6431,"children":6432},{"style":3372},[6433],{"type":26,"value":3375},{"type":21,"tag":2072,"props":6435,"children":6436},{"style":2079},[6437],{"type":26,"value":3433},{"type":21,"tag":2072,"props":6439,"children":6440},{"class":2074,"line":2093},[6441,6445],{"type":21,"tag":2072,"props":6442,"children":6443},{"style":3372},[6444],{"type":26,"value":3375},{"type":21,"tag":2072,"props":6446,"children":6447},{"style":2079},[6448],{"type":26,"value":6449}," math\n",{"type":21,"tag":2072,"props":6451,"children":6452},{"class":2074,"line":2155},[6453],{"type":21,"tag":2072,"props":6454,"children":6455},{"emptyLinePlaceholder":3460},[6456],{"type":26,"value":3463},{"type":21,"tag":2072,"props":6458,"children":6459},{"class":2074,"line":2178},[6460,6464,6468,6473],{"type":21,"tag":2072,"props":6461,"children":6462},{"style":2079},[6463],{"type":26,"value":4211},{"type":21,"tag":2072,"props":6465,"children":6466},{"style":3372},[6467],{"type":26,"value":3487},{"type":21,"tag":2072,"props":6469,"children":6470},{"style":2097},[6471],{"type":26,"value":6472}," 3",{"type":21,"tag":2072,"props":6474,"children":6475},{"style":3985},[6476],{"type":26,"value":6477},"                # 3 qubits -> N = 8 states\n",{"type":21,"tag":2072,"props":6479,"children":6480},{"class":2074,"line":288},[6481,6486,6490,6495],{"type":21,"tag":2072,"props":6482,"children":6483},{"style":2079},[6484],{"type":26,"value":6485},"marked ",{"type":21,"tag":2072,"props":6487,"children":6488},{"style":3372},[6489],{"type":26,"value":3487},{"type":21,"tag":2072,"props":6491,"children":6492},{"style":2108},[6493],{"type":26,"value":6494}," \"101\"",{"type":21,"tag":2072,"props":6496,"children":6497},{"style":3985},[6498],{"type":26,"value":6499},"       # the state we want to find\n",{"type":21,"tag":2072,"props":6501,"children":6502},{"class":2074,"line":16},[6503],{"type":21,"tag":2072,"props":6504,"children":6505},{"emptyLinePlaceholder":3460},[6506],{"type":26,"value":3463},{"type":21,"tag":2072,"props":6508,"children":6509},{"class":2074,"line":366},[6510,6515,6519],{"type":21,"tag":2072,"props":6511,"children":6512},{"style":2079},[6513],{"type":26,"value":6514},"qc ",{"type":21,"tag":2072,"props":6516,"children":6517},{"style":3372},[6518],{"type":26,"value":3487},{"type":21,"tag":2072,"props":6520,"children":6521},{"style":2079},[6522],{"type":26,"value":3910},{"type":21,"tag":2072,"props":6524,"children":6525},{"class":2074,"line":853},[6526,6531,6535,6540],{"type":21,"tag":2072,"props":6527,"children":6528},{"style":2079},[6529],{"type":26,"value":6530},"qc.h(",{"type":21,"tag":2072,"props":6532,"children":6533},{"style":2097},[6534],{"type":26,"value":4068},{"type":21,"tag":2072,"props":6536,"children":6537},{"style":2079},[6538],{"type":26,"value":6539},"(n))       ",{"type":21,"tag":2072,"props":6541,"children":6542},{"style":3985},[6543],{"type":26,"value":6544},"# uniform superposition\n",{"type":21,"tag":22,"props":6546,"children":6547},{},[6548,6550,6556],{"type":26,"value":6549},"If you ",{"type":21,"tag":29,"props":6551,"children":6553},{"href":6552},"\u002Fglossary\u002Fmeasurement",[6554],{"type":26,"value":6555},"measure",{"type":26,"value":6557}," here you get a uniform random bitstring: 12.5% for each of the eight outcomes. That's the baseline to beat.",{"type":21,"tag":43,"props":6559,"children":6561},{"id":6560},"step-2-the-oracle",[6562],{"type":26,"value":6563},"Step 2: The Oracle",{"type":21,"tag":22,"props":6565,"children":6566},{},[6567],{"type":26,"value":6568},"The oracle must apply a phase of −1 to |101⟩ and +1 to everything else. The trick is a multi-controlled Z gate: it flips the sign of |111⟩ only. To mark a different pattern, sandwich it with X gates on the qubits that should be 0.",{"type":21,"tag":22,"props":6570,"children":6571},{},[6572,6574,6580,6582,6588],{"type":26,"value":6573},"Qiskit has no ",{"type":21,"tag":1831,"props":6575,"children":6577},{"className":6576},[],[6578],{"type":26,"value":6579},"mcz",{"type":26,"value":6581},", so we build it the standard way: an H on the target, a multi-controlled X (",{"type":21,"tag":29,"props":6583,"children":6585},{"href":6584},"\u002Fglossary\u002Ftoffoli-gate",[6586],{"type":26,"value":6587},"Toffoli",{"type":26,"value":6589}," generalized), an H back:",{"type":21,"tag":2062,"props":6591,"children":6593},{"code":6592,"language":3361,"meta":7,"className":3362,"style":7},"def oracle(n, marked):\n    \"\"\"Phase-flip the marked basis state.\"\"\"\n    qc = QuantumCircuit(n, name=\"Oracle\")\n    rev = marked[::-1]              # Qiskit is little-endian\n    for i, bit in enumerate(rev):\n        if bit == \"0\":\n            qc.x(i)\n    qc.h(n - 1)                     # multi-controlled Z\n    qc.mcx(list(range(n - 1)), n - 1)\n    qc.h(n - 1)\n    for i, bit in enumerate(rev):\n        if bit == \"0\":\n            qc.x(i)\n    return qc\n",[6594],{"type":21,"tag":1831,"props":6595,"children":6596},{"__ignoreMap":7},[6597,6614,6622,6657,6691,6716,6742,6750,6776,6827,6846,6869,6892,6899],{"type":21,"tag":2072,"props":6598,"children":6599},{"class":2074,"line":2075},[6600,6604,6609],{"type":21,"tag":2072,"props":6601,"children":6602},{"style":3372},[6603],{"type":26,"value":3471},{"type":21,"tag":2072,"props":6605,"children":6606},{"style":3474},[6607],{"type":26,"value":6608}," oracle",{"type":21,"tag":2072,"props":6610,"children":6611},{"style":2079},[6612],{"type":26,"value":6613},"(n, marked):\n",{"type":21,"tag":2072,"props":6615,"children":6616},{"class":2074,"line":164},[6617],{"type":21,"tag":2072,"props":6618,"children":6619},{"style":2108},[6620],{"type":26,"value":6621},"    \"\"\"Phase-flip the marked basis state.\"\"\"\n",{"type":21,"tag":2072,"props":6623,"children":6624},{"class":2074,"line":2093},[6625,6630,6634,6639,6644,6648,6653],{"type":21,"tag":2072,"props":6626,"children":6627},{"style":2079},[6628],{"type":26,"value":6629},"    qc ",{"type":21,"tag":2072,"props":6631,"children":6632},{"style":3372},[6633],{"type":26,"value":3487},{"type":21,"tag":2072,"props":6635,"children":6636},{"style":2079},[6637],{"type":26,"value":6638}," QuantumCircuit(n, ",{"type":21,"tag":2072,"props":6640,"children":6641},{"style":3735},[6642],{"type":26,"value":6643},"name",{"type":21,"tag":2072,"props":6645,"children":6646},{"style":3372},[6647],{"type":26,"value":3487},{"type":21,"tag":2072,"props":6649,"children":6650},{"style":2108},[6651],{"type":26,"value":6652},"\"Oracle\"",{"type":21,"tag":2072,"props":6654,"children":6655},{"style":2079},[6656],{"type":26,"value":4281},{"type":21,"tag":2072,"props":6658,"children":6659},{"class":2074,"line":2155},[6660,6665,6669,6674,6678,6682,6687],{"type":21,"tag":2072,"props":6661,"children":6662},{"style":2079},[6663],{"type":26,"value":6664},"    rev ",{"type":21,"tag":2072,"props":6666,"children":6667},{"style":3372},[6668],{"type":26,"value":3487},{"type":21,"tag":2072,"props":6670,"children":6671},{"style":2079},[6672],{"type":26,"value":6673}," marked[::",{"type":21,"tag":2072,"props":6675,"children":6676},{"style":3372},[6677],{"type":26,"value":3973},{"type":21,"tag":2072,"props":6679,"children":6680},{"style":2097},[6681],{"type":26,"value":3555},{"type":21,"tag":2072,"props":6683,"children":6684},{"style":2079},[6685],{"type":26,"value":6686},"]              ",{"type":21,"tag":2072,"props":6688,"children":6689},{"style":3985},[6690],{"type":26,"value":3988},{"type":21,"tag":2072,"props":6692,"children":6693},{"class":2074,"line":2178},[6694,6698,6703,6707,6711],{"type":21,"tag":2072,"props":6695,"children":6696},{"style":3372},[6697],{"type":26,"value":3859},{"type":21,"tag":2072,"props":6699,"children":6700},{"style":2079},[6701],{"type":26,"value":6702}," i, bit ",{"type":21,"tag":2072,"props":6704,"children":6705},{"style":3372},[6706],{"type":26,"value":3869},{"type":21,"tag":2072,"props":6708,"children":6709},{"style":2097},[6710],{"type":26,"value":4011},{"type":21,"tag":2072,"props":6712,"children":6713},{"style":2079},[6714],{"type":26,"value":6715},"(rev):\n",{"type":21,"tag":2072,"props":6717,"children":6718},{"class":2074,"line":288},[6719,6724,6729,6733,6738],{"type":21,"tag":2072,"props":6720,"children":6721},{"style":3372},[6722],{"type":26,"value":6723},"        if",{"type":21,"tag":2072,"props":6725,"children":6726},{"style":2079},[6727],{"type":26,"value":6728}," bit ",{"type":21,"tag":2072,"props":6730,"children":6731},{"style":3372},[6732],{"type":26,"value":4035},{"type":21,"tag":2072,"props":6734,"children":6735},{"style":2108},[6736],{"type":26,"value":6737}," \"0\"",{"type":21,"tag":2072,"props":6739,"children":6740},{"style":2079},[6741],{"type":26,"value":4045},{"type":21,"tag":2072,"props":6743,"children":6744},{"class":2074,"line":16},[6745],{"type":21,"tag":2072,"props":6746,"children":6747},{"style":2079},[6748],{"type":26,"value":6749},"            qc.x(i)\n",{"type":21,"tag":2072,"props":6751,"children":6752},{"class":2074,"line":366},[6753,6758,6762,6766,6771],{"type":21,"tag":2072,"props":6754,"children":6755},{"style":2079},[6756],{"type":26,"value":6757},"    qc.h(n ",{"type":21,"tag":2072,"props":6759,"children":6760},{"style":3372},[6761],{"type":26,"value":3973},{"type":21,"tag":2072,"props":6763,"children":6764},{"style":2097},[6765],{"type":26,"value":5228},{"type":21,"tag":2072,"props":6767,"children":6768},{"style":2079},[6769],{"type":26,"value":6770},")                     ",{"type":21,"tag":2072,"props":6772,"children":6773},{"style":3985},[6774],{"type":26,"value":6775},"# multi-controlled Z\n",{"type":21,"tag":2072,"props":6777,"children":6778},{"class":2074,"line":853},[6779,6784,6789,6793,6797,6802,6806,6810,6815,6819,6823],{"type":21,"tag":2072,"props":6780,"children":6781},{"style":2079},[6782],{"type":26,"value":6783},"    qc.mcx(",{"type":21,"tag":2072,"props":6785,"children":6786},{"style":2097},[6787],{"type":26,"value":6788},"list",{"type":21,"tag":2072,"props":6790,"children":6791},{"style":2079},[6792],{"type":26,"value":3879},{"type":21,"tag":2072,"props":6794,"children":6795},{"style":2097},[6796],{"type":26,"value":4068},{"type":21,"tag":2072,"props":6798,"children":6799},{"style":2079},[6800],{"type":26,"value":6801},"(n ",{"type":21,"tag":2072,"props":6803,"children":6804},{"style":3372},[6805],{"type":26,"value":3973},{"type":21,"tag":2072,"props":6807,"children":6808},{"style":2097},[6809],{"type":26,"value":5228},{"type":21,"tag":2072,"props":6811,"children":6812},{"style":2079},[6813],{"type":26,"value":6814},")), n ",{"type":21,"tag":2072,"props":6816,"children":6817},{"style":3372},[6818],{"type":26,"value":3973},{"type":21,"tag":2072,"props":6820,"children":6821},{"style":2097},[6822],{"type":26,"value":5228},{"type":21,"tag":2072,"props":6824,"children":6825},{"style":2079},[6826],{"type":26,"value":4281},{"type":21,"tag":2072,"props":6828,"children":6829},{"class":2074,"line":3092},[6830,6834,6838,6842],{"type":21,"tag":2072,"props":6831,"children":6832},{"style":2079},[6833],{"type":26,"value":6757},{"type":21,"tag":2072,"props":6835,"children":6836},{"style":3372},[6837],{"type":26,"value":3973},{"type":21,"tag":2072,"props":6839,"children":6840},{"style":2097},[6841],{"type":26,"value":5228},{"type":21,"tag":2072,"props":6843,"children":6844},{"style":2079},[6845],{"type":26,"value":4281},{"type":21,"tag":2072,"props":6847,"children":6848},{"class":2074,"line":3651},[6849,6853,6857,6861,6865],{"type":21,"tag":2072,"props":6850,"children":6851},{"style":3372},[6852],{"type":26,"value":3859},{"type":21,"tag":2072,"props":6854,"children":6855},{"style":2079},[6856],{"type":26,"value":6702},{"type":21,"tag":2072,"props":6858,"children":6859},{"style":3372},[6860],{"type":26,"value":3869},{"type":21,"tag":2072,"props":6862,"children":6863},{"style":2097},[6864],{"type":26,"value":4011},{"type":21,"tag":2072,"props":6866,"children":6867},{"style":2079},[6868],{"type":26,"value":6715},{"type":21,"tag":2072,"props":6870,"children":6871},{"class":2074,"line":2616},[6872,6876,6880,6884,6888],{"type":21,"tag":2072,"props":6873,"children":6874},{"style":3372},[6875],{"type":26,"value":6723},{"type":21,"tag":2072,"props":6877,"children":6878},{"style":2079},[6879],{"type":26,"value":6728},{"type":21,"tag":2072,"props":6881,"children":6882},{"style":3372},[6883],{"type":26,"value":4035},{"type":21,"tag":2072,"props":6885,"children":6886},{"style":2108},[6887],{"type":26,"value":6737},{"type":21,"tag":2072,"props":6889,"children":6890},{"style":2079},[6891],{"type":26,"value":4045},{"type":21,"tag":2072,"props":6893,"children":6894},{"class":2074,"line":3695},[6895],{"type":21,"tag":2072,"props":6896,"children":6897},{"style":2079},[6898],{"type":26,"value":6749},{"type":21,"tag":2072,"props":6900,"children":6901},{"class":2074,"line":3709},[6902,6906],{"type":21,"tag":2072,"props":6903,"children":6904},{"style":3372},[6905],{"type":26,"value":3701},{"type":21,"tag":2072,"props":6907,"children":6908},{"style":2079},[6909],{"type":26,"value":6910}," qc\n",{"type":21,"tag":22,"props":6912,"children":6913},{},[6914,6916,6921,6923,6929,6931,6937],{"type":26,"value":6915},"Watch the endianness. Qiskit orders bitstrings with qubit 0 on the ",{"type":21,"tag":784,"props":6917,"children":6918},{},[6919],{"type":26,"value":6920},"right",{"type":26,"value":6922},", so ",{"type":21,"tag":1831,"props":6924,"children":6926},{"className":6925},[],[6927],{"type":26,"value":6928},"marked[::-1]",{"type":26,"value":6930}," maps the string to qubit indices. Getting this backwards is the second most common bug in Grover implementations and it fails silently. You'll amplify ",{"type":21,"tag":1831,"props":6932,"children":6934},{"className":6933},[],[6935],{"type":26,"value":6936},"101",{"type":26,"value":6938}," reversed and wonder why.",{"type":21,"tag":43,"props":6940,"children":6942},{"id":6941},"step-3-the-diffusion-operator",[6943],{"type":26,"value":6944},"Step 3: The Diffusion Operator",{"type":21,"tag":22,"props":6946,"children":6947},{},[6948],{"type":26,"value":6949},"Inversion about the mean is H⊗n, then X⊗n, then a multi-controlled Z, then X⊗n, then H⊗n. Structurally it's a reflection about the uniform superposition state:",{"type":21,"tag":2062,"props":6951,"children":6953},{"code":6952,"language":3361,"meta":7,"className":3362,"style":7},"def diffuser(n):\n    \"\"\"Inversion about the mean.\"\"\"\n    qc = QuantumCircuit(n, name=\"Diffuser\")\n    qc.h(range(n))\n    qc.x(range(n))\n    qc.h(n - 1)\n    qc.mcx(list(range(n - 1)), n - 1)\n    qc.h(n - 1)\n    qc.x(range(n))\n    qc.h(range(n))\n    return qc\n",[6954],{"type":21,"tag":1831,"props":6955,"children":6956},{"__ignoreMap":7},[6957,6974,6982,7014,7030,7046,7065,7112,7131,7146,7161],{"type":21,"tag":2072,"props":6958,"children":6959},{"class":2074,"line":2075},[6960,6964,6969],{"type":21,"tag":2072,"props":6961,"children":6962},{"style":3372},[6963],{"type":26,"value":3471},{"type":21,"tag":2072,"props":6965,"children":6966},{"style":3474},[6967],{"type":26,"value":6968}," diffuser",{"type":21,"tag":2072,"props":6970,"children":6971},{"style":2079},[6972],{"type":26,"value":6973},"(n):\n",{"type":21,"tag":2072,"props":6975,"children":6976},{"class":2074,"line":164},[6977],{"type":21,"tag":2072,"props":6978,"children":6979},{"style":2108},[6980],{"type":26,"value":6981},"    \"\"\"Inversion about the mean.\"\"\"\n",{"type":21,"tag":2072,"props":6983,"children":6984},{"class":2074,"line":2093},[6985,6989,6993,6997,7001,7005,7010],{"type":21,"tag":2072,"props":6986,"children":6987},{"style":2079},[6988],{"type":26,"value":6629},{"type":21,"tag":2072,"props":6990,"children":6991},{"style":3372},[6992],{"type":26,"value":3487},{"type":21,"tag":2072,"props":6994,"children":6995},{"style":2079},[6996],{"type":26,"value":6638},{"type":21,"tag":2072,"props":6998,"children":6999},{"style":3735},[7000],{"type":26,"value":6643},{"type":21,"tag":2072,"props":7002,"children":7003},{"style":3372},[7004],{"type":26,"value":3487},{"type":21,"tag":2072,"props":7006,"children":7007},{"style":2108},[7008],{"type":26,"value":7009},"\"Diffuser\"",{"type":21,"tag":2072,"props":7011,"children":7012},{"style":2079},[7013],{"type":26,"value":4281},{"type":21,"tag":2072,"props":7015,"children":7016},{"class":2074,"line":2155},[7017,7022,7026],{"type":21,"tag":2072,"props":7018,"children":7019},{"style":2079},[7020],{"type":26,"value":7021},"    qc.h(",{"type":21,"tag":2072,"props":7023,"children":7024},{"style":2097},[7025],{"type":26,"value":4068},{"type":21,"tag":2072,"props":7027,"children":7028},{"style":2079},[7029],{"type":26,"value":4082},{"type":21,"tag":2072,"props":7031,"children":7032},{"class":2074,"line":2178},[7033,7038,7042],{"type":21,"tag":2072,"props":7034,"children":7035},{"style":2079},[7036],{"type":26,"value":7037},"    qc.x(",{"type":21,"tag":2072,"props":7039,"children":7040},{"style":2097},[7041],{"type":26,"value":4068},{"type":21,"tag":2072,"props":7043,"children":7044},{"style":2079},[7045],{"type":26,"value":4082},{"type":21,"tag":2072,"props":7047,"children":7048},{"class":2074,"line":288},[7049,7053,7057,7061],{"type":21,"tag":2072,"props":7050,"children":7051},{"style":2079},[7052],{"type":26,"value":6757},{"type":21,"tag":2072,"props":7054,"children":7055},{"style":3372},[7056],{"type":26,"value":3973},{"type":21,"tag":2072,"props":7058,"children":7059},{"style":2097},[7060],{"type":26,"value":5228},{"type":21,"tag":2072,"props":7062,"children":7063},{"style":2079},[7064],{"type":26,"value":4281},{"type":21,"tag":2072,"props":7066,"children":7067},{"class":2074,"line":16},[7068,7072,7076,7080,7084,7088,7092,7096,7100,7104,7108],{"type":21,"tag":2072,"props":7069,"children":7070},{"style":2079},[7071],{"type":26,"value":6783},{"type":21,"tag":2072,"props":7073,"children":7074},{"style":2097},[7075],{"type":26,"value":6788},{"type":21,"tag":2072,"props":7077,"children":7078},{"style":2079},[7079],{"type":26,"value":3879},{"type":21,"tag":2072,"props":7081,"children":7082},{"style":2097},[7083],{"type":26,"value":4068},{"type":21,"tag":2072,"props":7085,"children":7086},{"style":2079},[7087],{"type":26,"value":6801},{"type":21,"tag":2072,"props":7089,"children":7090},{"style":3372},[7091],{"type":26,"value":3973},{"type":21,"tag":2072,"props":7093,"children":7094},{"style":2097},[7095],{"type":26,"value":5228},{"type":21,"tag":2072,"props":7097,"children":7098},{"style":2079},[7099],{"type":26,"value":6814},{"type":21,"tag":2072,"props":7101,"children":7102},{"style":3372},[7103],{"type":26,"value":3973},{"type":21,"tag":2072,"props":7105,"children":7106},{"style":2097},[7107],{"type":26,"value":5228},{"type":21,"tag":2072,"props":7109,"children":7110},{"style":2079},[7111],{"type":26,"value":4281},{"type":21,"tag":2072,"props":7113,"children":7114},{"class":2074,"line":366},[7115,7119,7123,7127],{"type":21,"tag":2072,"props":7116,"children":7117},{"style":2079},[7118],{"type":26,"value":6757},{"type":21,"tag":2072,"props":7120,"children":7121},{"style":3372},[7122],{"type":26,"value":3973},{"type":21,"tag":2072,"props":7124,"children":7125},{"style":2097},[7126],{"type":26,"value":5228},{"type":21,"tag":2072,"props":7128,"children":7129},{"style":2079},[7130],{"type":26,"value":4281},{"type":21,"tag":2072,"props":7132,"children":7133},{"class":2074,"line":853},[7134,7138,7142],{"type":21,"tag":2072,"props":7135,"children":7136},{"style":2079},[7137],{"type":26,"value":7037},{"type":21,"tag":2072,"props":7139,"children":7140},{"style":2097},[7141],{"type":26,"value":4068},{"type":21,"tag":2072,"props":7143,"children":7144},{"style":2079},[7145],{"type":26,"value":4082},{"type":21,"tag":2072,"props":7147,"children":7148},{"class":2074,"line":3092},[7149,7153,7157],{"type":21,"tag":2072,"props":7150,"children":7151},{"style":2079},[7152],{"type":26,"value":7021},{"type":21,"tag":2072,"props":7154,"children":7155},{"style":2097},[7156],{"type":26,"value":4068},{"type":21,"tag":2072,"props":7158,"children":7159},{"style":2079},[7160],{"type":26,"value":4082},{"type":21,"tag":2072,"props":7162,"children":7163},{"class":2074,"line":3651},[7164,7168],{"type":21,"tag":2072,"props":7165,"children":7166},{"style":3372},[7167],{"type":26,"value":3701},{"type":21,"tag":2072,"props":7169,"children":7170},{"style":2079},[7171],{"type":26,"value":6910},{"type":21,"tag":22,"props":7173,"children":7174},{},[7175,7177,7183],{"type":26,"value":7176},"Note the diffuser knows nothing about the marked state. It is the same ",{"type":21,"tag":29,"props":7178,"children":7180},{"href":7179},"\u002Fglossary\u002Fquantum-circuit",[7181],{"type":26,"value":7182},"circuit",{"type":26,"value":7184}," for every search problem. Only the oracle changes.",{"type":21,"tag":43,"props":7186,"children":7188},{"id":7187},"step-4-iterate-the-right-number-of-times",[7189],{"type":26,"value":7190},"Step 4: Iterate the Right Number of Times",{"type":21,"tag":22,"props":7192,"children":7193},{},[7194],{"type":26,"value":7195},"This is where people go wrong. The optimal count is:",{"type":21,"tag":2062,"props":7197,"children":7199},{"code":7198},"k = floor( (π\u002F4) · √(N\u002FM) )\n",[7200],{"type":21,"tag":1831,"props":7201,"children":7202},{"__ignoreMap":7},[7203],{"type":26,"value":7198},{"type":21,"tag":22,"props":7205,"children":7206},{},[7207,7209,7213],{"type":26,"value":7208},"where N = 2ⁿ and M is the number of marked states. For N = 8, M = 1: k = floor(2.22) = ",{"type":21,"tag":784,"props":7210,"children":7211},{},[7212],{"type":26,"value":2170},{"type":26,"value":237},{"type":21,"tag":22,"props":7215,"children":7216},{},[7217],{"type":26,"value":7218},"Here's the complete program:",{"type":21,"tag":2062,"props":7220,"children":7222},{"code":7221,"language":3361,"meta":7,"className":3362,"style":7},"def grover(n, marked, iterations):\n    qc = QuantumCircuit(n, n)\n    qc.h(range(n))                       # uniform superposition\n    orc, dif = oracle(n, marked), diffuser(n)\n    for _ in range(iterations):\n        qc.compose(orc, inplace=True)    # phase-flip the target\n        qc.compose(dif, inplace=True)    # amplify it\n    qc.measure(range(n), range(n))\n    return qc\n\nN = 2 ** n\noptimal = math.floor(math.pi \u002F 4 * math.sqrt(N))\nprint(f\"N = {N}, optimal iterations = {optimal}\")\n\nsim = AerSimulator()\nqc = grover(n, marked, optimal)\ncounts = sim.run(transpile(qc, sim), shots=4096).result().get_counts()\nprint(sorted(counts.items()))\n",[7223],{"type":21,"tag":1831,"props":7224,"children":7225},{"__ignoreMap":7},[7226,7243,7258,7278,7295,7319,7351,7380,7404,7415,7422,7448,7484,7544,7551,7568,7584,7618],{"type":21,"tag":2072,"props":7227,"children":7228},{"class":2074,"line":2075},[7229,7233,7238],{"type":21,"tag":2072,"props":7230,"children":7231},{"style":3372},[7232],{"type":26,"value":3471},{"type":21,"tag":2072,"props":7234,"children":7235},{"style":3474},[7236],{"type":26,"value":7237}," grover",{"type":21,"tag":2072,"props":7239,"children":7240},{"style":2079},[7241],{"type":26,"value":7242},"(n, marked, iterations):\n",{"type":21,"tag":2072,"props":7244,"children":7245},{"class":2074,"line":164},[7246,7250,7254],{"type":21,"tag":2072,"props":7247,"children":7248},{"style":2079},[7249],{"type":26,"value":6629},{"type":21,"tag":2072,"props":7251,"children":7252},{"style":3372},[7253],{"type":26,"value":3487},{"type":21,"tag":2072,"props":7255,"children":7256},{"style":2079},[7257],{"type":26,"value":3910},{"type":21,"tag":2072,"props":7259,"children":7260},{"class":2074,"line":2093},[7261,7265,7269,7274],{"type":21,"tag":2072,"props":7262,"children":7263},{"style":2079},[7264],{"type":26,"value":7021},{"type":21,"tag":2072,"props":7266,"children":7267},{"style":2097},[7268],{"type":26,"value":4068},{"type":21,"tag":2072,"props":7270,"children":7271},{"style":2079},[7272],{"type":26,"value":7273},"(n))                       ",{"type":21,"tag":2072,"props":7275,"children":7276},{"style":3985},[7277],{"type":26,"value":6544},{"type":21,"tag":2072,"props":7279,"children":7280},{"class":2074,"line":2155},[7281,7286,7290],{"type":21,"tag":2072,"props":7282,"children":7283},{"style":2079},[7284],{"type":26,"value":7285},"    orc, dif ",{"type":21,"tag":2072,"props":7287,"children":7288},{"style":3372},[7289],{"type":26,"value":3487},{"type":21,"tag":2072,"props":7291,"children":7292},{"style":2079},[7293],{"type":26,"value":7294}," oracle(n, marked), diffuser(n)\n",{"type":21,"tag":2072,"props":7296,"children":7297},{"class":2074,"line":2178},[7298,7302,7306,7310,7314],{"type":21,"tag":2072,"props":7299,"children":7300},{"style":3372},[7301],{"type":26,"value":3859},{"type":21,"tag":2072,"props":7303,"children":7304},{"style":2079},[7305],{"type":26,"value":5270},{"type":21,"tag":2072,"props":7307,"children":7308},{"style":3372},[7309],{"type":26,"value":3869},{"type":21,"tag":2072,"props":7311,"children":7312},{"style":2097},[7313],{"type":26,"value":3874},{"type":21,"tag":2072,"props":7315,"children":7316},{"style":2079},[7317],{"type":26,"value":7318},"(iterations):\n",{"type":21,"tag":2072,"props":7320,"children":7321},{"class":2074,"line":288},[7322,7327,7332,7336,7341,7346],{"type":21,"tag":2072,"props":7323,"children":7324},{"style":2079},[7325],{"type":26,"value":7326},"        qc.compose(orc, ",{"type":21,"tag":2072,"props":7328,"children":7329},{"style":3735},[7330],{"type":26,"value":7331},"inplace",{"type":21,"tag":2072,"props":7333,"children":7334},{"style":3372},[7335],{"type":26,"value":3487},{"type":21,"tag":2072,"props":7337,"children":7338},{"style":2097},[7339],{"type":26,"value":7340},"True",{"type":21,"tag":2072,"props":7342,"children":7343},{"style":2079},[7344],{"type":26,"value":7345},")    ",{"type":21,"tag":2072,"props":7347,"children":7348},{"style":3985},[7349],{"type":26,"value":7350},"# phase-flip the target\n",{"type":21,"tag":2072,"props":7352,"children":7353},{"class":2074,"line":16},[7354,7359,7363,7367,7371,7375],{"type":21,"tag":2072,"props":7355,"children":7356},{"style":2079},[7357],{"type":26,"value":7358},"        qc.compose(dif, ",{"type":21,"tag":2072,"props":7360,"children":7361},{"style":3735},[7362],{"type":26,"value":7331},{"type":21,"tag":2072,"props":7364,"children":7365},{"style":3372},[7366],{"type":26,"value":3487},{"type":21,"tag":2072,"props":7368,"children":7369},{"style":2097},[7370],{"type":26,"value":7340},{"type":21,"tag":2072,"props":7372,"children":7373},{"style":2079},[7374],{"type":26,"value":7345},{"type":21,"tag":2072,"props":7376,"children":7377},{"style":3985},[7378],{"type":26,"value":7379},"# amplify it\n",{"type":21,"tag":2072,"props":7381,"children":7382},{"class":2074,"line":366},[7383,7388,7392,7396,7400],{"type":21,"tag":2072,"props":7384,"children":7385},{"style":2079},[7386],{"type":26,"value":7387},"    qc.measure(",{"type":21,"tag":2072,"props":7389,"children":7390},{"style":2097},[7391],{"type":26,"value":4068},{"type":21,"tag":2072,"props":7393,"children":7394},{"style":2079},[7395],{"type":26,"value":4073},{"type":21,"tag":2072,"props":7397,"children":7398},{"style":2097},[7399],{"type":26,"value":4068},{"type":21,"tag":2072,"props":7401,"children":7402},{"style":2079},[7403],{"type":26,"value":4082},{"type":21,"tag":2072,"props":7405,"children":7406},{"class":2074,"line":853},[7407,7411],{"type":21,"tag":2072,"props":7408,"children":7409},{"style":3372},[7410],{"type":26,"value":3701},{"type":21,"tag":2072,"props":7412,"children":7413},{"style":2079},[7414],{"type":26,"value":6910},{"type":21,"tag":2072,"props":7416,"children":7417},{"class":2074,"line":3092},[7418],{"type":21,"tag":2072,"props":7419,"children":7420},{"emptyLinePlaceholder":3460},[7421],{"type":26,"value":3463},{"type":21,"tag":2072,"props":7423,"children":7424},{"class":2074,"line":3651},[7425,7430,7434,7438,7443],{"type":21,"tag":2072,"props":7426,"children":7427},{"style":2079},[7428],{"type":26,"value":7429},"N ",{"type":21,"tag":2072,"props":7431,"children":7432},{"style":3372},[7433],{"type":26,"value":3487},{"type":21,"tag":2072,"props":7435,"children":7436},{"style":2097},[7437],{"type":26,"value":5513},{"type":21,"tag":2072,"props":7439,"children":7440},{"style":3372},[7441],{"type":26,"value":7442}," **",{"type":21,"tag":2072,"props":7444,"children":7445},{"style":2079},[7446],{"type":26,"value":7447}," n\n",{"type":21,"tag":2072,"props":7449,"children":7450},{"class":2074,"line":2616},[7451,7456,7460,7465,7469,7474,7479],{"type":21,"tag":2072,"props":7452,"children":7453},{"style":2079},[7454],{"type":26,"value":7455},"optimal ",{"type":21,"tag":2072,"props":7457,"children":7458},{"style":3372},[7459],{"type":26,"value":3487},{"type":21,"tag":2072,"props":7461,"children":7462},{"style":2079},[7463],{"type":26,"value":7464}," math.floor(math.pi ",{"type":21,"tag":2072,"props":7466,"children":7467},{"style":3372},[7468],{"type":26,"value":1926},{"type":21,"tag":2072,"props":7470,"children":7471},{"style":2097},[7472],{"type":26,"value":7473}," 4",{"type":21,"tag":2072,"props":7475,"children":7476},{"style":3372},[7477],{"type":26,"value":7478}," *",{"type":21,"tag":2072,"props":7480,"children":7481},{"style":2079},[7482],{"type":26,"value":7483}," math.sqrt(N))\n",{"type":21,"tag":2072,"props":7485,"children":7486},{"class":2074,"line":3695},[7487,7491,7495,7499,7504,7508,7513,7517,7522,7526,7531,7535,7540],{"type":21,"tag":2072,"props":7488,"children":7489},{"style":2097},[7490],{"type":26,"value":4614},{"type":21,"tag":2072,"props":7492,"children":7493},{"style":2079},[7494],{"type":26,"value":3879},{"type":21,"tag":2072,"props":7496,"children":7497},{"style":3372},[7498],{"type":26,"value":3938},{"type":21,"tag":2072,"props":7500,"children":7501},{"style":2108},[7502],{"type":26,"value":7503},"\"N = ",{"type":21,"tag":2072,"props":7505,"children":7506},{"style":2097},[7507],{"type":26,"value":3948},{"type":21,"tag":2072,"props":7509,"children":7510},{"style":2079},[7511],{"type":26,"value":7512},"N",{"type":21,"tag":2072,"props":7514,"children":7515},{"style":2097},[7516],{"type":26,"value":3958},{"type":21,"tag":2072,"props":7518,"children":7519},{"style":2108},[7520],{"type":26,"value":7521},", optimal iterations = ",{"type":21,"tag":2072,"props":7523,"children":7524},{"style":2097},[7525],{"type":26,"value":3948},{"type":21,"tag":2072,"props":7527,"children":7528},{"style":2079},[7529],{"type":26,"value":7530},"optimal",{"type":21,"tag":2072,"props":7532,"children":7533},{"style":2097},[7534],{"type":26,"value":3958},{"type":21,"tag":2072,"props":7536,"children":7537},{"style":2108},[7538],{"type":26,"value":7539},"\"",{"type":21,"tag":2072,"props":7541,"children":7542},{"style":2079},[7543],{"type":26,"value":4281},{"type":21,"tag":2072,"props":7545,"children":7546},{"class":2074,"line":3709},[7547],{"type":21,"tag":2072,"props":7548,"children":7549},{"emptyLinePlaceholder":3460},[7550],{"type":26,"value":3463},{"type":21,"tag":2072,"props":7552,"children":7553},{"class":2074,"line":3717},[7554,7559,7563],{"type":21,"tag":2072,"props":7555,"children":7556},{"style":2079},[7557],{"type":26,"value":7558},"sim ",{"type":21,"tag":2072,"props":7560,"children":7561},{"style":3372},[7562],{"type":26,"value":3487},{"type":21,"tag":2072,"props":7564,"children":7565},{"style":2079},[7566],{"type":26,"value":7567}," AerSimulator()\n",{"type":21,"tag":2072,"props":7569,"children":7570},{"class":2074,"line":3750},[7571,7575,7579],{"type":21,"tag":2072,"props":7572,"children":7573},{"style":2079},[7574],{"type":26,"value":6514},{"type":21,"tag":2072,"props":7576,"children":7577},{"style":3372},[7578],{"type":26,"value":3487},{"type":21,"tag":2072,"props":7580,"children":7581},{"style":2079},[7582],{"type":26,"value":7583}," grover(n, marked, optimal)\n",{"type":21,"tag":2072,"props":7585,"children":7586},{"class":2074,"line":3769},[7587,7592,7596,7601,7605,7609,7614],{"type":21,"tag":2072,"props":7588,"children":7589},{"style":2079},[7590],{"type":26,"value":7591},"counts ",{"type":21,"tag":2072,"props":7593,"children":7594},{"style":3372},[7595],{"type":26,"value":3487},{"type":21,"tag":2072,"props":7597,"children":7598},{"style":2079},[7599],{"type":26,"value":7600}," sim.run(transpile(qc, sim), ",{"type":21,"tag":2072,"props":7602,"children":7603},{"style":3735},[7604],{"type":26,"value":3226},{"type":21,"tag":2072,"props":7606,"children":7607},{"style":3372},[7608],{"type":26,"value":3487},{"type":21,"tag":2072,"props":7610,"children":7611},{"style":2097},[7612],{"type":26,"value":7613},"4096",{"type":21,"tag":2072,"props":7615,"children":7616},{"style":2079},[7617],{"type":26,"value":4409},{"type":21,"tag":2072,"props":7619,"children":7620},{"class":2074,"line":3777},[7621,7625,7629,7634],{"type":21,"tag":2072,"props":7622,"children":7623},{"style":2097},[7624],{"type":26,"value":4614},{"type":21,"tag":2072,"props":7626,"children":7627},{"style":2079},[7628],{"type":26,"value":3879},{"type":21,"tag":2072,"props":7630,"children":7631},{"style":2097},[7632],{"type":26,"value":7633},"sorted",{"type":21,"tag":2072,"props":7635,"children":7636},{"style":2079},[7637],{"type":26,"value":7638},"(counts.items()))\n",{"type":21,"tag":22,"props":7640,"children":7641},{},[7642],{"type":26,"value":7643},"Real output from this exact code (Qiskit 2.5, Aer 0.17):",{"type":21,"tag":2062,"props":7645,"children":7647},{"code":7646},"N = 8, optimal iterations = 2\n[('000', 35), ('001', 34), ('010', 33), ('011', 27),\n ('100', 33), ('101', 3866), ('110', 35), ('111', 33)]\n",[7648],{"type":21,"tag":1831,"props":7649,"children":7650},{"__ignoreMap":7},[7651],{"type":26,"value":7646},{"type":21,"tag":22,"props":7653,"children":7654},{},[7655,7657,7662],{"type":26,"value":7656},"94.4% on ",{"type":21,"tag":1831,"props":7658,"children":7660},{"className":7659},[],[7661],{"type":26,"value":6936},{"type":26,"value":7663},", versus 12.5% by chance. Two oracle calls where classical search would need 4.5 on average.",{"type":21,"tag":43,"props":7665,"children":7667},{"id":7666},"the-mistake-more-iterations-make-it-worse",[7668],{"type":26,"value":7669},"The Mistake: More Iterations Make It Worse",{"type":21,"tag":22,"props":7671,"children":7672},{},[7673,7675,7680],{"type":26,"value":7674},"The intuition \"more amplification is better\" is wrong, and it's the single biggest trap in Grover's algorithm. Each iteration rotates the state by a ",{"type":21,"tag":784,"props":7676,"children":7677},{},[7678],{"type":26,"value":7679},"fixed",{"type":26,"value":7681}," angle θ where sin(θ\u002F2) = √(M\u002FN). After the optimal number of rounds you're aligned with the target. Keep going and you rotate straight past it, back down toward the unmarked states, and eventually back to where you started. Success probability oscillates as sin²((2k+1)·θ\u002F2).",{"type":21,"tag":22,"props":7683,"children":7684},{},[7685],{"type":26,"value":7686},"Loop the iteration count and watch. Measured counts over 4096 shots each:",{"type":21,"tag":2062,"props":7688,"children":7690},{"code":7689},"iters=0  P(101)=0.127   \u003C- uniform, no better than guessing\niters=1  P(101)=0.779\niters=2  P(101)=0.944   \u003C- optimal\niters=3  P(101)=0.320   \u003C- overshooting\niters=4  P(101)=0.013   \u003C- worse than random guessing!\niters=5  P(101)=0.556\niters=6  P(101)=1.000   \u003C- period brings it back around\niters=7  P(101)=0.586\n",[7691],{"type":21,"tag":1831,"props":7692,"children":7693},{"__ignoreMap":7},[7694],{"type":26,"value":7689},{"type":21,"tag":22,"props":7696,"children":7697},{},[7698,7700,7705],{"type":26,"value":7699},"Four iterations gives you a 1.3% success rate. You did ",{"type":21,"tag":103,"props":7701,"children":7702},{},[7703],{"type":26,"value":7704},"twice",{"type":26,"value":7706}," the optimal work and ended up nine times worse than doing nothing at all. This is not noise or a bug. It is exactly what the math says should happen, and it's the reason you must compute k in advance rather than \"running it a while\".",{"type":21,"tag":22,"props":7708,"children":7709},{},[7710,7712,7717],{"type":26,"value":7711},"The awkward corollary: computing k requires knowing M, the number of solutions. If you don't know how many marked states exist, you need ",{"type":21,"tag":784,"props":7713,"children":7714},{},[7715],{"type":26,"value":7716},"quantum counting",{"type":26,"value":7718}," (an amplitude-estimation routine) first, or you use randomized iteration counts, which costs you a constant factor. Textbook presentations tend to skip this.",{"type":21,"tag":43,"props":7720,"children":7722},{"id":7721},"what-the-speedup-buys-you",[7723],{"type":26,"value":7724},"What the Speedup Buys You",{"type":21,"tag":22,"props":7726,"children":7727},{},[7728],{"type":26,"value":7729},"Be precise about this, because a lot of writing on Grover is not.",{"type":21,"tag":22,"props":7731,"children":7732},{},[7733,7738,7740,7746],{"type":21,"tag":784,"props":7734,"children":7735},{},[7736],{"type":26,"value":7737},"It is quadratic, not exponential.",{"type":26,"value":7739}," √N versus N. ",{"type":21,"tag":29,"props":7741,"children":7743},{"href":7742},"\u002Fresearch\u002Fshor-factoring-1994",[7744],{"type":26,"value":7745},"Shor's factoring algorithm",{"type":26,"value":7747}," is exponential. That's a categorically different thing. A quadratic speedup is real and provably optimal (no quantum algorithm beats √N for unstructured search), but it is fragile: error correction's constant-factor overhead often eats it entirely, and that overhead is substantial.",{"type":21,"tag":22,"props":7749,"children":7750},{},[7751,7756],{"type":21,"tag":784,"props":7752,"children":7753},{},[7754],{"type":26,"value":7755},"It does not make NP-hard problems easy.",{"type":26,"value":7757}," Apply Grover to brute-force SAT and go from 2ⁿ to 2^(n\u002F2). That's a genuine improvement, and it is also still exponential. NP-hard problems remain NP-hard. Real SAT solvers use clause learning and structure that Grover, by definition, cannot exploit. That is why classical solvers routinely handle instances with millions of variables.",{"type":21,"tag":22,"props":7759,"children":7760},{},[7761,7766,7768,7773,7775,7780],{"type":21,"tag":784,"props":7762,"children":7763},{},[7764],{"type":26,"value":7765},"The \"database search\" framing is misleading.",{"type":26,"value":7767}," Grover needs an ",{"type":21,"tag":103,"props":7769,"children":7770},{},[7771],{"type":26,"value":7772},"oracle",{"type":26,"value":7774}," (a circuit that recognizes the answer), not a stored database. If you had N records in memory, you would first need to load them into quantum superposition, which costs O(N) and destroys the speedup outright. Grover is useful when the marked item is ",{"type":21,"tag":103,"props":7776,"children":7777},{},[7778],{"type":26,"value":7779},"defined by a computable property",{"type":26,"value":7781}," (this key decrypts the ciphertext, this input hashes to that digest) rather than looked up in a table.",{"type":21,"tag":22,"props":7783,"children":7784},{},[7785,7787,7793],{"type":26,"value":7786},"The real applications: cryptanalysis (Grover halves the effective key length of symmetric ciphers, which is exactly why AES-256 is recommended over AES-128 for post-quantum security), and as a subroutine inside larger algorithms via amplitude amplification. Grover's original 1996 paper is worth reading directly. See our ",{"type":21,"tag":29,"props":7788,"children":7790},{"href":7789},"\u002Fresearch\u002Fgrover-search-1996",[7791],{"type":26,"value":7792},"breakdown of the paper",{"type":26,"value":237},{"type":21,"tag":43,"props":7795,"children":7797},{"id":7796},"running-on-real-hardware",[7798],{"type":26,"value":7799},"Running on Real Hardware",{"type":21,"tag":22,"props":7801,"children":7802},{},[7803,7805,7810],{"type":26,"value":7804},"Moving to a QPU, the picture changes fast. Multi-controlled X gates are not native to any hardware. ",{"type":21,"tag":29,"props":7806,"children":7807},{"href":4884},[7808],{"type":26,"value":7809},"Transpilation",{"type":26,"value":7811}," decomposes each one into a cascade of CNOTs and single-qubit rotations, and the cost grows steeply with the number of controls. A 4-qubit MCX becomes 20+ two-qubit gates. Multiply that by two per Grover iteration, times k iterations, and depth explodes.",{"type":21,"tag":2062,"props":7813,"children":7815},{"code":7814,"language":3361,"meta":7,"className":3362,"style":7},"# Check what your circuit costs before submitting\nqc = grover(3, \"101\", 2)\nprint(qc.decompose().count_ops())\n",[7816],{"type":21,"tag":1831,"props":7817,"children":7818},{"__ignoreMap":7},[7819,7827,7868],{"type":21,"tag":2072,"props":7820,"children":7821},{"class":2074,"line":2075},[7822],{"type":21,"tag":2072,"props":7823,"children":7824},{"style":3985},[7825],{"type":26,"value":7826},"# Check what your circuit costs before submitting\n",{"type":21,"tag":2072,"props":7828,"children":7829},{"class":2074,"line":164},[7830,7834,7838,7843,7847,7851,7856,7860,7864],{"type":21,"tag":2072,"props":7831,"children":7832},{"style":2079},[7833],{"type":26,"value":6514},{"type":21,"tag":2072,"props":7835,"children":7836},{"style":3372},[7837],{"type":26,"value":3487},{"type":21,"tag":2072,"props":7839,"children":7840},{"style":2079},[7841],{"type":26,"value":7842}," grover(",{"type":21,"tag":2072,"props":7844,"children":7845},{"style":2097},[7846],{"type":26,"value":5641},{"type":21,"tag":2072,"props":7848,"children":7849},{"style":2079},[7850],{"type":26,"value":798},{"type":21,"tag":2072,"props":7852,"children":7853},{"style":2108},[7854],{"type":26,"value":7855},"\"101\"",{"type":21,"tag":2072,"props":7857,"children":7858},{"style":2079},[7859],{"type":26,"value":798},{"type":21,"tag":2072,"props":7861,"children":7862},{"style":2097},[7863],{"type":26,"value":2170},{"type":21,"tag":2072,"props":7865,"children":7866},{"style":2079},[7867],{"type":26,"value":4281},{"type":21,"tag":2072,"props":7869,"children":7870},{"class":2074,"line":2093},[7871,7875],{"type":21,"tag":2072,"props":7872,"children":7873},{"style":2097},[7874],{"type":26,"value":4614},{"type":21,"tag":2072,"props":7876,"children":7877},{"style":2079},[7878],{"type":26,"value":7879},"(qc.decompose().count_ops())\n",{"type":21,"tag":22,"props":7881,"children":7882},{},[7883,7885,7891,7893,7897],{"type":26,"value":7884},"On ",{"type":21,"tag":29,"props":7886,"children":7888},{"href":7887},"\u002Fresearch\u002Fpreskill-nisq-2018",[7889],{"type":26,"value":7890},"NISQ devices",{"type":26,"value":7892},", two-qubit gate error sits around 0.5–1%. A few hundred entangling gates and your output is indistinguishable from uniform random. Published hardware demonstrations of Grover are almost all 2–3 qubits, and they are demonstrations, not useful computations. Add ",{"type":21,"tag":29,"props":7894,"children":7895},{"href":4837},[7896],{"type":26,"value":4840},{"type":26,"value":7898}," on top and you need enough samples to distinguish a modest peak from the floor.",{"type":21,"tag":22,"props":7900,"children":7901},{},[7902,7904,7909,7911,7916],{"type":26,"value":7903},"The practical advice: develop and debug on ",{"type":21,"tag":29,"props":7905,"children":7906},{"href":150},[7907],{"type":26,"value":7908},"simulators",{"type":26,"value":7910},", where you verify correctness exactly. Only move to ",{"type":21,"tag":29,"props":7912,"children":7913},{"href":590},[7914],{"type":26,"value":7915},"real hardware",{"type":26,"value":7917}," when you understand what your circuit costs in native gates, and expect degraded results.",{"type":21,"tag":43,"props":7919,"children":7921},{"id":7920},"next-steps",[7922],{"type":26,"value":7923},"Next Steps",{"type":21,"tag":7925,"props":7926,"children":7927},"ul",{},[7928,7941,7953,7974],{"type":21,"tag":6142,"props":7929,"children":7930},{},[7931,7939],{"type":21,"tag":784,"props":7932,"children":7933},{},[7934],{"type":21,"tag":29,"props":7935,"children":7936},{"href":6223},[7937],{"type":26,"value":7938},"Qiskit SDK guide",{"type":26,"value":7940},": full setup, backends, and transpiler options",{"type":21,"tag":6142,"props":7942,"children":7943},{},[7944,7951],{"type":21,"tag":784,"props":7945,"children":7946},{},[7947],{"type":21,"tag":29,"props":7948,"children":7949},{"href":1788},[7950],{"type":26,"value":2404},{"type":26,"value":7952},": the other big near-term algorithm, applied to Max-Cut",{"type":21,"tag":6142,"props":7954,"children":7955},{},[7956,7964,7966,7972],{"type":21,"tag":784,"props":7957,"children":7958},{},[7959],{"type":21,"tag":29,"props":7960,"children":7961},{"href":1206},[7962],{"type":26,"value":7963},"Compare the SDKs",{"type":26,"value":7965},": the same Grover circuit in ",{"type":21,"tag":29,"props":7967,"children":7969},{"href":7968},"\u002Fsdks\u002Fcirq",[7970],{"type":26,"value":7971},"Cirq",{"type":26,"value":7973}," or PennyLane",{"type":21,"tag":6142,"props":7975,"children":7976},{},[7977,7986,7987,7993,7994,8000],{"type":21,"tag":784,"props":7978,"children":7979},{},[7980],{"type":21,"tag":29,"props":7981,"children":7983},{"href":7982},"\u002Fglossary",[7984],{"type":26,"value":7985},"Glossary",{"type":26,"value":66},{"type":21,"tag":29,"props":7988,"children":7990},{"href":7989},"\u002Fglossary\u002Fsuperposition",[7991],{"type":26,"value":7992},"superposition",{"type":26,"value":798},{"type":21,"tag":29,"props":7995,"children":7997},{"href":7996},"\u002Fglossary\u002Fquantum-advantage",[7998],{"type":26,"value":7999},"quantum advantage",{"type":26,"value":8001},", and the rest of the vocabulary",{"type":21,"tag":2445,"props":8003,"children":8004},{},[8005],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":8007},[8008,8009,8010,8011,8012,8013,8014,8015,8016,8017],{"id":6302,"depth":164,"text":6305},{"id":6330,"depth":164,"text":6333},{"id":6376,"depth":164,"text":6379},{"id":6560,"depth":164,"text":6563},{"id":6941,"depth":164,"text":6944},{"id":7187,"depth":164,"text":7190},{"id":7666,"depth":164,"text":7669},{"id":7721,"depth":164,"text":7724},{"id":7796,"depth":164,"text":7799},{"id":7920,"depth":164,"text":7923},"content:blog:grover-algorithm-tutorial.md","blog\u002Fgrover-algorithm-tutorial.md","blog\u002Fgrover-algorithm-tutorial",{"_path":487,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8022,"description":8023,"date":3089,"author":11,"tags":8024,"readingTime":366,"body":8026,"_type":171,"_id":8479,"_source":173,"_file":8480,"_stem":8481,"_extension":176},"Logical Qubits and Fault Tolerance: What the Qubit Count Doesn't Tell You","A physical qubit is hardware. A logical qubit is an error-protected qubit built out of many of them. Understanding the difference is the fastest way to see through quantum computing headlines.",[365,15,8025],"QPU",{"type":18,"children":8027,"toc":8469},[8028,8033,8045,8051,8078,8092,8119,8125,8137,8142,8155,8175,8181,8186,8197,8210,8215,8220,8226,8238,8243,8263,8268,8274,8279,8289,8299,8321,8327,8332,8342,8352,8362,8372,8377,8383,8388,8393,8419,8439,8445,8457],{"type":21,"tag":22,"props":8029,"children":8030},{},[8031],{"type":26,"value":8032},"Every few months a press release announces a new record qubit count. Almost none of them tell you the number that decides whether the machine does anything: the error rate.",{"type":21,"tag":22,"props":8034,"children":8035},{},[8036,8038,8043],{"type":26,"value":8037},"This is not a pedantic complaint. The relationship between qubit count and computational power in quantum computing is not merely noisy. It sometimes inverts. Under the right conditions, a machine with more qubits is ",{"type":21,"tag":103,"props":8039,"children":8040},{},[8041],{"type":26,"value":8042},"worse",{"type":26,"value":8044}," than one with fewer. Understanding why requires one distinction, and once you have it, most quantum computing news becomes far easier to read.",{"type":21,"tag":43,"props":8046,"children":8048},{"id":8047},"two-things-called-qubit",[8049],{"type":26,"value":8050},"Two things called \"qubit\"",{"type":21,"tag":22,"props":8052,"children":8053},{},[8054,8056,8061,8063,8069,8071,8076],{"type":26,"value":8055},"A ",{"type":21,"tag":784,"props":8057,"children":8058},{},[8059],{"type":26,"value":8060},"physical qubit",{"type":26,"value":8062}," is a piece of hardware: a superconducting circuit on a chip, a trapped ion held in an electromagnetic field, a neutral atom in an optical tweezer. It is a real object subject to real physics, which means it drifts, absorbs stray energy, and loses its quantum state on a timescale measured in microseconds to seconds. That decay is ",{"type":21,"tag":29,"props":8064,"children":8066},{"href":8065},"\u002Fglossary\u002Fdecoherence",[8067],{"type":26,"value":8068},"decoherence",{"type":26,"value":8070},", and the ",{"type":21,"tag":29,"props":8072,"children":8073},{"href":4863},[8074],{"type":26,"value":8075},"T1 and T2 times",{"type":26,"value":8077}," that quantify it are among the few hardware specs worth reading closely.",{"type":21,"tag":22,"props":8079,"children":8080},{},[8081,8082,8090],{"type":26,"value":8055},{"type":21,"tag":784,"props":8083,"children":8084},{},[8085],{"type":21,"tag":29,"props":8086,"children":8087},{"href":874},[8088],{"type":26,"value":8089},"logical qubit",{"type":26,"value":8091}," is not hardware. It is a qubit's worth of quantum information spread across many physical qubits, arranged so that errors on individual members are detected and undone without ever measuring, and thereby destroying, the encoded state. IonQ describes logical qubits as software-defined, and that framing is a good one: the logical qubit is a construction that hardware supports rather than a thing you point to.",{"type":21,"tag":22,"props":8093,"children":8094},{},[8095,8097,8102,8104,8109,8111,8117],{"type":26,"value":8096},"The technique is ",{"type":21,"tag":29,"props":8098,"children":8099},{"href":409},[8100],{"type":26,"value":8101},"quantum error correction",{"type":26,"value":8103},", and our ",{"type":21,"tag":29,"props":8105,"children":8106},{"href":428},[8107],{"type":26,"value":8108},"companion post on QEC",{"type":26,"value":8110}," covers the mechanics: parity checks, ",{"type":21,"tag":29,"props":8112,"children":8114},{"href":8113},"\u002Fglossary\u002Fancilla-qubit",[8115],{"type":26,"value":8116},"ancilla qubits",{"type":26,"value":8118},", the surface code lattice. This post is about the accounting: what encoding costs, when it pays off, and what else fault tolerance demands beyond the encoding itself.",{"type":21,"tag":43,"props":8120,"children":8122},{"id":8121},"why-how-many-qubits-is-nearly-meaningless",[8123],{"type":26,"value":8124},"Why \"how many qubits?\" is nearly meaningless",{"type":21,"tag":22,"props":8126,"children":8127},{},[8128,8130,8135],{"type":26,"value":8129},"Here is the uncomfortable arithmetic. If your physical error rate is above the threshold of your error-correcting code, encoding does not help. The extra qubits and the extra gates needed to perform parity checks each introduce errors of their own. Add more of them and you add more noise than you remove. A headline of 1,000 physical qubits with mediocre fidelity is compatible with ",{"type":21,"tag":784,"props":8131,"children":8132},{},[8133],{"type":26,"value":8134},"zero",{"type":26,"value":8136}," logical qubits, not few, zero.",{"type":21,"tag":22,"props":8138,"children":8139},{},[8140],{"type":26,"value":8141},"Meanwhile a smaller, cleaner machine is sometimes strictly more useful. IonQ argues this point aggressively, claiming that a system of 100 physical qubits at 99.99% two-qubit gate fidelity would likely outperform a 10,000-qubit system of lower-quality qubits encoding 100 logical ones: on overhead, gate speed, universality, and energy. That's a vendor making a case for its own architecture and should be read as such, but the underlying logic is sound and widely accepted: quality compounds in a way that quantity does not.",{"type":21,"tag":22,"props":8143,"children":8144},{},[8145,8147,8153],{"type":26,"value":8146},"The compounding is the key mechanism. In a code that corrects one error, roughly speaking, halving the physical error rate quarters the logical error rate. In a code correcting two errors the same improvement gives about an eight-fold gain. IonQ makes this multiplicative argument explicitly, and it explains why hardware teams chase ",{"type":21,"tag":29,"props":8148,"children":8150},{"href":8149},"\u002Fglossary\u002Ffidelity",[8151],{"type":26,"value":8152},"fidelity",{"type":26,"value":8154}," improvements that look small in isolation. A 2x hardware win is a 4x or 8x win after encoding.",{"type":21,"tag":22,"props":8156,"children":8157},{},[8158,8160,8166,8168,8173],{"type":26,"value":8159},"This is also why single-number benchmarks keep failing the field. ",{"type":21,"tag":29,"props":8161,"children":8163},{"href":8162},"\u002Fglossary\u002Fquantum-volume",[8164],{"type":26,"value":8165},"Quantum Volume",{"type":26,"value":8167},", algorithmic qubits, gate counts: each captures a slice and hides the rest. We wrote about that measurement problem ",{"type":21,"tag":29,"props":8169,"children":8170},{"href":670},[8171],{"type":26,"value":8172},"in the context of EO 14413",{"type":26,"value":8174},", and it applies with full force here.",{"type":21,"tag":43,"props":8176,"children":8178},{"id":8177},"the-overhead-is-the-whole-story",[8179],{"type":26,"value":8180},"The overhead is the whole story",{"type":21,"tag":22,"props":8182,"children":8183},{},[8184],{"type":26,"value":8185},"How many physical qubits does one logical qubit cost? The honest answer is that it depends on two numbers you have to state together: your physical error rate and the logical error rate you're targeting.",{"type":21,"tag":22,"props":8187,"children":8188},{},[8189,8195],{"type":21,"tag":29,"props":8190,"children":8192},{"href":8191},"\u002Fresearch\u002Fshor-error-correction-1995",[8193],{"type":26,"value":8194},"Shor's 1995 code",{"type":26,"value":8196},", the first quantum error-correcting code ever written down, used nine physical qubits to protect one logical qubit against an arbitrary single-qubit error. That was a proof that the thing was possible at all. Before it, many physicists believed no-cloning made quantum computing hopeless in principle.",{"type":21,"tag":22,"props":8198,"children":8199},{},[8200,8202,8208],{"type":26,"value":8201},"Nine turned out to be optimistic for practical machines. ",{"type":21,"tag":29,"props":8203,"children":8205},{"href":8204},"\u002Fresearch\u002Fkitaev-anyons-1997",[8206],{"type":26,"value":8207},"Kitaev's 1997 work on anyons",{"type":26,"value":8209}," introduced topological codes, including the surface code, which stores information in global properties of a 2D lattice rather than in any individual site. Its great virtue is that every parity check involves only neighbouring qubits, which maps cleanly onto flat chips, and it tolerates physical error rates around 1%, high enough that real hardware plausibly reaches it.",{"type":21,"tag":22,"props":8211,"children":8212},{},[8213],{"type":26,"value":8214},"The price is scale. Surface code overhead grows with code distance, and realistic estimates for running a cryptographically relevant algorithm land at hundreds to a few thousand physical qubits per logical qubit, with total system requirements often quoted in the millions. Push your physical error rate down and that ratio falls fast. Let it drift up toward threshold and the ratio explodes. Overhead is not a fixed constant of the technology. It is a function of how good your hardware is.",{"type":21,"tag":22,"props":8216,"children":8217},{},[8218],{"type":26,"value":8219},"Newer code families are attacking the ratio directly. IonQ has promoted a bivariate bicycle variant it calls BB5, claiming an idle logical error rate around 5x10⁻⁵ using 50 physical qubits, roughly four times smaller than standard BB codes. Vendor-reported figures like that are worth tracking but not worth treating as settled until independently reproduced.",{"type":21,"tag":43,"props":8221,"children":8223},{"id":8222},"the-threshold-theorem-and-why-2024-mattered",[8224],{"type":26,"value":8225},"The threshold theorem, and why 2024 mattered",{"type":21,"tag":22,"props":8227,"children":8228},{},[8229,8231,8236],{"type":26,"value":8230},"The theoretical foundation under all of this is the ",{"type":21,"tag":784,"props":8232,"children":8233},{},[8234],{"type":26,"value":8235},"threshold theorem",{"type":26,"value":8237},". It says there exists a critical physical error rate. Below it, increasing the size of your code suppresses logical errors exponentially. You make them as small as you like by spending more qubits. Above it, the opposite: bigger codes are worse codes.",{"type":21,"tag":22,"props":8239,"children":8240},{},[8241],{"type":26,"value":8242},"For decades this was a theorem without an experiment. Every roadmap in the industry assumed the crossing was achievable. None had demonstrated it.",{"type":21,"tag":22,"props":8244,"children":8245},{},[8246,8248,8254,8256,8261],{"type":26,"value":8247},"That changed with ",{"type":21,"tag":29,"props":8249,"children":8251},{"href":8250},"\u002Fresearch\u002Fgoogle-below-threshold-2024",[8252],{"type":26,"value":8253},"Google's below-threshold result in 2024",{"type":26,"value":8255},". Running surface codes at distances 3, 5, and 7 on its 105-qubit Willow processor, the team observed each increase in code distance roughly ",{"type":21,"tag":784,"props":8257,"children":8258},{},[8259],{"type":26,"value":8260},"halving",{"type":26,"value":8262}," the logical error rate, the direction fault tolerance requires. Critically, the encoded logical qubit outlived the best individual physical qubit on the chip, which is the concrete test of whether error correction is a net win rather than an expensive way to add noise.",{"type":21,"tag":22,"props":8264,"children":8265},{},[8266],{"type":26,"value":8267},"It's hard to overstate the significance. That experiment converted large-scale quantum computing from an open physics question into a scaling and engineering problem. Engineering problems are hard, but they are a different category of hard.",{"type":21,"tag":43,"props":8269,"children":8271},{"id":8270},"different-hardware-different-arithmetic",[8272],{"type":26,"value":8273},"Different hardware, different arithmetic",{"type":21,"tag":22,"props":8275,"children":8276},{},[8277],{"type":26,"value":8278},"The threshold is not a single universal number. It depends on the code, and which codes are practical depends on your hardware's connectivity. This is where modality differences stop being trivia.",{"type":21,"tag":22,"props":8280,"children":8281},{},[8282,8287],{"type":21,"tag":784,"props":8283,"children":8284},{},[8285],{"type":26,"value":8286},"Superconducting",{"type":26,"value":8288}," processors offer fast gates (nanoseconds) and mature fabrication, but qubits interact only with their planar neighbours and fidelities are typically lower. That planar constraint is precisely what the surface code was designed around, which is why superconducting roadmaps are built on it.",{"type":21,"tag":22,"props":8290,"children":8291},{},[8292,8297],{"type":21,"tag":784,"props":8293,"children":8294},{},[8295],{"type":26,"value":8296},"Trapped ions",{"type":26,"value":8298}," invert the trade: gates are far slower (microseconds to milliseconds), but fidelities are the highest of any modality and connectivity is effectively all-to-all: any ion in a chain is entangled with any other without a chain of intervening swap operations. IonQ argues this connectivity is a structural advantage for error correction, because codes requiring non-local checks become implementable rather than prohibitively expensive, and it has claimed 99.99% physical two-qubit gate fidelity via its Oxford Ionics acquisition. Again: vendor claim, vendor benchmark conditions.",{"type":21,"tag":22,"props":8300,"children":8301},{},[8302,8304,8308,8309,8313,8315,8319],{"type":26,"value":8303},"Neither is obviously winning. Our ",{"type":21,"tag":29,"props":8305,"children":8306},{"href":590},[8307],{"type":26,"value":593},{"type":26,"value":383},{"type":21,"tag":29,"props":8310,"children":8311},{"href":1206},[8312],{"type":26,"value":1590},{"type":26,"value":8314}," go into the specifics, and the broader ",{"type":21,"tag":29,"props":8316,"children":8317},{"href":328},[8318],{"type":26,"value":331},{"type":26,"value":8320}," tracks who is betting on what. The practical takeaway for anyone learning is that connectivity and fidelity, not qubit count, are the specs that determine which error-correction strategies a machine even attempts.",{"type":21,"tag":43,"props":8322,"children":8324},{"id":8323},"encoding-is-necessary-not-sufficient",[8325],{"type":26,"value":8326},"Encoding is necessary, not sufficient",{"type":21,"tag":22,"props":8328,"children":8329},{},[8330],{"type":26,"value":8331},"A subtlety that gets lost in coverage: storing a logical qubit is the easy part of fault tolerance. Computing on one is harder. A genuinely fault-tolerant machine needs all of the following:",{"type":21,"tag":22,"props":8333,"children":8334},{},[8335,8340],{"type":21,"tag":784,"props":8336,"children":8337},{},[8338],{"type":26,"value":8339},"Fault-tolerant gate operations.",{"type":26,"value":8341}," Logical gates must be implemented so that a single physical fault cannot propagate into an uncorrectable logical error. Some gates are cheap in a given code. Others are not.",{"type":21,"tag":22,"props":8343,"children":8344},{},[8345,8350],{"type":21,"tag":784,"props":8346,"children":8347},{},[8348],{"type":26,"value":8349},"Continuous syndrome extraction.",{"type":26,"value":8351}," Parity checks run constantly, in rounds, throughout the computation. The measurement circuits are themselves noisy, so the scheme has to tolerate faults in its own error detection.",{"type":21,"tag":22,"props":8353,"children":8354},{},[8355,8360],{"type":21,"tag":784,"props":8356,"children":8357},{},[8358],{"type":26,"value":8359},"Magic state distillation.",{"type":26,"value":8361}," Surface codes give you Clifford gates relatively cheaply, but Clifford gates alone are classically simulable. Universality needs a non-Clifford gate, typically T, and those are produced by distilling noisy \"magic states\" into clean ones. Distillation factories consume a large fraction of the total qubit budget in realistic architectures.",{"type":21,"tag":22,"props":8363,"children":8364},{},[8365,8370],{"type":21,"tag":784,"props":8366,"children":8367},{},[8368],{"type":26,"value":8369},"Real-time decoding.",{"type":26,"value":8371}," Syndrome data must be interpreted and corrections applied faster than errors accumulate. This is a classical computing problem, running at microsecond latency alongside the QPU, and it's a serious engineering constraint in its own right.",{"type":21,"tag":22,"props":8373,"children":8374},{},[8375],{"type":26,"value":8376},"IonQ's framing here is useful regardless of the vendor context: a logical qubit should be characterised by several attributes together: overhead, idle logical error rate, logical gate fidelity, logical gate speed, and gate-set universality, rather than counted. A logical qubit that is stored but not usefully operated on is not much of a logical qubit.",{"type":21,"tag":43,"props":8378,"children":8380},{"id":8379},"where-the-field-stands",[8381],{"type":26,"value":8382},"Where the field stands",{"type":21,"tag":22,"props":8384,"children":8385},{},[8386],{"type":26,"value":8387},"Honest summary as of mid-2026: logical qubits are real, demonstrated, and few.",{"type":21,"tag":22,"props":8389,"children":8390},{},[8391],{"type":26,"value":8392},"Multiple groups have encoded them. Google has shown error suppression scaling in the right direction. Trapped-ion and neutral-atom teams have run algorithms on small numbers of encoded qubits. These are genuine milestones, not marketing.",{"type":21,"tag":22,"props":8394,"children":8395},{},[8396,8398,8403,8405,8410,8412,8417],{"type":26,"value":8397},"But useful fault-tolerant computation needs hundreds to thousands of logical qubits executing millions of logical operations, and that means physical qubit counts several orders of magnitude beyond anything running today, with error rates comfortably below threshold across the whole device rather than on the best-behaved corner of a chip. Most working hardware remains firmly in the ",{"type":21,"tag":29,"props":8399,"children":8400},{"href":120},[8401],{"type":26,"value":8402},"NISQ regime",{"type":26,"value":8404}," that ",{"type":21,"tag":29,"props":8406,"children":8407},{"href":7887},[8408],{"type":26,"value":8409},"Preskill named in 2018",{"type":26,"value":8411},", where ",{"type":21,"tag":29,"props":8413,"children":8414},{"href":3150},[8415],{"type":26,"value":8416},"error mitigation",{"type":26,"value":8418}," (statistical post-processing rather than true correction) is the practical tool.",{"type":21,"tag":22,"props":8420,"children":8421},{},[8422,8424,8429,8431,8437],{"type":26,"value":8423},"None of which means waiting around. The abstractions transfer: circuits, gates, measurement, and noise behave the same way whether you're on a simulator or a fault-tolerant machine a decade out. You start on ",{"type":21,"tag":29,"props":8425,"children":8426},{"href":150},[8427],{"type":26,"value":8428},"free simulators",{"type":26,"value":8430}," or real QPUs today, and the ",{"type":21,"tag":29,"props":8432,"children":8434},{"href":8433},"\u002Fcourses",[8435],{"type":26,"value":8436},"courses page",{"type":26,"value":8438}," collects structured routes in.",{"type":21,"tag":43,"props":8440,"children":8442},{"id":8441},"the-one-habit-worth-forming",[8443],{"type":26,"value":8444},"The one habit worth forming",{"type":21,"tag":22,"props":8446,"children":8447},{},[8448,8450,8455],{"type":26,"value":8449},"When you next see a qubit-count headline, ask three questions: what is the two-qubit gate fidelity, is it below the relevant threshold, and how many ",{"type":21,"tag":103,"props":8451,"children":8452},{},[8453],{"type":26,"value":8454},"logical",{"type":26,"value":8456}," qubits does that imply?",{"type":21,"tag":22,"props":8458,"children":8459},{},[8460,8462,8467],{"type":26,"value":8461},"Frequently the answer to the third is zero, and the article won't have mentioned it. Learning to notice that gap is most of what separates informed reading from press-release reading. The ",{"type":21,"tag":29,"props":8463,"children":8464},{"href":7982},[8465],{"type":26,"value":8466},"glossary",{"type":26,"value":8468}," is a decent place to build the vocabulary for it.",{"title":7,"searchDepth":164,"depth":164,"links":8470},[8471,8472,8473,8474,8475,8476,8477,8478],{"id":8047,"depth":164,"text":8050},{"id":8121,"depth":164,"text":8124},{"id":8177,"depth":164,"text":8180},{"id":8222,"depth":164,"text":8225},{"id":8270,"depth":164,"text":8273},{"id":8323,"depth":164,"text":8326},{"id":8379,"depth":164,"text":8382},{"id":8441,"depth":164,"text":8444},"content:blog:logical-qubits-fault-tolerance-explained.md","blog\u002Flogical-qubits-fault-tolerance-explained.md","blog\u002Flogical-qubits-fault-tolerance-explained",{"_path":1236,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8483,"description":8484,"date":3089,"author":11,"tags":8485,"readingTime":366,"body":8489,"_type":171,"_id":9587,"_source":173,"_file":9588,"_stem":9589,"_extension":176},"The Post-Quantum Migration Clock: Real Deadlines and How to Plan Against Them","NIST says RSA and ECC are deprecated after 2030 and disallowed after 2035. NSA's CNSA 2.0 moves faster. Here's what the published timelines require, and how to build a migration plan that survives them.",[8486,8487,8488],"Post-Quantum","Security","Cryptography",{"type":18,"children":8490,"toc":9577},[8491,8511,8524,8530,8535,8645,8650,8669,8675,8680,8710,8720,8730,8742,8747,8753,8773,8778,8804,8815,8821,8826,8869,8875,8880,9300,9312,9318,9330,9342,9392,9397,9403,9408,9517,9523,9535,9540,9573],{"type":21,"tag":22,"props":8492,"children":8493},{},[8494,8496,8502,8504,8509],{"type":26,"value":8495},"Most discussions of ",{"type":21,"tag":29,"props":8497,"children":8499},{"href":8498},"\u002Fglossary\u002Fpost-quantum-cryptography",[8500],{"type":26,"value":8501},"post-quantum cryptography",{"type":26,"value":8503}," stall at the same place: ",{"type":21,"tag":103,"props":8505,"children":8506},{},[8507],{"type":26,"value":8508},"when do we have to do this?",{"type":26,"value":8510}," The honest answer used to be \"nobody knows.\" That's no longer true. Not because anyone predicts when a cryptographically relevant quantum computer arrives, but because regulators stopped waiting for that prediction and published dates anyway.",{"type":21,"tag":22,"props":8512,"children":8513},{},[8514,8516,8522],{"type":26,"value":8515},"If you already understand what PQC is and which algorithms replace which, our ",{"type":21,"tag":29,"props":8517,"children":8519},{"href":8518},"\u002Fblog\u002Fpost-quantum-cryptography-guide",[8520],{"type":26,"value":8521},"guide to post-quantum cryptography",{"type":26,"value":8523}," covers that ground. This post is about the calendar and the project plan.",{"type":21,"tag":43,"props":8525,"children":8527},{"id":8526},"the-standards-are-settled",[8528],{"type":26,"value":8529},"The standards are settled",{"type":21,"tag":22,"props":8531,"children":8532},{},[8533],{"type":26,"value":8534},"NIST finalized three post-quantum standards on August 13, 2024, after an eight-year competition:",{"type":21,"tag":3169,"props":8536,"children":8537},{},[8538,8564],{"type":21,"tag":3173,"props":8539,"children":8540},{},[8541],{"type":21,"tag":3177,"props":8542,"children":8543},{},[8544,8549,8554,8559],{"type":21,"tag":3181,"props":8545,"children":8546},{},[8547],{"type":26,"value":8548},"Standard",{"type":21,"tag":3181,"props":8550,"children":8551},{},[8552],{"type":26,"value":8553},"Algorithm",{"type":21,"tag":3181,"props":8555,"children":8556},{},[8557],{"type":26,"value":8558},"Formerly",{"type":21,"tag":3181,"props":8560,"children":8561},{},[8562],{"type":26,"value":8563},"Replaces",{"type":21,"tag":3195,"props":8565,"children":8566},{},[8567,8593,8619],{"type":21,"tag":3177,"props":8568,"children":8569},{},[8570,8578,8583,8588],{"type":21,"tag":3202,"props":8571,"children":8572},{},[8573],{"type":21,"tag":784,"props":8574,"children":8575},{},[8576],{"type":26,"value":8577},"FIPS 203",{"type":21,"tag":3202,"props":8579,"children":8580},{},[8581],{"type":26,"value":8582},"ML-KEM",{"type":21,"tag":3202,"props":8584,"children":8585},{},[8586],{"type":26,"value":8587},"CRYSTALS-Kyber",{"type":21,"tag":3202,"props":8589,"children":8590},{},[8591],{"type":26,"value":8592},"RSA key transport, ECDH",{"type":21,"tag":3177,"props":8594,"children":8595},{},[8596,8604,8609,8614],{"type":21,"tag":3202,"props":8597,"children":8598},{},[8599],{"type":21,"tag":784,"props":8600,"children":8601},{},[8602],{"type":26,"value":8603},"FIPS 204",{"type":21,"tag":3202,"props":8605,"children":8606},{},[8607],{"type":26,"value":8608},"ML-DSA",{"type":21,"tag":3202,"props":8610,"children":8611},{},[8612],{"type":26,"value":8613},"CRYSTALS-Dilithium",{"type":21,"tag":3202,"props":8615,"children":8616},{},[8617],{"type":26,"value":8618},"ECDSA, RSA-PSS signatures",{"type":21,"tag":3177,"props":8620,"children":8621},{},[8622,8630,8635,8640],{"type":21,"tag":3202,"props":8623,"children":8624},{},[8625],{"type":21,"tag":784,"props":8626,"children":8627},{},[8628],{"type":26,"value":8629},"FIPS 205",{"type":21,"tag":3202,"props":8631,"children":8632},{},[8633],{"type":26,"value":8634},"SLH-DSA",{"type":21,"tag":3202,"props":8636,"children":8637},{},[8638],{"type":26,"value":8639},"SPHINCS+",{"type":21,"tag":3202,"props":8641,"children":8642},{},[8643],{"type":26,"value":8644},"Conservative hash-based signing",{"type":21,"tag":22,"props":8646,"children":8647},{},[8648],{"type":26,"value":8649},"Use the FIPS names in procurement documents and internal specs. \"Kyber\" and \"Dilithium\" refer to the competition submissions, which differ in small but real ways from the standardized versions. A vendor claiming \"Kyber support\" does or doesn't mean FIPS 203 compliance, and that ambiguity has already caused interop problems.",{"type":21,"tag":22,"props":8651,"children":8652},{},[8653,8655,8660,8662,8667],{"type":26,"value":8654},"Two more are in flight. NIST selected ",{"type":21,"tag":784,"props":8656,"children":8657},{},[8658],{"type":26,"value":8659},"HQC",{"type":26,"value":8661}," in March 2025 as a code-based backup KEM with different mathematical foundations from ML-KEM, with a draft standard expected around 2026 and finalization targeted for 2027. ",{"type":21,"tag":784,"props":8663,"children":8664},{},[8665],{"type":26,"value":8666},"FN-DSA",{"type":26,"value":8668}," (FALCON) remains slated for standardization as a compact-signature option. Neither should hold up your migration. ML-KEM and ML-DSA are the workhorses.",{"type":21,"tag":43,"props":8670,"children":8672},{"id":8671},"the-deadlines-that-exist-on-paper",[8673],{"type":26,"value":8674},"The deadlines that exist on paper",{"type":21,"tag":22,"props":8676,"children":8677},{},[8678],{"type":26,"value":8679},"Three separate sets of dates matter, and they don't line up.",{"type":21,"tag":22,"props":8681,"children":8682},{},[8683,8688,8690,8695,8697,8702,8703,8708],{"type":21,"tag":784,"props":8684,"children":8685},{},[8686],{"type":26,"value":8687},"NIST IR 8547",{"type":26,"value":8689}," (",{"type":21,"tag":103,"props":8691,"children":8692},{},[8693],{"type":26,"value":8694},"Transition to Post-Quantum Cryptography Standards",{"type":26,"value":8696},", initial public draft November 2024) is the broadest. It proposes that RSA, ECDSA, EdDSA, ECDH, DSA, and finite-field Diffie-Hellman become ",{"type":21,"tag":784,"props":8698,"children":8699},{},[8700],{"type":26,"value":8701},"deprecated after 2030",{"type":26,"value":383},{"type":21,"tag":784,"props":8704,"children":8705},{},[8706],{"type":26,"value":8707},"disallowed after 2035",{"type":26,"value":8709},". Deprecated means continued use requires the data owner to document a risk acceptance. Disallowed means the option to accept that risk goes away.",{"type":21,"tag":22,"props":8711,"children":8712},{},[8713,8718],{"type":21,"tag":784,"props":8714,"children":8715},{},[8716],{"type":26,"value":8717},"NSA's CNSA 2.0",{"type":26,"value":8719}," applies to National Security Systems and moves faster, with a staged schedule by product category. As published and updated through May 2025, software and firmware signing is the leading edge (exclusive use of CNSA 2.0 algorithms from January 1, 2027), with networking equipment following around 2030, and operating systems, custom applications, and cloud services around 2033. Full quantum resistance across NSS is expected by 2035.",{"type":21,"tag":22,"props":8721,"children":8722},{},[8723,8728],{"type":21,"tag":784,"props":8724,"children":8725},{},[8726],{"type":26,"value":8727},"OMB M-23-02",{"type":26,"value":8729}," (November 2022) is the one that already bit. It directed federal agencies to inventory cryptography on prioritized systems, produce funding estimates, and report annually, with full federal migration targeted for 2035.",{"type":21,"tag":22,"props":8731,"children":8732},{},[8733,8735,8740],{"type":26,"value":8734},"Two things follow from this. First, if you sell to the US federal government, especially anything involving signed firmware, your effective deadline is ",{"type":21,"tag":784,"props":8736,"children":8737},{},[8738],{"type":26,"value":8739},"2027, not 2035",{"type":26,"value":8741},". Second, even for purely commercial work, NIST's deprecation calendar becomes the de facto compliance baseline the moment auditors and insurers start citing it, which historically happens well before the date itself.",{"type":21,"tag":22,"props":8743,"children":8744},{},[8745],{"type":26,"value":8746},"Note that none of these dates are predictions about quantum hardware. They are engineering schedules working backward from the migration itself taking a decade.",{"type":21,"tag":43,"props":8748,"children":8750},{"id":8749},"why-the-threat-model-has-no-start-date",[8751],{"type":26,"value":8752},"Why the threat model has no start date",{"type":21,"tag":22,"props":8754,"children":8755},{},[8756,8758,8763,8765,8771],{"type":26,"value":8757},"The reason a 2030 deadline is defensible even though nobody expects a code-breaking quantum computer by 2030 is ",{"type":21,"tag":784,"props":8759,"children":8760},{},[8761],{"type":26,"value":8762},"harvest now, decrypt later",{"type":26,"value":8764},". An adversary records encrypted traffic today and decrypts it whenever ",{"type":21,"tag":29,"props":8766,"children":8768},{"href":8767},"\u002Fglossary\u002Fshor-algorithm",[8769],{"type":26,"value":8770},"Shor's algorithm",{"type":26,"value":8772}," becomes runnable at scale. Any data whose confidentiality must outlive that moment is already exposed.",{"type":21,"tag":22,"props":8774,"children":8775},{},[8776],{"type":26,"value":8777},"The practical calculation is Mosca's inequality: if the time your data must stay secret plus the time your migration takes exceeds the time until a capable quantum computer exists, you are already late. For medical records with a 50-year sensitivity horizon and a five-year migration, you needed to start before the standards existed.",{"type":21,"tag":22,"props":8779,"children":8780},{},[8781,8783,8788,8790,8794,8796,8802],{"type":26,"value":8782},"What makes this hard to plan against is that the hardware estimate keeps moving. ",{"type":21,"tag":29,"props":8784,"children":8785},{"href":7742},[8786],{"type":26,"value":8787},"Shor's 1994 paper",{"type":26,"value":8789}," established the algorithm. The resource question (how many ",{"type":21,"tag":29,"props":8791,"children":8792},{"href":874},[8793],{"type":26,"value":877},{"type":26,"value":8795}," and how many gates to break RSA-2048) has been re-estimated downward repeatedly as compilation techniques improved. Recent work ",{"type":21,"tag":29,"props":8797,"children":8799},{"href":8798},"\u002Fresearch\u002Fshor-lean-formalization-2026",[8800],{"type":26,"value":8801},"machine-checking those estimates in Lean",{"type":26,"value":8803}," is valuable precisely because it removes hand-waving from a number that security planning depends on. The estimates remain far beyond current devices, but \"far\" has been shrinking, and the direction of travel is one-way.",{"type":21,"tag":22,"props":8805,"children":8806},{},[8807,8809,8813],{"type":26,"value":8808},"For the record: symmetric cryptography is fine. ",{"type":21,"tag":29,"props":8810,"children":8811},{"href":6289},[8812],{"type":26,"value":6292},{"type":26,"value":8814}," gives only a quadratic speedup, so AES-256 retains 128-bit effective security. The migration is an asymmetric-crypto migration.",{"type":21,"tag":43,"props":8816,"children":8818},{"id":8817},"why-this-takes-years",[8819],{"type":26,"value":8820},"Why this takes years",{"type":21,"tag":22,"props":8822,"children":8823},{},[8824],{"type":26,"value":8825},"Migration is slow for reasons that have nothing to do with the algorithms:",{"type":21,"tag":7925,"props":8827,"children":8828},{},[8829,8839,8849,8859],{"type":21,"tag":6142,"props":8830,"children":8831},{},[8832,8837],{"type":21,"tag":784,"props":8833,"children":8834},{},[8835],{"type":26,"value":8836},"You don't know where your crypto is.",{"type":26,"value":8838}," It's in TLS terminators, JWT libraries, database TDE, backup encryption, VPN tunnels, code-signing pipelines, HSMs, IoT firmware, and vendor SDKs you don't control.",{"type":21,"tag":6142,"props":8840,"children":8841},{},[8842,8847],{"type":21,"tag":784,"props":8843,"children":8844},{},[8845],{"type":26,"value":8846},"Key and signature sizes change.",{"type":26,"value":8848}," ML-DSA public keys are roughly 1.3 KB versus 32 bytes for Ed25519, and SLH-DSA signatures sometimes run tens of kilobytes. Protocols with fixed-size fields, embedded devices with constrained flash, and certificate chains with MTU assumptions all break.",{"type":21,"tag":6142,"props":8850,"children":8851},{},[8852,8857],{"type":21,"tag":784,"props":8853,"children":8854},{},[8855],{"type":26,"value":8856},"Both endpoints must upgrade.",{"type":26,"value":8858}," You migrate at the speed of your slowest counterparty.",{"type":21,"tag":6142,"props":8860,"children":8861},{},[8862,8867],{"type":21,"tag":784,"props":8863,"children":8864},{},[8865],{"type":26,"value":8866},"Hardware has a decade-long tail.",{"type":26,"value":8868}," HSMs and embedded devices deployed today will still be running in 2035.",{"type":21,"tag":43,"props":8870,"children":8872},{"id":8871},"inventory-first-a-starting-point",[8873],{"type":26,"value":8874},"Inventory first: a starting point",{"type":21,"tag":22,"props":8876,"children":8877},{},[8878],{"type":26,"value":8879},"You cannot migrate an unknown. Start with automated discovery of what's negotiated in production, not what your architecture diagram claims.",{"type":21,"tag":2062,"props":8881,"children":8885},{"className":8882,"code":8883,"language":8884,"meta":7,"style":7},"language-bash shiki shiki-themes github-dark","# What key exchange and signature algorithms is this endpoint using?\nopenssl s_client -connect example.com:443 -brief \u003C\u002Fdev\u002Fnull 2>&1 \\\n  | grep -Ei 'protocol|ciphersuite|group|peer signature'\n\n# Does the endpoint support hybrid post-quantum key exchange?\n# Requires OpenSSL 3.5+, which ships ML-KEM natively.\nopenssl s_client -connect example.com:443 \\\n  -groups X25519MLKEM768 \u003C\u002Fdev\u002Fnull 2>&1 | grep -i 'group\\|error'\n\n# Inventory certificate signature algorithms across an internal fleet\nwhile read -r host; do\n  alg=$(echo | openssl s_client -connect \"$host:443\" 2>\u002Fdev\u002Fnull \\\n    | openssl x509 -noout -text 2>\u002Fdev\u002Fnull \\\n    | awk '\u002FSignature Algorithm\u002F {print $3; exit}')\n  printf '%s\\t%s\\n' \"$host\" \"${alg:-UNREACHABLE}\"\ndone \u003C hosts.txt\n","bash",[8886],{"type":21,"tag":1831,"props":8887,"children":8888},{"__ignoreMap":7},[8889,8897,8945,8968,8975,8983,8991,9014,9058,9065,9073,9106,9173,9212,9233,9283],{"type":21,"tag":2072,"props":8890,"children":8891},{"class":2074,"line":2075},[8892],{"type":21,"tag":2072,"props":8893,"children":8894},{"style":3985},[8895],{"type":26,"value":8896},"# What key exchange and signature algorithms is this endpoint using?\n",{"type":21,"tag":2072,"props":8898,"children":8899},{"class":2074,"line":164},[8900,8905,8910,8915,8920,8925,8930,8935,8940],{"type":21,"tag":2072,"props":8901,"children":8902},{"style":3474},[8903],{"type":26,"value":8904},"openssl",{"type":21,"tag":2072,"props":8906,"children":8907},{"style":2108},[8908],{"type":26,"value":8909}," s_client",{"type":21,"tag":2072,"props":8911,"children":8912},{"style":2097},[8913],{"type":26,"value":8914}," -connect",{"type":21,"tag":2072,"props":8916,"children":8917},{"style":2108},[8918],{"type":26,"value":8919}," example.com:443",{"type":21,"tag":2072,"props":8921,"children":8922},{"style":2097},[8923],{"type":26,"value":8924}," -brief",{"type":21,"tag":2072,"props":8926,"children":8927},{"style":3372},[8928],{"type":26,"value":8929}," \u003C",{"type":21,"tag":2072,"props":8931,"children":8932},{"style":2108},[8933],{"type":26,"value":8934},"\u002Fdev\u002Fnull",{"type":21,"tag":2072,"props":8936,"children":8937},{"style":3372},[8938],{"type":26,"value":8939}," 2>&1",{"type":21,"tag":2072,"props":8941,"children":8942},{"style":2097},[8943],{"type":26,"value":8944}," \\\n",{"type":21,"tag":2072,"props":8946,"children":8947},{"class":2074,"line":2093},[8948,8953,8958,8963],{"type":21,"tag":2072,"props":8949,"children":8950},{"style":3372},[8951],{"type":26,"value":8952},"  |",{"type":21,"tag":2072,"props":8954,"children":8955},{"style":3474},[8956],{"type":26,"value":8957}," grep",{"type":21,"tag":2072,"props":8959,"children":8960},{"style":2097},[8961],{"type":26,"value":8962}," -Ei",{"type":21,"tag":2072,"props":8964,"children":8965},{"style":2108},[8966],{"type":26,"value":8967}," 'protocol|ciphersuite|group|peer signature'\n",{"type":21,"tag":2072,"props":8969,"children":8970},{"class":2074,"line":2155},[8971],{"type":21,"tag":2072,"props":8972,"children":8973},{"emptyLinePlaceholder":3460},[8974],{"type":26,"value":3463},{"type":21,"tag":2072,"props":8976,"children":8977},{"class":2074,"line":2178},[8978],{"type":21,"tag":2072,"props":8979,"children":8980},{"style":3985},[8981],{"type":26,"value":8982},"# Does the endpoint support hybrid post-quantum key exchange?\n",{"type":21,"tag":2072,"props":8984,"children":8985},{"class":2074,"line":288},[8986],{"type":21,"tag":2072,"props":8987,"children":8988},{"style":3985},[8989],{"type":26,"value":8990},"# Requires OpenSSL 3.5+, which ships ML-KEM natively.\n",{"type":21,"tag":2072,"props":8992,"children":8993},{"class":2074,"line":16},[8994,8998,9002,9006,9010],{"type":21,"tag":2072,"props":8995,"children":8996},{"style":3474},[8997],{"type":26,"value":8904},{"type":21,"tag":2072,"props":8999,"children":9000},{"style":2108},[9001],{"type":26,"value":8909},{"type":21,"tag":2072,"props":9003,"children":9004},{"style":2097},[9005],{"type":26,"value":8914},{"type":21,"tag":2072,"props":9007,"children":9008},{"style":2108},[9009],{"type":26,"value":8919},{"type":21,"tag":2072,"props":9011,"children":9012},{"style":2097},[9013],{"type":26,"value":8944},{"type":21,"tag":2072,"props":9015,"children":9016},{"class":2074,"line":366},[9017,9022,9027,9031,9035,9039,9044,9048,9053],{"type":21,"tag":2072,"props":9018,"children":9019},{"style":2097},[9020],{"type":26,"value":9021},"  -groups",{"type":21,"tag":2072,"props":9023,"children":9024},{"style":2108},[9025],{"type":26,"value":9026}," X25519MLKEM768",{"type":21,"tag":2072,"props":9028,"children":9029},{"style":3372},[9030],{"type":26,"value":8929},{"type":21,"tag":2072,"props":9032,"children":9033},{"style":2108},[9034],{"type":26,"value":8934},{"type":21,"tag":2072,"props":9036,"children":9037},{"style":3372},[9038],{"type":26,"value":8939},{"type":21,"tag":2072,"props":9040,"children":9041},{"style":3372},[9042],{"type":26,"value":9043}," |",{"type":21,"tag":2072,"props":9045,"children":9046},{"style":3474},[9047],{"type":26,"value":8957},{"type":21,"tag":2072,"props":9049,"children":9050},{"style":2097},[9051],{"type":26,"value":9052}," -i",{"type":21,"tag":2072,"props":9054,"children":9055},{"style":2108},[9056],{"type":26,"value":9057}," 'group\\|error'\n",{"type":21,"tag":2072,"props":9059,"children":9060},{"class":2074,"line":853},[9061],{"type":21,"tag":2072,"props":9062,"children":9063},{"emptyLinePlaceholder":3460},[9064],{"type":26,"value":3463},{"type":21,"tag":2072,"props":9066,"children":9067},{"class":2074,"line":3092},[9068],{"type":21,"tag":2072,"props":9069,"children":9070},{"style":3985},[9071],{"type":26,"value":9072},"# Inventory certificate signature algorithms across an internal fleet\n",{"type":21,"tag":2072,"props":9074,"children":9075},{"class":2074,"line":3651},[9076,9081,9086,9091,9096,9101],{"type":21,"tag":2072,"props":9077,"children":9078},{"style":3372},[9079],{"type":26,"value":9080},"while",{"type":21,"tag":2072,"props":9082,"children":9083},{"style":2097},[9084],{"type":26,"value":9085}," read",{"type":21,"tag":2072,"props":9087,"children":9088},{"style":2097},[9089],{"type":26,"value":9090}," -r",{"type":21,"tag":2072,"props":9092,"children":9093},{"style":2108},[9094],{"type":26,"value":9095}," host",{"type":21,"tag":2072,"props":9097,"children":9098},{"style":2079},[9099],{"type":26,"value":9100},"; ",{"type":21,"tag":2072,"props":9102,"children":9103},{"style":3372},[9104],{"type":26,"value":9105},"do\n",{"type":21,"tag":2072,"props":9107,"children":9108},{"class":2074,"line":2616},[9109,9114,9118,9123,9128,9132,9137,9141,9145,9150,9155,9160,9165,9169],{"type":21,"tag":2072,"props":9110,"children":9111},{"style":2079},[9112],{"type":26,"value":9113},"  alg",{"type":21,"tag":2072,"props":9115,"children":9116},{"style":3372},[9117],{"type":26,"value":3487},{"type":21,"tag":2072,"props":9119,"children":9120},{"style":2079},[9121],{"type":26,"value":9122},"$(",{"type":21,"tag":2072,"props":9124,"children":9125},{"style":2097},[9126],{"type":26,"value":9127},"echo",{"type":21,"tag":2072,"props":9129,"children":9130},{"style":3372},[9131],{"type":26,"value":9043},{"type":21,"tag":2072,"props":9133,"children":9134},{"style":3474},[9135],{"type":26,"value":9136}," openssl",{"type":21,"tag":2072,"props":9138,"children":9139},{"style":2108},[9140],{"type":26,"value":8909},{"type":21,"tag":2072,"props":9142,"children":9143},{"style":2097},[9144],{"type":26,"value":8914},{"type":21,"tag":2072,"props":9146,"children":9147},{"style":2108},[9148],{"type":26,"value":9149}," \"",{"type":21,"tag":2072,"props":9151,"children":9152},{"style":2079},[9153],{"type":26,"value":9154},"$host",{"type":21,"tag":2072,"props":9156,"children":9157},{"style":2108},[9158],{"type":26,"value":9159},":443\"",{"type":21,"tag":2072,"props":9161,"children":9162},{"style":3372},[9163],{"type":26,"value":9164}," 2>",{"type":21,"tag":2072,"props":9166,"children":9167},{"style":2108},[9168],{"type":26,"value":8934},{"type":21,"tag":2072,"props":9170,"children":9171},{"style":2097},[9172],{"type":26,"value":8944},{"type":21,"tag":2072,"props":9174,"children":9175},{"class":2074,"line":3695},[9176,9181,9185,9190,9195,9200,9204,9208],{"type":21,"tag":2072,"props":9177,"children":9178},{"style":3372},[9179],{"type":26,"value":9180},"    |",{"type":21,"tag":2072,"props":9182,"children":9183},{"style":3474},[9184],{"type":26,"value":9136},{"type":21,"tag":2072,"props":9186,"children":9187},{"style":2108},[9188],{"type":26,"value":9189}," x509",{"type":21,"tag":2072,"props":9191,"children":9192},{"style":2097},[9193],{"type":26,"value":9194}," -noout",{"type":21,"tag":2072,"props":9196,"children":9197},{"style":2097},[9198],{"type":26,"value":9199}," -text",{"type":21,"tag":2072,"props":9201,"children":9202},{"style":3372},[9203],{"type":26,"value":9164},{"type":21,"tag":2072,"props":9205,"children":9206},{"style":2108},[9207],{"type":26,"value":8934},{"type":21,"tag":2072,"props":9209,"children":9210},{"style":2097},[9211],{"type":26,"value":8944},{"type":21,"tag":2072,"props":9213,"children":9214},{"class":2074,"line":3709},[9215,9219,9224,9229],{"type":21,"tag":2072,"props":9216,"children":9217},{"style":3372},[9218],{"type":26,"value":9180},{"type":21,"tag":2072,"props":9220,"children":9221},{"style":3474},[9222],{"type":26,"value":9223}," awk",{"type":21,"tag":2072,"props":9225,"children":9226},{"style":2108},[9227],{"type":26,"value":9228}," '\u002FSignature Algorithm\u002F {print $3; exit}'",{"type":21,"tag":2072,"props":9230,"children":9231},{"style":2079},[9232],{"type":26,"value":4281},{"type":21,"tag":2072,"props":9234,"children":9235},{"class":2074,"line":3717},[9236,9241,9246,9250,9254,9258,9263,9268,9273,9278],{"type":21,"tag":2072,"props":9237,"children":9238},{"style":2097},[9239],{"type":26,"value":9240},"  printf",{"type":21,"tag":2072,"props":9242,"children":9243},{"style":2108},[9244],{"type":26,"value":9245}," '%s\\t%s\\n'",{"type":21,"tag":2072,"props":9247,"children":9248},{"style":2108},[9249],{"type":26,"value":9149},{"type":21,"tag":2072,"props":9251,"children":9252},{"style":2079},[9253],{"type":26,"value":9154},{"type":21,"tag":2072,"props":9255,"children":9256},{"style":2108},[9257],{"type":26,"value":7539},{"type":21,"tag":2072,"props":9259,"children":9260},{"style":2108},[9261],{"type":26,"value":9262}," \"${",{"type":21,"tag":2072,"props":9264,"children":9265},{"style":2079},[9266],{"type":26,"value":9267},"alg",{"type":21,"tag":2072,"props":9269,"children":9270},{"style":3372},[9271],{"type":26,"value":9272},":-",{"type":21,"tag":2072,"props":9274,"children":9275},{"style":2079},[9276],{"type":26,"value":9277},"UNREACHABLE",{"type":21,"tag":2072,"props":9279,"children":9280},{"style":2108},[9281],{"type":26,"value":9282},"}\"\n",{"type":21,"tag":2072,"props":9284,"children":9285},{"class":2074,"line":3750},[9286,9291,9295],{"type":21,"tag":2072,"props":9287,"children":9288},{"style":3372},[9289],{"type":26,"value":9290},"done",{"type":21,"tag":2072,"props":9292,"children":9293},{"style":3372},[9294],{"type":26,"value":8929},{"type":21,"tag":2072,"props":9296,"children":9297},{"style":2079},[9298],{"type":26,"value":9299}," hosts.txt\n",{"type":21,"tag":22,"props":9301,"children":9302},{},[9303,9305,9310],{"type":26,"value":9304},"Feed the results into a register that records, per system: the algorithm, key size, protocol, certificate authority, library and version, the owner, and, most importantly, ",{"type":21,"tag":784,"props":9306,"children":9307},{},[9308],{"type":26,"value":9309},"how long the data it protects must stay confidential",{"type":26,"value":9311},". That last column is what turns an inventory into a prioritized migration order.",{"type":21,"tag":43,"props":9313,"children":9315},{"id":9314},"hybrid-deployment-is-the-low-risk-path",[9316],{"type":26,"value":9317},"Hybrid deployment is the low-risk path",{"type":21,"tag":22,"props":9319,"children":9320},{},[9321,9323,9328],{"type":26,"value":9322},"The consensus deployment pattern is hybrid: run a classical and a post-quantum key exchange together and combine both shared secrets, so the connection is safe unless ",{"type":21,"tag":103,"props":9324,"children":9325},{},[9326],{"type":26,"value":9327},"both",{"type":26,"value":9329}," are broken. This hedges against implementation bugs and undiscovered cryptanalysis in the newer lattice schemes.",{"type":21,"tag":22,"props":9331,"children":9332},{},[9333,9335,9340],{"type":26,"value":9334},"This is no longer experimental. ",{"type":21,"tag":784,"props":9336,"children":9337},{},[9338],{"type":26,"value":9339},"X25519MLKEM768",{"type":26,"value":9341}," is the standardized hybrid group, enabled by default in Chrome since version 131 and Firefox since 132, and OpenSSL 3.5 (April 2025) ships ML-KEM natively. Its default group list prefers the hybrid, meaning two OpenSSL 3.5 endpoints negotiate post-quantum key exchange with no configuration at all.",{"type":21,"tag":2062,"props":9343,"children":9345},{"className":8882,"code":9344,"language":8884,"meta":7,"style":7},"# nginx with OpenSSL 3.5+: explicit hybrid preference, classical fallback\nssl_protocols TLSv1.3;\nssl_ecdh_curve X25519MLKEM768:X25519:P-256;\n",[9346],{"type":21,"tag":1831,"props":9347,"children":9348},{"__ignoreMap":7},[9349,9357,9375],{"type":21,"tag":2072,"props":9350,"children":9351},{"class":2074,"line":2075},[9352],{"type":21,"tag":2072,"props":9353,"children":9354},{"style":3985},[9355],{"type":26,"value":9356},"# nginx with OpenSSL 3.5+: explicit hybrid preference, classical fallback\n",{"type":21,"tag":2072,"props":9358,"children":9359},{"class":2074,"line":164},[9360,9365,9370],{"type":21,"tag":2072,"props":9361,"children":9362},{"style":3474},[9363],{"type":26,"value":9364},"ssl_protocols",{"type":21,"tag":2072,"props":9366,"children":9367},{"style":2108},[9368],{"type":26,"value":9369}," TLSv1.3",{"type":21,"tag":2072,"props":9371,"children":9372},{"style":2079},[9373],{"type":26,"value":9374},";\n",{"type":21,"tag":2072,"props":9376,"children":9377},{"class":2074,"line":2093},[9378,9383,9388],{"type":21,"tag":2072,"props":9379,"children":9380},{"style":3474},[9381],{"type":26,"value":9382},"ssl_ecdh_curve",{"type":21,"tag":2072,"props":9384,"children":9385},{"style":2108},[9386],{"type":26,"value":9387}," X25519MLKEM768:X25519:P-256",{"type":21,"tag":2072,"props":9389,"children":9390},{"style":2079},[9391],{"type":26,"value":9374},{"type":21,"tag":22,"props":9393,"children":9394},{},[9395],{"type":26,"value":9396},"Signatures are further behind. Public CAs are not yet issuing ML-DSA certificates at scale, so key exchange is where you get real HNDL protection today, and it's the cheapest win available.",{"type":21,"tag":43,"props":9398,"children":9400},{"id":9399},"what-to-do-this-quarter",[9401],{"type":26,"value":9402},"What to do this quarter",{"type":21,"tag":22,"props":9404,"children":9405},{},[9406],{"type":26,"value":9407},"A realistic 90-day slice:",{"type":21,"tag":6138,"props":9409,"children":9410},{},[9411,9421,9460,9470,9480,9490,9507],{"type":21,"tag":6142,"props":9412,"children":9413},{},[9414,9419],{"type":21,"tag":784,"props":9415,"children":9416},{},[9417],{"type":26,"value":9418},"Appoint an owner.",{"type":26,"value":9420}," Migrations without a named accountable person do not happen. This is a multi-year program, not a ticket.",{"type":21,"tag":6142,"props":9422,"children":9423},{},[9424,9429,9431,9437,9438,9444,9445,9451,9452,9458],{"type":21,"tag":784,"props":9425,"children":9426},{},[9427],{"type":26,"value":9428},"Run automated discovery",{"type":26,"value":9430}," across external endpoints, internal service mesh, and code repositories. Grep your codebases for ",{"type":21,"tag":1831,"props":9432,"children":9434},{"className":9433},[],[9435],{"type":26,"value":9436},"RSA",{"type":26,"value":798},{"type":21,"tag":1831,"props":9439,"children":9441},{"className":9440},[],[9442],{"type":26,"value":9443},"ECDSA",{"type":26,"value":798},{"type":21,"tag":1831,"props":9446,"children":9448},{"className":9447},[],[9449],{"type":26,"value":9450},"secp256",{"type":26,"value":798},{"type":21,"tag":1831,"props":9453,"children":9455},{"className":9454},[],[9456],{"type":26,"value":9457},"PKCS1",{"type":26,"value":9459},", and hardcoded algorithm identifiers.",{"type":21,"tag":6142,"props":9461,"children":9462},{},[9463,9468],{"type":21,"tag":784,"props":9464,"children":9465},{},[9466],{"type":26,"value":9467},"Classify by data lifetime.",{"type":26,"value":9469}," Sort systems by how long their data must stay secret. Anything over ten years is priority one.",{"type":21,"tag":6142,"props":9471,"children":9472},{},[9473,9478],{"type":21,"tag":784,"props":9474,"children":9475},{},[9476],{"type":26,"value":9477},"Turn on hybrid TLS where it's free.",{"type":26,"value":9479}," Upgrade to OpenSSL 3.5+ or a TLS terminator that supports X25519MLKEM768. For many organizations this is a load-balancer config change covering the majority of traffic.",{"type":21,"tag":6142,"props":9481,"children":9482},{},[9483,9488],{"type":21,"tag":784,"props":9484,"children":9485},{},[9486],{"type":26,"value":9487},"Send the vendor questionnaire.",{"type":26,"value":9489}," Ask every crypto-touching vendor for their FIPS 203\u002F204\u002F205 roadmap with dates. Slow answers are your long pole. You need them on record now.",{"type":21,"tag":6142,"props":9491,"children":9492},{},[9493,9498,9500,9505],{"type":21,"tag":784,"props":9494,"children":9495},{},[9496],{"type":26,"value":9497},"Fix crypto-agility in new code.",{"type":26,"value":9499}," Stop hardcoding algorithms. Route every operation through an abstraction that takes the algorithm from configuration, so the ",{"type":21,"tag":103,"props":9501,"children":9502},{},[9503],{"type":26,"value":9504},"next",{"type":26,"value":9506}," transition (HQC, FN-DSA, or whatever follows) is a config change rather than a rewrite. This is the single highest-leverage engineering change, because the 2035 deadline is not the last one.",{"type":21,"tag":6142,"props":9508,"children":9509},{},[9510,9515],{"type":21,"tag":784,"props":9511,"children":9512},{},[9513],{"type":26,"value":9514},"Move code signing early.",{"type":26,"value":9516}," It has the earliest federal deadline, the longest verification tail, and signatures that must remain verifiable for decades.",{"type":21,"tag":43,"props":9518,"children":9520},{"id":9519},"the-bottom-line",[9521],{"type":26,"value":9522},"The bottom line",{"type":21,"tag":22,"props":9524,"children":9525},{},[9526,9528,9533],{"type":26,"value":9527},"The deadlines are published, they're closer than the hardware timeline suggests, and they were set by people who assume migration takes ten years. Two dates are worth memorizing: ",{"type":21,"tag":784,"props":9529,"children":9530},{},[9531],{"type":26,"value":9532},"after 2030, classical asymmetric crypto is deprecated, and after 2035, it's disallowed",{"type":26,"value":9534},", with federal national-security systems running years ahead of that.",{"type":21,"tag":22,"props":9536,"children":9537},{},[9538],{"type":26,"value":9539},"The work that pays off regardless of when quantum hardware arrives is the boring part: knowing where your cryptography lives and being able to change it without a rewrite. Everything else is a config flag.",{"type":21,"tag":22,"props":9541,"children":9542},{},[9543,9548,9549,9554,9555,9560,9561,9566,9567],{"type":21,"tag":784,"props":9544,"children":9545},{},[9546],{"type":26,"value":9547},"Further reading:",{"type":26,"value":790},{"type":21,"tag":29,"props":9550,"children":9551},{"href":8518},[9552],{"type":26,"value":9553},"What PQC is",{"type":26,"value":6244},{"type":21,"tag":29,"props":9556,"children":9557},{"href":670},[9558],{"type":26,"value":9559},"Reading policy documents as technical assessments",{"type":26,"value":6244},{"type":21,"tag":29,"props":9562,"children":9563},{"href":7982},[9564],{"type":26,"value":9565},"Quantum computing glossary",{"type":26,"value":6244},{"type":21,"tag":29,"props":9568,"children":9570},{"href":9569},"\u002Fnews",[9571],{"type":26,"value":9572},"Latest developments",{"type":21,"tag":2445,"props":9574,"children":9575},{},[9576],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":9578},[9579,9580,9581,9582,9583,9584,9585,9586],{"id":8526,"depth":164,"text":8529},{"id":8671,"depth":164,"text":8674},{"id":8749,"depth":164,"text":8752},{"id":8817,"depth":164,"text":8820},{"id":8871,"depth":164,"text":8874},{"id":9314,"depth":164,"text":9317},{"id":9399,"depth":164,"text":9402},{"id":9519,"depth":164,"text":9522},"content:blog:post-quantum-migration-deadlines.md","blog\u002Fpost-quantum-migration-deadlines.md","blog\u002Fpost-quantum-migration-deadlines",{"_path":9591,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":9592,"description":9593,"date":3089,"author":11,"tags":9594,"readingTime":853,"body":9595,"_type":171,"_id":10161,"_source":173,"_file":10162,"_stem":10163,"_extension":176},"\u002Fblog\u002Fq-day-breaking-rsa-2048","Q-Day and What Breaking RSA-2048 Requires","Q-Day is one of the most abused terms in quantum computing. Here's a precise definition, the published resource estimates for factoring RSA-2048 with Shor's algorithm, and why those estimates disagree by orders of magnitude.",[8486,8487,8488],{"type":18,"children":9596,"toc":10151},[9597,9602,9607,9613,9637,9649,9654,9660,9678,9690,9696,9716,9755,9784,9790,9824,9851,9877,9903,9908,9961,9971,9977,10001,10013,10019,10024,10036,10042,10047,10073,10085,10091,10096,10108,10120],{"type":21,"tag":22,"props":9598,"children":9599},{},[9600],{"type":26,"value":9601},"\"Q-Day\" appears in vendor decks, government strategy documents, and newspaper headlines, usually with a countdown clock attached. It is rarely defined. That vagueness is doing a lot of work, because the term is used to mean at least two different things, and the gap between them is measured in years and billions of dollars of engineering.",{"type":21,"tag":22,"props":9603,"children":9604},{},[9605],{"type":26,"value":9606},"This post does the part that most coverage skips: what a machine capable of breaking RSA-2048 would have to be, according to published estimates, and why those estimates have ranged from twenty million qubits to under one million within six years.",{"type":21,"tag":43,"props":9608,"children":9610},{"id":9609},"defining-the-term-precisely",[9611],{"type":26,"value":9612},"Defining the term precisely",{"type":21,"tag":22,"props":9614,"children":9615},{},[9616,9622,9624,9629,9631,9635],{"type":21,"tag":29,"props":9617,"children":9619},{"href":9618},"\u002Fglossary\u002Fq-day",[9620],{"type":26,"value":9621},"Q-Day",{"type":26,"value":9623}," is most usefully defined as ",{"type":21,"tag":784,"props":9625,"children":9626},{},[9627],{"type":26,"value":9628},"the day a cryptographically relevant quantum computer (CRQC) first exists",{"type":26,"value":9630},": a machine that runs ",{"type":21,"tag":29,"props":9632,"children":9633},{"href":8767},[9634],{"type":26,"value":8770},{"type":26,"value":9636}," against real-world key sizes within an operationally useful time.",{"type":21,"tag":22,"props":9638,"children":9639},{},[9640,9642,9647],{"type":26,"value":9641},"The looseness creeps in around \"real-world key sizes.\" Some writers use Q-Day to mean specifically ",{"type":21,"tag":103,"props":9643,"children":9644},{},[9645],{"type":26,"value":9646},"RSA-2048 is broken",{"type":26,"value":9648},". Others use it for any CRQC, which would include a machine that breaks NIST P-256 elliptic-curve keys, a meaningfully easier target, since ECC uses far smaller keys for equivalent classical security, and the elliptic-curve variant of Shor's needs a smaller register. A third group uses it loosely for \"quantum computers become scary,\" which is not a technical claim at all.",{"type":21,"tag":22,"props":9650,"children":9651},{},[9652],{"type":26,"value":9653},"Precision matters because these events do not happen on the same day. If P-256 falls before RSA-2048, the practical consequences differ sharply: ECDSA underpins TLS certificates, SSH, code signing, and most cryptocurrency, while RSA-2048 still guards a large installed base of older infrastructure. A plan built around one date risks being badly calibrated for the other.",{"type":21,"tag":43,"props":9655,"children":9657},{"id":9656},"why-the-date-matters-less-than-youd-think",[9658],{"type":26,"value":9659},"Why the date matters less than you'd think",{"type":21,"tag":22,"props":9661,"children":9662},{},[9663,9665,9669,9671,9676],{"type":26,"value":9664},"The instinct on hearing \"Q-Day\" is to ask when. That question is less decision-relevant than it feels, because of ",{"type":21,"tag":784,"props":9666,"children":9667},{},[9668],{"type":26,"value":8762},{"type":26,"value":9670},": an adversary records encrypted traffic today and stores it until a CRQC exists. Any data whose confidentiality must outlive Q-Day is exposed ",{"type":21,"tag":103,"props":9672,"children":9673},{},[9674],{"type":26,"value":9675},"now",{"type":26,"value":9677},", regardless of when Q-Day lands.",{"type":21,"tag":22,"props":9679,"children":9680},{},[9681,9683,9688],{"type":26,"value":9682},"So the question that drives decisions is not \"when is Q-Day\" but \"how long must this data stay secret, and how long will my migration take.\" Regulators have already answered on organizations' behalf with published deprecation dates. We cover those in detail in ",{"type":21,"tag":29,"props":9684,"children":9685},{"href":1236},[9686],{"type":26,"value":9687},"the post-quantum migration clock",{"type":26,"value":9689},", and they are deliberately independent of any hardware forecast.",{"type":21,"tag":43,"props":9691,"children":9693},{"id":9692},"the-core-question-what-would-the-machine-look-like",[9694],{"type":26,"value":9695},"The core question: what would the machine look like?",{"type":21,"tag":22,"props":9697,"children":9698},{},[9699,9701,9706,9708,9714],{"type":26,"value":9700},"Shor's algorithm, ",{"type":21,"tag":29,"props":9702,"children":9703},{"href":7742},[9704],{"type":26,"value":9705},"introduced in 1994",{"type":26,"value":9707},", reduces factoring to period-finding, which it solves using ",{"type":21,"tag":29,"props":9709,"children":9711},{"href":9710},"\u002Fglossary\u002Fphase-estimation",[9712],{"type":26,"value":9713},"quantum phase estimation",{"type":26,"value":9715}," over a modular exponentiation circuit. The algorithmic cost is polynomial. The engineering cost is where the difficulty lives, and it splits into two different numbers.",{"type":21,"tag":22,"props":9717,"children":9718},{},[9719,9724,9726,9732,9734,9738,9740,9745,9747,9753],{"type":21,"tag":784,"props":9720,"children":9721},{},[9722],{"type":26,"value":9723},"Logical qubits",{"type":26,"value":9725}," are the idealized, error-free qubits the algorithm is written against. Gidney and Ekerå's 2019 construction expresses this as ",{"type":21,"tag":1831,"props":9727,"children":9729},{"className":9728},[],[9730],{"type":26,"value":9731},"3n + 0.002·n·lg n",{"type":26,"value":9733}," logical qubits for an ",{"type":21,"tag":103,"props":9735,"children":9736},{},[9737],{"type":26,"value":3953},{"type":26,"value":9739},"-bit modulus. For RSA-2048 that works out to roughly ",{"type":21,"tag":784,"props":9741,"children":9742},{},[9743],{"type":26,"value":9744},"6,200 logical qubits",{"type":26,"value":9746},", alongside a Toffoli gate count on the order of ",{"type":21,"tag":1831,"props":9748,"children":9750},{"className":9749},[],[9751],{"type":26,"value":9752},"0.3n³",{"type":26,"value":9754},", billions of gates.",{"type":21,"tag":22,"props":9756,"children":9757},{},[9758,9763,9765,9769,9771,9775,9777,9782],{"type":21,"tag":784,"props":9759,"children":9760},{},[9761],{"type":26,"value":9762},"Physical qubits",{"type":26,"value":9764}," are what you build. The ratio between them is the overhead imposed by ",{"type":21,"tag":29,"props":9766,"children":9767},{"href":409},[9768],{"type":26,"value":8101},{"type":26,"value":9770},", and it is brutal. Under the surface code, each ",{"type":21,"tag":29,"props":9772,"children":9773},{"href":874},[9774],{"type":26,"value":8089},{"type":26,"value":9776}," is encoded across a patch of physical qubits whose size grows with the ",{"type":21,"tag":103,"props":9778,"children":9779},{},[9780],{"type":26,"value":9781},"code distance",{"type":26,"value":9783},", which must be chosen large enough that the total error across billions of gates stays below one. Getting from ~6,200 logical qubits to a working machine is where the millions come from.",{"type":21,"tag":43,"props":9785,"children":9787},{"id":9786},"the-published-estimates-and-why-they-moved",[9788],{"type":26,"value":9789},"The published estimates, and why they moved",{"type":21,"tag":22,"props":9791,"children":9792},{},[9793,9795,9800,9802,9807,9808,9815,9817,9822],{"type":26,"value":9794},"The most-cited figure comes from ",{"type":21,"tag":784,"props":9796,"children":9797},{},[9798],{"type":26,"value":9799},"Gidney and Ekerå (2019)",{"type":26,"value":9801},": factoring a 2048-bit RSA integer in ",{"type":21,"tag":784,"props":9803,"children":9804},{},[9805],{"type":26,"value":9806},"8 hours using 20 million noisy physical qubits",{"type":26,"value":8689},{"type":21,"tag":29,"props":9809,"children":9812},{"href":9810,"rel":9811},"https:\u002F\u002Farxiv.org\u002Fabs\u002F1905.09749",[378],[9813],{"type":26,"value":9814},"arXiv:1905.09749",{"type":26,"value":9816},", later published in ",{"type":21,"tag":103,"props":9818,"children":9819},{},[9820],{"type":26,"value":9821},"Quantum",{"type":26,"value":9823},"). That was already a hundredfold reduction in spacetime volume over prior proposals.",{"type":21,"tag":22,"props":9825,"children":9826},{},[9827,9829,9834,9836,9841,9842,9849],{"type":26,"value":9828},"In May 2025, ",{"type":21,"tag":784,"props":9830,"children":9831},{},[9832],{"type":26,"value":9833},"Gidney",{"type":26,"value":9835}," published a revised analysis: ",{"type":21,"tag":784,"props":9837,"children":9838},{},[9839],{"type":26,"value":9840},"fewer than one million noisy physical qubits, running for under a week",{"type":26,"value":8689},{"type":21,"tag":29,"props":9843,"children":9846},{"href":9844,"rel":9845},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2505.15917",[378],[9847],{"type":26,"value":9848},"arXiv:2505.15917",{"type":26,"value":9850},"). That is roughly a 20× reduction in qubit count against his own earlier number, traded for a longer runtime.",{"type":21,"tag":22,"props":9852,"children":9853},{},[9854,9856,9861,9863,9868,9870,9875],{"type":26,"value":9855},"Both papers assume broadly the same hardware model: a planar square grid of superconducting qubits with nearest-neighbour connectivity, a ",{"type":21,"tag":784,"props":9857,"children":9858},{},[9859],{"type":26,"value":9860},"0.1% gate error rate",{"type":26,"value":9862},", a ",{"type":21,"tag":784,"props":9864,"children":9865},{},[9866],{"type":26,"value":9867},"1 microsecond",{"type":26,"value":9869}," surface code cycle, and a ",{"type":21,"tag":784,"props":9871,"children":9872},{},[9873],{"type":26,"value":9874},"10 microsecond",{"type":26,"value":9876}," control-system reaction time.",{"type":21,"tag":22,"props":9878,"children":9879},{},[9880,9882,9887,9889,9894,9896,9901],{"type":26,"value":9881},"That is the key insight about the discrepancy: ",{"type":21,"tag":784,"props":9883,"children":9884},{},[9885],{"type":26,"value":9886},"the hardware assumptions barely changed. The algorithms and codes did.",{"type":26,"value":9888}," The 2025 reduction comes from three specific advances: approximate residue arithmetic (fewer operations), ",{"type":21,"tag":103,"props":9890,"children":9891},{},[9892],{"type":26,"value":9893},"yoked surface codes",{"type":26,"value":9895}," (roughly tripling storage density for idle logical qubits), and ",{"type":21,"tag":103,"props":9897,"children":9898},{},[9899],{"type":26,"value":9900},"magic state cultivation",{"type":26,"value":9902},", which makes producing the high-fidelity non-Clifford resource states that dominate the cost far cheaper than traditional distillation.",{"type":21,"tag":22,"props":9904,"children":9905},{},[9906],{"type":26,"value":9907},"This is why estimates in the wild vary so wildly. Any published number is a function of at least five assumptions:",{"type":21,"tag":7925,"props":9909,"children":9910},{},[9911,9921,9931,9941,9951],{"type":21,"tag":6142,"props":9912,"children":9913},{},[9914,9919],{"type":21,"tag":784,"props":9915,"children":9916},{},[9917],{"type":26,"value":9918},"Physical error rate.",{"type":26,"value":9920}," The required code distance depends on how far below threshold the hardware sits. A 10× better physical error rate cuts the overhead dramatically.",{"type":21,"tag":6142,"props":9922,"children":9923},{},[9924,9929],{"type":21,"tag":784,"props":9925,"children":9926},{},[9927],{"type":26,"value":9928},"Code choice.",{"type":26,"value":9930}," Surface codes are the conservative baseline. Higher-rate qLDPC codes are likely to reduce overhead substantially, at the cost of harder connectivity requirements.",{"type":21,"tag":6142,"props":9932,"children":9933},{},[9934,9939],{"type":21,"tag":784,"props":9935,"children":9936},{},[9937],{"type":26,"value":9938},"Cycle and reaction time.",{"type":26,"value":9940}," These set wall-clock runtime, and runtime feeds back into how much error correction you need.",{"type":21,"tag":6142,"props":9942,"children":9943},{},[9944,9949],{"type":21,"tag":784,"props":9945,"children":9946},{},[9947],{"type":26,"value":9948},"Magic state strategy.",{"type":26,"value":9950}," Distillation factories historically consumed the majority of the machine's footprint. Cultivation changes that budget.",{"type":21,"tag":6142,"props":9952,"children":9953},{},[9954,9959],{"type":21,"tag":784,"props":9955,"children":9956},{},[9957],{"type":26,"value":9958},"Space–time tradeoff.",{"type":26,"value":9960}," You nearly always buy fewer qubits with more hours, which is exactly what happened between the 2019 and 2025 papers. Quoting a qubit count without a runtime is meaningless.",{"type":21,"tag":22,"props":9962,"children":9963},{},[9964,9969],{"type":21,"tag":784,"props":9965,"children":9966},{},[9967],{"type":26,"value":9968},"The direction of travel is the important dynamic.",{"type":26,"value":9970}," Over three decades, published estimates have moved consistently downward, driven by compilation and error-correction improvements rather than by hardware surprises. A migration plan that assumes today's estimate is the floor is planning against a number that has never yet stopped falling.",{"type":21,"tag":43,"props":9972,"children":9974},{"id":9973},"where-hardware-stands",[9975],{"type":26,"value":9976},"Where hardware stands",{"type":21,"tag":22,"props":9978,"children":9979},{},[9980,9982,9987,9989,9993,9995,9999],{"type":26,"value":9981},"Current devices carry roughly 100 to 1,000 physical qubits. Google's Willow processor, used in the 2024 ",{"type":21,"tag":29,"props":9983,"children":9984},{"href":8250},[9985],{"type":26,"value":9986},"below-threshold demonstration",{"type":26,"value":9988},", has 105. Even against the optimistic 2025 estimate, that is three orders of magnitude short in qubit count, before accounting for the ",{"type":21,"tag":29,"props":9990,"children":9991},{"href":8149},[9992],{"type":26,"value":8152},{"type":26,"value":9994},", connectivity, and control requirements those papers assume. Our ",{"type":21,"tag":29,"props":9996,"children":9997},{"href":590},[9998],{"type":26,"value":593},{"type":26,"value":10000}," tracks what is available.",{"type":21,"tag":22,"props":10002,"children":10003},{},[10004,10006,10011],{"type":26,"value":10005},"But the 2024 result matters more than the raw gap suggests. Google ran surface codes at distances 3, 5, and 7 and showed each increase roughly ",{"type":21,"tag":103,"props":10007,"children":10008},{},[10009],{"type":26,"value":10010},"halved",{"type":26,"value":10012}," the logical error rate: the logical qubit outperformed its best constituent physical qubit. Every fault-tolerance roadmap assumes that adding qubits makes the encoded qubit better rather than worse. Until that experiment, it was an assumption. Crossing the threshold converted the remaining problem from an open physics question into a scaling and manufacturing one. Scaling problems are still extremely hard and sometimes take decades. They are a different category of hard.",{"type":21,"tag":43,"props":10014,"children":10016},{"id":10015},"machine-checking-the-numbers",[10017],{"type":26,"value":10018},"Machine-checking the numbers",{"type":21,"tag":22,"props":10020,"children":10021},{},[10022],{"type":26,"value":10023},"A subtlety that rarely surfaces: these resource estimates are long, detailed, hand-written analyses, and migration budgets running into the billions are set on the basis of them. An arithmetic slip or an unstated assumption in a compilation argument propagates straight into policy.",{"type":21,"tag":22,"props":10025,"children":10026},{},[10027,10029,10034],{"type":26,"value":10028},"That is why the 2026 ",{"type":21,"tag":29,"props":10030,"children":10031},{"href":8798},[10032],{"type":26,"value":10033},"Lean formalization of Shor's algorithm",{"type":26,"value":10035}," is worth attention beyond its novelty. It formalizes order finding and the reversible circuits for modular and elliptic-curve arithmetic in a proof assistant, and machine-checks the logical resource estimates for both RSA-2048 and P-256. It does not settle the physical-qubit question (that still depends on the hardware assumptions above), but it puts the logical layer on an auditable footing. When a number drives a budget, \"a machine verified this derivation\" is a meaningfully stronger claim than \"several experts read the appendix.\"",{"type":21,"tag":43,"props":10037,"children":10039},{"id":10038},"the-vendor-perspective-clearly-labelled",[10040],{"type":26,"value":10041},"The vendor perspective, clearly labelled",{"type":21,"tag":22,"props":10043,"children":10044},{},[10045],{"type":26,"value":10046},"Quantum hardware companies publish extensively on Q-Day, and their framing deserves an explicit caveat: they sell the machines whose urgency they are describing.",{"type":21,"tag":22,"props":10048,"children":10049},{},[10050,10052,10057,10059,10064,10066,10071],{"type":26,"value":10051},"IonQ's December 2024 post ",{"type":21,"tag":103,"props":10053,"children":10054},{},[10055],{"type":26,"value":10056},"Q-Day and the Impact of Breaking RSA2048",{"type":26,"value":10058},", by SVP of Product and Applications Ariel Braunstein, is a reasonable example. ",{"type":21,"tag":784,"props":10060,"children":10061},{},[10062],{"type":26,"value":10063},"IonQ argues",{"type":26,"value":10065}," that harvest-now-decrypt-later is already underway, describing nation states collecting encrypted data in anticipation of future decryption capability, and that the unpredictability of algorithmic breakthroughs is itself a reason not to wait. To its credit, the post declines to name a year, presenting a spread of estimates across research organizations instead, and ",{"type":21,"tag":784,"props":10067,"children":10068},{},[10069],{"type":26,"value":10070},"IonQ's recommendation",{"type":26,"value":10072}," (that organizations begin exploring quantum-resistant algorithms now, while acknowledging urgency varies with the timeline one assumes) is close to the mainstream security-community position.",{"type":21,"tag":22,"props":10074,"children":10075},{},[10076,10078,10083],{"type":26,"value":10077},"Note also what it does not contain. ",{"type":21,"tag":784,"props":10079,"children":10080},{},[10081],{"type":26,"value":10082},"The IonQ post cites no qubit count or resource estimate for RSA-2048 at all.",{"type":26,"value":10084}," Its one concrete figure is an unrelated materials-simulation algorithm reduced from 1.5 trillion gate operations to 410,000. That is a genuine result about a different workload, and it is not evidence about factoring. Treat vendor content as a directionally useful signal about industry expectations, not as a neutral source for the resource question.",{"type":21,"tag":43,"props":10086,"children":10088},{"id":10087},"how-to-reason-about-it-yourself",[10089],{"type":26,"value":10090},"How to reason about it yourself",{"type":21,"tag":22,"props":10092,"children":10093},{},[10094],{"type":26,"value":10095},"The framing that survives contact with the uncertainty is Mosca's inequality: if your data's required confidentiality lifetime plus your migration time exceeds the time until a CRQC exists, you are already late. Only the third term is unknown, and the first two are usually large enough that the third barely changes the answer.",{"type":21,"tag":22,"props":10097,"children":10098},{},[10099,10101,10106],{"type":26,"value":10100},"So the honest conclusion is an uncomfortable one: ",{"type":21,"tag":784,"props":10102,"children":10103},{},[10104],{"type":26,"value":10105},"nobody credible gives you a date, and anyone who does is telling you about their business model or their priors, not about physics.",{"type":26,"value":10107}," What we say precisely is what the machine would need to be, that the requirement has been revised downward repeatedly, and that the error-correction threshold has been crossed.",{"type":21,"tag":22,"props":10109,"children":10110},{},[10111,10113,10118],{"type":26,"value":10112},"The responsible posture is to migrate on a schedule that does not depend on knowing the date. Start with ",{"type":21,"tag":29,"props":10114,"children":10115},{"href":8518},[10116],{"type":26,"value":10117},"what PQC is",{"type":26,"value":10119},", then work the calendar. If your plan breaks when the estimate drops another 10×, it was never a plan.",{"type":21,"tag":22,"props":10121,"children":10122},{},[10123,10127,10128,10133,10134,10139,10140,10146,10147],{"type":21,"tag":784,"props":10124,"children":10125},{},[10126],{"type":26,"value":9547},{"type":26,"value":790},{"type":21,"tag":29,"props":10129,"children":10130},{"href":1236},[10131],{"type":26,"value":10132},"Post-quantum migration deadlines",{"type":26,"value":6244},{"type":21,"tag":29,"props":10135,"children":10136},{"href":428},[10137],{"type":26,"value":10138},"Quantum error correction explained",{"type":26,"value":6244},{"type":21,"tag":29,"props":10141,"children":10143},{"href":10142},"\u002Fresearch",[10144],{"type":26,"value":10145},"Landmark research papers",{"type":26,"value":6244},{"type":21,"tag":29,"props":10148,"children":10149},{"href":9569},[10150],{"type":26,"value":9572},{"title":7,"searchDepth":164,"depth":164,"links":10152},[10153,10154,10155,10156,10157,10158,10159,10160],{"id":9609,"depth":164,"text":9612},{"id":9656,"depth":164,"text":9659},{"id":9692,"depth":164,"text":9695},{"id":9786,"depth":164,"text":9789},{"id":9973,"depth":164,"text":9976},{"id":10015,"depth":164,"text":10018},{"id":10038,"depth":164,"text":10041},{"id":10087,"depth":164,"text":10090},"content:blog:q-day-breaking-rsa-2048.md","blog\u002Fq-day-breaking-rsa-2048.md","blog\u002Fq-day-breaking-rsa-2048",{"_path":670,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":10165,"description":10166,"date":3089,"author":11,"tags":10167,"readingTime":366,"body":10168,"_type":171,"_id":11084,"_source":173,"_file":11085,"_stem":11086,"_extension":176},"What the New Quantum Executive Order Reveals About the Field's Real Problems","Read EO 14413 as a technical document instead of a political one and it becomes a candid list of what quantum computing still hasn't solved: starting with the fact that nobody reliably measures how good a quantum computer is.",[287,15,3091],{"type":18,"children":10169,"toc":11075},[10170,10182,10187,10192,10198,10203,10213,10218,10293,10298,10303,10776,10800,10806,10811,10816,10836,10848,10854,10866,10871,10897,10902,10921,10927,10932,10937,10958,10964,10969,10974,10993,10999,11011,11016,11022,11027,11055,11060,11071],{"type":21,"tag":22,"props":10171,"children":10172},{},[10173,10175,10180],{"type":26,"value":10174},"On June 22, 2026, Executive Order 14413 (",{"type":21,"tag":103,"props":10176,"children":10177},{},[10178],{"type":26,"value":10179},"Ushering in the Next Frontier of Quantum Innovation",{"type":26,"value":10181},") was signed. Coverage of it focused almost entirely on the politics.",{"type":21,"tag":22,"props":10183,"children":10184},{},[10185],{"type":26,"value":10186},"That's a shame, because the more interesting reading is technical. Policy documents like this get drafted with heavy input from people who run quantum programs, and what they ask for is a fairly candid map of what the field still lacks. Read it that way and EO 14413 is less an announcement than a problem list.",{"type":21,"tag":22,"props":10188,"children":10189},{},[10190],{"type":26,"value":10191},"Here's what stands out.",{"type":21,"tag":43,"props":10193,"children":10195},{"id":10194},"nobody-reliably-measures-how-good-a-quantum-computer-is",[10196],{"type":26,"value":10197},"Nobody reliably measures how good a quantum computer is",{"type":21,"tag":22,"props":10199,"children":10200},{},[10201],{"type":26,"value":10202},"The most quietly striking line in the order directs the Department of Energy to establish, within 180 days, \"a national center to develop the tools and capabilities required to accurately assess the performance of quantum computing systems.\"",{"type":21,"tag":22,"props":10204,"children":10205},{},[10206,10208],{"type":26,"value":10207},"Sit with that. Roughly forty-five years after Feynman proposed quantum computers and seven years after the first quantum supremacy claim, a government is standing up an institution because we do not have a trustworthy way to answer ",{"type":21,"tag":103,"props":10209,"children":10210},{},[10211],{"type":26,"value":10212},"\"is this quantum computer any good?\"",{"type":21,"tag":22,"props":10214,"children":10215},{},[10216],{"type":26,"value":10217},"This is not bureaucratic throat-clearing. It's real, and anyone who has tried to compare two QPUs has run into it. The problem is that every vendor reports different numbers:",{"type":21,"tag":7925,"props":10219,"children":10220},{},[10221,10231,10243,10256,10273,10283],{"type":21,"tag":6142,"props":10222,"children":10223},{},[10224,10229],{"type":21,"tag":784,"props":10225,"children":10226},{},[10227],{"type":26,"value":10228},"Qubit count",{"type":26,"value":10230}," is nearly meaningless alone. A hundred bad qubits are sometimes worse than twenty good ones for real work.",{"type":21,"tag":6142,"props":10232,"children":10233},{},[10234,10241],{"type":21,"tag":784,"props":10235,"children":10236},{},[10237],{"type":21,"tag":29,"props":10238,"children":10239},{"href":8162},[10240],{"type":26,"value":8165},{"type":26,"value":10242}," bundles qubit count, connectivity, and error rates into one figure, but it saturates, and it says little about how a device handles the specific circuits you care about.",{"type":21,"tag":6142,"props":10244,"children":10245},{},[10246,10254],{"type":21,"tag":784,"props":10247,"children":10248},{},[10249],{"type":21,"tag":29,"props":10250,"children":10251},{"href":8149},[10252],{"type":26,"value":10253},"Gate fidelity",{"type":26,"value":10255}," is usually quoted for isolated one- and two-qubit gates, which systematically flatters a chip. Errors compound differently when gates run in parallel, and crosstalk doesn't show up in the headline number.",{"type":21,"tag":6142,"props":10257,"children":10258},{},[10259,10264,10266,10271],{"type":21,"tag":784,"props":10260,"children":10261},{},[10262],{"type":26,"value":10263},"Error-mitigated results",{"type":26,"value":10265}," are sometimes inflated downstream by the mitigation itself. A 2026 analysis of ",{"type":21,"tag":29,"props":10267,"children":10268},{"href":5975},[10269],{"type":26,"value":10270},"artefactual improvements in zero-noise extrapolation",{"type":26,"value":10272}," found the technique sometimes manufactures convincing gains that reflect no underlying physics at all.",{"type":21,"tag":6142,"props":10274,"children":10275},{},[10276,10281],{"type":21,"tag":784,"props":10277,"children":10278},{},[10279],{"type":26,"value":10280},"CLOPS",{"type":26,"value":10282}," and similar throughput metrics measure speed, not accuracy. A fast machine that returns noise is not useful.",{"type":21,"tag":6142,"props":10284,"children":10285},{},[10286,10291],{"type":21,"tag":784,"props":10287,"children":10288},{},[10289],{"type":26,"value":10290},"\"Algorithmic qubits\"",{"type":26,"value":10292}," and other vendor-defined metrics aren't comparable across vendors, which is frequently the point.",{"type":21,"tag":22,"props":10294,"children":10295},{},[10296],{"type":26,"value":10297},"The order also asks for a mechanism to share information between agencies \"to improve the Government's ability to assess commercial quantum computing capabilities.\" This is a polite way of saying that vendor marketing claims are currently hard to verify independently.",{"type":21,"tag":22,"props":10299,"children":10300},{},[10301],{"type":26,"value":10302},"If you're evaluating hardware yourself, the practical lesson is to stop trusting any single number and benchmark against your own workload. You pull real device properties directly rather than relying on a press release:",{"type":21,"tag":2062,"props":10304,"children":10306},{"className":3362,"code":10305,"language":3361,"meta":7,"style":7},"from qiskit_ibm_runtime import QiskitRuntimeService\n\nservice = QiskitRuntimeService()\nbackend = service.least_busy(operational=True, simulator=False)\n\nprint(f\"Backend:  {backend.name}\")\nprint(f\"Qubits:   {backend.num_qubits}\")\nprint(f\"Basis:    {backend.basis_gates}\")\n\n# Per-qubit error rates vary enormously across a single chip\nprops = backend.properties()\nerrors = [(q, props.readout_error(q)) for q in range(backend.num_qubits)]\nworst = max(errors, key=lambda x: x[1])\nbest = min(errors, key=lambda x: x[1])\nprint(f\"Readout error: best qubit: {best[1]:.4f}, worst: {worst[1]:.4f}\")\n",[10307],{"type":21,"tag":1831,"props":10308,"children":10309},{"__ignoreMap":7},[10310,10331,10338,10355,10405,10412,10453,10494,10535,10542,10550,10567,10605,10650,10691],{"type":21,"tag":2072,"props":10311,"children":10312},{"class":2074,"line":2075},[10313,10317,10322,10326],{"type":21,"tag":2072,"props":10314,"children":10315},{"style":3372},[10316],{"type":26,"value":3398},{"type":21,"tag":2072,"props":10318,"children":10319},{"style":2079},[10320],{"type":26,"value":10321}," qiskit_ibm_runtime ",{"type":21,"tag":2072,"props":10323,"children":10324},{"style":3372},[10325],{"type":26,"value":3375},{"type":21,"tag":2072,"props":10327,"children":10328},{"style":2079},[10329],{"type":26,"value":10330}," QiskitRuntimeService\n",{"type":21,"tag":2072,"props":10332,"children":10333},{"class":2074,"line":164},[10334],{"type":21,"tag":2072,"props":10335,"children":10336},{"emptyLinePlaceholder":3460},[10337],{"type":26,"value":3463},{"type":21,"tag":2072,"props":10339,"children":10340},{"class":2074,"line":2093},[10341,10346,10350],{"type":21,"tag":2072,"props":10342,"children":10343},{"style":2079},[10344],{"type":26,"value":10345},"service ",{"type":21,"tag":2072,"props":10347,"children":10348},{"style":3372},[10349],{"type":26,"value":3487},{"type":21,"tag":2072,"props":10351,"children":10352},{"style":2079},[10353],{"type":26,"value":10354}," QiskitRuntimeService()\n",{"type":21,"tag":2072,"props":10356,"children":10357},{"class":2074,"line":2155},[10358,10362,10366,10371,10376,10380,10384,10388,10392,10396,10401],{"type":21,"tag":2072,"props":10359,"children":10360},{"style":2079},[10361],{"type":26,"value":3723},{"type":21,"tag":2072,"props":10363,"children":10364},{"style":3372},[10365],{"type":26,"value":3487},{"type":21,"tag":2072,"props":10367,"children":10368},{"style":2079},[10369],{"type":26,"value":10370}," service.least_busy(",{"type":21,"tag":2072,"props":10372,"children":10373},{"style":3735},[10374],{"type":26,"value":10375},"operational",{"type":21,"tag":2072,"props":10377,"children":10378},{"style":3372},[10379],{"type":26,"value":3487},{"type":21,"tag":2072,"props":10381,"children":10382},{"style":2097},[10383],{"type":26,"value":7340},{"type":21,"tag":2072,"props":10385,"children":10386},{"style":2079},[10387],{"type":26,"value":798},{"type":21,"tag":2072,"props":10389,"children":10390},{"style":3735},[10391],{"type":26,"value":6090},{"type":21,"tag":2072,"props":10393,"children":10394},{"style":3372},[10395],{"type":26,"value":3487},{"type":21,"tag":2072,"props":10397,"children":10398},{"style":2097},[10399],{"type":26,"value":10400},"False",{"type":21,"tag":2072,"props":10402,"children":10403},{"style":2079},[10404],{"type":26,"value":4281},{"type":21,"tag":2072,"props":10406,"children":10407},{"class":2074,"line":2178},[10408],{"type":21,"tag":2072,"props":10409,"children":10410},{"emptyLinePlaceholder":3460},[10411],{"type":26,"value":3463},{"type":21,"tag":2072,"props":10413,"children":10414},{"class":2074,"line":288},[10415,10419,10423,10427,10432,10436,10441,10445,10449],{"type":21,"tag":2072,"props":10416,"children":10417},{"style":2097},[10418],{"type":26,"value":4614},{"type":21,"tag":2072,"props":10420,"children":10421},{"style":2079},[10422],{"type":26,"value":3879},{"type":21,"tag":2072,"props":10424,"children":10425},{"style":3372},[10426],{"type":26,"value":3938},{"type":21,"tag":2072,"props":10428,"children":10429},{"style":2108},[10430],{"type":26,"value":10431},"\"Backend:  ",{"type":21,"tag":2072,"props":10433,"children":10434},{"style":2097},[10435],{"type":26,"value":3948},{"type":21,"tag":2072,"props":10437,"children":10438},{"style":2079},[10439],{"type":26,"value":10440},"backend.name",{"type":21,"tag":2072,"props":10442,"children":10443},{"style":2097},[10444],{"type":26,"value":3958},{"type":21,"tag":2072,"props":10446,"children":10447},{"style":2108},[10448],{"type":26,"value":7539},{"type":21,"tag":2072,"props":10450,"children":10451},{"style":2079},[10452],{"type":26,"value":4281},{"type":21,"tag":2072,"props":10454,"children":10455},{"class":2074,"line":16},[10456,10460,10464,10468,10473,10477,10482,10486,10490],{"type":21,"tag":2072,"props":10457,"children":10458},{"style":2097},[10459],{"type":26,"value":4614},{"type":21,"tag":2072,"props":10461,"children":10462},{"style":2079},[10463],{"type":26,"value":3879},{"type":21,"tag":2072,"props":10465,"children":10466},{"style":3372},[10467],{"type":26,"value":3938},{"type":21,"tag":2072,"props":10469,"children":10470},{"style":2108},[10471],{"type":26,"value":10472},"\"Qubits:   ",{"type":21,"tag":2072,"props":10474,"children":10475},{"style":2097},[10476],{"type":26,"value":3948},{"type":21,"tag":2072,"props":10478,"children":10479},{"style":2079},[10480],{"type":26,"value":10481},"backend.num_qubits",{"type":21,"tag":2072,"props":10483,"children":10484},{"style":2097},[10485],{"type":26,"value":3958},{"type":21,"tag":2072,"props":10487,"children":10488},{"style":2108},[10489],{"type":26,"value":7539},{"type":21,"tag":2072,"props":10491,"children":10492},{"style":2079},[10493],{"type":26,"value":4281},{"type":21,"tag":2072,"props":10495,"children":10496},{"class":2074,"line":366},[10497,10501,10505,10509,10514,10518,10523,10527,10531],{"type":21,"tag":2072,"props":10498,"children":10499},{"style":2097},[10500],{"type":26,"value":4614},{"type":21,"tag":2072,"props":10502,"children":10503},{"style":2079},[10504],{"type":26,"value":3879},{"type":21,"tag":2072,"props":10506,"children":10507},{"style":3372},[10508],{"type":26,"value":3938},{"type":21,"tag":2072,"props":10510,"children":10511},{"style":2108},[10512],{"type":26,"value":10513},"\"Basis:    ",{"type":21,"tag":2072,"props":10515,"children":10516},{"style":2097},[10517],{"type":26,"value":3948},{"type":21,"tag":2072,"props":10519,"children":10520},{"style":2079},[10521],{"type":26,"value":10522},"backend.basis_gates",{"type":21,"tag":2072,"props":10524,"children":10525},{"style":2097},[10526],{"type":26,"value":3958},{"type":21,"tag":2072,"props":10528,"children":10529},{"style":2108},[10530],{"type":26,"value":7539},{"type":21,"tag":2072,"props":10532,"children":10533},{"style":2079},[10534],{"type":26,"value":4281},{"type":21,"tag":2072,"props":10536,"children":10537},{"class":2074,"line":853},[10538],{"type":21,"tag":2072,"props":10539,"children":10540},{"emptyLinePlaceholder":3460},[10541],{"type":26,"value":3463},{"type":21,"tag":2072,"props":10543,"children":10544},{"class":2074,"line":3092},[10545],{"type":21,"tag":2072,"props":10546,"children":10547},{"style":3985},[10548],{"type":26,"value":10549},"# Per-qubit error rates vary enormously across a single chip\n",{"type":21,"tag":2072,"props":10551,"children":10552},{"class":2074,"line":3651},[10553,10558,10562],{"type":21,"tag":2072,"props":10554,"children":10555},{"style":2079},[10556],{"type":26,"value":10557},"props ",{"type":21,"tag":2072,"props":10559,"children":10560},{"style":3372},[10561],{"type":26,"value":3487},{"type":21,"tag":2072,"props":10563,"children":10564},{"style":2079},[10565],{"type":26,"value":10566}," backend.properties()\n",{"type":21,"tag":2072,"props":10568,"children":10569},{"class":2074,"line":2616},[10570,10575,10579,10584,10588,10592,10596,10600],{"type":21,"tag":2072,"props":10571,"children":10572},{"style":2079},[10573],{"type":26,"value":10574},"errors ",{"type":21,"tag":2072,"props":10576,"children":10577},{"style":3372},[10578],{"type":26,"value":3487},{"type":21,"tag":2072,"props":10580,"children":10581},{"style":2079},[10582],{"type":26,"value":10583}," [(q, props.readout_error(q)) ",{"type":21,"tag":2072,"props":10585,"children":10586},{"style":3372},[10587],{"type":26,"value":4479},{"type":21,"tag":2072,"props":10589,"children":10590},{"style":2079},[10591],{"type":26,"value":5624},{"type":21,"tag":2072,"props":10593,"children":10594},{"style":3372},[10595],{"type":26,"value":3869},{"type":21,"tag":2072,"props":10597,"children":10598},{"style":2097},[10599],{"type":26,"value":3874},{"type":21,"tag":2072,"props":10601,"children":10602},{"style":2079},[10603],{"type":26,"value":10604},"(backend.num_qubits)]\n",{"type":21,"tag":2072,"props":10606,"children":10607},{"class":2074,"line":3695},[10608,10613,10617,10622,10627,10632,10637,10642,10646],{"type":21,"tag":2072,"props":10609,"children":10610},{"style":2079},[10611],{"type":26,"value":10612},"worst ",{"type":21,"tag":2072,"props":10614,"children":10615},{"style":3372},[10616],{"type":26,"value":3487},{"type":21,"tag":2072,"props":10618,"children":10619},{"style":2097},[10620],{"type":26,"value":10621}," max",{"type":21,"tag":2072,"props":10623,"children":10624},{"style":2079},[10625],{"type":26,"value":10626},"(errors, ",{"type":21,"tag":2072,"props":10628,"children":10629},{"style":3735},[10630],{"type":26,"value":10631},"key",{"type":21,"tag":2072,"props":10633,"children":10634},{"style":3372},[10635],{"type":26,"value":10636},"=lambda",{"type":21,"tag":2072,"props":10638,"children":10639},{"style":2079},[10640],{"type":26,"value":10641}," x: x[",{"type":21,"tag":2072,"props":10643,"children":10644},{"style":2097},[10645],{"type":26,"value":3555},{"type":21,"tag":2072,"props":10647,"children":10648},{"style":2079},[10649],{"type":26,"value":3597},{"type":21,"tag":2072,"props":10651,"children":10652},{"class":2074,"line":3709},[10653,10658,10662,10667,10671,10675,10679,10683,10687],{"type":21,"tag":2072,"props":10654,"children":10655},{"style":2079},[10656],{"type":26,"value":10657},"best ",{"type":21,"tag":2072,"props":10659,"children":10660},{"style":3372},[10661],{"type":26,"value":3487},{"type":21,"tag":2072,"props":10663,"children":10664},{"style":2097},[10665],{"type":26,"value":10666}," min",{"type":21,"tag":2072,"props":10668,"children":10669},{"style":2079},[10670],{"type":26,"value":10626},{"type":21,"tag":2072,"props":10672,"children":10673},{"style":3735},[10674],{"type":26,"value":10631},{"type":21,"tag":2072,"props":10676,"children":10677},{"style":3372},[10678],{"type":26,"value":10636},{"type":21,"tag":2072,"props":10680,"children":10681},{"style":2079},[10682],{"type":26,"value":10641},{"type":21,"tag":2072,"props":10684,"children":10685},{"style":2097},[10686],{"type":26,"value":3555},{"type":21,"tag":2072,"props":10688,"children":10689},{"style":2079},[10690],{"type":26,"value":3597},{"type":21,"tag":2072,"props":10692,"children":10693},{"class":2074,"line":3717},[10694,10698,10702,10706,10711,10715,10720,10724,10729,10734,10738,10743,10747,10752,10756,10760,10764,10768,10772],{"type":21,"tag":2072,"props":10695,"children":10696},{"style":2097},[10697],{"type":26,"value":4614},{"type":21,"tag":2072,"props":10699,"children":10700},{"style":2079},[10701],{"type":26,"value":3879},{"type":21,"tag":2072,"props":10703,"children":10704},{"style":3372},[10705],{"type":26,"value":3938},{"type":21,"tag":2072,"props":10707,"children":10708},{"style":2108},[10709],{"type":26,"value":10710},"\"Readout error: best qubit: ",{"type":21,"tag":2072,"props":10712,"children":10713},{"style":2097},[10714],{"type":26,"value":3948},{"type":21,"tag":2072,"props":10716,"children":10717},{"style":2079},[10718],{"type":26,"value":10719},"best[",{"type":21,"tag":2072,"props":10721,"children":10722},{"style":2097},[10723],{"type":26,"value":3555},{"type":21,"tag":2072,"props":10725,"children":10726},{"style":2079},[10727],{"type":26,"value":10728},"]",{"type":21,"tag":2072,"props":10730,"children":10731},{"style":3372},[10732],{"type":26,"value":10733},":.4f",{"type":21,"tag":2072,"props":10735,"children":10736},{"style":2097},[10737],{"type":26,"value":3958},{"type":21,"tag":2072,"props":10739,"children":10740},{"style":2108},[10741],{"type":26,"value":10742},", worst: ",{"type":21,"tag":2072,"props":10744,"children":10745},{"style":2097},[10746],{"type":26,"value":3948},{"type":21,"tag":2072,"props":10748,"children":10749},{"style":2079},[10750],{"type":26,"value":10751},"worst[",{"type":21,"tag":2072,"props":10753,"children":10754},{"style":2097},[10755],{"type":26,"value":3555},{"type":21,"tag":2072,"props":10757,"children":10758},{"style":2079},[10759],{"type":26,"value":10728},{"type":21,"tag":2072,"props":10761,"children":10762},{"style":3372},[10763],{"type":26,"value":10733},{"type":21,"tag":2072,"props":10765,"children":10766},{"style":2097},[10767],{"type":26,"value":3958},{"type":21,"tag":2072,"props":10769,"children":10770},{"style":2108},[10771],{"type":26,"value":7539},{"type":21,"tag":2072,"props":10773,"children":10774},{"style":2079},[10775],{"type":26,"value":4281},{"type":21,"tag":22,"props":10777,"children":10778},{},[10779,10781,10786,10788,10792,10793,10798],{"type":26,"value":10780},"Run that on almost any current device and you'll see the spread between the best and worst qubit on the ",{"type":21,"tag":103,"props":10782,"children":10783},{},[10784],{"type":26,"value":10785},"same chip",{"type":26,"value":10787}," is often a factor of five or more. That variation is invisible in every summary statistic, and it's precisely why transpilation and qubit selection matter so much. Our ",{"type":21,"tag":29,"props":10789,"children":10790},{"href":1206},[10791],{"type":26,"value":2867},{"type":26,"value":383},{"type":21,"tag":29,"props":10794,"children":10795},{"href":590},[10796],{"type":26,"value":10797},"hardware guide",{"type":26,"value":10799}," go deeper on picking backends.",{"type":21,"tag":43,"props":10801,"children":10803},{"id":10802},"the-field-hasnt-picked-a-winning-qubit-technology",[10804],{"type":26,"value":10805},"The field hasn't picked a winning qubit technology",{"type":21,"tag":22,"props":10807,"children":10808},{},[10809],{"type":26,"value":10810},"Something notable by its absence: the order never names a qubit modality. No preference for superconducting circuits, trapped ions, photonics, neutral atoms, or spin qubits. It refers generically to \"quantum-enabling component technologies.\"",{"type":21,"tag":22,"props":10812,"children":10813},{},[10814],{"type":26,"value":10815},"That's a meaningful signal. When a technology matures, procurement documents get specific. Nobody writes a national strategy for \"computing devices based on some form of switching element.\" The deliberate vagueness reflects genuine reality: as of mid-2026, no modality has clearly won.",{"type":21,"tag":22,"props":10817,"children":10818},{},[10819,10821,10827,10829,10834],{"type":26,"value":10820},"Each remains ahead on different axes: superconducting chips on gate speed and fabrication scale, trapped ions on fidelity and all-to-all connectivity, neutral atoms on qubit count, photonics on room-temperature operation and networking. The 2026 ",{"type":21,"tag":29,"props":10822,"children":10824},{"href":10823},"\u002Fresearch\u002Fholographic-codes-quantum-gravity-2026",[10825],{"type":26,"value":10826},"holographic codes experiment",{"type":26,"value":10828}," ran on trapped ions. ",{"type":21,"tag":29,"props":10830,"children":10831},{"href":8250},[10832],{"type":26,"value":10833},"Google's below-threshold error correction result",{"type":26,"value":10835}," ran on superconducting hardware. Both were landmark results on completely different platforms.",{"type":21,"tag":22,"props":10837,"children":10838},{},[10839,10841,10846],{"type":26,"value":10840},"For anyone learning quantum computing, this is good news, and it has a concrete implication: ",{"type":21,"tag":784,"props":10842,"children":10843},{},[10844],{"type":26,"value":10845},"don't over-specialize in one vendor's stack.",{"type":26,"value":10847}," The abstractions (circuits, gates, measurement, error mitigation) transfer across hardware. The vendor-specific API details sometimes don't.",{"type":21,"tag":43,"props":10849,"children":10851},{"id":10850},"beyond-current-classical-capabilities-is-the-bar-now",[10852],{"type":26,"value":10853},"\"Beyond current classical capabilities\" is the bar now",{"type":21,"tag":22,"props":10855,"children":10856},{},[10857,10859,10864],{"type":26,"value":10858},"The order establishes the ",{"type":21,"tag":784,"props":10860,"children":10861},{},[10862],{"type":26,"value":10863},"Quantum Computer for Application Development and Discovery Science (QC-ADDS)",{"type":26,"value":10865}," effort, aiming to deliver at least one machine to a Department of Energy facility and make it available to the scientific community. The Secretary of Energy has 90 days to identify specifications for systems capable of \"transformative scientific applications... on a path towards economically significant applications and beyond current classical computer capabilities.\"",{"type":21,"tag":22,"props":10867,"children":10868},{},[10869],{"type":26,"value":10870},"Two things are worth noticing in that phrasing.",{"type":21,"tag":22,"props":10872,"children":10873},{},[10874,10876,10881,10883,10888,10890,10895],{"type":26,"value":10875},"First, the framing is ",{"type":21,"tag":784,"props":10877,"children":10878},{},[10879],{"type":26,"value":10880},"discovery science",{"type":26,"value":10882},", not commercial advantage. The goal is a scientific instrument, a machine researchers use to learn things, rather than a product that beats classical computers at a business task. That's consistent with where the evidence points: ",{"type":21,"tag":29,"props":10884,"children":10885},{"href":945},[10886],{"type":26,"value":10887},"IBM's 2023 quantum utility result",{"type":26,"value":10889}," and the holographic-codes work were both ",{"type":21,"tag":103,"props":10891,"children":10892},{},[10893],{"type":26,"value":10894},"physics",{"type":26,"value":10896}," experiments.",{"type":21,"tag":22,"props":10898,"children":10899},{},[10900],{"type":26,"value":10901},"Second, \"on a path towards\" is doing real work in that sentence. It's an acknowledgment that the machine being specified is a step, not a destination.",{"type":21,"tag":22,"props":10903,"children":10904},{},[10905,10907,10913,10915,10919],{"type":26,"value":10906},"It also explains why the bar keeps moving. Classical methods improve too: a 2026 result ",{"type":21,"tag":29,"props":10908,"children":10910},{"href":10909},"\u002Fresearch\u002Fclassical-simulation-rydberg-arrays-2026",[10911],{"type":26,"value":10912},"classically simulating Rydberg atom arrays",{"type":26,"value":10914}," reproduced experiments that had been treated as beyond classical reach, which is exactly the kind of moving target a national benchmarking center would exist to track. Claims of ",{"type":21,"tag":29,"props":10916,"children":10917},{"href":7996},[10918],{"type":26,"value":7999},{"type":26,"value":10920}," are only as durable as the best classical algorithm anyone has bothered to write.",{"type":21,"tag":43,"props":10922,"children":10924},{"id":10923},"distributed-quantum-computing-shows-up-as-a-serious-goal",[10925],{"type":26,"value":10926},"Distributed quantum computing shows up as a serious goal",{"type":21,"tag":22,"props":10928,"children":10929},{},[10930],{"type":26,"value":10931},"Tucked into the sections on networking is a request for DOE plans covering quantum networking for \"distributed quantum computing.\"",{"type":21,"tag":22,"props":10933,"children":10934},{},[10935],{"type":26,"value":10936},"This matters because it's an admission about scaling. Building one enormous quantum processor is extraordinarily hard. Wiring, cooling, crosstalk, and yield all get worse as chips grow. Linking several smaller processors into one logical machine is an alternative route, and it depends on distributing entanglement between separate devices with high enough fidelity to be useful.",{"type":21,"tag":22,"props":10938,"children":10939},{},[10940,10942,10948,10950,10956],{"type":26,"value":10941},"The underlying primitive is ",{"type":21,"tag":29,"props":10943,"children":10945},{"href":10944},"\u002Fresearch\u002Fbennett-teleportation-1993",[10946],{"type":26,"value":10947},"quantum teleportation",{"type":26,"value":10949},", which moves a qubit's state between locations using shared ",{"type":21,"tag":29,"props":10951,"children":10953},{"href":10952},"\u002Fglossary\u002Fentanglement",[10954],{"type":26,"value":10955},"entanglement",{"type":26,"value":10957}," plus two classical bits. It's been experimentally routine for years, but doing it fast enough, and cleanly enough, to knit processors together is not. Seeing it named as a five-year planning target is a sign the single-big-chip strategy isn't assumed to be sufficient.",{"type":21,"tag":43,"props":10959,"children":10961},{"id":10960},"the-workforce-gap-is-treated-as-a-bottleneck",[10962],{"type":26,"value":10963},"The workforce gap is treated as a bottleneck",{"type":21,"tag":22,"props":10965,"children":10966},{},[10967],{"type":26,"value":10968},"The order directs the NSF to initiate \"a network of National QIST Workforce Development Institutes\" within 180 days, alongside recruitment and retention strategies.",{"type":21,"tag":22,"props":10970,"children":10971},{},[10972],{"type":26,"value":10973},"Workforce sections are easy to skim past, but the inclusion tells you something concrete: the constraint on quantum progress isn't purely hardware. There are not enough people who write, debug, and reason about quantum programs, and that shortage is now considered severe enough to warrant dedicated institutions.",{"type":21,"tag":22,"props":10975,"children":10976},{},[10977,10979,10983,10985,10991],{"type":26,"value":10978},"For anyone reading this site, that's the most directly actionable part of the whole document. The skills being described as scarce are learnable right now, for free, on real hardware. Our ",{"type":21,"tag":29,"props":10980,"children":10981},{"href":8433},[10982],{"type":26,"value":8436},{"type":26,"value":10984}," collects the best structured options, and the ",{"type":21,"tag":29,"props":10986,"children":10988},{"href":10987},"\u002Fblog\u002Fgetting-started-free-quantum-computing",[10989],{"type":26,"value":10990},"getting started guide",{"type":26,"value":10992}," will get you running a circuit on a real QPU in an afternoon.",{"type":21,"tag":43,"props":10994,"children":10996},{"id":10995},"what-it-doesnt-contain",[10997],{"type":26,"value":10998},"What it doesn't contain",{"type":21,"tag":22,"props":11000,"children":11001},{},[11002,11004,11009],{"type":26,"value":11003},"Worth stating plainly for accuracy: the order specifies ",{"type":21,"tag":784,"props":11005,"children":11006},{},[11007],{"type":26,"value":11008},"no dollar figures",{"type":26,"value":11010},". It sets direction, assigns responsibilities, and imposes deadlines (90, 120, 180, and 210 days across various sections), but appropriations come from elsewhere. Deadlines in an executive order are also not guarantees of delivery.",{"type":21,"tag":22,"props":11012,"children":11013},{},[11014],{"type":26,"value":11015},"Treat the timelines as a statement of intent, not a schedule to plan around.",{"type":21,"tag":43,"props":11017,"children":11019},{"id":11018},"the-takeaway",[11020],{"type":26,"value":11021},"The takeaway",{"type":21,"tag":22,"props":11023,"children":11024},{},[11025],{"type":26,"value":11026},"Strip out the politics and EO 14413 reads as an unusually frank technical assessment:",{"type":21,"tag":7925,"props":11028,"children":11029},{},[11030,11035,11040,11045,11050],{"type":21,"tag":6142,"props":11031,"children":11032},{},[11033],{"type":26,"value":11034},"We cannot reliably measure quantum computer performance, and that's now urgent enough to institutionalize.",{"type":21,"tag":6142,"props":11036,"children":11037},{},[11038],{"type":26,"value":11039},"No qubit technology has won, so bets are being hedged.",{"type":21,"tag":6142,"props":11041,"children":11042},{},[11043],{"type":26,"value":11044},"The near-term target is scientific discovery, not commercial advantage.",{"type":21,"tag":6142,"props":11046,"children":11047},{},[11048],{"type":26,"value":11049},"Scaling potentially requires networking chips together rather than building one giant one.",{"type":21,"tag":6142,"props":11051,"children":11052},{},[11053],{"type":26,"value":11054},"There aren't enough trained people, and that's a first-order bottleneck.",{"type":21,"tag":22,"props":11056,"children":11057},{},[11058],{"type":26,"value":11059},"None of that is pessimistic. It's a field that has moved past \"does this work at all\" into \"how do we measure it, scale it, and staff it,\" roughly the transition classical computing went through in the 1950s.",{"type":21,"tag":22,"props":11061,"children":11062},{},[11063,11065,11070],{"type":26,"value":11064},"The measurement problem is the one to watch. Benchmarking sounds dull next to qubit-count records, but you cannot engineer what you cannot measure, and every serious claim about quantum advantage ultimately rests on it. If you want to understand where the field is going, learn to read the error rates instead of the headlines. Start with our ",{"type":21,"tag":29,"props":11066,"children":11067},{"href":7982},[11068],{"type":26,"value":11069},"glossary of the terms that matter",{"type":26,"value":237},{"type":21,"tag":2445,"props":11072,"children":11073},{},[11074],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":11076},[11077,11078,11079,11080,11081,11082,11083],{"id":10194,"depth":164,"text":10197},{"id":10802,"depth":164,"text":10805},{"id":10850,"depth":164,"text":10853},{"id":10923,"depth":164,"text":10926},{"id":10960,"depth":164,"text":10963},{"id":10995,"depth":164,"text":10998},{"id":11018,"depth":164,"text":11021},"content:blog:quantum-benchmarking-eo-14413.md","blog\u002Fquantum-benchmarking-eo-14413.md","blog\u002Fquantum-benchmarking-eo-14413",{"_path":2689,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":11088,"description":11089,"date":3089,"author":11,"tags":11090,"readingTime":853,"body":11091,"_type":171,"_id":11582,"_source":173,"_file":11583,"_stem":11584,"_extension":176},"The Real-Time Decoding Bottleneck: Quantum Error Correction's Classical Problem","Syndrome measurement tells you something broke, not what broke. Working that out is decoding, and if your classical decoder can't keep pace with the syndrome stream, the whole error-correction scheme collapses.",[365,15,3091],{"type":18,"children":11092,"toc":11572},[11093,11110,11121,11127,11139,11152,11164,11176,11182,11187,11192,11197,11209,11221,11233,11245,11251,11256,11266,11276,11286,11292,11297,11302,11314,11333,11338,11343,11349,11361,11366,11397,11409,11415,11420,11452,11457,11463,11475,11480,11499,11505,11510,11515,11526],{"type":21,"tag":22,"props":11094,"children":11095},{},[11096,11098,11102,11104,11108],{"type":26,"value":11097},"Most explanations of ",{"type":21,"tag":29,"props":11099,"children":11100},{"href":409},[11101],{"type":26,"value":8101},{"type":26,"value":11103}," end at the same place. You encode a logical qubit across many physical ones, you run parity checks with ",{"type":21,"tag":29,"props":11105,"children":11106},{"href":8113},[11107],{"type":26,"value":8116},{"type":26,"value":11109},", you detect errors without collapsing the state, and then the article stops, having implied that detection is correction.",{"type":21,"tag":22,"props":11111,"children":11112},{},[11113,11115,11119],{"type":26,"value":11114},"It isn't. In our ",{"type":21,"tag":29,"props":11116,"children":11117},{"href":487},[11118],{"type":26,"value":1530},{"type":26,"value":11120},", we listed real-time decoding as one of four things a fault-tolerant machine needs, and then moved on. This post picks up that thread, because it is the requirement least likely to be explained anywhere else, and it has a property the others don't: it is not fundamentally a quantum problem at all. It is a classical computing problem sitting inside the quantum computer, and it is currently one of the harder ones.",{"type":21,"tag":43,"props":11122,"children":11124},{"id":11123},"what-syndrome-measurement-gives-you",[11125],{"type":26,"value":11126},"What syndrome measurement gives you",{"type":21,"tag":22,"props":11128,"children":11129},{},[11130,11132,11137],{"type":26,"value":11131},"The ",{"type":21,"tag":29,"props":11133,"children":11134},{"href":428},[11135],{"type":26,"value":11136},"QEC basics post",{"type":26,"value":11138}," covers the mechanics of parity checks, so we won't re-derive them. The relevant point is what comes out.",{"type":21,"tag":22,"props":11140,"children":11141},{},[11142,11144,11150],{"type":26,"value":11143},"A round of syndrome extraction hands you a list of bits. Each bit says whether one particular parity check agreed with its previous value or flipped. A flipped check means an error touched at least one of the qubits it monitors. That's it. You do not learn which qubit. You do not learn whether it was an X, Z, or Y error. See the ",{"type":21,"tag":29,"props":11145,"children":11147},{"href":11146},"\u002Fglossary\u002Fpauli-operators",[11148],{"type":26,"value":11149},"Pauli operator",{"type":26,"value":11151}," breakdown for why those are the only cases that matter. You learn only that the parity structure has been violated somewhere in the neighbourhood of that check.",{"type":21,"tag":22,"props":11153,"children":11154},{},[11155,11157,11162],{"type":26,"value":11156},"Worse, the ",{"type":21,"tag":29,"props":11158,"children":11159},{"href":6552},[11160],{"type":26,"value":11161},"measurement",{"type":26,"value":11163}," circuits are themselves noisy, so some flipped checks correspond to no data error at all. The check itself misfired. And errors that happen to straddle two checks flip both, while an error in the middle of a chain of errors sometimes flips nothing, because two violations cancel.",{"type":21,"tag":22,"props":11165,"children":11166},{},[11167,11169,11174],{"type":26,"value":11168},"So the syndrome is not a diagnosis. It is a constraint. The job is to find the most probable physical error consistent with that constraint, then apply (or, more often, simply record) the correction. That inference step is ",{"type":21,"tag":784,"props":11170,"children":11171},{},[11172],{"type":26,"value":11173},"decoding",{"type":26,"value":11175},", and it is a genuine combinatorial optimisation problem.",{"type":21,"tag":43,"props":11177,"children":11179},{"id":11178},"the-part-that-makes-it-urgent",[11180],{"type":26,"value":11181},"The part that makes it urgent",{"type":21,"tag":22,"props":11183,"children":11184},{},[11185],{"type":26,"value":11186},"Here is where it stops being an interesting algorithms question and becomes an engineering crisis.",{"type":21,"tag":22,"props":11188,"children":11189},{},[11190],{"type":26,"value":11191},"Syndrome extraction is not a one-off. It runs continuously, in rounds, for the entire duration of the computation. On superconducting hardware a round takes roughly a microsecond. Google's Willow experiments ran a cycle time of about 1.1 µs. Every one of those cycles emits a fresh syndrome frame from every logical qubit on the chip. For a machine of any interesting size, the syndrome data rate runs into millions of measurements per second.",{"type":21,"tag":22,"props":11193,"children":11194},{},[11195],{"type":26,"value":11196},"Your decoder has to consume that stream at least as fast as it arrives. Not \"reasonably fast.\" At least as fast, sustained, forever.",{"type":21,"tag":22,"props":11198,"children":11199},{},[11200,11202,11207],{"type":26,"value":11201},"If it doesn't, you get the ",{"type":21,"tag":784,"props":11203,"children":11204},{},[11205],{"type":26,"value":11206},"backlog problem",{"type":26,"value":11208},", and the backlog problem does not degrade gracefully. Suppose your decoder processes each round 10% slower than rounds are produced. Undecoded frames pile up. The queue grows linearly in wall-clock time, which sounds survivable until you remember why you needed the decode result in the first place.",{"type":21,"tag":22,"props":11210,"children":11211},{},[11212,11214,11219],{"type":26,"value":11213},"Certain operations in a fault-tolerant computation are ",{"type":21,"tag":103,"props":11215,"children":11216},{},[11217],{"type":26,"value":11218},"conditional",{"type":26,"value":11220},": what gate you apply next depends on the decoded outcome of measurements already taken. The canonical case is a non-Clifford gate implemented via magic state injection, where a correction is applied or not depending on a measurement result that must first be decoded. At each such branch point, the machine must stop and wait for the decoder to catch up to the present moment. But while it waits, more syndrome rounds are being produced. The qubits don't stop decohering only because the classical side is busy. So the wait itself extends the backlog, which lengthens the next wait, which extends the backlog further.",{"type":21,"tag":22,"props":11222,"children":11223},{},[11224,11226,11231],{"type":26,"value":11225},"The result is an ",{"type":21,"tag":784,"props":11227,"children":11228},{},[11229],{"type":26,"value":11230},"exponential slowdown",{"type":26,"value":11232},". Each conditional operation takes longer than the last by a compounding factor, and the computation grinds to a halt long before it finishes. A decoder that is 10% too slow doesn't cost you 10%. It costs you the entire computation. The requirement is a hard throughput threshold, not a performance preference.",{"type":21,"tag":22,"props":11234,"children":11235},{},[11236,11238,11243],{"type":26,"value":11237},"This is why the word \"real-time\" is load-bearing. Offline decoding (recording the syndrome stream and analysing it afterwards) is perfectly fine for a ",{"type":21,"tag":103,"props":11239,"children":11240},{},[11241],{"type":26,"value":11242},"memory",{"type":26,"value":11244}," experiment, where you only want to know whether the stored state survived. It is useless for computation.",{"type":21,"tag":43,"props":11246,"children":11248},{"id":11247},"the-decoder-families-and-their-bargains",[11249],{"type":26,"value":11250},"The decoder families, and their bargains",{"type":21,"tag":22,"props":11252,"children":11253},{},[11254],{"type":26,"value":11255},"The decoding problem has a beautiful structure in the surface code, and a much uglier one elsewhere.",{"type":21,"tag":22,"props":11257,"children":11258},{},[11259,11264],{"type":21,"tag":784,"props":11260,"children":11261},{},[11262],{"type":26,"value":11263},"Minimum-weight perfect matching (MWPM).",{"type":26,"value":11265}," In the surface code, errors have a geometric signature: a chain of errors flips exactly the two checks at its endpoints. Syndrome violations therefore come in pairs, and finding the most likely error reduces to pairing up the flipped checks so that the total length of the connecting paths is minimised. That's a classic graph problem with a classic polynomial-time solution, Edmonds' blossom algorithm. MWPM has long been the accuracy benchmark for surface-code decoding: roughly a 0.94% threshold on weighted decoder graphs in commonly cited comparisons. Its problem is speed: polynomial time is not the same as fast enough, and the constant factors are unfriendly at microsecond deadlines.",{"type":21,"tag":22,"props":11267,"children":11268},{},[11269,11274],{"type":21,"tag":784,"props":11270,"children":11271},{},[11272],{"type":26,"value":11273},"Union-find.",{"type":26,"value":11275}," The pragmatic answer. Union-find grows clusters around syndrome violations until each cluster is explained by an internal error, using disjoint-set data structures that run in almost-linear time. It's a fast approximation of what matching does, and the accuracy cost is real but modest, with reported thresholds around 0.83% weighted versus MWPM's 0.94%. That trade has made it the workhorse for hardware implementations, particularly FPGA ones.",{"type":21,"tag":22,"props":11277,"children":11278},{},[11279,11284],{"type":21,"tag":784,"props":11280,"children":11281},{},[11282],{"type":26,"value":11283},"Belief propagation plus ordered statistics (BP-OSD).",{"type":26,"value":11285}," This is what you reach for when the matching trick stops working, which is exactly what happens with quantum LDPC codes.",{"type":21,"tag":43,"props":11287,"children":11289},{"id":11288},"why-qldpc-decoding-is-genuinely-harder",[11290],{"type":26,"value":11291},"Why qLDPC decoding is genuinely harder",{"type":21,"tag":22,"props":11293,"children":11294},{},[11295],{"type":26,"value":11296},"The surface code's decoding advantage comes from a property most codes don't share: each error chain flips precisely two checks, so the syndrome maps onto a matching problem. Take that away and you're back to general belief propagation over a Tanner graph: the same message-passing machinery used for classical LDPC codes in modern telecoms.",{"type":21,"tag":22,"props":11298,"children":11299},{},[11300],{"type":26,"value":11301},"Except it works worse in the quantum case, for two structural reasons.",{"type":21,"tag":22,"props":11303,"children":11304},{},[11305,11307,11312],{"type":26,"value":11306},"First, ",{"type":21,"tag":784,"props":11308,"children":11309},{},[11310],{"type":26,"value":11311},"short cycles",{"type":26,"value":11313},". Belief propagation assumes the graph is locally tree-like. The loops in quantum code Tanner graphs break that assumption and hurt convergence.",{"type":21,"tag":22,"props":11315,"children":11316},{},[11317,11319,11324,11326,11331],{"type":26,"value":11318},"Second, and more fundamentally, ",{"type":21,"tag":784,"props":11320,"children":11321},{},[11322],{"type":26,"value":11323},"degeneracy",{"type":26,"value":11325},". In a quantum code, genuinely different physical error patterns are sometimes ",{"type":21,"tag":103,"props":11327,"children":11328},{},[11329],{"type":26,"value":11330},"equivalent",{"type":26,"value":11332},": they differ by a stabilizer and therefore have identical syndromes and identical effects on the logical state. Classically, this doesn't happen. Each syndrome points toward one most likely error. Quantum mechanically, belief propagation gets stuck oscillating between equally valid candidates it has no basis to choose between. It's not that the decoder can't find the answer. It's that there are several answers and the algorithm's tie-breaking machinery wasn't designed for that.",{"type":21,"tag":22,"props":11334,"children":11335},{},[11336],{"type":26,"value":11337},"The standard fix is to bolt ordered statistics decoding onto the back: when BP fails to converge, OSD solves a linear system to pick a candidate. It works, and it costs you. Plain BP scales roughly linearly in code size. The OSD post-processing step is around O(N³). For a decoder on a microsecond budget, cubic scaling is precisely the wrong shape.",{"type":21,"tag":22,"props":11339,"children":11340},{},[11341],{"type":26,"value":11342},"So qLDPC codes present the field with an awkward bargain: better codes, worse decoders.",{"type":21,"tag":43,"props":11344,"children":11346},{"id":11345},"why-anyone-puts-up-with-it",[11347],{"type":26,"value":11348},"Why anyone puts up with it",{"type":21,"tag":22,"props":11350,"children":11351},{},[11352,11354,11359],{"type":26,"value":11353},"Because the encoding rate is dramatically better. Surface codes are extravagant: the ",{"type":21,"tag":29,"props":11355,"children":11356},{"href":874},[11357],{"type":26,"value":11358},"logical qubit overhead",{"type":26,"value":11360}," runs to hundreds or thousands of physical qubits each, and the fault-tolerance estimates that produce headline figures of millions of physical qubits are mostly surface-code estimates. qLDPC codes, including the bivariate bicycle family, promise far more logical qubits per physical qubit. If that holds up, it moves the timeline for useful fault tolerance by a large margin. That is a prize worth accepting a harder decoding problem for.",{"type":21,"tag":22,"props":11362,"children":11363},{},[11364],{"type":26,"value":11365},"This is where vendors have entered the picture, and where the claims need careful handling.",{"type":21,"tag":22,"props":11367,"children":11368},{},[11369,11374,11376,11381,11383,11388,11390,11395],{"type":21,"tag":784,"props":11370,"children":11371},{},[11372],{"type":26,"value":11373},"IonQ reports",{"type":26,"value":11375}," having developed a \"Beam Search\" decoder intended to replace BP-OSD for quantum LDPC codes. On bivariate bicycle codes, ",{"type":21,"tag":784,"props":11377,"children":11378},{},[11379],{"type":26,"value":11380},"IonQ claims",{"type":26,"value":11382}," a 17x reduction in logical error rate relative to standard BP-OSD, along with a 26x reduction in worst-case (99.9th percentile) runtime, which ",{"type":21,"tag":784,"props":11384,"children":11385},{},[11386],{"type":26,"value":11387},"IonQ states",{"type":26,"value":11389}," it brought under one millisecond on a single core of a commercial CPU. ",{"type":21,"tag":784,"props":11391,"children":11392},{},[11393],{"type":26,"value":11394},"IonQ further estimates",{"type":26,"value":11396}," that three 32-core CPUs would suffice to decode 1,000 logical qubits in its trapped-ion architecture, contrasting that with roughly 1,000 FPGAs for surface-code approaches and 84 FPGAs for superconducting LDPC implementations.",{"type":21,"tag":22,"props":11398,"children":11399},{},[11400,11402,11407],{"type":26,"value":11401},"Those are vendor-reported figures, measured under vendor-chosen conditions, on vendor-selected codes and noise models, and IonQ is a hardware company with a commercial interest in the conclusion that its architecture needs less classical support than its competitors'. The direction of the work is credible and the problem is real. The specific multipliers should be treated as claims pending independent reproduction, in the same way we'd treat any ",{"type":21,"tag":29,"props":11403,"children":11404},{"href":670},[11405],{"type":26,"value":11406},"benchmark",{"type":26,"value":11408}," that hasn't been replicated by a disinterested party.",{"type":21,"tag":43,"props":11410,"children":11412},{"id":11411},"why-you-cant-simply-pick-the-fast-decoder",[11413],{"type":26,"value":11414},"Why you can't simply pick the fast decoder",{"type":21,"tag":22,"props":11416,"children":11417},{},[11418],{"type":26,"value":11419},"The obvious response to a latency problem is to accept a worse answer faster. In decoding, that instinct is sometimes fatal.",{"type":21,"tag":22,"props":11421,"children":11422},{},[11423,11425,11430,11432,11437,11439,11444,11446,11450],{"type":26,"value":11424},"A less accurate decoder produces a higher logical error rate for the same physical error rate. And the logical error rate is exactly the quantity the threshold theorem is about. ",{"type":21,"tag":29,"props":11426,"children":11427},{"href":8250},[11428],{"type":26,"value":11429},"Google's 2024 below-threshold result",{"type":26,"value":11431}," (the first experimental demonstration that increasing code distance suppresses logical errors rather than amplifying them, descending from ",{"type":21,"tag":29,"props":11433,"children":11434},{"href":8204},[11435],{"type":26,"value":11436},"Kitaev's topological codes",{"type":26,"value":11438}," and ultimately ",{"type":21,"tag":29,"props":11440,"children":11441},{"href":8191},[11442],{"type":26,"value":11443},"Shor's original 1995 code",{"type":26,"value":11445},") was a narrow win. Each distance increase roughly halved the error rate. A decoder that degrades logical ",{"type":21,"tag":29,"props":11447,"children":11448},{"href":8149},[11449],{"type":26,"value":8152},{"type":26,"value":11451}," enough eats that margin entirely and puts you back above threshold, at which point adding qubits makes things worse and the whole exercise inverts.",{"type":21,"tag":22,"props":11453,"children":11454},{},[11455],{"type":26,"value":11456},"So the decoder isn't a peripheral. It sits inside the threshold calculation. You cannot report a threshold crossing without saying which decoder produced it, and a below-threshold result obtained with an offline MWPM decoder is a weaker claim than the same result obtained in real time. Notably, Google's experiment did decode in real time, reporting average decoder latency around 63 µs at distance 5 while sustaining below-threshold performance across up to a million cycles, using an ensemble of neural-network and matching approaches rather than a single clean algorithm.",{"type":21,"tag":43,"props":11458,"children":11460},{"id":11459},"where-the-decoder-physically-lives",[11461],{"type":26,"value":11462},"Where the decoder physically lives",{"type":21,"tag":22,"props":11464,"children":11465},{},[11466,11468,11473],{"type":26,"value":11467},"The last constraint is a plumbing one. Syndrome bits have to travel from the ",{"type":21,"tag":29,"props":11469,"children":11471},{"href":11470},"\u002Fglossary\u002Fqpu",[11472],{"type":26,"value":8025},{"type":26,"value":11474}," to whatever computes on them, and the answer has to travel back, inside the error-correction cycle time.",{"type":21,"tag":22,"props":11476,"children":11477},{},[11478],{"type":26,"value":11479},"That budget covers readout, digitisation, transmission over the classical link, the decode itself, and the return trip. On superconducting hardware the qubits sit in a dilution refrigerator and the classical processor generally doesn't, so the link crosses a temperature boundary. Implementations split roughly three ways: software decoders on CPUs or GPUs (flexible and easy to iterate on, but carrying OS-level latency jitter), FPGA decoders (the current sweet spot for real-time surface-code work), and ASICs (fastest, but freezing your algorithm into silicon in a field where decoding algorithms are still actively improving).",{"type":21,"tag":22,"props":11481,"children":11482},{},[11483,11485,11490,11492,11497],{"type":26,"value":11484},"Slower gate speeds change the maths considerably. Trapped-ion systems operate on microsecond-to-millisecond gate timescales rather than nanoseconds, which relaxes the per-round decoding deadline by orders of magnitude. Part of why a sub-millisecond software decoder is a plausible proposition in that setting and not in a superconducting one. This is another place where ",{"type":21,"tag":29,"props":11486,"children":11487},{"href":1206},[11488],{"type":26,"value":11489},"modality differences",{"type":26,"value":11491}," drive architecture rather than being incidental, and it's visible in the ",{"type":21,"tag":29,"props":11493,"children":11494},{"href":328},[11495],{"type":26,"value":11496},"hardware landscape",{"type":26,"value":11498}," if you know to look for it.",{"type":21,"tag":43,"props":11500,"children":11502},{"id":11501},"the-honest-state-of-things",[11503],{"type":26,"value":11504},"The honest state of things",{"type":21,"tag":22,"props":11506,"children":11507},{},[11508],{"type":26,"value":11509},"Real-time decoding is not solved. It is an active, competitive, genuinely open engineering problem, and it scales in an uncomfortable direction: more logical qubits means more syndrome streams, and the classical side has to grow with the quantum side.",{"type":21,"tag":22,"props":11511,"children":11512},{},[11513],{"type":26,"value":11514},"What makes it worth understanding is what it reveals about the shape of the machine. A fault-tolerant quantum computer is not a QPU with a control rack attached. It is a quantum processor and a substantial classical real-time computing system operating as one device, where the classical half's throughput is a hard constraint on whether the quantum half works at all. The decoder is not support equipment. It is part of the computer.",{"type":21,"tag":22,"props":11516,"children":11517},{},[11518,11520,11525],{"type":26,"value":11519},"That framing also explains why progress here is slower to make headlines than qubit counts. There is no satisfying number to announce. But if you're tracking whether fault tolerance is arriving, decoder latency and accuracy under real-time conditions are among the more informative things to watch, more so than most of what appears in ",{"type":21,"tag":29,"props":11521,"children":11522},{"href":9569},[11523],{"type":26,"value":11524},"quantum news",{"type":26,"value":237},{"type":21,"tag":22,"props":11527,"children":11528},{},[11529,11531,11535,11537,11541,11543,11547,11549,11554,11556,11562,11564,11570],{"type":26,"value":11530},"None of this is a reason to wait. The concepts underneath (noise, ",{"type":21,"tag":29,"props":11532,"children":11533},{"href":8065},[11534],{"type":26,"value":8068},{"type":26,"value":11536},", what a ",{"type":21,"tag":29,"props":11538,"children":11539},{"href":682},[11540],{"type":26,"value":2533},{"type":26,"value":11542}," does under measurement) are the same ones you'd work with on a fault-tolerant machine, and you build that intuition now on ",{"type":21,"tag":29,"props":11544,"children":11545},{"href":150},[11546],{"type":26,"value":8428},{"type":26,"value":11548},". The ",{"type":21,"tag":29,"props":11550,"children":11551},{"href":10142},[11552],{"type":26,"value":11553},"research library",{"type":26,"value":11555}," has the primary sources, ",{"type":21,"tag":29,"props":11557,"children":11559},{"href":11558},"\u002Fglossary\u002Fsyndrome-decoding",[11560],{"type":26,"value":11561},"syndrome decoding",{"type":26,"value":11563}," has the compact definition, and if you want to see what problems this infrastructure is ultimately being built for, the ",{"type":21,"tag":29,"props":11565,"children":11567},{"href":11566},"\u002Fuse-cases",[11568],{"type":26,"value":11569},"use cases page",{"type":26,"value":11571}," is the place to start.",{"title":7,"searchDepth":164,"depth":164,"links":11573},[11574,11575,11576,11577,11578,11579,11580,11581],{"id":11123,"depth":164,"text":11126},{"id":11178,"depth":164,"text":11181},{"id":11247,"depth":164,"text":11250},{"id":11288,"depth":164,"text":11291},{"id":11345,"depth":164,"text":11348},{"id":11411,"depth":164,"text":11414},{"id":11459,"depth":164,"text":11462},{"id":11501,"depth":164,"text":11504},"content:blog:quantum-error-decoding-bottleneck.md","blog\u002Fquantum-error-decoding-bottleneck.md","blog\u002Fquantum-error-decoding-bottleneck",{"_path":11586,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":11587,"description":11588,"date":3089,"author":11,"tags":11589,"readingTime":3092,"body":11590,"_type":171,"_id":13837,"_source":173,"_file":13838,"_stem":13839,"_extension":176},"\u002Fblog\u002Fquantum-fourier-transform-tutorial","The Quantum Fourier Transform: Build It Yourself in Qiskit","A hands-on tutorial that builds the QFT gate by gate in Qiskit, verifies it against the library implementation, and explains why an exponentially faster Fourier transform gives you no speedup on its own.",[6280,852,2891],{"type":18,"children":11591,"toc":13826},[11592,11604,11609,11617,11623,11635,11640,11648,11676,11687,11693,11705,11710,11733,11745,11751,11756,11807,11824,11830,11841,11871,11876,12442,12447,12455,12460,12466,12479,12661,12665,12673,12693,12699,12710,13052,13056,13064,13076,13081,13255,13259,13267,13272,13278,13301,13311,13337,13342,13348,13360,13664,13669,13761,13772,13778,13817,13822],{"type":21,"tag":22,"props":11593,"children":11594},{},[11595,11596,11602],{"type":26,"value":11131},{"type":21,"tag":29,"props":11597,"children":11599},{"href":11598},"\u002Fglossary\u002Fqft",[11600],{"type":26,"value":11601},"Quantum Fourier Transform",{"type":26,"value":11603}," is the single most important subroutine in quantum computing. It's the engine inside Shor's factoring algorithm, quantum phase estimation, and order finding. It's also the most commonly misunderstood algorithm in the field, because on paper it looks like an exponentially faster FFT, and it absolutely is not.",{"type":21,"tag":22,"props":11605,"children":11606},{},[11607],{"type":26,"value":11608},"This tutorial builds the QFT from scratch in Qiskit, proves the implementation is correct against Qiskit's own, and then explains carefully where the speedup goes.",{"type":21,"tag":22,"props":11610,"children":11611},{},[11612],{"type":21,"tag":784,"props":11613,"children":11614},{},[11615],{"type":26,"value":11616},"All code in this post was executed against Qiskit 2.5.0 and Qiskit Aer 0.17.2 on Python 3.11. The outputs shown are real.",{"type":21,"tag":43,"props":11618,"children":11620},{"id":11619},"what-the-qft-does",[11621],{"type":26,"value":11622},"What the QFT does",{"type":21,"tag":22,"props":11624,"children":11625},{},[11626,11628,11633],{"type":26,"value":11627},"The classical Discrete Fourier Transform takes a vector of N numbers and returns N Fourier coefficients. The QFT does exactly the same linear map, but the input vector is the ",{"type":21,"tag":103,"props":11629,"children":11630},{},[11631],{"type":26,"value":11632},"amplitude vector",{"type":26,"value":11634}," of an n-qubit state, so N = 2ⁿ.",{"type":21,"tag":22,"props":11636,"children":11637},{},[11638],{"type":26,"value":11639},"On basis states it acts as:",{"type":21,"tag":2062,"props":11641,"children":11643},{"code":11642},"QFT |x⟩ = (1\u002F√N) Σ_{k=0}^{N-1} e^{2πi·xk\u002FN} |k⟩\n",[11644],{"type":21,"tag":1831,"props":11645,"children":11646},{"__ignoreMap":7},[11647],{"type":26,"value":11642},{"type":21,"tag":22,"props":11649,"children":11650},{},[11651,11653,11658,11660,11666,11668,11674],{"type":26,"value":11652},"Notice what's on the right: every basis state gets amplitude of the ",{"type":21,"tag":103,"props":11654,"children":11655},{},[11656],{"type":26,"value":11657},"same magnitude",{"type":26,"value":11659}," (1\u002F√N), and all the information about ",{"type":21,"tag":1831,"props":11661,"children":11663},{"className":11662},[],[11664],{"type":26,"value":11665},"x",{"type":26,"value":11667}," lives in the complex phase ",{"type":21,"tag":1831,"props":11669,"children":11671},{"className":11670},[],[11672],{"type":26,"value":11673},"e^{2πi·xk\u002FN}",{"type":26,"value":11675},". The QFT takes information that was sitting in the computational basis and pushes it into the phases.",{"type":21,"tag":22,"props":11677,"children":11678},{},[11679,11681,11685],{"type":26,"value":11680},"That single fact is the whole story of the QFT. It's a perfectly uniform state, as far as any ",{"type":21,"tag":29,"props":11682,"children":11683},{"href":6552},[11684],{"type":26,"value":11161},{"type":26,"value":11686}," in the computational basis is concerned. If you QFT a basis state and measure, you get a uniformly random n-bit string. Every time. You learn nothing.",{"type":21,"tag":43,"props":11688,"children":11690},{"id":11689},"the-readout-problem-stated-plainly",[11691],{"type":26,"value":11692},"The readout problem, stated plainly",{"type":21,"tag":22,"props":11694,"children":11695},{},[11696,11698,11703],{"type":26,"value":11697},"Here's the trap. The QFT on n qubits takes O(n²) gates. Classically, an FFT on the same 2ⁿ amplitudes takes O(n·2ⁿ) operations. That is a genuine exponential gap in ",{"type":21,"tag":103,"props":11699,"children":11700},{},[11701],{"type":26,"value":11702},"gate count",{"type":26,"value":11704},", and it's the number everybody quotes.",{"type":21,"tag":22,"props":11706,"children":11707},{},[11708],{"type":26,"value":11709},"But it isn't a usable speedup, for two reasons:",{"type":21,"tag":6138,"props":11711,"children":11712},{},[11713,11723],{"type":21,"tag":6142,"props":11714,"children":11715},{},[11716,11721],{"type":21,"tag":784,"props":11717,"children":11718},{},[11719],{"type":26,"value":11720},"You can't load the input.",{"type":26,"value":11722}," Getting 2ⁿ arbitrary classical amplitudes into a quantum register generally costs O(2ⁿ) gates, wiping out the advantage before you start.",{"type":21,"tag":6142,"props":11724,"children":11725},{},[11726,11731],{"type":21,"tag":784,"props":11727,"children":11728},{},[11729],{"type":26,"value":11730},"You can't read the output.",{"type":26,"value":11732}," The Fourier coefficients are amplitudes. You cannot look at amplitudes. You only sample from their squared magnitudes, one n-bit string per shot. Extracting all 2ⁿ coefficients would take exponentially many repetitions.",{"type":21,"tag":22,"props":11734,"children":11735},{},[11736,11738,11743],{"type":26,"value":11737},"So the QFT is never a drop-in replacement for the FFT. It is a ",{"type":21,"tag":103,"props":11739,"children":11740},{},[11741],{"type":26,"value":11742},"transform you apply in the middle of a larger circuit",{"type":26,"value":11744},", where the goal isn't to read the spectrum but to convert a periodicity that was hidden in phases into a peak you sample directly. That's the shape every real application takes.",{"type":21,"tag":43,"props":11746,"children":11748},{"id":11747},"the-circuit-hadamard-rotate-recurse-swap",[11749],{"type":26,"value":11750},"The circuit: Hadamard, rotate, recurse, swap",{"type":21,"tag":22,"props":11752,"children":11753},{},[11754],{"type":26,"value":11755},"The construction follows directly from factoring the exponential above into a product over qubits. For the most significant qubit:",{"type":21,"tag":6138,"props":11757,"children":11758},{},[11759,11776,11797,11802],{"type":21,"tag":6142,"props":11760,"children":11761},{},[11762,11763,11768,11770,11774],{"type":26,"value":6384},{"type":21,"tag":29,"props":11764,"children":11765},{"href":6387},[11766],{"type":26,"value":11767},"Hadamard",{"type":26,"value":11769},". This creates a ",{"type":21,"tag":29,"props":11771,"children":11772},{"href":7989},[11773],{"type":26,"value":7992},{"type":26,"value":11775}," whose relative phase encodes one bit of the input.",{"type":21,"tag":6142,"props":11777,"children":11778},{},[11779,11781,11787,11789,11795],{"type":26,"value":11780},"Apply controlled-phase gates ",{"type":21,"tag":1831,"props":11782,"children":11784},{"className":11783},[],[11785],{"type":26,"value":11786},"CP(π\u002F2^k)",{"type":26,"value":11788}," from each less significant qubit, controlled onto that same qubit. Qubit distance ",{"type":21,"tag":1831,"props":11790,"children":11792},{"className":11791},[],[11793],{"type":26,"value":11794},"k",{"type":26,"value":11796}," contributes a rotation of π\u002F2^k: the further away, the smaller the correction.",{"type":21,"tag":6142,"props":11798,"children":11799},{},[11800],{"type":26,"value":11801},"Recurse on the remaining n−1 qubits.",{"type":21,"tag":6142,"props":11803,"children":11804},{},[11805],{"type":26,"value":11806},"Swap the qubit order at the end.",{"type":21,"tag":22,"props":11808,"children":11809},{},[11810,11815,11817,11822],{"type":21,"tag":784,"props":11811,"children":11812},{},[11813],{"type":26,"value":11814},"Why the swaps?",{"type":26,"value":11816}," The recursion naturally produces the output register in reverse bit order. Qubit 0 ends up holding what should be the most significant output bit, and vice versa. This is a real bug, not a bookkeeping convention. If you feed an unswapped QFT into phase estimation you get a bit-reversed answer. The swaps fix it. (In hardware-aware compilation you sometimes ",{"type":21,"tag":103,"props":11818,"children":11819},{},[11820],{"type":26,"value":11821},"do",{"type":26,"value":11823}," drop the swaps and relabel the wires downstream instead, which is free. But if your QFT is a standalone reusable block, keep them.)",{"type":21,"tag":43,"props":11825,"children":11827},{"id":11826},"building-it-in-qiskit",[11828],{"type":26,"value":11829},"Building it in Qiskit",{"type":21,"tag":22,"props":11831,"children":11832},{},[11833,11835,11839],{"type":26,"value":11834},"Make sure you have ",{"type":21,"tag":29,"props":11836,"children":11837},{"href":6223},[11838],{"type":26,"value":852},{"type":26,"value":11840}," and the Aer simulator installed:",{"type":21,"tag":2062,"props":11842,"children":11844},{"code":11843,"language":8884,"meta":7,"className":8882,"style":7},"pip install qiskit qiskit-aer\n",[11845],{"type":21,"tag":1831,"props":11846,"children":11847},{"__ignoreMap":7},[11848],{"type":21,"tag":2072,"props":11849,"children":11850},{"class":2074,"line":2075},[11851,11856,11861,11866],{"type":21,"tag":2072,"props":11852,"children":11853},{"style":3474},[11854],{"type":26,"value":11855},"pip",{"type":21,"tag":2072,"props":11857,"children":11858},{"style":2108},[11859],{"type":26,"value":11860}," install",{"type":21,"tag":2072,"props":11862,"children":11863},{"style":2108},[11864],{"type":26,"value":11865}," qiskit",{"type":21,"tag":2072,"props":11867,"children":11868},{"style":2108},[11869],{"type":26,"value":11870}," qiskit-aer\n",{"type":21,"tag":22,"props":11872,"children":11873},{},[11874],{"type":26,"value":11875},"Now the construction, written recursively so it mirrors the math:",{"type":21,"tag":2062,"props":11877,"children":11879},{"code":11878,"language":3361,"meta":7,"className":3362,"style":7},"import numpy as np\nfrom qiskit import QuantumCircuit, transpile\nfrom qiskit.quantum_info import Statevector, Operator\nfrom qiskit_aer import AerSimulator\n\n\ndef qft_rotations(circuit, n):\n    \"\"\"Hadamard + controlled phases on the top qubit, then recurse.\"\"\"\n    if n == 0:\n        return circuit\n    n -= 1                      # index of the most significant qubit\n    circuit.h(n)\n    for qubit in range(n):\n        # qubit is (n - qubit) positions below the target\n        circuit.cp(np.pi \u002F 2 ** (n - qubit), qubit, n)\n    qft_rotations(circuit, n)   # recurse on the rest\n    return circuit\n\n\ndef swap_registers(circuit, n):\n    \"\"\"Reverse the qubit order to undo the bit reversal.\"\"\"\n    for qubit in range(n \u002F\u002F 2):\n        circuit.swap(qubit, n - qubit - 1)\n    return circuit\n\n\ndef qft(n):\n    qc = QuantumCircuit(n, name=\"QFT\")\n    qft_rotations(qc, n)\n    swap_registers(qc, n)\n    return qc\n\n\nmy_qft = qft(4)\nprint(my_qft.draw(output=\"text\"))\nprint(my_qft.count_ops())\n",[11880],{"type":21,"tag":1831,"props":11881,"children":11882},{"__ignoreMap":7},[11883,11902,11921,11942,11961,11968,11975,11992,12000,12026,12039,12061,12069,12093,12101,12135,12148,12159,12166,12173,12189,12197,12232,12260,12271,12278,12285,12301,12333,12341,12349,12360,12367,12374,12399,12430],{"type":21,"tag":2072,"props":11884,"children":11885},{"class":2074,"line":2075},[11886,11890,11894,11898],{"type":21,"tag":2072,"props":11887,"children":11888},{"style":3372},[11889],{"type":26,"value":3375},{"type":21,"tag":2072,"props":11891,"children":11892},{"style":2079},[11893],{"type":26,"value":3380},{"type":21,"tag":2072,"props":11895,"children":11896},{"style":3372},[11897],{"type":26,"value":3385},{"type":21,"tag":2072,"props":11899,"children":11900},{"style":2079},[11901],{"type":26,"value":3390},{"type":21,"tag":2072,"props":11903,"children":11904},{"class":2074,"line":164},[11905,11909,11913,11917],{"type":21,"tag":2072,"props":11906,"children":11907},{"style":3372},[11908],{"type":26,"value":3398},{"type":21,"tag":2072,"props":11910,"children":11911},{"style":2079},[11912],{"type":26,"value":3403},{"type":21,"tag":2072,"props":11914,"children":11915},{"style":3372},[11916],{"type":26,"value":3375},{"type":21,"tag":2072,"props":11918,"children":11919},{"style":2079},[11920],{"type":26,"value":3412},{"type":21,"tag":2072,"props":11922,"children":11923},{"class":2074,"line":2093},[11924,11928,11933,11937],{"type":21,"tag":2072,"props":11925,"children":11926},{"style":3372},[11927],{"type":26,"value":3398},{"type":21,"tag":2072,"props":11929,"children":11930},{"style":2079},[11931],{"type":26,"value":11932}," qiskit.quantum_info ",{"type":21,"tag":2072,"props":11934,"children":11935},{"style":3372},[11936],{"type":26,"value":3375},{"type":21,"tag":2072,"props":11938,"children":11939},{"style":2079},[11940],{"type":26,"value":11941}," Statevector, Operator\n",{"type":21,"tag":2072,"props":11943,"children":11944},{"class":2074,"line":2155},[11945,11949,11953,11957],{"type":21,"tag":2072,"props":11946,"children":11947},{"style":3372},[11948],{"type":26,"value":3398},{"type":21,"tag":2072,"props":11950,"children":11951},{"style":2079},[11952],{"type":26,"value":3424},{"type":21,"tag":2072,"props":11954,"children":11955},{"style":3372},[11956],{"type":26,"value":3375},{"type":21,"tag":2072,"props":11958,"children":11959},{"style":2079},[11960],{"type":26,"value":3433},{"type":21,"tag":2072,"props":11962,"children":11963},{"class":2074,"line":2178},[11964],{"type":21,"tag":2072,"props":11965,"children":11966},{"emptyLinePlaceholder":3460},[11967],{"type":26,"value":3463},{"type":21,"tag":2072,"props":11969,"children":11970},{"class":2074,"line":288},[11971],{"type":21,"tag":2072,"props":11972,"children":11973},{"emptyLinePlaceholder":3460},[11974],{"type":26,"value":3463},{"type":21,"tag":2072,"props":11976,"children":11977},{"class":2074,"line":16},[11978,11982,11987],{"type":21,"tag":2072,"props":11979,"children":11980},{"style":3372},[11981],{"type":26,"value":3471},{"type":21,"tag":2072,"props":11983,"children":11984},{"style":3474},[11985],{"type":26,"value":11986}," qft_rotations",{"type":21,"tag":2072,"props":11988,"children":11989},{"style":2079},[11990],{"type":26,"value":11991},"(circuit, n):\n",{"type":21,"tag":2072,"props":11993,"children":11994},{"class":2074,"line":366},[11995],{"type":21,"tag":2072,"props":11996,"children":11997},{"style":2108},[11998],{"type":26,"value":11999},"    \"\"\"Hadamard + controlled phases on the top qubit, then recurse.\"\"\"\n",{"type":21,"tag":2072,"props":12001,"children":12002},{"class":2074,"line":853},[12003,12008,12013,12017,12022],{"type":21,"tag":2072,"props":12004,"children":12005},{"style":3372},[12006],{"type":26,"value":12007},"    if",{"type":21,"tag":2072,"props":12009,"children":12010},{"style":2079},[12011],{"type":26,"value":12012}," n ",{"type":21,"tag":2072,"props":12014,"children":12015},{"style":3372},[12016],{"type":26,"value":4035},{"type":21,"tag":2072,"props":12018,"children":12019},{"style":2097},[12020],{"type":26,"value":12021}," 0",{"type":21,"tag":2072,"props":12023,"children":12024},{"style":2079},[12025],{"type":26,"value":4045},{"type":21,"tag":2072,"props":12027,"children":12028},{"class":2074,"line":3092},[12029,12034],{"type":21,"tag":2072,"props":12030,"children":12031},{"style":3372},[12032],{"type":26,"value":12033},"        return",{"type":21,"tag":2072,"props":12035,"children":12036},{"style":2079},[12037],{"type":26,"value":12038}," circuit\n",{"type":21,"tag":2072,"props":12040,"children":12041},{"class":2074,"line":3651},[12042,12047,12052,12056],{"type":21,"tag":2072,"props":12043,"children":12044},{"style":2079},[12045],{"type":26,"value":12046},"    n ",{"type":21,"tag":2072,"props":12048,"children":12049},{"style":3372},[12050],{"type":26,"value":12051},"-=",{"type":21,"tag":2072,"props":12053,"children":12054},{"style":2097},[12055],{"type":26,"value":5228},{"type":21,"tag":2072,"props":12057,"children":12058},{"style":3985},[12059],{"type":26,"value":12060},"                      # index of the most significant qubit\n",{"type":21,"tag":2072,"props":12062,"children":12063},{"class":2074,"line":2616},[12064],{"type":21,"tag":2072,"props":12065,"children":12066},{"style":2079},[12067],{"type":26,"value":12068},"    circuit.h(n)\n",{"type":21,"tag":2072,"props":12070,"children":12071},{"class":2074,"line":3695},[12072,12076,12081,12085,12089],{"type":21,"tag":2072,"props":12073,"children":12074},{"style":3372},[12075],{"type":26,"value":3859},{"type":21,"tag":2072,"props":12077,"children":12078},{"style":2079},[12079],{"type":26,"value":12080}," qubit ",{"type":21,"tag":2072,"props":12082,"children":12083},{"style":3372},[12084],{"type":26,"value":3869},{"type":21,"tag":2072,"props":12086,"children":12087},{"style":2097},[12088],{"type":26,"value":3874},{"type":21,"tag":2072,"props":12090,"children":12091},{"style":2079},[12092],{"type":26,"value":6973},{"type":21,"tag":2072,"props":12094,"children":12095},{"class":2074,"line":3709},[12096],{"type":21,"tag":2072,"props":12097,"children":12098},{"style":3985},[12099],{"type":26,"value":12100},"        # qubit is (n - qubit) positions below the target\n",{"type":21,"tag":2072,"props":12102,"children":12103},{"class":2074,"line":3717},[12104,12109,12113,12117,12121,12126,12130],{"type":21,"tag":2072,"props":12105,"children":12106},{"style":2079},[12107],{"type":26,"value":12108},"        circuit.cp(np.pi ",{"type":21,"tag":2072,"props":12110,"children":12111},{"style":3372},[12112],{"type":26,"value":1926},{"type":21,"tag":2072,"props":12114,"children":12115},{"style":2097},[12116],{"type":26,"value":5513},{"type":21,"tag":2072,"props":12118,"children":12119},{"style":3372},[12120],{"type":26,"value":7442},{"type":21,"tag":2072,"props":12122,"children":12123},{"style":2079},[12124],{"type":26,"value":12125}," (n ",{"type":21,"tag":2072,"props":12127,"children":12128},{"style":3372},[12129],{"type":26,"value":3973},{"type":21,"tag":2072,"props":12131,"children":12132},{"style":2079},[12133],{"type":26,"value":12134}," qubit), qubit, n)\n",{"type":21,"tag":2072,"props":12136,"children":12137},{"class":2074,"line":3750},[12138,12143],{"type":21,"tag":2072,"props":12139,"children":12140},{"style":2079},[12141],{"type":26,"value":12142},"    qft_rotations(circuit, n)   ",{"type":21,"tag":2072,"props":12144,"children":12145},{"style":3985},[12146],{"type":26,"value":12147},"# recurse on the rest\n",{"type":21,"tag":2072,"props":12149,"children":12150},{"class":2074,"line":3769},[12151,12155],{"type":21,"tag":2072,"props":12152,"children":12153},{"style":3372},[12154],{"type":26,"value":3701},{"type":21,"tag":2072,"props":12156,"children":12157},{"style":2079},[12158],{"type":26,"value":12038},{"type":21,"tag":2072,"props":12160,"children":12161},{"class":2074,"line":3777},[12162],{"type":21,"tag":2072,"props":12163,"children":12164},{"emptyLinePlaceholder":3460},[12165],{"type":26,"value":3463},{"type":21,"tag":2072,"props":12167,"children":12168},{"class":2074,"line":3808},[12169],{"type":21,"tag":2072,"props":12170,"children":12171},{"emptyLinePlaceholder":3460},[12172],{"type":26,"value":3463},{"type":21,"tag":2072,"props":12174,"children":12175},{"class":2074,"line":3853},[12176,12180,12185],{"type":21,"tag":2072,"props":12177,"children":12178},{"style":3372},[12179],{"type":26,"value":3471},{"type":21,"tag":2072,"props":12181,"children":12182},{"style":3474},[12183],{"type":26,"value":12184}," swap_registers",{"type":21,"tag":2072,"props":12186,"children":12187},{"style":2079},[12188],{"type":26,"value":11991},{"type":21,"tag":2072,"props":12190,"children":12191},{"class":2074,"line":3895},[12192],{"type":21,"tag":2072,"props":12193,"children":12194},{"style":2108},[12195],{"type":26,"value":12196},"    \"\"\"Reverse the qubit order to undo the bit reversal.\"\"\"\n",{"type":21,"tag":2072,"props":12198,"children":12199},{"class":2074,"line":3913},[12200,12204,12208,12212,12216,12220,12224,12228],{"type":21,"tag":2072,"props":12201,"children":12202},{"style":3372},[12203],{"type":26,"value":3859},{"type":21,"tag":2072,"props":12205,"children":12206},{"style":2079},[12207],{"type":26,"value":12080},{"type":21,"tag":2072,"props":12209,"children":12210},{"style":3372},[12211],{"type":26,"value":3869},{"type":21,"tag":2072,"props":12213,"children":12214},{"style":2097},[12215],{"type":26,"value":3874},{"type":21,"tag":2072,"props":12217,"children":12218},{"style":2079},[12219],{"type":26,"value":6801},{"type":21,"tag":2072,"props":12221,"children":12222},{"style":3372},[12223],{"type":26,"value":5237},{"type":21,"tag":2072,"props":12225,"children":12226},{"style":2097},[12227],{"type":26,"value":5513},{"type":21,"tag":2072,"props":12229,"children":12230},{"style":2079},[12231],{"type":26,"value":3525},{"type":21,"tag":2072,"props":12233,"children":12234},{"class":2074,"line":3991},[12235,12240,12244,12248,12252,12256],{"type":21,"tag":2072,"props":12236,"children":12237},{"style":2079},[12238],{"type":26,"value":12239},"        circuit.swap(qubit, n ",{"type":21,"tag":2072,"props":12241,"children":12242},{"style":3372},[12243],{"type":26,"value":3973},{"type":21,"tag":2072,"props":12245,"children":12246},{"style":2079},[12247],{"type":26,"value":12080},{"type":21,"tag":2072,"props":12249,"children":12250},{"style":3372},[12251],{"type":26,"value":3973},{"type":21,"tag":2072,"props":12253,"children":12254},{"style":2097},[12255],{"type":26,"value":5228},{"type":21,"tag":2072,"props":12257,"children":12258},{"style":2079},[12259],{"type":26,"value":4281},{"type":21,"tag":2072,"props":12261,"children":12262},{"class":2074,"line":4019},[12263,12267],{"type":21,"tag":2072,"props":12264,"children":12265},{"style":3372},[12266],{"type":26,"value":3701},{"type":21,"tag":2072,"props":12268,"children":12269},{"style":2079},[12270],{"type":26,"value":12038},{"type":21,"tag":2072,"props":12272,"children":12273},{"class":2074,"line":4048},[12274],{"type":21,"tag":2072,"props":12275,"children":12276},{"emptyLinePlaceholder":3460},[12277],{"type":26,"value":3463},{"type":21,"tag":2072,"props":12279,"children":12280},{"class":2074,"line":4057},[12281],{"type":21,"tag":2072,"props":12282,"children":12283},{"emptyLinePlaceholder":3460},[12284],{"type":26,"value":3463},{"type":21,"tag":2072,"props":12286,"children":12287},{"class":2074,"line":4085},[12288,12292,12297],{"type":21,"tag":2072,"props":12289,"children":12290},{"style":3372},[12291],{"type":26,"value":3471},{"type":21,"tag":2072,"props":12293,"children":12294},{"style":3474},[12295],{"type":26,"value":12296}," qft",{"type":21,"tag":2072,"props":12298,"children":12299},{"style":2079},[12300],{"type":26,"value":6973},{"type":21,"tag":2072,"props":12302,"children":12303},{"class":2074,"line":4116},[12304,12308,12312,12316,12320,12324,12329],{"type":21,"tag":2072,"props":12305,"children":12306},{"style":2079},[12307],{"type":26,"value":6629},{"type":21,"tag":2072,"props":12309,"children":12310},{"style":3372},[12311],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12313,"children":12314},{"style":2079},[12315],{"type":26,"value":6638},{"type":21,"tag":2072,"props":12317,"children":12318},{"style":3735},[12319],{"type":26,"value":6643},{"type":21,"tag":2072,"props":12321,"children":12322},{"style":3372},[12323],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12325,"children":12326},{"style":2108},[12327],{"type":26,"value":12328},"\"QFT\"",{"type":21,"tag":2072,"props":12330,"children":12331},{"style":2079},[12332],{"type":26,"value":4281},{"type":21,"tag":2072,"props":12334,"children":12335},{"class":2074,"line":4138},[12336],{"type":21,"tag":2072,"props":12337,"children":12338},{"style":2079},[12339],{"type":26,"value":12340},"    qft_rotations(qc, n)\n",{"type":21,"tag":2072,"props":12342,"children":12343},{"class":2074,"line":4184},[12344],{"type":21,"tag":2072,"props":12345,"children":12346},{"style":2079},[12347],{"type":26,"value":12348},"    swap_registers(qc, n)\n",{"type":21,"tag":2072,"props":12350,"children":12351},{"class":2074,"line":4197},[12352,12356],{"type":21,"tag":2072,"props":12353,"children":12354},{"style":3372},[12355],{"type":26,"value":3701},{"type":21,"tag":2072,"props":12357,"children":12358},{"style":2079},[12359],{"type":26,"value":6910},{"type":21,"tag":2072,"props":12361,"children":12362},{"class":2074,"line":4205},[12363],{"type":21,"tag":2072,"props":12364,"children":12365},{"emptyLinePlaceholder":3460},[12366],{"type":26,"value":3463},{"type":21,"tag":2072,"props":12368,"children":12369},{"class":2074,"line":4223},[12370],{"type":21,"tag":2072,"props":12371,"children":12372},{"emptyLinePlaceholder":3460},[12373],{"type":26,"value":3463},{"type":21,"tag":2072,"props":12375,"children":12376},{"class":2074,"line":4241},[12377,12382,12386,12391,12395],{"type":21,"tag":2072,"props":12378,"children":12379},{"style":2079},[12380],{"type":26,"value":12381},"my_qft ",{"type":21,"tag":2072,"props":12383,"children":12384},{"style":3372},[12385],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12387,"children":12388},{"style":2079},[12389],{"type":26,"value":12390}," qft(",{"type":21,"tag":2072,"props":12392,"children":12393},{"style":2097},[12394],{"type":26,"value":4661},{"type":21,"tag":2072,"props":12396,"children":12397},{"style":2079},[12398],{"type":26,"value":4281},{"type":21,"tag":2072,"props":12400,"children":12401},{"class":2074,"line":4249},[12402,12406,12411,12416,12420,12425],{"type":21,"tag":2072,"props":12403,"children":12404},{"style":2097},[12405],{"type":26,"value":4614},{"type":21,"tag":2072,"props":12407,"children":12408},{"style":2079},[12409],{"type":26,"value":12410},"(my_qft.draw(",{"type":21,"tag":2072,"props":12412,"children":12413},{"style":3735},[12414],{"type":26,"value":12415},"output",{"type":21,"tag":2072,"props":12417,"children":12418},{"style":3372},[12419],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12421,"children":12422},{"style":2108},[12423],{"type":26,"value":12424},"\"text\"",{"type":21,"tag":2072,"props":12426,"children":12427},{"style":2079},[12428],{"type":26,"value":12429},"))\n",{"type":21,"tag":2072,"props":12431,"children":12432},{"class":2074,"line":4284},[12433,12437],{"type":21,"tag":2072,"props":12434,"children":12435},{"style":2097},[12436],{"type":26,"value":4614},{"type":21,"tag":2072,"props":12438,"children":12439},{"style":2079},[12440],{"type":26,"value":12441},"(my_qft.count_ops())\n",{"type":21,"tag":22,"props":12443,"children":12444},{},[12445],{"type":26,"value":12446},"Real output:",{"type":21,"tag":2062,"props":12448,"children":12450},{"code":12449},"                                                                          ┌───┐»\nq_0: ──────■───────────────────────────────■──────────────────────■───────┤ H ├»\n           │                               │                ┌───┐ │P(π\u002F2) └───┘»\nq_1: ──────┼────────■──────────────────────┼────────■───────┤ H ├─■─────────X──»\n           │        │                ┌───┐ │P(π\u002F4)  │P(π\u002F2) └───┘           │  »\nq_2: ──────┼────────┼────────■───────┤ H ├─■────────■───────────────────────X──»\n     ┌───┐ │P(π\u002F8)  │P(π\u002F4)  │P(π\u002F2) └───┘                                     »\nq_3: ┤ H ├─■────────■────────■─────────────────────────────────────────────────»\n     └───┘\n\nOrderedDict([('cp', 6), ('h', 4), ('swap', 2)])\n",[12451],{"type":21,"tag":1831,"props":12452,"children":12453},{"__ignoreMap":7},[12454],{"type":26,"value":12449},{"type":21,"tag":22,"props":12456,"children":12457},{},[12458],{"type":26,"value":12459},"Four Hadamards, six controlled-phase gates, two swaps. That matches the count: n Hadamards and n(n−1)\u002F2 = 6 rotations. The angles descend π\u002F2, π\u002F4, π\u002F8 as the control qubit gets further from the target, exactly as expected.",{"type":21,"tag":43,"props":12461,"children":12463},{"id":12462},"proving-its-correct",[12464],{"type":26,"value":12465},"Proving it's correct",{"type":21,"tag":22,"props":12467,"children":12468},{},[12469,12471,12477],{"type":26,"value":12470},"Never trust a hand-built QFT. Compare the full unitary against Qiskit's ",{"type":21,"tag":1831,"props":12472,"children":12474},{"className":12473},[],[12475],{"type":26,"value":12476},"QFTGate",{"type":26,"value":12478},":",{"type":21,"tag":2062,"props":12480,"children":12482},{"code":12481,"language":3361,"meta":7,"className":3362,"style":7},"from qiskit.circuit.library import QFTGate\n\nn = 4\nmine = qft(n)\n\nreference = QuantumCircuit(n)\nreference.append(QFTGate(n), range(n))\n\na, b = Operator(mine), Operator(reference)\nprint(\"Equivalent:\", a.equiv(b))\nprint(\"Max element difference:\", np.abs(a.data - b.data).max())\n",[12483],{"type":21,"tag":1831,"props":12484,"children":12485},{"__ignoreMap":7},[12486,12506,12513,12529,12546,12553,12570,12586,12593,12610,12631],{"type":21,"tag":2072,"props":12487,"children":12488},{"class":2074,"line":2075},[12489,12493,12497,12501],{"type":21,"tag":2072,"props":12490,"children":12491},{"style":3372},[12492],{"type":26,"value":3398},{"type":21,"tag":2072,"props":12494,"children":12495},{"style":2079},[12496],{"type":26,"value":4950},{"type":21,"tag":2072,"props":12498,"children":12499},{"style":3372},[12500],{"type":26,"value":3375},{"type":21,"tag":2072,"props":12502,"children":12503},{"style":2079},[12504],{"type":26,"value":12505}," QFTGate\n",{"type":21,"tag":2072,"props":12507,"children":12508},{"class":2074,"line":164},[12509],{"type":21,"tag":2072,"props":12510,"children":12511},{"emptyLinePlaceholder":3460},[12512],{"type":26,"value":3463},{"type":21,"tag":2072,"props":12514,"children":12515},{"class":2074,"line":2093},[12516,12520,12524],{"type":21,"tag":2072,"props":12517,"children":12518},{"style":2079},[12519],{"type":26,"value":4211},{"type":21,"tag":2072,"props":12521,"children":12522},{"style":3372},[12523],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12525,"children":12526},{"style":2097},[12527],{"type":26,"value":12528}," 4\n",{"type":21,"tag":2072,"props":12530,"children":12531},{"class":2074,"line":2155},[12532,12537,12541],{"type":21,"tag":2072,"props":12533,"children":12534},{"style":2079},[12535],{"type":26,"value":12536},"mine ",{"type":21,"tag":2072,"props":12538,"children":12539},{"style":3372},[12540],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12542,"children":12543},{"style":2079},[12544],{"type":26,"value":12545}," qft(n)\n",{"type":21,"tag":2072,"props":12547,"children":12548},{"class":2074,"line":2178},[12549],{"type":21,"tag":2072,"props":12550,"children":12551},{"emptyLinePlaceholder":3460},[12552],{"type":26,"value":3463},{"type":21,"tag":2072,"props":12554,"children":12555},{"class":2074,"line":288},[12556,12561,12565],{"type":21,"tag":2072,"props":12557,"children":12558},{"style":2079},[12559],{"type":26,"value":12560},"reference ",{"type":21,"tag":2072,"props":12562,"children":12563},{"style":3372},[12564],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12566,"children":12567},{"style":2079},[12568],{"type":26,"value":12569}," QuantumCircuit(n)\n",{"type":21,"tag":2072,"props":12571,"children":12572},{"class":2074,"line":16},[12573,12578,12582],{"type":21,"tag":2072,"props":12574,"children":12575},{"style":2079},[12576],{"type":26,"value":12577},"reference.append(QFTGate(n), ",{"type":21,"tag":2072,"props":12579,"children":12580},{"style":2097},[12581],{"type":26,"value":4068},{"type":21,"tag":2072,"props":12583,"children":12584},{"style":2079},[12585],{"type":26,"value":4082},{"type":21,"tag":2072,"props":12587,"children":12588},{"class":2074,"line":366},[12589],{"type":21,"tag":2072,"props":12590,"children":12591},{"emptyLinePlaceholder":3460},[12592],{"type":26,"value":3463},{"type":21,"tag":2072,"props":12594,"children":12595},{"class":2074,"line":853},[12596,12601,12605],{"type":21,"tag":2072,"props":12597,"children":12598},{"style":2079},[12599],{"type":26,"value":12600},"a, b ",{"type":21,"tag":2072,"props":12602,"children":12603},{"style":3372},[12604],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12606,"children":12607},{"style":2079},[12608],{"type":26,"value":12609}," Operator(mine), Operator(reference)\n",{"type":21,"tag":2072,"props":12611,"children":12612},{"class":2074,"line":3092},[12613,12617,12621,12626],{"type":21,"tag":2072,"props":12614,"children":12615},{"style":2097},[12616],{"type":26,"value":4614},{"type":21,"tag":2072,"props":12618,"children":12619},{"style":2079},[12620],{"type":26,"value":3879},{"type":21,"tag":2072,"props":12622,"children":12623},{"style":2108},[12624],{"type":26,"value":12625},"\"Equivalent:\"",{"type":21,"tag":2072,"props":12627,"children":12628},{"style":2079},[12629],{"type":26,"value":12630},", a.equiv(b))\n",{"type":21,"tag":2072,"props":12632,"children":12633},{"class":2074,"line":3651},[12634,12638,12642,12647,12652,12656],{"type":21,"tag":2072,"props":12635,"children":12636},{"style":2097},[12637],{"type":26,"value":4614},{"type":21,"tag":2072,"props":12639,"children":12640},{"style":2079},[12641],{"type":26,"value":3879},{"type":21,"tag":2072,"props":12643,"children":12644},{"style":2108},[12645],{"type":26,"value":12646},"\"Max element difference:\"",{"type":21,"tag":2072,"props":12648,"children":12649},{"style":2079},[12650],{"type":26,"value":12651},", np.abs(a.data ",{"type":21,"tag":2072,"props":12653,"children":12654},{"style":3372},[12655],{"type":26,"value":3973},{"type":21,"tag":2072,"props":12657,"children":12658},{"style":2079},[12659],{"type":26,"value":12660}," b.data).max())\n",{"type":21,"tag":22,"props":12662,"children":12663},{},[12664],{"type":26,"value":12446},{"type":21,"tag":2062,"props":12666,"children":12668},{"code":12667},"Equivalent: True\nMax element difference: 2.285583597498884e-15\n",[12669],{"type":21,"tag":1831,"props":12670,"children":12671},{"__ignoreMap":7},[12672],{"type":26,"value":12667},{"type":21,"tag":22,"props":12674,"children":12675},{},[12676,12678,12684,12685,12691],{"type":26,"value":12677},"Identical to floating-point precision, not merely equal up to a global phase. If you're on an older Qiskit, use ",{"type":21,"tag":1831,"props":12679,"children":12681},{"className":12680},[],[12682],{"type":26,"value":12683},"from qiskit.circuit.library import QFT",{"type":26,"value":383},{"type":21,"tag":1831,"props":12686,"children":12688},{"className":12687},[],[12689],{"type":26,"value":12690},"QFT(n).decompose()",{"type":26,"value":12692}," instead.",{"type":21,"tag":43,"props":12694,"children":12696},{"id":12695},"seeing-it-find-a-period",[12697],{"type":26,"value":12698},"Seeing it find a period",{"type":21,"tag":22,"props":12700,"children":12701},{},[12702,12704,12708],{"type":26,"value":12703},"This is the one demonstration that shows what the QFT is ",{"type":21,"tag":103,"props":12705,"children":12706},{},[12707],{"type":26,"value":4479},{"type":26,"value":12709},". Prepare a state that's a uniform superposition over multiples of 4 (a comb with period 4) and transform it:",{"type":21,"tag":2062,"props":12711,"children":12713},{"code":12712,"language":3361,"meta":7,"className":3362,"style":7},"n = 4\npsi = np.zeros(2 ** n, dtype=complex)\nfor x in range(0, 2 ** n, 4):   # |0> + |4> + |8> + |12>\n    psi[x] = 1\npsi \u002F= np.linalg.norm(psi)\n\nout = Statevector(psi).evolve(qft(n))\nfor i, p in enumerate(out.probabilities()):\n    if p > 1e-6:\n        print(f\"|{i:0{n}b}> = {i:2d}   p = {p:.4f}\")\n",[12714],{"type":21,"tag":1831,"props":12715,"children":12716},{"__ignoreMap":7},[12717,12732,12780,12838,12855,12871,12878,12895,12920,12946],{"type":21,"tag":2072,"props":12718,"children":12719},{"class":2074,"line":2075},[12720,12724,12728],{"type":21,"tag":2072,"props":12721,"children":12722},{"style":2079},[12723],{"type":26,"value":4211},{"type":21,"tag":2072,"props":12725,"children":12726},{"style":3372},[12727],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12729,"children":12730},{"style":2097},[12731],{"type":26,"value":12528},{"type":21,"tag":2072,"props":12733,"children":12734},{"class":2074,"line":164},[12735,12740,12744,12749,12753,12757,12762,12767,12771,12776],{"type":21,"tag":2072,"props":12736,"children":12737},{"style":2079},[12738],{"type":26,"value":12739},"psi ",{"type":21,"tag":2072,"props":12741,"children":12742},{"style":3372},[12743],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12745,"children":12746},{"style":2079},[12747],{"type":26,"value":12748}," np.zeros(",{"type":21,"tag":2072,"props":12750,"children":12751},{"style":2097},[12752],{"type":26,"value":2170},{"type":21,"tag":2072,"props":12754,"children":12755},{"style":3372},[12756],{"type":26,"value":7442},{"type":21,"tag":2072,"props":12758,"children":12759},{"style":2079},[12760],{"type":26,"value":12761}," n, ",{"type":21,"tag":2072,"props":12763,"children":12764},{"style":3735},[12765],{"type":26,"value":12766},"dtype",{"type":21,"tag":2072,"props":12768,"children":12769},{"style":3372},[12770],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12772,"children":12773},{"style":2097},[12774],{"type":26,"value":12775},"complex",{"type":21,"tag":2072,"props":12777,"children":12778},{"style":2079},[12779],{"type":26,"value":4281},{"type":21,"tag":2072,"props":12781,"children":12782},{"class":2074,"line":2093},[12783,12787,12792,12796,12800,12804,12808,12812,12816,12820,12824,12828,12833],{"type":21,"tag":2072,"props":12784,"children":12785},{"style":3372},[12786],{"type":26,"value":4479},{"type":21,"tag":2072,"props":12788,"children":12789},{"style":2079},[12790],{"type":26,"value":12791}," x ",{"type":21,"tag":2072,"props":12793,"children":12794},{"style":3372},[12795],{"type":26,"value":3869},{"type":21,"tag":2072,"props":12797,"children":12798},{"style":2097},[12799],{"type":26,"value":3874},{"type":21,"tag":2072,"props":12801,"children":12802},{"style":2079},[12803],{"type":26,"value":3879},{"type":21,"tag":2072,"props":12805,"children":12806},{"style":2097},[12807],{"type":26,"value":4295},{"type":21,"tag":2072,"props":12809,"children":12810},{"style":2079},[12811],{"type":26,"value":798},{"type":21,"tag":2072,"props":12813,"children":12814},{"style":2097},[12815],{"type":26,"value":2170},{"type":21,"tag":2072,"props":12817,"children":12818},{"style":3372},[12819],{"type":26,"value":7442},{"type":21,"tag":2072,"props":12821,"children":12822},{"style":2079},[12823],{"type":26,"value":12761},{"type":21,"tag":2072,"props":12825,"children":12826},{"style":2097},[12827],{"type":26,"value":4661},{"type":21,"tag":2072,"props":12829,"children":12830},{"style":2079},[12831],{"type":26,"value":12832},"):   ",{"type":21,"tag":2072,"props":12834,"children":12835},{"style":3985},[12836],{"type":26,"value":12837},"# |0> + |4> + |8> + |12>\n",{"type":21,"tag":2072,"props":12839,"children":12840},{"class":2074,"line":2155},[12841,12846,12850],{"type":21,"tag":2072,"props":12842,"children":12843},{"style":2079},[12844],{"type":26,"value":12845},"    psi[x] ",{"type":21,"tag":2072,"props":12847,"children":12848},{"style":3372},[12849],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12851,"children":12852},{"style":2097},[12853],{"type":26,"value":12854}," 1\n",{"type":21,"tag":2072,"props":12856,"children":12857},{"class":2074,"line":2178},[12858,12862,12866],{"type":21,"tag":2072,"props":12859,"children":12860},{"style":2079},[12861],{"type":26,"value":12739},{"type":21,"tag":2072,"props":12863,"children":12864},{"style":3372},[12865],{"type":26,"value":4592},{"type":21,"tag":2072,"props":12867,"children":12868},{"style":2079},[12869],{"type":26,"value":12870}," np.linalg.norm(psi)\n",{"type":21,"tag":2072,"props":12872,"children":12873},{"class":2074,"line":288},[12874],{"type":21,"tag":2072,"props":12875,"children":12876},{"emptyLinePlaceholder":3460},[12877],{"type":26,"value":3463},{"type":21,"tag":2072,"props":12879,"children":12880},{"class":2074,"line":16},[12881,12886,12890],{"type":21,"tag":2072,"props":12882,"children":12883},{"style":2079},[12884],{"type":26,"value":12885},"out ",{"type":21,"tag":2072,"props":12887,"children":12888},{"style":3372},[12889],{"type":26,"value":3487},{"type":21,"tag":2072,"props":12891,"children":12892},{"style":2079},[12893],{"type":26,"value":12894}," Statevector(psi).evolve(qft(n))\n",{"type":21,"tag":2072,"props":12896,"children":12897},{"class":2074,"line":366},[12898,12902,12907,12911,12915],{"type":21,"tag":2072,"props":12899,"children":12900},{"style":3372},[12901],{"type":26,"value":4479},{"type":21,"tag":2072,"props":12903,"children":12904},{"style":2079},[12905],{"type":26,"value":12906}," i, p ",{"type":21,"tag":2072,"props":12908,"children":12909},{"style":3372},[12910],{"type":26,"value":3869},{"type":21,"tag":2072,"props":12912,"children":12913},{"style":2097},[12914],{"type":26,"value":4011},{"type":21,"tag":2072,"props":12916,"children":12917},{"style":2079},[12918],{"type":26,"value":12919},"(out.probabilities()):\n",{"type":21,"tag":2072,"props":12921,"children":12922},{"class":2074,"line":853},[12923,12927,12932,12937,12942],{"type":21,"tag":2072,"props":12924,"children":12925},{"style":3372},[12926],{"type":26,"value":12007},{"type":21,"tag":2072,"props":12928,"children":12929},{"style":2079},[12930],{"type":26,"value":12931}," p ",{"type":21,"tag":2072,"props":12933,"children":12934},{"style":3372},[12935],{"type":26,"value":12936},">",{"type":21,"tag":2072,"props":12938,"children":12939},{"style":2097},[12940],{"type":26,"value":12941}," 1e-6",{"type":21,"tag":2072,"props":12943,"children":12944},{"style":2079},[12945],{"type":26,"value":4045},{"type":21,"tag":2072,"props":12947,"children":12948},{"class":2074,"line":3092},[12949,12954,12958,12962,12967,12971,12975,12980,12984,12988,12992,12997,13001,13006,13010,13014,13019,13023,13028,13032,13036,13040,13044,13048],{"type":21,"tag":2072,"props":12950,"children":12951},{"style":2097},[12952],{"type":26,"value":12953},"        print",{"type":21,"tag":2072,"props":12955,"children":12956},{"style":2079},[12957],{"type":26,"value":3879},{"type":21,"tag":2072,"props":12959,"children":12960},{"style":3372},[12961],{"type":26,"value":3938},{"type":21,"tag":2072,"props":12963,"children":12964},{"style":2108},[12965],{"type":26,"value":12966},"\"|",{"type":21,"tag":2072,"props":12968,"children":12969},{"style":2097},[12970],{"type":26,"value":3948},{"type":21,"tag":2072,"props":12972,"children":12973},{"style":2079},[12974],{"type":26,"value":3339},{"type":21,"tag":2072,"props":12976,"children":12977},{"style":3372},[12978],{"type":26,"value":12979},":0",{"type":21,"tag":2072,"props":12981,"children":12982},{"style":2097},[12983],{"type":26,"value":3948},{"type":21,"tag":2072,"props":12985,"children":12986},{"style":2079},[12987],{"type":26,"value":3953},{"type":21,"tag":2072,"props":12989,"children":12990},{"style":2097},[12991],{"type":26,"value":3958},{"type":21,"tag":2072,"props":12993,"children":12994},{"style":3372},[12995],{"type":26,"value":12996},"b",{"type":21,"tag":2072,"props":12998,"children":12999},{"style":2097},[13000],{"type":26,"value":3958},{"type":21,"tag":2072,"props":13002,"children":13003},{"style":2108},[13004],{"type":26,"value":13005},"> = ",{"type":21,"tag":2072,"props":13007,"children":13008},{"style":2097},[13009],{"type":26,"value":3948},{"type":21,"tag":2072,"props":13011,"children":13012},{"style":2079},[13013],{"type":26,"value":3339},{"type":21,"tag":2072,"props":13015,"children":13016},{"style":3372},[13017],{"type":26,"value":13018},":2d",{"type":21,"tag":2072,"props":13020,"children":13021},{"style":2097},[13022],{"type":26,"value":3958},{"type":21,"tag":2072,"props":13024,"children":13025},{"style":2108},[13026],{"type":26,"value":13027},"   p = ",{"type":21,"tag":2072,"props":13029,"children":13030},{"style":2097},[13031],{"type":26,"value":3948},{"type":21,"tag":2072,"props":13033,"children":13034},{"style":2079},[13035],{"type":26,"value":22},{"type":21,"tag":2072,"props":13037,"children":13038},{"style":3372},[13039],{"type":26,"value":10733},{"type":21,"tag":2072,"props":13041,"children":13042},{"style":2097},[13043],{"type":26,"value":3958},{"type":21,"tag":2072,"props":13045,"children":13046},{"style":2108},[13047],{"type":26,"value":7539},{"type":21,"tag":2072,"props":13049,"children":13050},{"style":2079},[13051],{"type":26,"value":4281},{"type":21,"tag":22,"props":13053,"children":13054},{},[13055],{"type":26,"value":12446},{"type":21,"tag":2062,"props":13057,"children":13059},{"code":13058},"|0000> =  0   p = 0.2500\n|0100> =  4   p = 0.2500\n|1000> =  8   p = 0.2500\n|1100> = 12   p = 0.2500\n",[13060],{"type":21,"tag":1831,"props":13061,"children":13062},{"__ignoreMap":7},[13063],{"type":26,"value":13058},{"type":21,"tag":22,"props":13065,"children":13066},{},[13067,13069,13074],{"type":26,"value":13068},"The input had period 4 in position space. The output is concentrated on multiples of 16\u002F4 = 4 in frequency space. Sample this a few times, take the greatest common divisor of the outcomes, and you recover the period. ",{"type":21,"tag":784,"props":13070,"children":13071},{},[13072],{"type":26,"value":13073},"That",{"type":26,"value":13075}," is the readable signal: not the coefficients, but a periodicity converted into a sampling distribution.",{"type":21,"tag":22,"props":13077,"children":13078},{},[13079],{"type":26,"value":13080},"Confirm it on the simulator with actual shots:",{"type":21,"tag":2062,"props":13082,"children":13084},{"code":13083,"language":3361,"meta":7,"className":3362,"style":7},"qc = QuantumCircuit(n)\nqc.initialize(psi, range(n))\nqc.compose(qft(n), inplace=True)\nqc.measure_all()\n\nsim = AerSimulator()\ncounts = sim.run(transpile(qc, sim), shots=4096).result().get_counts()\nprint(sorted(counts.items(), key=lambda kv: -kv[1]))\n",[13085],{"type":21,"tag":1831,"props":13086,"children":13087},{"__ignoreMap":7},[13088,13103,13119,13143,13151,13158,13173,13204],{"type":21,"tag":2072,"props":13089,"children":13090},{"class":2074,"line":2075},[13091,13095,13099],{"type":21,"tag":2072,"props":13092,"children":13093},{"style":2079},[13094],{"type":26,"value":6514},{"type":21,"tag":2072,"props":13096,"children":13097},{"style":3372},[13098],{"type":26,"value":3487},{"type":21,"tag":2072,"props":13100,"children":13101},{"style":2079},[13102],{"type":26,"value":12569},{"type":21,"tag":2072,"props":13104,"children":13105},{"class":2074,"line":164},[13106,13111,13115],{"type":21,"tag":2072,"props":13107,"children":13108},{"style":2079},[13109],{"type":26,"value":13110},"qc.initialize(psi, ",{"type":21,"tag":2072,"props":13112,"children":13113},{"style":2097},[13114],{"type":26,"value":4068},{"type":21,"tag":2072,"props":13116,"children":13117},{"style":2079},[13118],{"type":26,"value":4082},{"type":21,"tag":2072,"props":13120,"children":13121},{"class":2074,"line":2093},[13122,13127,13131,13135,13139],{"type":21,"tag":2072,"props":13123,"children":13124},{"style":2079},[13125],{"type":26,"value":13126},"qc.compose(qft(n), ",{"type":21,"tag":2072,"props":13128,"children":13129},{"style":3735},[13130],{"type":26,"value":7331},{"type":21,"tag":2072,"props":13132,"children":13133},{"style":3372},[13134],{"type":26,"value":3487},{"type":21,"tag":2072,"props":13136,"children":13137},{"style":2097},[13138],{"type":26,"value":7340},{"type":21,"tag":2072,"props":13140,"children":13141},{"style":2079},[13142],{"type":26,"value":4281},{"type":21,"tag":2072,"props":13144,"children":13145},{"class":2074,"line":2155},[13146],{"type":21,"tag":2072,"props":13147,"children":13148},{"style":2079},[13149],{"type":26,"value":13150},"qc.measure_all()\n",{"type":21,"tag":2072,"props":13152,"children":13153},{"class":2074,"line":2178},[13154],{"type":21,"tag":2072,"props":13155,"children":13156},{"emptyLinePlaceholder":3460},[13157],{"type":26,"value":3463},{"type":21,"tag":2072,"props":13159,"children":13160},{"class":2074,"line":288},[13161,13165,13169],{"type":21,"tag":2072,"props":13162,"children":13163},{"style":2079},[13164],{"type":26,"value":7558},{"type":21,"tag":2072,"props":13166,"children":13167},{"style":3372},[13168],{"type":26,"value":3487},{"type":21,"tag":2072,"props":13170,"children":13171},{"style":2079},[13172],{"type":26,"value":7567},{"type":21,"tag":2072,"props":13174,"children":13175},{"class":2074,"line":16},[13176,13180,13184,13188,13192,13196,13200],{"type":21,"tag":2072,"props":13177,"children":13178},{"style":2079},[13179],{"type":26,"value":7591},{"type":21,"tag":2072,"props":13181,"children":13182},{"style":3372},[13183],{"type":26,"value":3487},{"type":21,"tag":2072,"props":13185,"children":13186},{"style":2079},[13187],{"type":26,"value":7600},{"type":21,"tag":2072,"props":13189,"children":13190},{"style":3735},[13191],{"type":26,"value":3226},{"type":21,"tag":2072,"props":13193,"children":13194},{"style":3372},[13195],{"type":26,"value":3487},{"type":21,"tag":2072,"props":13197,"children":13198},{"style":2097},[13199],{"type":26,"value":7613},{"type":21,"tag":2072,"props":13201,"children":13202},{"style":2079},[13203],{"type":26,"value":4409},{"type":21,"tag":2072,"props":13205,"children":13206},{"class":2074,"line":366},[13207,13211,13215,13219,13224,13228,13232,13237,13241,13246,13250],{"type":21,"tag":2072,"props":13208,"children":13209},{"style":2097},[13210],{"type":26,"value":4614},{"type":21,"tag":2072,"props":13212,"children":13213},{"style":2079},[13214],{"type":26,"value":3879},{"type":21,"tag":2072,"props":13216,"children":13217},{"style":2097},[13218],{"type":26,"value":7633},{"type":21,"tag":2072,"props":13220,"children":13221},{"style":2079},[13222],{"type":26,"value":13223},"(counts.items(), ",{"type":21,"tag":2072,"props":13225,"children":13226},{"style":3735},[13227],{"type":26,"value":10631},{"type":21,"tag":2072,"props":13229,"children":13230},{"style":3372},[13231],{"type":26,"value":10636},{"type":21,"tag":2072,"props":13233,"children":13234},{"style":2079},[13235],{"type":26,"value":13236}," kv: ",{"type":21,"tag":2072,"props":13238,"children":13239},{"style":3372},[13240],{"type":26,"value":3973},{"type":21,"tag":2072,"props":13242,"children":13243},{"style":2079},[13244],{"type":26,"value":13245},"kv[",{"type":21,"tag":2072,"props":13247,"children":13248},{"style":2097},[13249],{"type":26,"value":3555},{"type":21,"tag":2072,"props":13251,"children":13252},{"style":2079},[13253],{"type":26,"value":13254},"]))\n",{"type":21,"tag":22,"props":13256,"children":13257},{},[13258],{"type":26,"value":12446},{"type":21,"tag":2062,"props":13260,"children":13262},{"code":13261},"[('0100', 1079), ('1000', 1030), ('0000', 1018), ('1100', 969)]\n",[13263],{"type":21,"tag":1831,"props":13264,"children":13265},{"__ignoreMap":7},[13266],{"type":26,"value":13261},{"type":21,"tag":22,"props":13268,"children":13269},{},[13270],{"type":26,"value":13271},"Four peaks, roughly 1024 counts each. Nothing else appears.",{"type":21,"tag":43,"props":13273,"children":13275},{"id":13274},"where-the-qft-earns-its-keep",[13276],{"type":26,"value":13277},"Where the QFT earns its keep",{"type":21,"tag":22,"props":13279,"children":13280},{},[13281,13286,13288,13292,13294,13300],{"type":21,"tag":784,"props":13282,"children":13283},{},[13284],{"type":26,"value":13285},"Quantum phase estimation (QPE).",{"type":26,"value":13287}," Given a unitary U and an eigenstate |ψ⟩ with U|ψ⟩ = e^{2πiθ}|ψ⟩, QPE writes θ into a register's phases using controlled-U powers, then applies the ",{"type":21,"tag":103,"props":13289,"children":13290},{},[13291],{"type":26,"value":6110},{"type":26,"value":13293}," QFT to convert those phases into a binary number you measure. Note the direction: QPE uses QFT⁻¹, because the phases are already there and the job is to pull them out. In Qiskit that's ",{"type":21,"tag":1831,"props":13295,"children":13297},{"className":13296},[],[13298],{"type":26,"value":13299},"qft(n).inverse()",{"type":26,"value":237},{"type":21,"tag":22,"props":13302,"children":13303},{},[13304,13309],{"type":21,"tag":784,"props":13305,"children":13306},{},[13307],{"type":26,"value":13308},"Order finding.",{"type":26,"value":13310}," Given a and N, find the smallest r with a^r ≡ 1 (mod N). Modular exponentiation creates a register periodic in r. The QFT turns that period into measurable peaks, exactly as in the demo above.",{"type":21,"tag":22,"props":13312,"children":13313},{},[13314,13322,13324,13329,13331,13335],{"type":21,"tag":784,"props":13315,"children":13316},{},[13317,13321],{"type":21,"tag":29,"props":13318,"children":13319},{"href":8767},[13320],{"type":26,"value":8770},{"type":26,"value":237},{"type":26,"value":13323}," Factoring reduces to order finding, so Shor's is order finding plus classical post-processing (continued fractions and a GCD). The ",{"type":21,"tag":29,"props":13325,"children":13326},{"href":7742},[13327],{"type":26,"value":13328},"1994 paper",{"type":26,"value":13330}," is worth reading precisely because the QFT is the only quantum part: everything else is number theory. This is also why the algorithm threatens RSA, and why ",{"type":21,"tag":29,"props":13332,"children":13333},{"href":8518},[13334],{"type":26,"value":8501},{"type":26,"value":13336}," migration is happening now rather than later.",{"type":21,"tag":22,"props":13338,"children":13339},{},[13340],{"type":26,"value":13341},"In all three cases the QFT is doing the same job: turning phase information into position information so a measurement sees it.",{"type":21,"tag":43,"props":13343,"children":13345},{"id":13344},"approximate-qft-drop-the-tiny-rotations",[13346],{"type":26,"value":13347},"Approximate QFT: drop the tiny rotations",{"type":21,"tag":22,"props":13349,"children":13350},{},[13351,13353,13358],{"type":26,"value":13352},"On real hardware, ",{"type":21,"tag":1831,"props":13354,"children":13356},{"className":13355},[],[13357],{"type":26,"value":11786},{"type":26,"value":13359}," for large k is a rotation smaller than your gate error. Executing it adds noise and buys nothing. The Approximate QFT (AQFT) simply skips every rotation with k above a cutoff, reducing the gate count from O(n²) to O(n log n):",{"type":21,"tag":2062,"props":13361,"children":13363},{"code":13362,"language":3361,"meta":7,"className":3362,"style":7},"def aqft(n, k_max):\n    qc = QuantumCircuit(n, name=\"AQFT\")\n    for size in range(n, 0, -1):\n        m = size - 1\n        qc.h(m)\n        for qubit in range(m):\n            k = m - qubit\n            if k \u003C= k_max:\n                qc.cp(np.pi \u002F 2 ** k, qubit, m)\n    for q in range(n \u002F\u002F 2):\n        qc.swap(q, n - q - 1)\n    return qc\n",[13364],{"type":21,"tag":1831,"props":13365,"children":13366},{"__ignoreMap":7},[13367,13384,13416,13461,13485,13493,13517,13543,13565,13590,13625,13653],{"type":21,"tag":2072,"props":13368,"children":13369},{"class":2074,"line":2075},[13370,13374,13379],{"type":21,"tag":2072,"props":13371,"children":13372},{"style":3372},[13373],{"type":26,"value":3471},{"type":21,"tag":2072,"props":13375,"children":13376},{"style":3474},[13377],{"type":26,"value":13378}," aqft",{"type":21,"tag":2072,"props":13380,"children":13381},{"style":2079},[13382],{"type":26,"value":13383},"(n, k_max):\n",{"type":21,"tag":2072,"props":13385,"children":13386},{"class":2074,"line":164},[13387,13391,13395,13399,13403,13407,13412],{"type":21,"tag":2072,"props":13388,"children":13389},{"style":2079},[13390],{"type":26,"value":6629},{"type":21,"tag":2072,"props":13392,"children":13393},{"style":3372},[13394],{"type":26,"value":3487},{"type":21,"tag":2072,"props":13396,"children":13397},{"style":2079},[13398],{"type":26,"value":6638},{"type":21,"tag":2072,"props":13400,"children":13401},{"style":3735},[13402],{"type":26,"value":6643},{"type":21,"tag":2072,"props":13404,"children":13405},{"style":3372},[13406],{"type":26,"value":3487},{"type":21,"tag":2072,"props":13408,"children":13409},{"style":2108},[13410],{"type":26,"value":13411},"\"AQFT\"",{"type":21,"tag":2072,"props":13413,"children":13414},{"style":2079},[13415],{"type":26,"value":4281},{"type":21,"tag":2072,"props":13417,"children":13418},{"class":2074,"line":2093},[13419,13423,13428,13432,13436,13441,13445,13449,13453,13457],{"type":21,"tag":2072,"props":13420,"children":13421},{"style":3372},[13422],{"type":26,"value":3859},{"type":21,"tag":2072,"props":13424,"children":13425},{"style":2079},[13426],{"type":26,"value":13427}," size ",{"type":21,"tag":2072,"props":13429,"children":13430},{"style":3372},[13431],{"type":26,"value":3869},{"type":21,"tag":2072,"props":13433,"children":13434},{"style":2097},[13435],{"type":26,"value":3874},{"type":21,"tag":2072,"props":13437,"children":13438},{"style":2079},[13439],{"type":26,"value":13440},"(n, ",{"type":21,"tag":2072,"props":13442,"children":13443},{"style":2097},[13444],{"type":26,"value":4295},{"type":21,"tag":2072,"props":13446,"children":13447},{"style":2079},[13448],{"type":26,"value":798},{"type":21,"tag":2072,"props":13450,"children":13451},{"style":3372},[13452],{"type":26,"value":3973},{"type":21,"tag":2072,"props":13454,"children":13455},{"style":2097},[13456],{"type":26,"value":3555},{"type":21,"tag":2072,"props":13458,"children":13459},{"style":2079},[13460],{"type":26,"value":3525},{"type":21,"tag":2072,"props":13462,"children":13463},{"class":2074,"line":2155},[13464,13469,13473,13477,13481],{"type":21,"tag":2072,"props":13465,"children":13466},{"style":2079},[13467],{"type":26,"value":13468},"        m ",{"type":21,"tag":2072,"props":13470,"children":13471},{"style":3372},[13472],{"type":26,"value":3487},{"type":21,"tag":2072,"props":13474,"children":13475},{"style":2079},[13476],{"type":26,"value":13427},{"type":21,"tag":2072,"props":13478,"children":13479},{"style":3372},[13480],{"type":26,"value":3973},{"type":21,"tag":2072,"props":13482,"children":13483},{"style":2097},[13484],{"type":26,"value":12854},{"type":21,"tag":2072,"props":13486,"children":13487},{"class":2074,"line":2178},[13488],{"type":21,"tag":2072,"props":13489,"children":13490},{"style":2079},[13491],{"type":26,"value":13492},"        qc.h(m)\n",{"type":21,"tag":2072,"props":13494,"children":13495},{"class":2074,"line":288},[13496,13500,13504,13508,13512],{"type":21,"tag":2072,"props":13497,"children":13498},{"style":3372},[13499],{"type":26,"value":3997},{"type":21,"tag":2072,"props":13501,"children":13502},{"style":2079},[13503],{"type":26,"value":12080},{"type":21,"tag":2072,"props":13505,"children":13506},{"style":3372},[13507],{"type":26,"value":3869},{"type":21,"tag":2072,"props":13509,"children":13510},{"style":2097},[13511],{"type":26,"value":3874},{"type":21,"tag":2072,"props":13513,"children":13514},{"style":2079},[13515],{"type":26,"value":13516},"(m):\n",{"type":21,"tag":2072,"props":13518,"children":13519},{"class":2074,"line":16},[13520,13525,13529,13534,13538],{"type":21,"tag":2072,"props":13521,"children":13522},{"style":2079},[13523],{"type":26,"value":13524},"            k ",{"type":21,"tag":2072,"props":13526,"children":13527},{"style":3372},[13528],{"type":26,"value":3487},{"type":21,"tag":2072,"props":13530,"children":13531},{"style":2079},[13532],{"type":26,"value":13533}," m ",{"type":21,"tag":2072,"props":13535,"children":13536},{"style":3372},[13537],{"type":26,"value":3973},{"type":21,"tag":2072,"props":13539,"children":13540},{"style":2079},[13541],{"type":26,"value":13542}," qubit\n",{"type":21,"tag":2072,"props":13544,"children":13545},{"class":2074,"line":366},[13546,13550,13555,13560],{"type":21,"tag":2072,"props":13547,"children":13548},{"style":3372},[13549],{"type":26,"value":4025},{"type":21,"tag":2072,"props":13551,"children":13552},{"style":2079},[13553],{"type":26,"value":13554}," k ",{"type":21,"tag":2072,"props":13556,"children":13557},{"style":3372},[13558],{"type":26,"value":13559},"\u003C=",{"type":21,"tag":2072,"props":13561,"children":13562},{"style":2079},[13563],{"type":26,"value":13564}," k_max:\n",{"type":21,"tag":2072,"props":13566,"children":13567},{"class":2074,"line":853},[13568,13573,13577,13581,13585],{"type":21,"tag":2072,"props":13569,"children":13570},{"style":2079},[13571],{"type":26,"value":13572},"                qc.cp(np.pi ",{"type":21,"tag":2072,"props":13574,"children":13575},{"style":3372},[13576],{"type":26,"value":1926},{"type":21,"tag":2072,"props":13578,"children":13579},{"style":2097},[13580],{"type":26,"value":5513},{"type":21,"tag":2072,"props":13582,"children":13583},{"style":3372},[13584],{"type":26,"value":7442},{"type":21,"tag":2072,"props":13586,"children":13587},{"style":2079},[13588],{"type":26,"value":13589}," k, qubit, m)\n",{"type":21,"tag":2072,"props":13591,"children":13592},{"class":2074,"line":3092},[13593,13597,13601,13605,13609,13613,13617,13621],{"type":21,"tag":2072,"props":13594,"children":13595},{"style":3372},[13596],{"type":26,"value":3859},{"type":21,"tag":2072,"props":13598,"children":13599},{"style":2079},[13600],{"type":26,"value":5624},{"type":21,"tag":2072,"props":13602,"children":13603},{"style":3372},[13604],{"type":26,"value":3869},{"type":21,"tag":2072,"props":13606,"children":13607},{"style":2097},[13608],{"type":26,"value":3874},{"type":21,"tag":2072,"props":13610,"children":13611},{"style":2079},[13612],{"type":26,"value":6801},{"type":21,"tag":2072,"props":13614,"children":13615},{"style":3372},[13616],{"type":26,"value":5237},{"type":21,"tag":2072,"props":13618,"children":13619},{"style":2097},[13620],{"type":26,"value":5513},{"type":21,"tag":2072,"props":13622,"children":13623},{"style":2079},[13624],{"type":26,"value":3525},{"type":21,"tag":2072,"props":13626,"children":13627},{"class":2074,"line":3651},[13628,13633,13637,13641,13645,13649],{"type":21,"tag":2072,"props":13629,"children":13630},{"style":2079},[13631],{"type":26,"value":13632},"        qc.swap(q, n ",{"type":21,"tag":2072,"props":13634,"children":13635},{"style":3372},[13636],{"type":26,"value":3973},{"type":21,"tag":2072,"props":13638,"children":13639},{"style":2079},[13640],{"type":26,"value":5624},{"type":21,"tag":2072,"props":13642,"children":13643},{"style":3372},[13644],{"type":26,"value":3973},{"type":21,"tag":2072,"props":13646,"children":13647},{"style":2097},[13648],{"type":26,"value":5228},{"type":21,"tag":2072,"props":13650,"children":13651},{"style":2079},[13652],{"type":26,"value":4281},{"type":21,"tag":2072,"props":13654,"children":13655},{"class":2074,"line":2616},[13656,13660],{"type":21,"tag":2072,"props":13657,"children":13658},{"style":3372},[13659],{"type":26,"value":3701},{"type":21,"tag":2072,"props":13661,"children":13662},{"style":2079},[13663],{"type":26,"value":6910},{"type":21,"tag":22,"props":13665,"children":13666},{},[13667],{"type":26,"value":13668},"Measured fidelity against the exact 4-qubit QFT:",{"type":21,"tag":3169,"props":13670,"children":13671},{},[13672,13693],{"type":21,"tag":3173,"props":13673,"children":13674},{},[13675],{"type":21,"tag":3177,"props":13676,"children":13677},{},[13678,13683,13688],{"type":21,"tag":3181,"props":13679,"children":13680},{},[13681],{"type":26,"value":13682},"k_max",{"type":21,"tag":3181,"props":13684,"children":13685},{},[13686],{"type":26,"value":13687},"CP gates",{"type":21,"tag":3181,"props":13689,"children":13690},{},[13691],{"type":26,"value":13692},"Fidelity",{"type":21,"tag":3195,"props":13694,"children":13695},{},[13696,13712,13728,13745],{"type":21,"tag":3177,"props":13697,"children":13698},{},[13699,13703,13707],{"type":21,"tag":3202,"props":13700,"children":13701},{},[13702],{"type":26,"value":3555},{"type":21,"tag":3202,"props":13704,"children":13705},{},[13706],{"type":26,"value":5641},{"type":21,"tag":3202,"props":13708,"children":13709},{},[13710],{"type":26,"value":13711},"0.8456",{"type":21,"tag":3177,"props":13713,"children":13714},{},[13715,13719,13723],{"type":21,"tag":3202,"props":13716,"children":13717},{},[13718],{"type":26,"value":2170},{"type":21,"tag":3202,"props":13720,"children":13721},{},[13722],{"type":26,"value":5812},{"type":21,"tag":3202,"props":13724,"children":13725},{},[13726],{"type":26,"value":13727},"0.9856",{"type":21,"tag":3177,"props":13729,"children":13730},{},[13731,13735,13740],{"type":21,"tag":3202,"props":13732,"children":13733},{},[13734],{"type":26,"value":5641},{"type":21,"tag":3202,"props":13736,"children":13737},{},[13738],{"type":26,"value":13739},"6",{"type":21,"tag":3202,"props":13741,"children":13742},{},[13743],{"type":26,"value":13744},"1.0000",{"type":21,"tag":3177,"props":13746,"children":13747},{},[13748,13753,13757],{"type":21,"tag":3202,"props":13749,"children":13750},{},[13751],{"type":26,"value":13752},"exact",{"type":21,"tag":3202,"props":13754,"children":13755},{},[13756],{"type":26,"value":13739},{"type":21,"tag":3202,"props":13758,"children":13759},{},[13760],{"type":26,"value":13744},{"type":21,"tag":22,"props":13762,"children":13763},{},[13764,13766,13770],{"type":26,"value":13765},"Keeping rotations down to π\u002F4 recovers 98.6% fidelity with 17% fewer two-qubit gates. On larger registers the saving is dramatic: keeping only k ≤ O(log n) rotations is provably enough for Shor's algorithm to succeed, and on a noisy device the AQFT often outperforms the exact QFT because the errors you avoid outweigh the approximation you introduce. Always benchmark both on a ",{"type":21,"tag":29,"props":13767,"children":13768},{"href":150},[13769],{"type":26,"value":6090},{"type":26,"value":13771}," with a realistic noise model before committing.",{"type":21,"tag":43,"props":13773,"children":13775},{"id":13774},"try-this-next",[13776],{"type":26,"value":13777},"Try this next",{"type":21,"tag":7925,"props":13779,"children":13780},{},[13781,13793,13806],{"type":21,"tag":6142,"props":13782,"children":13783},{},[13784,13786,13791],{"type":26,"value":13785},"Build ",{"type":21,"tag":1831,"props":13787,"children":13789},{"className":13788},[],[13790],{"type":26,"value":13299},{"type":26,"value":13792}," and use it to implement phase estimation on a T gate. You should recover θ = 1\u002F8 exactly with 3 counting qubits.",{"type":21,"tag":6142,"props":13794,"children":13795},{},[13796,13798,13804],{"type":26,"value":13797},"Run the 4-qubit QFT through ",{"type":21,"tag":1831,"props":13799,"children":13801},{"className":13800},[],[13802],{"type":26,"value":13803},"transpile(qc, backend, optimization_level=3)",{"type":26,"value":13805}," for a real device and watch the CP gates decompose into CNOTs. The depth increase is sobering.",{"type":21,"tag":6142,"props":13807,"children":13808},{},[13809,13811,13815],{"type":26,"value":13810},"Compare against a variational algorithm like ",{"type":21,"tag":29,"props":13812,"children":13813},{"href":1788},[13814],{"type":26,"value":1777},{"type":26,"value":13816}," to see the contrast between structured algorithms with proven speedups and heuristic NISQ ones.",{"type":21,"tag":22,"props":13818,"children":13819},{},[13820],{"type":26,"value":13821},"The takeaway to keep: the QFT is fast, exact, and useless by itself. Its power is entirely in what you wrap around it.",{"type":21,"tag":2445,"props":13823,"children":13824},{},[13825],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":13827},[13828,13829,13830,13831,13832,13833,13834,13835,13836],{"id":11619,"depth":164,"text":11622},{"id":11689,"depth":164,"text":11692},{"id":11747,"depth":164,"text":11750},{"id":11826,"depth":164,"text":11829},{"id":12462,"depth":164,"text":12465},{"id":12695,"depth":164,"text":12698},{"id":13274,"depth":164,"text":13277},{"id":13344,"depth":164,"text":13347},{"id":13774,"depth":164,"text":13777},"content:blog:quantum-fourier-transform-tutorial.md","blog\u002Fquantum-fourier-transform-tutorial.md","blog\u002Fquantum-fourier-transform-tutorial",{"_path":13841,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":13842,"description":13843,"date":3089,"author":11,"tags":13844,"readingTime":853,"body":13847,"_type":171,"_id":15696,"_source":173,"_file":15697,"_stem":15698,"_extension":176},"\u002Fblog\u002Fquantum-machine-learning-reality-check","Quantum Machine Learning: A Reality Check","What QML is, what the evidence currently shows about whether it beats classical models, and which parts of it are genuinely promising: grounded in the Biamonte review, the barren plateaus result, and a 2026 head-to-head comparison.",[13845,13846,6280],"QML","PennyLane",{"type":18,"children":13848,"toc":15687},[13849,13854,13866,13871,13877,13882,13913,13923,13939,13949,13955,13967,13979,13984,13994,14000,14012,14024,14035,14040,14046,14051,14062,14067,14100,14105,14117,14123,14135,15468,15481,15536,15548,15567,15573,15578,15601,15611,15621,15627,15643,15655,15665,15683],{"type":21,"tag":22,"props":13850,"children":13851},{},[13852],{"type":26,"value":13853},"\"Quantum computing will supercharge AI\" is the single most repeated claim in quantum marketing. It is also the claim with the weakest evidence behind it.",{"type":21,"tag":22,"props":13855,"children":13856},{},[13857,13859,13864],{"type":26,"value":13858},"This isn't a takedown. Quantum machine learning is a real research area with real results and a handful of genuinely interesting open directions. But the gap between what QML is often ",{"type":21,"tag":103,"props":13860,"children":13861},{},[13862],{"type":26,"value":13863},"said",{"type":26,"value":13865}," to do and what has been demonstrated is wider than in almost any other corner of the field. If you're deciding whether to invest time here, you deserve the honest version.",{"type":21,"tag":22,"props":13867,"children":13868},{},[13869],{"type":26,"value":13870},"So: what QML is, what the evidence shows, and what's still worth watching.",{"type":21,"tag":43,"props":13872,"children":13874},{"id":13873},"what-quantum-machine-learning-means",[13875],{"type":26,"value":13876},"What quantum machine learning means",{"type":21,"tag":22,"props":13878,"children":13879},{},[13880],{"type":26,"value":13881},"The term covers several quite different things that get blurred together.",{"type":21,"tag":22,"props":13883,"children":13884},{},[13885,13890,13892,13898,13900,13905,13907,13911],{"type":21,"tag":784,"props":13886,"children":13887},{},[13888],{"type":26,"value":13889},"Variational circuits as trainable models.",{"type":26,"value":13891}," This is what most people building QML today are doing. You write a parameterized quantum circuit, a ",{"type":21,"tag":29,"props":13893,"children":13895},{"href":13894},"\u002Fglossary\u002Fvariational-circuit",[13896],{"type":26,"value":13897},"variational circuit",{"type":26,"value":13899},", feed data in, measure an output, and use a classical optimizer to adjust the parameters until the output matches your labels. Structurally it's the same ",{"type":21,"tag":29,"props":13901,"children":13902},{"href":112},[13903],{"type":26,"value":13904},"hybrid algorithm",{"type":26,"value":13906}," pattern as ",{"type":21,"tag":29,"props":13908,"children":13909},{"href":62},[13910],{"type":26,"value":14},{"type":26,"value":13912},", only with a loss function instead of an energy. The circuit is the model. The rotation angles are the weights.",{"type":21,"tag":22,"props":13914,"children":13915},{},[13916,13921],{"type":21,"tag":784,"props":13917,"children":13918},{},[13919],{"type":26,"value":13920},"Quantum kernels.",{"type":26,"value":13922}," Instead of training a quantum model directly, you use the quantum computer only to compute similarities between data points: encode two inputs into quantum states and measure their overlap. That similarity matrix then feeds an entirely classical support vector machine. The quantum device does one narrow job, which makes this approach far more resilient to noise than end-to-end variational training.",{"type":21,"tag":22,"props":13924,"children":13925},{},[13926,13931,13933,13937],{"type":21,"tag":784,"props":13927,"children":13928},{},[13929],{"type":26,"value":13930},"Data encoding.",{"type":26,"value":13932}," Both approaches need classical numbers turned into quantum states, and this choice matters more than anything else in the pipeline. Angle encoding maps each feature to a rotation angle. Simple, but it needs one ",{"type":21,"tag":29,"props":13934,"children":13935},{"href":682},[13936],{"type":26,"value":2533},{"type":26,"value":13938}," per feature. Amplitude encoding packs 2ⁿ values into n qubits, which sounds magical until you look at the circuit depth required to prepare that state.",{"type":21,"tag":22,"props":13940,"children":13941},{},[13942,13947],{"type":21,"tag":784,"props":13943,"children":13944},{},[13945],{"type":26,"value":13946},"Quantum-accelerated linear algebra.",{"type":26,"value":13948}," The original, most theoretically ambitious branch: algorithms like HHL for solving linear systems with exponential speedups on paper. This is where the big speedup numbers in QML pitches come from, and where the caveats bite hardest.",{"type":21,"tag":43,"props":13950,"children":13952},{"id":13951},"the-data-loading-bottleneck",[13953],{"type":26,"value":13954},"The data-loading bottleneck",{"type":21,"tag":22,"props":13956,"children":13957},{},[13958,13959,13965],{"type":26,"value":11131},{"type":21,"tag":29,"props":13960,"children":13962},{"href":13961},"\u002Fresearch\u002Fbiamonte-quantum-machine-learning-2017",[13963],{"type":26,"value":13964},"Biamonte et al. review",{"type":26,"value":13966},", still the standard reference for the field, is unusually direct about the central problem, and it applies to that fourth category above.",{"type":21,"tag":22,"props":13968,"children":13969},{},[13970,13972,13977],{"type":26,"value":13971},"Many quantum ML algorithms with proven exponential speedups assume your data is ",{"type":21,"tag":103,"props":13973,"children":13974},{},[13975],{"type":26,"value":13976},"already",{"type":26,"value":13978}," sitting in quantum RAM, in a convenient superposition, ready to be operated on. That's a big assumption. If you have to load N classical data points into a quantum state, and loading takes time proportional to N, then an algorithm that runs in log(N) time once loaded still costs you O(N) overall. The speedup evaporates in the preprocessing step.",{"type":21,"tag":22,"props":13980,"children":13981},{},[13982],{"type":26,"value":13983},"This isn't a hardware engineering problem that better devices will fix. It's structural. And it got worse: over the past decade, a series of \"dequantization\" results showed that several proposed quantum ML speedups had classical algorithms achieving comparable scaling once you granted the classical side similar sampling access to the data. The quantum advantage in those cases turned out to be an artifact of comparing a quantum algorithm with quantum data access against a classical algorithm without equivalent access.",{"type":21,"tag":22,"props":13985,"children":13986},{},[13987,13989],{"type":26,"value":13988},"The practical rule: ",{"type":21,"tag":784,"props":13990,"children":13991},{},[13992],{"type":26,"value":13993},"be suspicious of any quantum ML speedup claim that doesn't account for how the data got in.",{"type":21,"tag":43,"props":13995,"children":13997},{"id":13996},"barren-plateaus",[13998],{"type":26,"value":13999},"Barren plateaus",{"type":21,"tag":22,"props":14001,"children":14002},{},[14003,14005,14011],{"type":26,"value":14004},"The variational approach (the one most people build with) has its own structural obstacle, and it's the one described in ",{"type":21,"tag":29,"props":14006,"children":14008},{"href":14007},"\u002Fresearch\u002Fmcclean-barren-plateaus-2018",[14009],{"type":26,"value":14010},"McClean et al.",{"type":26,"value":237},{"type":21,"tag":22,"props":14013,"children":14014},{},[14015,14017,14022],{"type":26,"value":14016},"Training a variational model means computing gradients and stepping downhill. McClean and colleagues showed that for randomly initialized circuits, the ",{"type":21,"tag":103,"props":14018,"children":14019},{},[14020],{"type":26,"value":14021},"variance",{"type":26,"value":14023}," of the gradient shrinks exponentially as you add qubits. The optimization terrain flattens into a featureless plain (a barren plateau) where every direction looks the same.",{"type":21,"tag":22,"props":14025,"children":14026},{},[14027,14029,14033],{"type":26,"value":14028},"Why this is fatal rather than merely annoying: gradients on quantum hardware are estimated from measurement statistics, so they come with ",{"type":21,"tag":29,"props":14030,"children":14031},{"href":4837},[14032],{"type":26,"value":4840},{"type":26,"value":14034},". Once the true gradient is smaller than your sampling error, you need exponentially many shots only to tell which way is down. At a few dozen qubits with a generic ansatz, the training signal is gone.",{"type":21,"tag":22,"props":14036,"children":14037},{},[14038],{"type":26,"value":14039},"Mitigations exist and are actively researched: structured problem-informed ansätze, layerwise training, smart initialization, local rather than global cost functions. None is a general solution. Any claim that a variational quantum model scales to useful problem sizes has to explain how it escapes this, and most don't.",{"type":21,"tag":43,"props":14041,"children":14043},{"id":14042},"the-2026-head-to-head-comparison",[14044],{"type":26,"value":14045},"The 2026 head-to-head comparison",{"type":21,"tag":22,"props":14047,"children":14048},{},[14049],{"type":26,"value":14050},"Theoretical caveats are one thing. The more useful question is what happens when someone runs the models side by side, and that's rarer than you'd expect. QML papers usually benchmark against other QML papers.",{"type":21,"tag":22,"props":14052,"children":14053},{},[14054,14060],{"type":21,"tag":29,"props":14055,"children":14057},{"href":14056},"\u002Fresearch\u002Fquantum-vs-classical-ml-2026",[14058],{"type":26,"value":14059},"Yu et al. (2026)",{"type":26,"value":14061}," did the like-for-like version: seven matched quantum\u002Fclassical model pairs, spanning both supervised learning and reinforcement learning, run on the same problems with the comparison held as fair as possible.",{"type":21,"tag":22,"props":14063,"children":14064},{},[14065],{"type":26,"value":14066},"The quantum models lost. Not on one axis: on three:",{"type":21,"tag":7925,"props":14068,"children":14069},{},[14070,14080,14090],{"type":21,"tag":6142,"props":14071,"children":14072},{},[14073,14078],{"type":21,"tag":784,"props":14074,"children":14075},{},[14076],{"type":26,"value":14077},"Prediction performance.",{"type":26,"value":14079}," Classical baselines were more accurate.",{"type":21,"tag":6142,"props":14081,"children":14082},{},[14083,14088],{"type":21,"tag":784,"props":14084,"children":14085},{},[14086],{"type":26,"value":14087},"Policy stability.",{"type":26,"value":14089}," In the reinforcement learning tasks, the quantum models produced less stable policies.",{"type":21,"tag":6142,"props":14091,"children":14092},{},[14093,14098],{"type":21,"tag":784,"props":14094,"children":14095},{},[14096],{"type":26,"value":14097},"Training time.",{"type":26,"value":14099}," The quantum models were slower to train.",{"type":21,"tag":22,"props":14101,"children":14102},{},[14103],{"type":26,"value":14104},"That last one deserves emphasis, because \"quantum is slower\" is the opposite of the entire pitch. Circuit execution overhead, the shot counts needed for gradient estimation, and the classical-quantum round trips add up.",{"type":21,"tag":22,"props":14106,"children":14107},{},[14108,14110,14115],{"type":26,"value":14109},"One careful negative result doesn't close a research field. But it's the right kind of evidence, and it points the same direction as the theory. ",{"type":21,"tag":784,"props":14111,"children":14112},{},[14113],{"type":26,"value":14114},"As of mid-2026, \"quantum will make AI faster\" is not supported by the evidence.",{"type":26,"value":14116}," If someone tells you otherwise, ask them for the head-to-head benchmark.",{"type":21,"tag":43,"props":14118,"children":14120},{"id":14119},"try-it-yourself",[14121],{"type":26,"value":14122},"Try it yourself",{"type":21,"tag":22,"props":14124,"children":14125},{},[14126,14128,14133],{"type":26,"value":14127},"The best way to develop intuition here is to build one. This is a complete variational quantum classifier in ",{"type":21,"tag":29,"props":14129,"children":14131},{"href":14130},"\u002Fsdks\u002Fpennylane",[14132],{"type":26,"value":13846},{"type":26,"value":14134},": angle encoding, a trainable entangling ansatz, and a gradient-descent loop:",{"type":21,"tag":2062,"props":14136,"children":14138},{"className":3362,"code":14137,"language":3361,"meta":7,"style":7},"import pennylane as qml\nfrom pennylane import numpy as np\nfrom sklearn.datasets import make_moons\nfrom sklearn.model_selection import train_test_split\n\nn_qubits = 2\nn_layers = 3\n\ndev = qml.device(\"default.qubit\", wires=n_qubits)\n\n@qml.qnode(dev)\ndef circuit(weights, x):\n    # Data encoding: each feature becomes a rotation angle\n    qml.AngleEmbedding(x, wires=range(n_qubits), rotation=\"Y\")\n\n    # Trainable ansatz: rotations plus entangling CNOTs\n    qml.BasicEntanglerLayers(weights, wires=range(n_qubits))\n\n    return qml.expval(qml.PauliZ(0))\n\ndef variational_classifier(weights, bias, x):\n    return circuit(weights, x) + bias\n\ndef square_loss(labels, preds):\n    return np.mean((labels - qml.math.stack(preds)) ** 2)\n\ndef cost(weights, bias, X, Y):\n    preds = [variational_classifier(weights, bias, x) for x in X]\n    return square_loss(Y, preds)\n\n# Two-moons dataset, labels mapped to -1 \u002F +1 to match \u003CZ>\nX, y = make_moons(n_samples=200, noise=0.15, random_state=42)\ny = 2 * y - 1\nX_train, X_test, y_train, y_test = train_test_split(\n    X, y, test_size=0.3, random_state=42\n)\n\nshape = qml.BasicEntanglerLayers.shape(n_layers=n_layers, n_wires=n_qubits)\nrng = np.random.default_rng(42)\nweights = np.array(rng.normal(0, 0.1, shape), requires_grad=True)\nbias = np.array(0.0, requires_grad=True)\n\nopt = qml.AdamOptimizer(stepsize=0.1)\nbatch_size = 20\n\nfor step in range(60):\n    idx = np.random.randint(0, len(X_train), (batch_size,))\n    X_batch, y_batch = X_train[idx], y_train[idx]\n    weights, bias, _, _ = opt.step(cost, weights, bias, X_batch, y_batch)\n\n    if step % 15 == 0:\n        preds = [np.sign(variational_classifier(weights, bias, x)) for x in X_train]\n        acc = np.mean(np.array(preds) == y_train)\n        print(f\"Step {step:2d} | cost {cost(weights, bias, X_train, y_train):.4f} | acc {acc:.3f}\")\n\ntest_preds = [np.sign(variational_classifier(weights, bias, x)) for x in X_test]\nprint(f\"\\nTest accuracy: {np.mean(np.array(test_preds) == y_test):.3f}\")\n",[14139],{"type":21,"tag":1831,"props":14140,"children":14141},{"__ignoreMap":7},[14142,14163,14190,14211,14232,14239,14255,14272,14279,14319,14326,14339,14356,14364,14407,14414,14422,14447,14454,14474,14481,14498,14519,14526,14543,14576,14583,14600,14634,14646,14653,14661,14732,14765,14782,14821,14828,14835,14879,14904,14956,14998,15005,15039,15056,15063,15096,15131,15149,15167,15175,15209,15244,15271,15362,15370,15404],{"type":21,"tag":2072,"props":14143,"children":14144},{"class":2074,"line":2075},[14145,14149,14154,14158],{"type":21,"tag":2072,"props":14146,"children":14147},{"style":3372},[14148],{"type":26,"value":3375},{"type":21,"tag":2072,"props":14150,"children":14151},{"style":2079},[14152],{"type":26,"value":14153}," pennylane ",{"type":21,"tag":2072,"props":14155,"children":14156},{"style":3372},[14157],{"type":26,"value":3385},{"type":21,"tag":2072,"props":14159,"children":14160},{"style":2079},[14161],{"type":26,"value":14162}," qml\n",{"type":21,"tag":2072,"props":14164,"children":14165},{"class":2074,"line":164},[14166,14170,14174,14178,14182,14186],{"type":21,"tag":2072,"props":14167,"children":14168},{"style":3372},[14169],{"type":26,"value":3398},{"type":21,"tag":2072,"props":14171,"children":14172},{"style":2079},[14173],{"type":26,"value":14153},{"type":21,"tag":2072,"props":14175,"children":14176},{"style":3372},[14177],{"type":26,"value":3375},{"type":21,"tag":2072,"props":14179,"children":14180},{"style":2079},[14181],{"type":26,"value":3380},{"type":21,"tag":2072,"props":14183,"children":14184},{"style":3372},[14185],{"type":26,"value":3385},{"type":21,"tag":2072,"props":14187,"children":14188},{"style":2079},[14189],{"type":26,"value":3390},{"type":21,"tag":2072,"props":14191,"children":14192},{"class":2074,"line":2093},[14193,14197,14202,14206],{"type":21,"tag":2072,"props":14194,"children":14195},{"style":3372},[14196],{"type":26,"value":3398},{"type":21,"tag":2072,"props":14198,"children":14199},{"style":2079},[14200],{"type":26,"value":14201}," sklearn.datasets ",{"type":21,"tag":2072,"props":14203,"children":14204},{"style":3372},[14205],{"type":26,"value":3375},{"type":21,"tag":2072,"props":14207,"children":14208},{"style":2079},[14209],{"type":26,"value":14210}," make_moons\n",{"type":21,"tag":2072,"props":14212,"children":14213},{"class":2074,"line":2155},[14214,14218,14223,14227],{"type":21,"tag":2072,"props":14215,"children":14216},{"style":3372},[14217],{"type":26,"value":3398},{"type":21,"tag":2072,"props":14219,"children":14220},{"style":2079},[14221],{"type":26,"value":14222}," sklearn.model_selection ",{"type":21,"tag":2072,"props":14224,"children":14225},{"style":3372},[14226],{"type":26,"value":3375},{"type":21,"tag":2072,"props":14228,"children":14229},{"style":2079},[14230],{"type":26,"value":14231}," train_test_split\n",{"type":21,"tag":2072,"props":14233,"children":14234},{"class":2074,"line":2178},[14235],{"type":21,"tag":2072,"props":14236,"children":14237},{"emptyLinePlaceholder":3460},[14238],{"type":26,"value":3463},{"type":21,"tag":2072,"props":14240,"children":14241},{"class":2074,"line":288},[14242,14247,14251],{"type":21,"tag":2072,"props":14243,"children":14244},{"style":2079},[14245],{"type":26,"value":14246},"n_qubits ",{"type":21,"tag":2072,"props":14248,"children":14249},{"style":3372},[14250],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14252,"children":14253},{"style":2097},[14254],{"type":26,"value":4220},{"type":21,"tag":2072,"props":14256,"children":14257},{"class":2074,"line":16},[14258,14263,14267],{"type":21,"tag":2072,"props":14259,"children":14260},{"style":2079},[14261],{"type":26,"value":14262},"n_layers ",{"type":21,"tag":2072,"props":14264,"children":14265},{"style":3372},[14266],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14268,"children":14269},{"style":2097},[14270],{"type":26,"value":14271}," 3\n",{"type":21,"tag":2072,"props":14273,"children":14274},{"class":2074,"line":366},[14275],{"type":21,"tag":2072,"props":14276,"children":14277},{"emptyLinePlaceholder":3460},[14278],{"type":26,"value":3463},{"type":21,"tag":2072,"props":14280,"children":14281},{"class":2074,"line":853},[14282,14287,14291,14296,14301,14305,14310,14314],{"type":21,"tag":2072,"props":14283,"children":14284},{"style":2079},[14285],{"type":26,"value":14286},"dev ",{"type":21,"tag":2072,"props":14288,"children":14289},{"style":3372},[14290],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14292,"children":14293},{"style":2079},[14294],{"type":26,"value":14295}," qml.device(",{"type":21,"tag":2072,"props":14297,"children":14298},{"style":2108},[14299],{"type":26,"value":14300},"\"default.qubit\"",{"type":21,"tag":2072,"props":14302,"children":14303},{"style":2079},[14304],{"type":26,"value":798},{"type":21,"tag":2072,"props":14306,"children":14307},{"style":3735},[14308],{"type":26,"value":14309},"wires",{"type":21,"tag":2072,"props":14311,"children":14312},{"style":3372},[14313],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14315,"children":14316},{"style":2079},[14317],{"type":26,"value":14318},"n_qubits)\n",{"type":21,"tag":2072,"props":14320,"children":14321},{"class":2074,"line":3092},[14322],{"type":21,"tag":2072,"props":14323,"children":14324},{"emptyLinePlaceholder":3460},[14325],{"type":26,"value":3463},{"type":21,"tag":2072,"props":14327,"children":14328},{"class":2074,"line":3651},[14329,14334],{"type":21,"tag":2072,"props":14330,"children":14331},{"style":3474},[14332],{"type":26,"value":14333},"@qml.qnode",{"type":21,"tag":2072,"props":14335,"children":14336},{"style":2079},[14337],{"type":26,"value":14338},"(dev)\n",{"type":21,"tag":2072,"props":14340,"children":14341},{"class":2074,"line":2616},[14342,14346,14351],{"type":21,"tag":2072,"props":14343,"children":14344},{"style":3372},[14345],{"type":26,"value":3471},{"type":21,"tag":2072,"props":14347,"children":14348},{"style":3474},[14349],{"type":26,"value":14350}," circuit",{"type":21,"tag":2072,"props":14352,"children":14353},{"style":2079},[14354],{"type":26,"value":14355},"(weights, x):\n",{"type":21,"tag":2072,"props":14357,"children":14358},{"class":2074,"line":3695},[14359],{"type":21,"tag":2072,"props":14360,"children":14361},{"style":3985},[14362],{"type":26,"value":14363},"    # Data encoding: each feature becomes a rotation angle\n",{"type":21,"tag":2072,"props":14365,"children":14366},{"class":2074,"line":3709},[14367,14372,14376,14380,14384,14389,14394,14398,14403],{"type":21,"tag":2072,"props":14368,"children":14369},{"style":2079},[14370],{"type":26,"value":14371},"    qml.AngleEmbedding(x, ",{"type":21,"tag":2072,"props":14373,"children":14374},{"style":3735},[14375],{"type":26,"value":14309},{"type":21,"tag":2072,"props":14377,"children":14378},{"style":3372},[14379],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14381,"children":14382},{"style":2097},[14383],{"type":26,"value":4068},{"type":21,"tag":2072,"props":14385,"children":14386},{"style":2079},[14387],{"type":26,"value":14388},"(n_qubits), ",{"type":21,"tag":2072,"props":14390,"children":14391},{"style":3735},[14392],{"type":26,"value":14393},"rotation",{"type":21,"tag":2072,"props":14395,"children":14396},{"style":3372},[14397],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14399,"children":14400},{"style":2108},[14401],{"type":26,"value":14402},"\"Y\"",{"type":21,"tag":2072,"props":14404,"children":14405},{"style":2079},[14406],{"type":26,"value":4281},{"type":21,"tag":2072,"props":14408,"children":14409},{"class":2074,"line":3717},[14410],{"type":21,"tag":2072,"props":14411,"children":14412},{"emptyLinePlaceholder":3460},[14413],{"type":26,"value":3463},{"type":21,"tag":2072,"props":14415,"children":14416},{"class":2074,"line":3750},[14417],{"type":21,"tag":2072,"props":14418,"children":14419},{"style":3985},[14420],{"type":26,"value":14421},"    # Trainable ansatz: rotations plus entangling CNOTs\n",{"type":21,"tag":2072,"props":14423,"children":14424},{"class":2074,"line":3769},[14425,14430,14434,14438,14442],{"type":21,"tag":2072,"props":14426,"children":14427},{"style":2079},[14428],{"type":26,"value":14429},"    qml.BasicEntanglerLayers(weights, ",{"type":21,"tag":2072,"props":14431,"children":14432},{"style":3735},[14433],{"type":26,"value":14309},{"type":21,"tag":2072,"props":14435,"children":14436},{"style":3372},[14437],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14439,"children":14440},{"style":2097},[14441],{"type":26,"value":4068},{"type":21,"tag":2072,"props":14443,"children":14444},{"style":2079},[14445],{"type":26,"value":14446},"(n_qubits))\n",{"type":21,"tag":2072,"props":14448,"children":14449},{"class":2074,"line":3777},[14450],{"type":21,"tag":2072,"props":14451,"children":14452},{"emptyLinePlaceholder":3460},[14453],{"type":26,"value":3463},{"type":21,"tag":2072,"props":14455,"children":14456},{"class":2074,"line":3808},[14457,14461,14466,14470],{"type":21,"tag":2072,"props":14458,"children":14459},{"style":3372},[14460],{"type":26,"value":3701},{"type":21,"tag":2072,"props":14462,"children":14463},{"style":2079},[14464],{"type":26,"value":14465}," qml.expval(qml.PauliZ(",{"type":21,"tag":2072,"props":14467,"children":14468},{"style":2097},[14469],{"type":26,"value":4295},{"type":21,"tag":2072,"props":14471,"children":14472},{"style":2079},[14473],{"type":26,"value":12429},{"type":21,"tag":2072,"props":14475,"children":14476},{"class":2074,"line":3853},[14477],{"type":21,"tag":2072,"props":14478,"children":14479},{"emptyLinePlaceholder":3460},[14480],{"type":26,"value":3463},{"type":21,"tag":2072,"props":14482,"children":14483},{"class":2074,"line":3895},[14484,14488,14493],{"type":21,"tag":2072,"props":14485,"children":14486},{"style":3372},[14487],{"type":26,"value":3471},{"type":21,"tag":2072,"props":14489,"children":14490},{"style":3474},[14491],{"type":26,"value":14492}," variational_classifier",{"type":21,"tag":2072,"props":14494,"children":14495},{"style":2079},[14496],{"type":26,"value":14497},"(weights, bias, x):\n",{"type":21,"tag":2072,"props":14499,"children":14500},{"class":2074,"line":3913},[14501,14505,14510,14514],{"type":21,"tag":2072,"props":14502,"children":14503},{"style":3372},[14504],{"type":26,"value":3701},{"type":21,"tag":2072,"props":14506,"children":14507},{"style":2079},[14508],{"type":26,"value":14509}," circuit(weights, x) ",{"type":21,"tag":2072,"props":14511,"children":14512},{"style":3372},[14513],{"type":26,"value":5658},{"type":21,"tag":2072,"props":14515,"children":14516},{"style":2079},[14517],{"type":26,"value":14518}," bias\n",{"type":21,"tag":2072,"props":14520,"children":14521},{"class":2074,"line":3991},[14522],{"type":21,"tag":2072,"props":14523,"children":14524},{"emptyLinePlaceholder":3460},[14525],{"type":26,"value":3463},{"type":21,"tag":2072,"props":14527,"children":14528},{"class":2074,"line":4019},[14529,14533,14538],{"type":21,"tag":2072,"props":14530,"children":14531},{"style":3372},[14532],{"type":26,"value":3471},{"type":21,"tag":2072,"props":14534,"children":14535},{"style":3474},[14536],{"type":26,"value":14537}," square_loss",{"type":21,"tag":2072,"props":14539,"children":14540},{"style":2079},[14541],{"type":26,"value":14542},"(labels, preds):\n",{"type":21,"tag":2072,"props":14544,"children":14545},{"class":2074,"line":4048},[14546,14550,14555,14559,14564,14568,14572],{"type":21,"tag":2072,"props":14547,"children":14548},{"style":3372},[14549],{"type":26,"value":3701},{"type":21,"tag":2072,"props":14551,"children":14552},{"style":2079},[14553],{"type":26,"value":14554}," np.mean((labels ",{"type":21,"tag":2072,"props":14556,"children":14557},{"style":3372},[14558],{"type":26,"value":3973},{"type":21,"tag":2072,"props":14560,"children":14561},{"style":2079},[14562],{"type":26,"value":14563}," qml.math.stack(preds)) ",{"type":21,"tag":2072,"props":14565,"children":14566},{"style":3372},[14567],{"type":26,"value":3832},{"type":21,"tag":2072,"props":14569,"children":14570},{"style":2097},[14571],{"type":26,"value":5513},{"type":21,"tag":2072,"props":14573,"children":14574},{"style":2079},[14575],{"type":26,"value":4281},{"type":21,"tag":2072,"props":14577,"children":14578},{"class":2074,"line":4057},[14579],{"type":21,"tag":2072,"props":14580,"children":14581},{"emptyLinePlaceholder":3460},[14582],{"type":26,"value":3463},{"type":21,"tag":2072,"props":14584,"children":14585},{"class":2074,"line":4085},[14586,14590,14595],{"type":21,"tag":2072,"props":14587,"children":14588},{"style":3372},[14589],{"type":26,"value":3471},{"type":21,"tag":2072,"props":14591,"children":14592},{"style":3474},[14593],{"type":26,"value":14594}," cost",{"type":21,"tag":2072,"props":14596,"children":14597},{"style":2079},[14598],{"type":26,"value":14599},"(weights, bias, X, Y):\n",{"type":21,"tag":2072,"props":14601,"children":14602},{"class":2074,"line":4116},[14603,14608,14612,14617,14621,14625,14629],{"type":21,"tag":2072,"props":14604,"children":14605},{"style":2079},[14606],{"type":26,"value":14607},"    preds ",{"type":21,"tag":2072,"props":14609,"children":14610},{"style":3372},[14611],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14613,"children":14614},{"style":2079},[14615],{"type":26,"value":14616}," [variational_classifier(weights, bias, x) ",{"type":21,"tag":2072,"props":14618,"children":14619},{"style":3372},[14620],{"type":26,"value":4479},{"type":21,"tag":2072,"props":14622,"children":14623},{"style":2079},[14624],{"type":26,"value":12791},{"type":21,"tag":2072,"props":14626,"children":14627},{"style":3372},[14628],{"type":26,"value":3869},{"type":21,"tag":2072,"props":14630,"children":14631},{"style":2079},[14632],{"type":26,"value":14633}," X]\n",{"type":21,"tag":2072,"props":14635,"children":14636},{"class":2074,"line":4138},[14637,14641],{"type":21,"tag":2072,"props":14638,"children":14639},{"style":3372},[14640],{"type":26,"value":3701},{"type":21,"tag":2072,"props":14642,"children":14643},{"style":2079},[14644],{"type":26,"value":14645}," square_loss(Y, preds)\n",{"type":21,"tag":2072,"props":14647,"children":14648},{"class":2074,"line":4184},[14649],{"type":21,"tag":2072,"props":14650,"children":14651},{"emptyLinePlaceholder":3460},[14652],{"type":26,"value":3463},{"type":21,"tag":2072,"props":14654,"children":14655},{"class":2074,"line":4197},[14656],{"type":21,"tag":2072,"props":14657,"children":14658},{"style":3985},[14659],{"type":26,"value":14660},"# Two-moons dataset, labels mapped to -1 \u002F +1 to match \u003CZ>\n",{"type":21,"tag":2072,"props":14662,"children":14663},{"class":2074,"line":4205},[14664,14669,14673,14678,14683,14687,14692,14696,14701,14705,14710,14714,14719,14723,14728],{"type":21,"tag":2072,"props":14665,"children":14666},{"style":2079},[14667],{"type":26,"value":14668},"X, y ",{"type":21,"tag":2072,"props":14670,"children":14671},{"style":3372},[14672],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14674,"children":14675},{"style":2079},[14676],{"type":26,"value":14677}," make_moons(",{"type":21,"tag":2072,"props":14679,"children":14680},{"style":3735},[14681],{"type":26,"value":14682},"n_samples",{"type":21,"tag":2072,"props":14684,"children":14685},{"style":3372},[14686],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14688,"children":14689},{"style":2097},[14690],{"type":26,"value":14691},"200",{"type":21,"tag":2072,"props":14693,"children":14694},{"style":2079},[14695],{"type":26,"value":798},{"type":21,"tag":2072,"props":14697,"children":14698},{"style":3735},[14699],{"type":26,"value":14700},"noise",{"type":21,"tag":2072,"props":14702,"children":14703},{"style":3372},[14704],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14706,"children":14707},{"style":2097},[14708],{"type":26,"value":14709},"0.15",{"type":21,"tag":2072,"props":14711,"children":14712},{"style":2079},[14713],{"type":26,"value":798},{"type":21,"tag":2072,"props":14715,"children":14716},{"style":3735},[14717],{"type":26,"value":14718},"random_state",{"type":21,"tag":2072,"props":14720,"children":14721},{"style":3372},[14722],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14724,"children":14725},{"style":2097},[14726],{"type":26,"value":14727},"42",{"type":21,"tag":2072,"props":14729,"children":14730},{"style":2079},[14731],{"type":26,"value":4281},{"type":21,"tag":2072,"props":14733,"children":14734},{"class":2074,"line":4223},[14735,14740,14744,14748,14752,14757,14761],{"type":21,"tag":2072,"props":14736,"children":14737},{"style":2079},[14738],{"type":26,"value":14739},"y ",{"type":21,"tag":2072,"props":14741,"children":14742},{"style":3372},[14743],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14745,"children":14746},{"style":2097},[14747],{"type":26,"value":5513},{"type":21,"tag":2072,"props":14749,"children":14750},{"style":3372},[14751],{"type":26,"value":7478},{"type":21,"tag":2072,"props":14753,"children":14754},{"style":2079},[14755],{"type":26,"value":14756}," y ",{"type":21,"tag":2072,"props":14758,"children":14759},{"style":3372},[14760],{"type":26,"value":3973},{"type":21,"tag":2072,"props":14762,"children":14763},{"style":2097},[14764],{"type":26,"value":12854},{"type":21,"tag":2072,"props":14766,"children":14767},{"class":2074,"line":4241},[14768,14773,14777],{"type":21,"tag":2072,"props":14769,"children":14770},{"style":2079},[14771],{"type":26,"value":14772},"X_train, X_test, y_train, y_test ",{"type":21,"tag":2072,"props":14774,"children":14775},{"style":3372},[14776],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14778,"children":14779},{"style":2079},[14780],{"type":26,"value":14781}," train_test_split(\n",{"type":21,"tag":2072,"props":14783,"children":14784},{"class":2074,"line":4249},[14785,14790,14795,14799,14804,14808,14812,14816],{"type":21,"tag":2072,"props":14786,"children":14787},{"style":2079},[14788],{"type":26,"value":14789},"    X, y, ",{"type":21,"tag":2072,"props":14791,"children":14792},{"style":3735},[14793],{"type":26,"value":14794},"test_size",{"type":21,"tag":2072,"props":14796,"children":14797},{"style":3372},[14798],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14800,"children":14801},{"style":2097},[14802],{"type":26,"value":14803},"0.3",{"type":21,"tag":2072,"props":14805,"children":14806},{"style":2079},[14807],{"type":26,"value":798},{"type":21,"tag":2072,"props":14809,"children":14810},{"style":3735},[14811],{"type":26,"value":14718},{"type":21,"tag":2072,"props":14813,"children":14814},{"style":3372},[14815],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14817,"children":14818},{"style":2097},[14819],{"type":26,"value":14820},"42\n",{"type":21,"tag":2072,"props":14822,"children":14823},{"class":2074,"line":4284},[14824],{"type":21,"tag":2072,"props":14825,"children":14826},{"style":2079},[14827],{"type":26,"value":4281},{"type":21,"tag":2072,"props":14829,"children":14830},{"class":2074,"line":4302},[14831],{"type":21,"tag":2072,"props":14832,"children":14833},{"emptyLinePlaceholder":3460},[14834],{"type":26,"value":3463},{"type":21,"tag":2072,"props":14836,"children":14837},{"class":2074,"line":4327},[14838,14843,14847,14852,14857,14861,14866,14871,14875],{"type":21,"tag":2072,"props":14839,"children":14840},{"style":2079},[14841],{"type":26,"value":14842},"shape ",{"type":21,"tag":2072,"props":14844,"children":14845},{"style":3372},[14846],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14848,"children":14849},{"style":2079},[14850],{"type":26,"value":14851}," qml.BasicEntanglerLayers.shape(",{"type":21,"tag":2072,"props":14853,"children":14854},{"style":3735},[14855],{"type":26,"value":14856},"n_layers",{"type":21,"tag":2072,"props":14858,"children":14859},{"style":3372},[14860],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14862,"children":14863},{"style":2079},[14864],{"type":26,"value":14865},"n_layers, ",{"type":21,"tag":2072,"props":14867,"children":14868},{"style":3735},[14869],{"type":26,"value":14870},"n_wires",{"type":21,"tag":2072,"props":14872,"children":14873},{"style":3372},[14874],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14876,"children":14877},{"style":2079},[14878],{"type":26,"value":14318},{"type":21,"tag":2072,"props":14880,"children":14881},{"class":2074,"line":4369},[14882,14887,14891,14896,14900],{"type":21,"tag":2072,"props":14883,"children":14884},{"style":2079},[14885],{"type":26,"value":14886},"rng ",{"type":21,"tag":2072,"props":14888,"children":14889},{"style":3372},[14890],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14892,"children":14893},{"style":2079},[14894],{"type":26,"value":14895}," np.random.default_rng(",{"type":21,"tag":2072,"props":14897,"children":14898},{"style":2097},[14899],{"type":26,"value":14727},{"type":21,"tag":2072,"props":14901,"children":14902},{"style":2079},[14903],{"type":26,"value":4281},{"type":21,"tag":2072,"props":14905,"children":14906},{"class":2074,"line":4377},[14907,14912,14916,14921,14925,14929,14934,14939,14944,14948,14952],{"type":21,"tag":2072,"props":14908,"children":14909},{"style":2079},[14910],{"type":26,"value":14911},"weights ",{"type":21,"tag":2072,"props":14913,"children":14914},{"style":3372},[14915],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14917,"children":14918},{"style":2079},[14919],{"type":26,"value":14920}," np.array(rng.normal(",{"type":21,"tag":2072,"props":14922,"children":14923},{"style":2097},[14924],{"type":26,"value":4295},{"type":21,"tag":2072,"props":14926,"children":14927},{"style":2079},[14928],{"type":26,"value":798},{"type":21,"tag":2072,"props":14930,"children":14931},{"style":2097},[14932],{"type":26,"value":14933},"0.1",{"type":21,"tag":2072,"props":14935,"children":14936},{"style":2079},[14937],{"type":26,"value":14938},", shape), ",{"type":21,"tag":2072,"props":14940,"children":14941},{"style":3735},[14942],{"type":26,"value":14943},"requires_grad",{"type":21,"tag":2072,"props":14945,"children":14946},{"style":3372},[14947],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14949,"children":14950},{"style":2097},[14951],{"type":26,"value":7340},{"type":21,"tag":2072,"props":14953,"children":14954},{"style":2079},[14955],{"type":26,"value":4281},{"type":21,"tag":2072,"props":14957,"children":14958},{"class":2074,"line":4412},[14959,14964,14968,14973,14978,14982,14986,14990,14994],{"type":21,"tag":2072,"props":14960,"children":14961},{"style":2079},[14962],{"type":26,"value":14963},"bias ",{"type":21,"tag":2072,"props":14965,"children":14966},{"style":3372},[14967],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14969,"children":14970},{"style":2079},[14971],{"type":26,"value":14972}," np.array(",{"type":21,"tag":2072,"props":14974,"children":14975},{"style":2097},[14976],{"type":26,"value":14977},"0.0",{"type":21,"tag":2072,"props":14979,"children":14980},{"style":2079},[14981],{"type":26,"value":798},{"type":21,"tag":2072,"props":14983,"children":14984},{"style":3735},[14985],{"type":26,"value":14943},{"type":21,"tag":2072,"props":14987,"children":14988},{"style":3372},[14989],{"type":26,"value":3487},{"type":21,"tag":2072,"props":14991,"children":14992},{"style":2097},[14993],{"type":26,"value":7340},{"type":21,"tag":2072,"props":14995,"children":14996},{"style":2079},[14997],{"type":26,"value":4281},{"type":21,"tag":2072,"props":14999,"children":15000},{"class":2074,"line":4529},[15001],{"type":21,"tag":2072,"props":15002,"children":15003},{"emptyLinePlaceholder":3460},[15004],{"type":26,"value":3463},{"type":21,"tag":2072,"props":15006,"children":15007},{"class":2074,"line":4537},[15008,15013,15017,15022,15027,15031,15035],{"type":21,"tag":2072,"props":15009,"children":15010},{"style":2079},[15011],{"type":26,"value":15012},"opt ",{"type":21,"tag":2072,"props":15014,"children":15015},{"style":3372},[15016],{"type":26,"value":3487},{"type":21,"tag":2072,"props":15018,"children":15019},{"style":2079},[15020],{"type":26,"value":15021}," qml.AdamOptimizer(",{"type":21,"tag":2072,"props":15023,"children":15024},{"style":3735},[15025],{"type":26,"value":15026},"stepsize",{"type":21,"tag":2072,"props":15028,"children":15029},{"style":3372},[15030],{"type":26,"value":3487},{"type":21,"tag":2072,"props":15032,"children":15033},{"style":2097},[15034],{"type":26,"value":14933},{"type":21,"tag":2072,"props":15036,"children":15037},{"style":2079},[15038],{"type":26,"value":4281},{"type":21,"tag":2072,"props":15040,"children":15041},{"class":2074,"line":4582},[15042,15047,15051],{"type":21,"tag":2072,"props":15043,"children":15044},{"style":2079},[15045],{"type":26,"value":15046},"batch_size ",{"type":21,"tag":2072,"props":15048,"children":15049},{"style":3372},[15050],{"type":26,"value":3487},{"type":21,"tag":2072,"props":15052,"children":15053},{"style":2097},[15054],{"type":26,"value":15055}," 20\n",{"type":21,"tag":2072,"props":15057,"children":15058},{"class":2074,"line":4600},[15059],{"type":21,"tag":2072,"props":15060,"children":15061},{"emptyLinePlaceholder":3460},[15062],{"type":26,"value":3463},{"type":21,"tag":2072,"props":15064,"children":15065},{"class":2074,"line":4608},[15066,15070,15075,15079,15083,15087,15092],{"type":21,"tag":2072,"props":15067,"children":15068},{"style":3372},[15069],{"type":26,"value":4479},{"type":21,"tag":2072,"props":15071,"children":15072},{"style":2079},[15073],{"type":26,"value":15074}," step ",{"type":21,"tag":2072,"props":15076,"children":15077},{"style":3372},[15078],{"type":26,"value":3869},{"type":21,"tag":2072,"props":15080,"children":15081},{"style":2097},[15082],{"type":26,"value":3874},{"type":21,"tag":2072,"props":15084,"children":15085},{"style":2079},[15086],{"type":26,"value":3879},{"type":21,"tag":2072,"props":15088,"children":15089},{"style":2097},[15090],{"type":26,"value":15091},"60",{"type":21,"tag":2072,"props":15093,"children":15094},{"style":2079},[15095],{"type":26,"value":3525},{"type":21,"tag":2072,"props":15097,"children":15098},{"class":2074,"line":4697},[15099,15104,15108,15113,15117,15121,15126],{"type":21,"tag":2072,"props":15100,"children":15101},{"style":2079},[15102],{"type":26,"value":15103},"    idx ",{"type":21,"tag":2072,"props":15105,"children":15106},{"style":3372},[15107],{"type":26,"value":3487},{"type":21,"tag":2072,"props":15109,"children":15110},{"style":2079},[15111],{"type":26,"value":15112}," np.random.randint(",{"type":21,"tag":2072,"props":15114,"children":15115},{"style":2097},[15116],{"type":26,"value":4295},{"type":21,"tag":2072,"props":15118,"children":15119},{"style":2079},[15120],{"type":26,"value":798},{"type":21,"tag":2072,"props":15122,"children":15123},{"style":2097},[15124],{"type":26,"value":15125},"len",{"type":21,"tag":2072,"props":15127,"children":15128},{"style":2079},[15129],{"type":26,"value":15130},"(X_train), (batch_size,))\n",{"type":21,"tag":2072,"props":15132,"children":15134},{"class":2074,"line":15133},48,[15135,15140,15144],{"type":21,"tag":2072,"props":15136,"children":15137},{"style":2079},[15138],{"type":26,"value":15139},"    X_batch, y_batch ",{"type":21,"tag":2072,"props":15141,"children":15142},{"style":3372},[15143],{"type":26,"value":3487},{"type":21,"tag":2072,"props":15145,"children":15146},{"style":2079},[15147],{"type":26,"value":15148}," X_train[idx], y_train[idx]\n",{"type":21,"tag":2072,"props":15150,"children":15152},{"class":2074,"line":15151},49,[15153,15158,15162],{"type":21,"tag":2072,"props":15154,"children":15155},{"style":2079},[15156],{"type":26,"value":15157},"    weights, bias, _, _ ",{"type":21,"tag":2072,"props":15159,"children":15160},{"style":3372},[15161],{"type":26,"value":3487},{"type":21,"tag":2072,"props":15163,"children":15164},{"style":2079},[15165],{"type":26,"value":15166}," opt.step(cost, weights, bias, X_batch, y_batch)\n",{"type":21,"tag":2072,"props":15168,"children":15170},{"class":2074,"line":15169},50,[15171],{"type":21,"tag":2072,"props":15172,"children":15173},{"emptyLinePlaceholder":3460},[15174],{"type":26,"value":3463},{"type":21,"tag":2072,"props":15176,"children":15178},{"class":2074,"line":15177},51,[15179,15183,15187,15191,15196,15201,15205],{"type":21,"tag":2072,"props":15180,"children":15181},{"style":3372},[15182],{"type":26,"value":12007},{"type":21,"tag":2072,"props":15184,"children":15185},{"style":2079},[15186],{"type":26,"value":15074},{"type":21,"tag":2072,"props":15188,"children":15189},{"style":3372},[15190],{"type":26,"value":5508},{"type":21,"tag":2072,"props":15192,"children":15193},{"style":2097},[15194],{"type":26,"value":15195}," 15",{"type":21,"tag":2072,"props":15197,"children":15198},{"style":3372},[15199],{"type":26,"value":15200}," ==",{"type":21,"tag":2072,"props":15202,"children":15203},{"style":2097},[15204],{"type":26,"value":12021},{"type":21,"tag":2072,"props":15206,"children":15207},{"style":2079},[15208],{"type":26,"value":4045},{"type":21,"tag":2072,"props":15210,"children":15212},{"class":2074,"line":15211},52,[15213,15218,15222,15227,15231,15235,15239],{"type":21,"tag":2072,"props":15214,"children":15215},{"style":2079},[15216],{"type":26,"value":15217},"        preds ",{"type":21,"tag":2072,"props":15219,"children":15220},{"style":3372},[15221],{"type":26,"value":3487},{"type":21,"tag":2072,"props":15223,"children":15224},{"style":2079},[15225],{"type":26,"value":15226}," [np.sign(variational_classifier(weights, bias, x)) ",{"type":21,"tag":2072,"props":15228,"children":15229},{"style":3372},[15230],{"type":26,"value":4479},{"type":21,"tag":2072,"props":15232,"children":15233},{"style":2079},[15234],{"type":26,"value":12791},{"type":21,"tag":2072,"props":15236,"children":15237},{"style":3372},[15238],{"type":26,"value":3869},{"type":21,"tag":2072,"props":15240,"children":15241},{"style":2079},[15242],{"type":26,"value":15243}," X_train]\n",{"type":21,"tag":2072,"props":15245,"children":15247},{"class":2074,"line":15246},53,[15248,15253,15257,15262,15266],{"type":21,"tag":2072,"props":15249,"children":15250},{"style":2079},[15251],{"type":26,"value":15252},"        acc ",{"type":21,"tag":2072,"props":15254,"children":15255},{"style":3372},[15256],{"type":26,"value":3487},{"type":21,"tag":2072,"props":15258,"children":15259},{"style":2079},[15260],{"type":26,"value":15261}," np.mean(np.array(preds) ",{"type":21,"tag":2072,"props":15263,"children":15264},{"style":3372},[15265],{"type":26,"value":4035},{"type":21,"tag":2072,"props":15267,"children":15268},{"style":2079},[15269],{"type":26,"value":15270}," y_train)\n",{"type":21,"tag":2072,"props":15272,"children":15274},{"class":2074,"line":15273},54,[15275,15279,15283,15287,15292,15296,15301,15305,15309,15314,15318,15323,15327,15331,15336,15340,15345,15350,15354,15358],{"type":21,"tag":2072,"props":15276,"children":15277},{"style":2097},[15278],{"type":26,"value":12953},{"type":21,"tag":2072,"props":15280,"children":15281},{"style":2079},[15282],{"type":26,"value":3879},{"type":21,"tag":2072,"props":15284,"children":15285},{"style":3372},[15286],{"type":26,"value":3938},{"type":21,"tag":2072,"props":15288,"children":15289},{"style":2108},[15290],{"type":26,"value":15291},"\"Step ",{"type":21,"tag":2072,"props":15293,"children":15294},{"style":2097},[15295],{"type":26,"value":3948},{"type":21,"tag":2072,"props":15297,"children":15298},{"style":2079},[15299],{"type":26,"value":15300},"step",{"type":21,"tag":2072,"props":15302,"children":15303},{"style":3372},[15304],{"type":26,"value":13018},{"type":21,"tag":2072,"props":15306,"children":15307},{"style":2097},[15308],{"type":26,"value":3958},{"type":21,"tag":2072,"props":15310,"children":15311},{"style":2108},[15312],{"type":26,"value":15313}," | cost ",{"type":21,"tag":2072,"props":15315,"children":15316},{"style":2097},[15317],{"type":26,"value":3948},{"type":21,"tag":2072,"props":15319,"children":15320},{"style":2079},[15321],{"type":26,"value":15322},"cost(weights, bias, X_train, y_train)",{"type":21,"tag":2072,"props":15324,"children":15325},{"style":3372},[15326],{"type":26,"value":10733},{"type":21,"tag":2072,"props":15328,"children":15329},{"style":2097},[15330],{"type":26,"value":3958},{"type":21,"tag":2072,"props":15332,"children":15333},{"style":2108},[15334],{"type":26,"value":15335}," | acc ",{"type":21,"tag":2072,"props":15337,"children":15338},{"style":2097},[15339],{"type":26,"value":3948},{"type":21,"tag":2072,"props":15341,"children":15342},{"style":2079},[15343],{"type":26,"value":15344},"acc",{"type":21,"tag":2072,"props":15346,"children":15347},{"style":3372},[15348],{"type":26,"value":15349},":.3f",{"type":21,"tag":2072,"props":15351,"children":15352},{"style":2097},[15353],{"type":26,"value":3958},{"type":21,"tag":2072,"props":15355,"children":15356},{"style":2108},[15357],{"type":26,"value":7539},{"type":21,"tag":2072,"props":15359,"children":15360},{"style":2079},[15361],{"type":26,"value":4281},{"type":21,"tag":2072,"props":15363,"children":15365},{"class":2074,"line":15364},55,[15366],{"type":21,"tag":2072,"props":15367,"children":15368},{"emptyLinePlaceholder":3460},[15369],{"type":26,"value":3463},{"type":21,"tag":2072,"props":15371,"children":15373},{"class":2074,"line":15372},56,[15374,15379,15383,15387,15391,15395,15399],{"type":21,"tag":2072,"props":15375,"children":15376},{"style":2079},[15377],{"type":26,"value":15378},"test_preds ",{"type":21,"tag":2072,"props":15380,"children":15381},{"style":3372},[15382],{"type":26,"value":3487},{"type":21,"tag":2072,"props":15384,"children":15385},{"style":2079},[15386],{"type":26,"value":15226},{"type":21,"tag":2072,"props":15388,"children":15389},{"style":3372},[15390],{"type":26,"value":4479},{"type":21,"tag":2072,"props":15392,"children":15393},{"style":2079},[15394],{"type":26,"value":12791},{"type":21,"tag":2072,"props":15396,"children":15397},{"style":3372},[15398],{"type":26,"value":3869},{"type":21,"tag":2072,"props":15400,"children":15401},{"style":2079},[15402],{"type":26,"value":15403}," X_test]\n",{"type":21,"tag":2072,"props":15405,"children":15407},{"class":2074,"line":15406},57,[15408,15412,15416,15420,15424,15429,15434,15438,15443,15447,15452,15456,15460,15464],{"type":21,"tag":2072,"props":15409,"children":15410},{"style":2097},[15411],{"type":26,"value":4614},{"type":21,"tag":2072,"props":15413,"children":15414},{"style":2079},[15415],{"type":26,"value":3879},{"type":21,"tag":2072,"props":15417,"children":15418},{"style":3372},[15419],{"type":26,"value":3938},{"type":21,"tag":2072,"props":15421,"children":15422},{"style":2108},[15423],{"type":26,"value":7539},{"type":21,"tag":2072,"props":15425,"children":15426},{"style":2097},[15427],{"type":26,"value":15428},"\\n",{"type":21,"tag":2072,"props":15430,"children":15431},{"style":2108},[15432],{"type":26,"value":15433},"Test accuracy: ",{"type":21,"tag":2072,"props":15435,"children":15436},{"style":2097},[15437],{"type":26,"value":3948},{"type":21,"tag":2072,"props":15439,"children":15440},{"style":2079},[15441],{"type":26,"value":15442},"np.mean(np.array(test_preds) ",{"type":21,"tag":2072,"props":15444,"children":15445},{"style":3372},[15446],{"type":26,"value":4035},{"type":21,"tag":2072,"props":15448,"children":15449},{"style":2079},[15450],{"type":26,"value":15451}," y_test)",{"type":21,"tag":2072,"props":15453,"children":15454},{"style":3372},[15455],{"type":26,"value":15349},{"type":21,"tag":2072,"props":15457,"children":15458},{"style":2097},[15459],{"type":26,"value":3958},{"type":21,"tag":2072,"props":15461,"children":15462},{"style":2108},[15463],{"type":26,"value":7539},{"type":21,"tag":2072,"props":15465,"children":15466},{"style":2079},[15467],{"type":26,"value":4281},{"type":21,"tag":22,"props":15469,"children":15470},{},[15471,15473,15479],{"type":26,"value":15472},"Running it (PennyLane 0.45, ",{"type":21,"tag":1831,"props":15474,"children":15476},{"className":15475},[],[15477],{"type":26,"value":15478},"default.qubit",{"type":26,"value":15480},") gives:",{"type":21,"tag":2062,"props":15482,"children":15485},{"className":15483,"code":15484,"language":26,"meta":7,"style":7},"language-text shiki shiki-themes github-dark","Step  0 | cost 1.6158 | acc 0.336\nStep 15 | cost 0.6775 | acc 0.764\nStep 30 | cost 0.6466 | acc 0.779\nStep 45 | cost 0.6372 | acc 0.850\n\nTest accuracy: 0.817\n",[15486],{"type":21,"tag":1831,"props":15487,"children":15488},{"__ignoreMap":7},[15489,15497,15505,15513,15521,15528],{"type":21,"tag":2072,"props":15490,"children":15491},{"class":2074,"line":2075},[15492],{"type":21,"tag":2072,"props":15493,"children":15494},{},[15495],{"type":26,"value":15496},"Step  0 | cost 1.6158 | acc 0.336\n",{"type":21,"tag":2072,"props":15498,"children":15499},{"class":2074,"line":164},[15500],{"type":21,"tag":2072,"props":15501,"children":15502},{},[15503],{"type":26,"value":15504},"Step 15 | cost 0.6775 | acc 0.764\n",{"type":21,"tag":2072,"props":15506,"children":15507},{"class":2074,"line":2093},[15508],{"type":21,"tag":2072,"props":15509,"children":15510},{},[15511],{"type":26,"value":15512},"Step 30 | cost 0.6466 | acc 0.779\n",{"type":21,"tag":2072,"props":15514,"children":15515},{"class":2074,"line":2155},[15516],{"type":21,"tag":2072,"props":15517,"children":15518},{},[15519],{"type":26,"value":15520},"Step 45 | cost 0.6372 | acc 0.850\n",{"type":21,"tag":2072,"props":15522,"children":15523},{"class":2074,"line":2178},[15524],{"type":21,"tag":2072,"props":15525,"children":15526},{"emptyLinePlaceholder":3460},[15527],{"type":26,"value":3463},{"type":21,"tag":2072,"props":15529,"children":15530},{"class":2074,"line":288},[15531],{"type":21,"tag":2072,"props":15532,"children":15533},{},[15534],{"type":26,"value":15535},"Test accuracy: 0.817\n",{"type":21,"tag":22,"props":15537,"children":15538},{},[15539,15541,15546],{"type":26,"value":15540},"So it trains, and 82% on two moons is respectable. It is also worth noting what it doesn't do: an RBF-kernel SVM from scikit-learn scores ",{"type":21,"tag":784,"props":15542,"children":15543},{},[15544],{"type":26,"value":15545},"0.983",{"type":26,"value":15547}," on the identical split, and fits in under a millisecond on your laptop. That comparison isn't a criticism of the code. It's the honest baseline that a lot of QML demos quietly omit.",{"type":21,"tag":22,"props":15549,"children":15550},{},[15551,15553,15559,15561,15565],{"type":26,"value":15552},"Try scaling it. Push ",{"type":21,"tag":1831,"props":15554,"children":15556},{"className":15555},[],[15557],{"type":26,"value":15558},"n_qubits",{"type":26,"value":15560}," up, widen the ansatz, and watch the gradients shrink. You reproduce the barren-plateau effect on a ",{"type":21,"tag":29,"props":15562,"children":15563},{"href":150},[15564],{"type":26,"value":6090},{"type":26,"value":15566}," in an afternoon, which is a far better education than reading about it.",{"type":21,"tag":43,"props":15568,"children":15570},{"id":15569},"whats-genuinely-promising",[15571],{"type":26,"value":15572},"What's genuinely promising",{"type":21,"tag":22,"props":15574,"children":15575},{},[15576],{"type":26,"value":15577},"None of the above means QML is a dead end. Three directions look genuinely worth pursuing, and they share a feature: they avoid the problems above rather than hoping to power through them.",{"type":21,"tag":22,"props":15579,"children":15580},{},[15581,15586,15588,15593,15595,15599],{"type":21,"tag":784,"props":15582,"children":15583},{},[15584],{"type":26,"value":15585},"Quantum data instead of classical data.",{"type":26,"value":15587}," The data-loading bottleneck exists because we're forcing classical numbers into quantum states. If your data is ",{"type":21,"tag":103,"props":15589,"children":15590},{},[15591],{"type":26,"value":15592},"already quantum",{"type":26,"value":15594}," (states produced by a physics experiment, molecular ground states, outputs of a quantum sensor), there's nothing to load. Learning tasks on quantum data have the cleanest theoretical case for advantage, and unlike most QML claims, the argument survives scrutiny. This overlaps heavily with where quantum computing is delivering results generally: physics and chemistry, not business analytics. Our ",{"type":21,"tag":29,"props":15596,"children":15597},{"href":11566},[15598],{"type":26,"value":11569},{"type":26,"value":15600}," covers the distinction.",{"type":21,"tag":22,"props":15602,"children":15603},{},[15604,15609],{"type":21,"tag":784,"props":15605,"children":15606},{},[15607],{"type":26,"value":15608},"Quantum kernels for structured data.",{"type":26,"value":15610}," Because the quantum device only computes similarities, kernel methods sidestep barren plateaus entirely. There's no deep variational terrain to descend. For data with structure that maps naturally onto a quantum feature space (group-theoretic structure, certain periodic problems), there are constructed examples with provable separations. The honest caveat is that these are usually engineered problems rather than datasets anyone had lying around.",{"type":21,"tag":22,"props":15612,"children":15613},{},[15614,15619],{"type":21,"tag":784,"props":15615,"children":15616},{},[15617],{"type":26,"value":15618},"Noise filtering.",{"type":26,"value":15620}," Notably, the Yu et al. comparison that found quantum models losing on every headline metric also identified noise filtering and false-positive control as areas where quantum approaches still looked promising. That's a narrow, specific niche, and narrow, specific niches are how technologies gain footholds.",{"type":21,"tag":43,"props":15622,"children":15624},{"id":15623},"where-this-leaves-you",[15625],{"type":26,"value":15626},"Where this leaves you",{"type":21,"tag":22,"props":15628,"children":15629},{},[15630,15632,15636,15637,15641],{"type":26,"value":15631},"If you're learning quantum computing, QML is still worth your time, only for the right reasons. The techniques transfer. Data encoding, ansatz design, gradient estimation, and the hybrid loop are the same skills that ",{"type":21,"tag":29,"props":15633,"children":15634},{"href":31},[15635],{"type":26,"value":14},{"type":26,"value":383},{"type":21,"tag":29,"props":15638,"children":15639},{"href":1788},[15640],{"type":26,"value":1777},{"type":26,"value":15642}," need, and those have clearer near-term paths. Learning QML makes you better at variational quantum computing generally.",{"type":21,"tag":22,"props":15644,"children":15645},{},[15646,15648,15653],{"type":26,"value":15647},"What to avoid is building a business case on a speedup that hasn't been demonstrated. The same discipline applies here as in ",{"type":21,"tag":29,"props":15649,"children":15650},{"href":670},[15651],{"type":26,"value":15652},"benchmarking hardware claims",{"type":26,"value":15654},": ask what the classical baseline was, ask whether data loading was counted, ask how many qubits the result scales to.",{"type":21,"tag":22,"props":15656,"children":15657},{},[15658,15663],{"type":21,"tag":29,"props":15659,"children":15660},{"href":7887},[15661],{"type":26,"value":15662},"Preskill's NISQ paper",{"type":26,"value":15664}," set the tone for this kind of honesty about near-term devices, and it has aged well precisely because it under-promised. QML would benefit from the same posture.",{"type":21,"tag":22,"props":15666,"children":15667},{},[15668,15670,15675,15677,15681],{"type":26,"value":15669},"The field is more interesting when you stop needing it to be revolutionary. Start with the ",{"type":21,"tag":29,"props":15671,"children":15672},{"href":14130},[15673],{"type":26,"value":15674},"PennyLane SDK guide",{"type":26,"value":15676},", keep the ",{"type":21,"tag":29,"props":15678,"children":15679},{"href":7982},[15680],{"type":26,"value":8466},{"type":26,"value":15682}," open, and run the experiments yourself. The evidence is more useful than the pitch.",{"type":21,"tag":2445,"props":15684,"children":15685},{},[15686],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":15688},[15689,15690,15691,15692,15693,15694,15695],{"id":13873,"depth":164,"text":13876},{"id":13951,"depth":164,"text":13954},{"id":13996,"depth":164,"text":13999},{"id":14042,"depth":164,"text":14045},{"id":14119,"depth":164,"text":14122},{"id":15569,"depth":164,"text":15572},{"id":15623,"depth":164,"text":15626},"content:blog:quantum-machine-learning-reality-check.md","blog\u002Fquantum-machine-learning-reality-check.md","blog\u002Fquantum-machine-learning-reality-check",{"_path":336,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":15700,"description":15701,"date":3089,"author":11,"tags":15702,"readingTime":853,"body":15703,"_type":171,"_id":16073,"_source":173,"_file":16074,"_stem":16075,"_extension":176},"Quantum Networking and Distributed Quantum Computing: Wiring QPUs Together","Building one enormous quantum processor gets harder the bigger it gets. Linking smaller ones is the alternative, and it depends on distributing entanglement between machines, which is far harder than it sounds.",[15,8025,287],{"type":18,"children":15704,"toc":16064},[15705,15710,15715,15735,15740,15746,15751,15761,15792,15802,15807,15813,15818,15829,15834,15863,15881,15887,15898,15903,15915,15920,15926,15931,15936,15941,15952,15958,15963,15972,15989,16000,16006,16011,16016,16021,16026,16030,16035,16052],{"type":21,"tag":22,"props":15706,"children":15707},{},[15708],{"type":26,"value":15709},"There is a ceiling problem in quantum hardware that doesn't get discussed as often as qubit counts do.",{"type":21,"tag":22,"props":15711,"children":15712},{},[15713],{"type":26,"value":15714},"Every approach to building a quantum processor gets harder as the device grows. Superconducting chips need a control line for essentially every qubit, and those lines carry heat into a dilution refrigerator that has a finite cooling budget. Trapped-ion chains get slower and more fragile as you add ions to a single trap. Crosstalk between neighbouring qubits rises with density. Fabrication yield (the probability that every qubit on a chip is good) falls off a cliff as area increases. None of these are fundamental physics barriers. They are engineering walls, and engineering walls have a habit of arriving sooner than expected.",{"type":21,"tag":22,"props":15716,"children":15717},{},[15718,15720,15726,15728,15733],{"type":26,"value":15719},"The alternative is the one classical computing took decades ago: stop building one bigger machine and start connecting smaller ones. That is what ",{"type":21,"tag":29,"props":15721,"children":15723},{"href":15722},"\u002Fglossary\u002Fdistributed-quantum-computing",[15724],{"type":26,"value":15725},"distributed quantum computing",{"type":26,"value":15727}," means, and it is why quantum networking has moved from a communications curiosity to a scaling strategy. When we ",{"type":21,"tag":29,"props":15729,"children":15730},{"href":670},[15731],{"type":26,"value":15732},"read EO 14413 as a technical document",{"type":26,"value":15734},", distributed quantum computing showed up as a named five-year planning target, which is a fairly direct admission that nobody is confident the single-big-chip route gets all the way there.",{"type":21,"tag":22,"props":15736,"children":15737},{},[15738],{"type":26,"value":15739},"The catch is that connecting quantum computers is nothing like connecting classical ones.",{"type":21,"tag":43,"props":15741,"children":15743},{"id":15742},"three-different-things-people-call-quantum-networking",[15744],{"type":26,"value":15745},"Three different things people call \"quantum networking\"",{"type":21,"tag":22,"props":15747,"children":15748},{},[15749],{"type":26,"value":15750},"Before anything else, a disambiguation, because these get conflated constantly and the confusion makes most coverage of the topic unreadable.",{"type":21,"tag":22,"props":15752,"children":15753},{},[15754,15759],{"type":21,"tag":784,"props":15755,"children":15756},{},[15757],{"type":26,"value":15758},"(a) Quantum networking for distributed computation.",{"type":26,"value":15760}," Linking two or more QPUs with a quantum channel so they behave as one larger computer. Quantum information genuinely moves between them. This is the subject of this post.",{"type":21,"tag":22,"props":15762,"children":15763},{},[15764,15769,15771,15776,15778,15784,15786,15790],{"type":21,"tag":784,"props":15765,"children":15766},{},[15767],{"type":26,"value":15768},"(b) Quantum key distribution and the \"quantum internet.\"",{"type":26,"value":15770}," Using quantum states to establish a shared secret key whose security rests on physics rather than on computational hardness. This is a ",{"type":21,"tag":103,"props":15772,"children":15773},{},[15774],{"type":26,"value":15775},"communications security",{"type":26,"value":15777}," technology, descending from ",{"type":21,"tag":29,"props":15779,"children":15781},{"href":15780},"\u002Fresearch\u002Fbennett-brassard-bb84-1984",[15782],{"type":26,"value":15783},"Bennett and Brassard's BB84 protocol",{"type":26,"value":15785},". It does not make any computer faster. It's also frequently misrepresented as the answer to the quantum threat against public-key cryptography. In practice that threat is being addressed by ",{"type":21,"tag":29,"props":15787,"children":15788},{"href":8518},[15789],{"type":26,"value":8501},{"type":26,"value":15791},", which is software you deploy today, not hardware that needs new fibre.",{"type":21,"tag":22,"props":15793,"children":15794},{},[15795,15800],{"type":21,"tag":784,"props":15796,"children":15797},{},[15798],{"type":26,"value":15799},"(c) Classical networking of quantum computers.",{"type":26,"value":15801}," Running one circuit on a QPU in Maryland from a laptop in Berlin. This is what every cloud quantum service already does. It is ordinary TCP\u002FIP carrying circuit descriptions and measurement results, and nothing quantum crosses the wire.",{"type":21,"tag":22,"props":15803,"children":15804},{},[15805],{"type":26,"value":15806},"Press releases blur (a) and (c) especially often. If a headline says \"networked quantum computers\" and the mechanism is an API, it's (c).",{"type":21,"tag":43,"props":15808,"children":15810},{"id":15809},"why-you-cannot-simply-amplify-a-qubit",[15811],{"type":26,"value":15812},"Why you cannot simply amplify a qubit",{"type":21,"tag":22,"props":15814,"children":15815},{},[15816],{"type":26,"value":15817},"Classical networking works because signals are copied. A repeater reads a degraded bit, decides whether it was a 0 or a 1, and transmits a fresh clean copy. Errors are stripped out at every hop, which is why a fibre link spans an ocean.",{"type":21,"tag":22,"props":15819,"children":15820},{},[15821,15823,15827],{"type":26,"value":15822},"Quantum information forbids this. The no-cloning theorem says there is no operation that duplicates an arbitrary unknown quantum state. There is no such thing as reading a qubit to see what it is and sending a fresh one, because measurement collapses the state and destroys the ",{"type":21,"tag":29,"props":15824,"children":15825},{"href":7989},[15826],{"type":26,"value":7992},{"type":26,"value":15828}," you were trying to preserve. A quantum repeater that worked like a classical repeater would be a quantum repeater that deletes your data.",{"type":21,"tag":22,"props":15830,"children":15831},{},[15832],{"type":26,"value":15833},"Meanwhile the physical channel is brutally lossy. Photons in optical fibre attenuate exponentially with distance, and unlike classical light you can't compensate by turning up the power. A single photon either arrives or it doesn't. Beyond a few hundred kilometres, the odds of a photon surviving the trip get small enough that you'd wait a long time for one success.",{"type":21,"tag":22,"props":15835,"children":15836},{},[15837,15839,15846,15848,15853,15855,15861],{"type":26,"value":15838},"Quantum repeaters solve this by a genuinely different mechanism. Rather than relaying the qubit, they relay ",{"type":21,"tag":103,"props":15840,"children":15841},{},[15842],{"type":21,"tag":29,"props":15843,"children":15844},{"href":10952},[15845],{"type":26,"value":10955},{"type":26,"value":15847},". Split a long link into short segments. Establish an entangled pair across each segment independently: short hops, so the loss per hop is manageable, and success is heralded, meaning you know when it worked and simply retry when it didn't. Then perform ",{"type":21,"tag":784,"props":15849,"children":15850},{},[15851],{"type":26,"value":15852},"entanglement swapping",{"type":26,"value":15854},": at each intermediate node, jointly measure the two local halves of two adjacent pairs in the ",{"type":21,"tag":29,"props":15856,"children":15858},{"href":15857},"\u002Fglossary\u002Fbell-state",[15859],{"type":26,"value":15860},"Bell basis",{"type":26,"value":15862},". That measurement consumes both short pairs and leaves the two far-end qubits entangled with each other, despite never having interacted. Chain this along the route and you have entanglement spanning the whole distance.",{"type":21,"tag":22,"props":15864,"children":15865},{},[15866,15868,15872,15874,15879],{"type":26,"value":15867},"The ingredients this demands are exactly the hard parts: heralded entanglement generation, quantum memories that hold a half-pair coherently while the neighbouring segment keeps retrying, and some form of purification or error correction to keep ",{"type":21,"tag":29,"props":15869,"children":15870},{"href":8149},[15871],{"type":26,"value":8152},{"type":26,"value":15873}," from degrading across hops. ",{"type":21,"tag":29,"props":15875,"children":15876},{"href":8065},[15877],{"type":26,"value":15878},"Decoherence",{"type":26,"value":15880}," in the memory sets a hard clock on the whole procedure. If a stored qubit dies while its partner segment is still failing, the attempt is wasted.",{"type":21,"tag":43,"props":15882,"children":15884},{"id":15883},"teleportation-is-the-transport-primitive",[15885],{"type":26,"value":15886},"Teleportation is the transport primitive",{"type":21,"tag":22,"props":15888,"children":15889},{},[15890,15892,15896],{"type":26,"value":15891},"Once two nodes share an entangled pair, moving an actual qubit between them is a solved protocol: ",{"type":21,"tag":29,"props":15893,"children":15894},{"href":10944},[15895],{"type":26,"value":10947},{"type":26,"value":15897},", from Bennett and colleagues in 1993.",{"type":21,"tag":22,"props":15899,"children":15900},{},[15901],{"type":26,"value":15902},"The sender performs a joint measurement on the qubit to be transmitted and their half of the entangled pair, obtaining two classical bits. Those bits are sent over an ordinary classical channel. The receiver applies one of four corrections determined by those bits, and their half of the pair becomes the original state. One entangled pair and two classical bits per qubit transported.",{"type":21,"tag":22,"props":15904,"children":15905},{},[15906,15908,15913],{"type":26,"value":15907},"Two consequences are worth stating explicitly because both get mangled in popular coverage. First, the original state is destroyed by the sender's measurement. Teleportation moves a qubit, it does not copy one, which is precisely how it stays consistent with no-cloning. Second, ",{"type":21,"tag":784,"props":15909,"children":15910},{},[15911],{"type":26,"value":15912},"the classical channel is mandatory",{"type":26,"value":15914},". Without those two bits the receiver's qubit is in a completely random state and useless. Entanglement alone signals nothing. Nothing travels faster than light, and no amount of entanglement between two labs lets them communicate without a conventional link.",{"type":21,"tag":22,"props":15916,"children":15917},{},[15918],{"type":26,"value":15919},"That second point is the whole reason quantum networks are not a physics loophole. They are a way to move fragile information, not a way to move it instantly.",{"type":21,"tag":43,"props":15921,"children":15923},{"id":15922},"the-interconnect-is-the-bottleneck",[15924],{"type":26,"value":15925},"The interconnect is the bottleneck",{"type":21,"tag":22,"props":15927,"children":15928},{},[15929],{"type":26,"value":15930},"Now the engineering reality of stitching QPUs together.",{"type":21,"tag":22,"props":15932,"children":15933},{},[15934],{"type":26,"value":15935},"Inside a single processor, two-qubit gates take microseconds or less and land fidelities that, on good hardware, exceed 99.9%. Between two processors, you must first generate a shared entangled pair over a photonic link (a probabilistic, lossy process) and only then teleport a gate or a qubit across it. Inter-node entanglement generation is currently orders of magnitude slower than local gates, and arrives at meaningfully lower fidelity.",{"type":21,"tag":22,"props":15937,"children":15938},{},[15939],{"type":26,"value":15940},"This changes how you have to think about programming such a machine. A distributed QPU is not a flat pool of qubits. It is a strongly non-uniform architecture where some pairs of qubits are cheap to entangle and others are extremely expensive, and where the expensive operations also happen to be the noisy ones. Circuit compilers have to partition algorithms to minimise cross-node operations, in much the same spirit as minimising communication in classical HPC, except the penalty for getting it wrong is not only latency but error accumulation. And because entanglement must be produced faster than the memories holding it decohere, a slow interconnect doesn't merely reduce throughput. Past a certain point it stops working at all.",{"type":21,"tag":22,"props":15942,"children":15943},{},[15944,15946,15950],{"type":26,"value":15945},"There is a genuinely appealing upside, though, and it's the reason serious people pursue this: ",{"type":21,"tag":29,"props":15947,"children":15948},{"href":487},[15949],{"type":26,"value":518},{"type":26,"value":15951}," needs physical qubit counts in the millions for useful algorithms, and no one has a credible plan to put a million high-quality qubits in one enclosure. Modularity is one of the few routes to that number that doesn't require a single manufacturing miracle.",{"type":21,"tag":43,"props":15953,"children":15955},{"id":15954},"modality-matters-here-more-than-usual",[15956],{"type":26,"value":15957},"Modality matters here more than usual",{"type":21,"tag":22,"props":15959,"children":15960},{},[15961],{"type":26,"value":15962},"The photonic interface is where hardware platforms diverge sharply.",{"type":21,"tag":22,"props":15964,"children":15965},{},[15966,15970],{"type":21,"tag":784,"props":15967,"children":15968},{},[15969],{"type":26,"value":8296},{"type":26,"value":15971}," have a natural optical interface. An ion is excited with a laser and made to emit a single photon whose polarisation or frequency is entangled with the ion's internal state. The qubit is already coupled to light at optical wavelengths that fibre transmits well. IonQ argues that this photonic compatibility was a central reason it chose trapped ions in the first place, and that the platform is particularly suited to multi-QPU networking. That is an architectural argument from a vendor whose commercial strategy depends on modular scaling, and should be read as advocacy rather than a neutral survey, but the underlying physics of atom-photon coupling is standard, well-studied quantum optics and is not in dispute.",{"type":21,"tag":22,"props":15973,"children":15974},{},[15975,15980,15982,15987],{"type":21,"tag":784,"props":15976,"children":15977},{},[15978],{"type":26,"value":15979},"Superconducting qubits",{"type":26,"value":15981}," face a harder problem. They operate at microwave frequencies inside a millikelvin refrigerator, and microwave photons cannot travel any meaningful distance at room temperature. Thermal noise swamps them. Networking them optically requires ",{"type":21,"tag":784,"props":15983,"children":15984},{},[15985],{"type":26,"value":15986},"microwave-to-optical transduction",{"type":26,"value":15988},": coherently converting a gigahertz photon into a telecom-wavelength one without destroying the quantum state. This is an active and legitimate research field, with electro-optic, optomechanical, magneto-optic and atomic-ensemble approaches all under investigation, but efficiency and added noise remain the limiting factors. IonQ makes this contrast a talking point, characterising the conversion process as slow and not yet well matched to quantum computers. The general difficulty is widely acknowledged in the literature, though the framing is naturally sharper coming from a competitor. NIST, among others, is building optical channels for remote microwave entanglement precisely because the problem is considered tractable rather than hopeless.",{"type":21,"tag":22,"props":15990,"children":15991},{},[15992,15994,15998],{"type":26,"value":15993},"Neutral atoms sit closer to the ion story optically. Photonic qubits are their own case, since the information is already in flight. Our ",{"type":21,"tag":29,"props":15995,"children":15996},{"href":1206},[15997],{"type":26,"value":1590},{"type":26,"value":15999}," covers the broader trade-offs.",{"type":21,"tag":43,"props":16001,"children":16003},{"id":16002},"where-this-stands",[16004],{"type":26,"value":16005},"Where this stands",{"type":21,"tag":22,"props":16007,"children":16008},{},[16009],{"type":26,"value":16010},"Plainly: early.",{"type":21,"tag":22,"props":16012,"children":16013},{},[16014],{"type":26,"value":16015},"The building blocks are real. Ion-photon entanglement (the first milestone, where a photon leaves a trapped ion carrying entanglement with it) has been demonstrated, and IonQ reports having done so outside an academic setting. Remote ion-ion entanglement has followed, with IonQ describing a setup that collects photons from two separate trap wells, interferes them at a shared detection hub, and leaves the two distant ions entangled. IonQ frames these as the first and second of four milestones on its own roadmap to photonic interconnects, with the remaining two being the transfer of that remote entanglement onto computation qubits via swap gates, and programmable multi-QPU entanglement using single-photon switching. In 2026 the company announced it had photonically interconnected two independent trapped-ion systems.",{"type":21,"tag":22,"props":16017,"children":16018},{},[16019],{"type":26,"value":16020},"Read those carefully. They are milestone announcements on a vendor's internal roadmap, and the public write-ups notably do not disclose entanglement rates, fidelities, or success probabilities: the numbers that would let anyone judge whether the link is fast and clean enough to compute across. IonQ itself acknowledges low entanglement rates as a current limitation. Its broader case (that networking is what carries quantum computing from research demos to commercial scale, and that modular systems are faster to build and easier to service than monolithic ones) is a coherent argument, but it is a company describing why its own architecture wins.",{"type":21,"tag":22,"props":16022,"children":16023},{},[16024],{"type":26,"value":16025},"What is not in doubt is that the demonstrated capability sits far below what distributed computing requires. Getting two qubits in different traps entangled occasionally is a real physics achievement. Sustaining entanglement generation at rates and fidelities that let two processors execute a single fault-tolerant algorithm together is a different order of problem, and nobody has done it.",{"type":21,"tag":43,"props":16027,"children":16028},{"id":11018},[16029],{"type":26,"value":11021},{"type":21,"tag":22,"props":16031,"children":16032},{},[16033],{"type":26,"value":16034},"Quantum networking is not a faster internet and not a security product, though it shares physics with one. It is a proposed answer to a hardware scaling wall, built on entanglement distribution, entanglement swapping, and teleportation, all constrained by the fact that quantum information cannot be copied and therefore cannot be amplified.",{"type":21,"tag":22,"props":16036,"children":16037},{},[16038,16040,16045,16046,16050],{"type":26,"value":16039},"If you're evaluating claims in this space, three questions do most of the work. Is the link genuinely quantum, or is it an API? What is the entanglement generation ",{"type":21,"tag":103,"props":16041,"children":16042},{},[16043],{"type":26,"value":16044},"rate",{"type":26,"value":383},{"type":21,"tag":103,"props":16047,"children":16048},{},[16049],{"type":26,"value":8152},{"type":26,"value":16051}," between nodes, not whether entanglement was achieved once? And is the demonstration between two nodes in adjacent racks, or over a distance where photon loss genuinely bites?",{"type":21,"tag":22,"props":16053,"children":16054},{},[16055,16057,16062],{"type":26,"value":16056},"Answers to those tend to be absent from the announcements, which is itself informative. The ",{"type":21,"tag":29,"props":16058,"children":16060},{"href":16059},"\u002Fglossary\u002Fquantum-network",[16061],{"type":26,"value":8466},{"type":26,"value":16063}," covers the vocabulary if you want to read the primary sources yourself.",{"title":7,"searchDepth":164,"depth":164,"links":16065},[16066,16067,16068,16069,16070,16071,16072],{"id":15742,"depth":164,"text":15745},{"id":15809,"depth":164,"text":15812},{"id":15883,"depth":164,"text":15886},{"id":15922,"depth":164,"text":15925},{"id":15954,"depth":164,"text":15957},{"id":16002,"depth":164,"text":16005},{"id":11018,"depth":164,"text":11021},"content:blog:quantum-networking-distributed-computing.md","blog\u002Fquantum-networking-distributed-computing.md","blog\u002Fquantum-networking-distributed-computing",{"_path":16077,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":16078,"description":16079,"date":3089,"author":11,"tags":16080,"readingTime":3651,"body":16081,"_type":171,"_id":18175,"_source":173,"_file":18176,"_stem":18177,"_extension":176},"\u002Fblog\u002Fquantum-phase-estimation-tutorial","Quantum Phase Estimation: The Missing Link Between the QFT and Shor's Algorithm","A hands-on Qiskit tutorial on quantum phase estimation: phase kickback, the inverse QFT, and precision limits, with complete runnable code and real measured output.",[6280,852,2891],{"type":18,"children":16082,"toc":18163},[16083,16101,16119,16124,16132,16138,16143,16151,16156,16167,16206,16211,16223,16229,16234,16245,16253,16277,16285,16295,16300,16308,16328,16334,16345,16350,16360,16365,16393,16397,16433,17383,17387,17395,17405,17413,17418,17425,17457,17470,17478,17498,17503,17509,17514,17758,17762,17770,17782,17794,17802,17814,17826,17832,17855,17872,17900,17998,18022,18028,18039,18050,18092,18097,18102,18159],{"type":21,"tag":22,"props":16084,"children":16085},{},[16086,16088,16093,16095,16099],{"type":26,"value":16087},"Our ",{"type":21,"tag":29,"props":16089,"children":16090},{"href":11586},[16091],{"type":26,"value":16092},"QFT tutorial",{"type":26,"value":16094}," ended on a deliberately unsatisfying note: the ",{"type":21,"tag":29,"props":16096,"children":16097},{"href":11598},[16098],{"type":26,"value":11601},{"type":26,"value":16100}," is fast, exact, and useless on its own. You can't load its input efficiently and you can't read its output. Measure a transformed basis state and you get a uniformly random bitstring.",{"type":21,"tag":22,"props":16102,"children":16103},{},[16104,16106,16110,16112,16117],{"type":26,"value":16105},"This post is the sequel that resolves that. Quantum phase estimation (QPE) is the machine that turns the ",{"type":21,"tag":103,"props":16107,"children":16108},{},[16109],{"type":26,"value":6110},{"type":26,"value":16111}," QFT into a readout primitive. It's the reason the QFT matters, and it is the algorithm sitting underneath ",{"type":21,"tag":29,"props":16113,"children":16114},{"href":8767},[16115],{"type":26,"value":16116},"Shor's",{"type":26,"value":16118},": Shor's is QPE applied to modular exponentiation, plus number theory.",{"type":21,"tag":22,"props":16120,"children":16121},{},[16122],{"type":26,"value":16123},"Read the QFT post first if you haven't. This one assumes the construction and won't rebuild it.",{"type":21,"tag":22,"props":16125,"children":16126},{},[16127],{"type":21,"tag":784,"props":16128,"children":16129},{},[16130],{"type":26,"value":16131},"All code below was executed against Qiskit 2.5.0 and Qiskit Aer 0.17.2 on Python 3.11. The outputs shown are real.",{"type":21,"tag":43,"props":16133,"children":16135},{"id":16134},"the-problem-qpe-solves",[16136],{"type":26,"value":16137},"The problem QPE solves",{"type":21,"tag":22,"props":16139,"children":16140},{},[16141],{"type":26,"value":16142},"Given a unitary U and an eigenstate |ψ⟩ satisfying",{"type":21,"tag":2062,"props":16144,"children":16146},{"code":16145},"U|ψ⟩ = e^{2πiθ} |ψ⟩\n",[16147],{"type":21,"tag":1831,"props":16148,"children":16149},{"__ignoreMap":7},[16150],{"type":26,"value":16145},{"type":21,"tag":22,"props":16152,"children":16153},{},[16154],{"type":26,"value":16155},"estimate θ ∈ [0, 1).",{"type":21,"tag":22,"props":16157,"children":16158},{},[16159,16161,16166],{"type":26,"value":16160},"That sounds like a linear-algebra exercise, not an application. It is in fact one of the most consequential problems in the field, because ",{"type":21,"tag":103,"props":16162,"children":16163},{},[16164],{"type":26,"value":16165},"enormous numbers of questions are secretly eigenvalue questions",{"type":26,"value":12478},{"type":21,"tag":7925,"props":16168,"children":16169},{},[16170,16180,16190],{"type":21,"tag":6142,"props":16171,"children":16172},{},[16173,16178],{"type":21,"tag":784,"props":16174,"children":16175},{},[16176],{"type":26,"value":16177},"What is a molecule's ground-state energy?",{"type":26,"value":16179}," Build U = e^{-iHt} for the molecular Hamiltonian H. Its eigenphases are the energy levels. Estimating θ estimates the energy.",{"type":21,"tag":6142,"props":16181,"children":16182},{},[16183,16188],{"type":21,"tag":784,"props":16184,"children":16185},{},[16186],{"type":26,"value":16187},"What is the order of a mod N?",{"type":26,"value":16189}," Build U|y⟩ = |ay mod N⟩. Its eigenphases are multiples of 1\u002Fr where r is the order. Estimating θ gives you r, and factoring falls out.",{"type":21,"tag":6142,"props":16191,"children":16192},{},[16193,16198,16200,16205],{"type":21,"tag":784,"props":16194,"children":16195},{},[16196],{"type":26,"value":16197},"How many solutions does an oracle mark?",{"type":26,"value":16199}," Amplitude estimation is QPE on the Grover operator, whose eigenphase encodes the count. That's the quantum-counting subroutine we flagged as a missing piece in the ",{"type":21,"tag":29,"props":16201,"children":16202},{"href":6276},[16203],{"type":26,"value":16204},"Grover tutorial",{"type":26,"value":237},{"type":21,"tag":22,"props":16207,"children":16208},{},[16209],{"type":26,"value":16210},"One primitive, three flagship algorithms. That's why \"estimate an eigenphase\" is worth a dedicated circuit.",{"type":21,"tag":22,"props":16212,"children":16213},{},[16214,16216,16221],{"type":26,"value":16215},"Note the precondition, which people gloss over: you need to ",{"type":21,"tag":103,"props":16217,"children":16218},{},[16219],{"type":26,"value":16220},"have",{"type":26,"value":16222}," the eigenstate |ψ⟩, or at least a state with decent overlap with it. Preparing good eigenstates is its own hard problem, and in chemistry it's often the binding constraint.",{"type":21,"tag":43,"props":16224,"children":16226},{"id":16225},"phase-kickback-the-key-insight",[16227],{"type":26,"value":16228},"Phase kickback: the key insight",{"type":21,"tag":22,"props":16230,"children":16231},{},[16232],{"type":26,"value":16233},"Here's the thing that makes QPE work, and it's worth slowing down for.",{"type":21,"tag":22,"props":16235,"children":16236},{},[16237,16239,16243],{"type":26,"value":16238},"A controlled-U applied to a control ",{"type":21,"tag":29,"props":16240,"children":16241},{"href":682},[16242],{"type":26,"value":2533},{"type":26,"value":16244}," in state |1⟩ and a target in the eigenstate |ψ⟩ gives:",{"type":21,"tag":2062,"props":16246,"children":16248},{"code":16247},"CU |1⟩|ψ⟩ = |1⟩ ⊗ U|ψ⟩ = |1⟩ ⊗ e^{2πiθ}|ψ⟩ = e^{2πiθ} |1⟩|ψ⟩\n",[16249],{"type":21,"tag":1831,"props":16250,"children":16251},{"__ignoreMap":7},[16252],{"type":26,"value":16247},{"type":21,"tag":22,"props":16254,"children":16255},{},[16256,16258,16263,16265,16269,16271,16275],{"type":26,"value":16257},"The eigenstate came out unchanged. The phase e^{2πiθ} is a scalar, so it's now attached to the whole state, and since it only appeared for the |1⟩ branch of the control, it's a ",{"type":21,"tag":103,"props":16259,"children":16260},{},[16261],{"type":26,"value":16262},"relative",{"type":26,"value":16264}," phase on the control qubit. Put the control in ",{"type":21,"tag":29,"props":16266,"children":16267},{"href":7989},[16268],{"type":26,"value":7992},{"type":26,"value":16270}," with a ",{"type":21,"tag":29,"props":16272,"children":16273},{"href":6387},[16274],{"type":26,"value":11767},{"type":26,"value":16276}," and you get:",{"type":21,"tag":2062,"props":16278,"children":16280},{"code":16279},"CU (|0⟩+|1⟩)\u002F√2 ⊗ |ψ⟩ = (|0⟩ + e^{2πiθ}|1⟩)\u002F√2 ⊗ |ψ⟩\n",[16281],{"type":21,"tag":1831,"props":16282,"children":16283},{"__ignoreMap":7},[16284],{"type":26,"value":16279},{"type":21,"tag":22,"props":16286,"children":16287},{},[16288,16293],{"type":21,"tag":784,"props":16289,"children":16290},{},[16291],{"type":26,"value":16292},"The phase kicked back from the target onto the control.",{"type":26,"value":16294}," The target register is untouched and unentangled. It's a catalyst. All of the information now lives in the control's phase.",{"type":21,"tag":22,"props":16296,"children":16297},{},[16298],{"type":26,"value":16299},"Do this with n control qubits, and give control qubit k a controlled-U^(2^k) instead, so it picks up phase e^{2πi·2^k·θ}. The counting register ends up in:",{"type":21,"tag":2062,"props":16301,"children":16303},{"code":16302},"(1\u002F√N) Σ_{x=0}^{N-1} e^{2πi·x·θ} |x⟩\n",[16304],{"type":21,"tag":1831,"props":16305,"children":16306},{"__ignoreMap":7},[16307],{"type":26,"value":16302},{"type":21,"tag":22,"props":16309,"children":16310},{},[16311,16313,16319,16321,16326],{"type":26,"value":16312},"Stare at that and compare it to the QFT formula from the previous post: ",{"type":21,"tag":1831,"props":16314,"children":16316},{"className":16315},[],[16317],{"type":26,"value":16318},"QFT|j⟩ = (1\u002F√N) Σ_x e^{2πi·jx\u002FN}|x⟩",{"type":26,"value":16320},". They are the ",{"type":21,"tag":103,"props":16322,"children":16323},{},[16324],{"type":26,"value":16325},"same state",{"type":26,"value":16327},", with j\u002FN = θ. The counting register is holding the QFT of the number j = Nθ.",{"type":21,"tag":43,"props":16329,"children":16331},{"id":16330},"why-the-inverse-qft",[16332],{"type":26,"value":16333},"Why the inverse QFT",{"type":21,"tag":22,"props":16335,"children":16336},{},[16337,16339,16343],{"type":26,"value":16338},"So the controlled-U powers have written θ into the counting register's phases, and, as the QFT post hammered, phases are invisible to ",{"type":21,"tag":29,"props":16340,"children":16341},{"href":6552},[16342],{"type":26,"value":11161},{"type":26,"value":16344},". Measure now and you get uniform noise.",{"type":21,"tag":22,"props":16346,"children":16347},{},[16348],{"type":26,"value":16349},"But we know exactly what transform produced this state. So we undo it. Apply QFT⁻¹ and the register collapses to |j⟩ where j = Nθ, a plain binary integer you read off in one shot.",{"type":21,"tag":22,"props":16351,"children":16352},{},[16353,16355,16359],{"type":26,"value":16354},"That's the payoff the QFT post set up. The QFT direction moves position information into phases. The inverse direction pulls phase information back out into a readable number. QPE is the canonical example of the pattern we described there: the QFT is never the whole algorithm, it's the readout stage of a larger ",{"type":21,"tag":29,"props":16356,"children":16357},{"href":7179},[16358],{"type":26,"value":7182},{"type":26,"value":237},{"type":21,"tag":22,"props":16361,"children":16362},{},[16363],{"type":26,"value":16364},"The full recipe:",{"type":21,"tag":6138,"props":16366,"children":16367},{},[16368,16373,16378,16383,16388],{"type":21,"tag":6142,"props":16369,"children":16370},{},[16371],{"type":26,"value":16372},"n counting qubits + enough qubits to hold |ψ⟩.",{"type":21,"tag":6142,"props":16374,"children":16375},{},[16376],{"type":26,"value":16377},"Hadamard the counting register.",{"type":21,"tag":6142,"props":16379,"children":16380},{},[16381],{"type":26,"value":16382},"For k = 0…n−1: apply controlled-U^(2^k) from counting qubit k onto the eigenstate register.",{"type":21,"tag":6142,"props":16384,"children":16385},{},[16386],{"type":26,"value":16387},"Apply the inverse QFT to the counting register.",{"type":21,"tag":6142,"props":16389,"children":16390},{},[16391],{"type":26,"value":16392},"Measure the counting register. The result, read as a binary fraction, is θ.",{"type":21,"tag":43,"props":16394,"children":16395},{"id":11826},[16396],{"type":26,"value":11829},{"type":21,"tag":22,"props":16398,"children":16399},{},[16400,16402,16408,16410,16416,16418,16423,16425,16431],{"type":26,"value":16401},"Simplest possible U with a known answer: the phase gate ",{"type":21,"tag":1831,"props":16403,"children":16405},{"className":16404},[],[16406],{"type":26,"value":16407},"P(λ)",{"type":26,"value":16409},", which maps |1⟩ → e^{iλ}|1⟩. So |1⟩ is an eigenstate, and setting λ = 2πθ makes the eigenphase exactly θ. We'll reuse the ",{"type":21,"tag":1831,"props":16411,"children":16413},{"className":16412},[],[16414],{"type":26,"value":16415},"qft",{"type":26,"value":16417}," function from the ",{"type":21,"tag":29,"props":16419,"children":16420},{"href":11586},[16421],{"type":26,"value":16422},"previous post",{"type":26,"value":16424}," and simply call ",{"type":21,"tag":1831,"props":16426,"children":16428},{"className":16427},[],[16429],{"type":26,"value":16430},".inverse()",{"type":26,"value":16432}," on it.",{"type":21,"tag":2062,"props":16434,"children":16436},{"code":16435,"language":3361,"meta":7,"className":3362,"style":7},"import numpy as np\nfrom qiskit import QuantumCircuit, transpile\nfrom qiskit_aer import AerSimulator\n\n\ndef qft_rotations(circuit, n):\n    if n == 0:\n        return circuit\n    n -= 1\n    circuit.h(n)\n    for qubit in range(n):\n        circuit.cp(np.pi \u002F 2 ** (n - qubit), qubit, n)\n    qft_rotations(circuit, n)\n    return circuit\n\n\ndef qft(n):\n    qc = QuantumCircuit(n, name=\"QFT\")\n    qft_rotations(qc, n)\n    for q in range(n \u002F\u002F 2):          # the swaps matter here, see below\n        qc.swap(q, n - q - 1)\n    return qc\n\n\ndef qpe_phase_gate(n_count, theta):\n    \"\"\"QPE for U = P(2*pi*theta), whose eigenstate is |1>.\"\"\"\n    qc = QuantumCircuit(n_count + 1, n_count)\n    qc.h(range(n_count))             # counting register in superposition\n    qc.x(n_count)                    # prepare the eigenstate |1>\n\n    for k in range(n_count):         # controlled-U^(2^k) = CP(2*pi*theta*2^k)\n        qc.cp(2 * np.pi * theta * 2 ** k, k, n_count)\n\n    qc.compose(qft(n_count).inverse(), qubits=range(n_count), inplace=True)\n    qc.measure(range(n_count), range(n_count))\n    return qc\n\n\nsim = AerSimulator()\nqc = qpe_phase_gate(4, 0.625)        # theta = 0.625 = 0.1010 in binary\ncounts = sim.run(transpile(qc, sim), shots=4096).result().get_counts()\n\nfor bits, c in sorted(counts.items(), key=lambda kv: -kv[1]):\n    est = int(bits, 2) \u002F 2 ** 4\n    print(f\"{bits} -> theta = {int(bits, 2)}\u002F16 = {est:.4f}   counts = {c}\")\n",[16437],{"type":21,"tag":1831,"props":16438,"children":16439},{"__ignoreMap":7},[16440,16459,16478,16497,16504,16511,16526,16549,16560,16575,16582,16605,16636,16644,16655,16662,16669,16684,16715,16722,16763,16790,16801,16808,16815,16832,16840,16869,16890,16903,16910,16939,16986,16993,17034,17058,17069,17076,17083,17098,17137,17168,17175,17229,17275],{"type":21,"tag":2072,"props":16441,"children":16442},{"class":2074,"line":2075},[16443,16447,16451,16455],{"type":21,"tag":2072,"props":16444,"children":16445},{"style":3372},[16446],{"type":26,"value":3375},{"type":21,"tag":2072,"props":16448,"children":16449},{"style":2079},[16450],{"type":26,"value":3380},{"type":21,"tag":2072,"props":16452,"children":16453},{"style":3372},[16454],{"type":26,"value":3385},{"type":21,"tag":2072,"props":16456,"children":16457},{"style":2079},[16458],{"type":26,"value":3390},{"type":21,"tag":2072,"props":16460,"children":16461},{"class":2074,"line":164},[16462,16466,16470,16474],{"type":21,"tag":2072,"props":16463,"children":16464},{"style":3372},[16465],{"type":26,"value":3398},{"type":21,"tag":2072,"props":16467,"children":16468},{"style":2079},[16469],{"type":26,"value":3403},{"type":21,"tag":2072,"props":16471,"children":16472},{"style":3372},[16473],{"type":26,"value":3375},{"type":21,"tag":2072,"props":16475,"children":16476},{"style":2079},[16477],{"type":26,"value":3412},{"type":21,"tag":2072,"props":16479,"children":16480},{"class":2074,"line":2093},[16481,16485,16489,16493],{"type":21,"tag":2072,"props":16482,"children":16483},{"style":3372},[16484],{"type":26,"value":3398},{"type":21,"tag":2072,"props":16486,"children":16487},{"style":2079},[16488],{"type":26,"value":3424},{"type":21,"tag":2072,"props":16490,"children":16491},{"style":3372},[16492],{"type":26,"value":3375},{"type":21,"tag":2072,"props":16494,"children":16495},{"style":2079},[16496],{"type":26,"value":3433},{"type":21,"tag":2072,"props":16498,"children":16499},{"class":2074,"line":2155},[16500],{"type":21,"tag":2072,"props":16501,"children":16502},{"emptyLinePlaceholder":3460},[16503],{"type":26,"value":3463},{"type":21,"tag":2072,"props":16505,"children":16506},{"class":2074,"line":2178},[16507],{"type":21,"tag":2072,"props":16508,"children":16509},{"emptyLinePlaceholder":3460},[16510],{"type":26,"value":3463},{"type":21,"tag":2072,"props":16512,"children":16513},{"class":2074,"line":288},[16514,16518,16522],{"type":21,"tag":2072,"props":16515,"children":16516},{"style":3372},[16517],{"type":26,"value":3471},{"type":21,"tag":2072,"props":16519,"children":16520},{"style":3474},[16521],{"type":26,"value":11986},{"type":21,"tag":2072,"props":16523,"children":16524},{"style":2079},[16525],{"type":26,"value":11991},{"type":21,"tag":2072,"props":16527,"children":16528},{"class":2074,"line":16},[16529,16533,16537,16541,16545],{"type":21,"tag":2072,"props":16530,"children":16531},{"style":3372},[16532],{"type":26,"value":12007},{"type":21,"tag":2072,"props":16534,"children":16535},{"style":2079},[16536],{"type":26,"value":12012},{"type":21,"tag":2072,"props":16538,"children":16539},{"style":3372},[16540],{"type":26,"value":4035},{"type":21,"tag":2072,"props":16542,"children":16543},{"style":2097},[16544],{"type":26,"value":12021},{"type":21,"tag":2072,"props":16546,"children":16547},{"style":2079},[16548],{"type":26,"value":4045},{"type":21,"tag":2072,"props":16550,"children":16551},{"class":2074,"line":366},[16552,16556],{"type":21,"tag":2072,"props":16553,"children":16554},{"style":3372},[16555],{"type":26,"value":12033},{"type":21,"tag":2072,"props":16557,"children":16558},{"style":2079},[16559],{"type":26,"value":12038},{"type":21,"tag":2072,"props":16561,"children":16562},{"class":2074,"line":853},[16563,16567,16571],{"type":21,"tag":2072,"props":16564,"children":16565},{"style":2079},[16566],{"type":26,"value":12046},{"type":21,"tag":2072,"props":16568,"children":16569},{"style":3372},[16570],{"type":26,"value":12051},{"type":21,"tag":2072,"props":16572,"children":16573},{"style":2097},[16574],{"type":26,"value":12854},{"type":21,"tag":2072,"props":16576,"children":16577},{"class":2074,"line":3092},[16578],{"type":21,"tag":2072,"props":16579,"children":16580},{"style":2079},[16581],{"type":26,"value":12068},{"type":21,"tag":2072,"props":16583,"children":16584},{"class":2074,"line":3651},[16585,16589,16593,16597,16601],{"type":21,"tag":2072,"props":16586,"children":16587},{"style":3372},[16588],{"type":26,"value":3859},{"type":21,"tag":2072,"props":16590,"children":16591},{"style":2079},[16592],{"type":26,"value":12080},{"type":21,"tag":2072,"props":16594,"children":16595},{"style":3372},[16596],{"type":26,"value":3869},{"type":21,"tag":2072,"props":16598,"children":16599},{"style":2097},[16600],{"type":26,"value":3874},{"type":21,"tag":2072,"props":16602,"children":16603},{"style":2079},[16604],{"type":26,"value":6973},{"type":21,"tag":2072,"props":16606,"children":16607},{"class":2074,"line":2616},[16608,16612,16616,16620,16624,16628,16632],{"type":21,"tag":2072,"props":16609,"children":16610},{"style":2079},[16611],{"type":26,"value":12108},{"type":21,"tag":2072,"props":16613,"children":16614},{"style":3372},[16615],{"type":26,"value":1926},{"type":21,"tag":2072,"props":16617,"children":16618},{"style":2097},[16619],{"type":26,"value":5513},{"type":21,"tag":2072,"props":16621,"children":16622},{"style":3372},[16623],{"type":26,"value":7442},{"type":21,"tag":2072,"props":16625,"children":16626},{"style":2079},[16627],{"type":26,"value":12125},{"type":21,"tag":2072,"props":16629,"children":16630},{"style":3372},[16631],{"type":26,"value":3973},{"type":21,"tag":2072,"props":16633,"children":16634},{"style":2079},[16635],{"type":26,"value":12134},{"type":21,"tag":2072,"props":16637,"children":16638},{"class":2074,"line":3695},[16639],{"type":21,"tag":2072,"props":16640,"children":16641},{"style":2079},[16642],{"type":26,"value":16643},"    qft_rotations(circuit, n)\n",{"type":21,"tag":2072,"props":16645,"children":16646},{"class":2074,"line":3709},[16647,16651],{"type":21,"tag":2072,"props":16648,"children":16649},{"style":3372},[16650],{"type":26,"value":3701},{"type":21,"tag":2072,"props":16652,"children":16653},{"style":2079},[16654],{"type":26,"value":12038},{"type":21,"tag":2072,"props":16656,"children":16657},{"class":2074,"line":3717},[16658],{"type":21,"tag":2072,"props":16659,"children":16660},{"emptyLinePlaceholder":3460},[16661],{"type":26,"value":3463},{"type":21,"tag":2072,"props":16663,"children":16664},{"class":2074,"line":3750},[16665],{"type":21,"tag":2072,"props":16666,"children":16667},{"emptyLinePlaceholder":3460},[16668],{"type":26,"value":3463},{"type":21,"tag":2072,"props":16670,"children":16671},{"class":2074,"line":3769},[16672,16676,16680],{"type":21,"tag":2072,"props":16673,"children":16674},{"style":3372},[16675],{"type":26,"value":3471},{"type":21,"tag":2072,"props":16677,"children":16678},{"style":3474},[16679],{"type":26,"value":12296},{"type":21,"tag":2072,"props":16681,"children":16682},{"style":2079},[16683],{"type":26,"value":6973},{"type":21,"tag":2072,"props":16685,"children":16686},{"class":2074,"line":3777},[16687,16691,16695,16699,16703,16707,16711],{"type":21,"tag":2072,"props":16688,"children":16689},{"style":2079},[16690],{"type":26,"value":6629},{"type":21,"tag":2072,"props":16692,"children":16693},{"style":3372},[16694],{"type":26,"value":3487},{"type":21,"tag":2072,"props":16696,"children":16697},{"style":2079},[16698],{"type":26,"value":6638},{"type":21,"tag":2072,"props":16700,"children":16701},{"style":3735},[16702],{"type":26,"value":6643},{"type":21,"tag":2072,"props":16704,"children":16705},{"style":3372},[16706],{"type":26,"value":3487},{"type":21,"tag":2072,"props":16708,"children":16709},{"style":2108},[16710],{"type":26,"value":12328},{"type":21,"tag":2072,"props":16712,"children":16713},{"style":2079},[16714],{"type":26,"value":4281},{"type":21,"tag":2072,"props":16716,"children":16717},{"class":2074,"line":3808},[16718],{"type":21,"tag":2072,"props":16719,"children":16720},{"style":2079},[16721],{"type":26,"value":12340},{"type":21,"tag":2072,"props":16723,"children":16724},{"class":2074,"line":3853},[16725,16729,16733,16737,16741,16745,16749,16753,16758],{"type":21,"tag":2072,"props":16726,"children":16727},{"style":3372},[16728],{"type":26,"value":3859},{"type":21,"tag":2072,"props":16730,"children":16731},{"style":2079},[16732],{"type":26,"value":5624},{"type":21,"tag":2072,"props":16734,"children":16735},{"style":3372},[16736],{"type":26,"value":3869},{"type":21,"tag":2072,"props":16738,"children":16739},{"style":2097},[16740],{"type":26,"value":3874},{"type":21,"tag":2072,"props":16742,"children":16743},{"style":2079},[16744],{"type":26,"value":6801},{"type":21,"tag":2072,"props":16746,"children":16747},{"style":3372},[16748],{"type":26,"value":5237},{"type":21,"tag":2072,"props":16750,"children":16751},{"style":2097},[16752],{"type":26,"value":5513},{"type":21,"tag":2072,"props":16754,"children":16755},{"style":2079},[16756],{"type":26,"value":16757},"):          ",{"type":21,"tag":2072,"props":16759,"children":16760},{"style":3985},[16761],{"type":26,"value":16762},"# the swaps matter here, see below\n",{"type":21,"tag":2072,"props":16764,"children":16765},{"class":2074,"line":3895},[16766,16770,16774,16778,16782,16786],{"type":21,"tag":2072,"props":16767,"children":16768},{"style":2079},[16769],{"type":26,"value":13632},{"type":21,"tag":2072,"props":16771,"children":16772},{"style":3372},[16773],{"type":26,"value":3973},{"type":21,"tag":2072,"props":16775,"children":16776},{"style":2079},[16777],{"type":26,"value":5624},{"type":21,"tag":2072,"props":16779,"children":16780},{"style":3372},[16781],{"type":26,"value":3973},{"type":21,"tag":2072,"props":16783,"children":16784},{"style":2097},[16785],{"type":26,"value":5228},{"type":21,"tag":2072,"props":16787,"children":16788},{"style":2079},[16789],{"type":26,"value":4281},{"type":21,"tag":2072,"props":16791,"children":16792},{"class":2074,"line":3913},[16793,16797],{"type":21,"tag":2072,"props":16794,"children":16795},{"style":3372},[16796],{"type":26,"value":3701},{"type":21,"tag":2072,"props":16798,"children":16799},{"style":2079},[16800],{"type":26,"value":6910},{"type":21,"tag":2072,"props":16802,"children":16803},{"class":2074,"line":3991},[16804],{"type":21,"tag":2072,"props":16805,"children":16806},{"emptyLinePlaceholder":3460},[16807],{"type":26,"value":3463},{"type":21,"tag":2072,"props":16809,"children":16810},{"class":2074,"line":4019},[16811],{"type":21,"tag":2072,"props":16812,"children":16813},{"emptyLinePlaceholder":3460},[16814],{"type":26,"value":3463},{"type":21,"tag":2072,"props":16816,"children":16817},{"class":2074,"line":4048},[16818,16822,16827],{"type":21,"tag":2072,"props":16819,"children":16820},{"style":3372},[16821],{"type":26,"value":3471},{"type":21,"tag":2072,"props":16823,"children":16824},{"style":3474},[16825],{"type":26,"value":16826}," qpe_phase_gate",{"type":21,"tag":2072,"props":16828,"children":16829},{"style":2079},[16830],{"type":26,"value":16831},"(n_count, theta):\n",{"type":21,"tag":2072,"props":16833,"children":16834},{"class":2074,"line":4057},[16835],{"type":21,"tag":2072,"props":16836,"children":16837},{"style":2108},[16838],{"type":26,"value":16839},"    \"\"\"QPE for U = P(2*pi*theta), whose eigenstate is |1>.\"\"\"\n",{"type":21,"tag":2072,"props":16841,"children":16842},{"class":2074,"line":4085},[16843,16847,16851,16856,16860,16864],{"type":21,"tag":2072,"props":16844,"children":16845},{"style":2079},[16846],{"type":26,"value":6629},{"type":21,"tag":2072,"props":16848,"children":16849},{"style":3372},[16850],{"type":26,"value":3487},{"type":21,"tag":2072,"props":16852,"children":16853},{"style":2079},[16854],{"type":26,"value":16855}," QuantumCircuit(n_count ",{"type":21,"tag":2072,"props":16857,"children":16858},{"style":3372},[16859],{"type":26,"value":5658},{"type":21,"tag":2072,"props":16861,"children":16862},{"style":2097},[16863],{"type":26,"value":5228},{"type":21,"tag":2072,"props":16865,"children":16866},{"style":2079},[16867],{"type":26,"value":16868},", n_count)\n",{"type":21,"tag":2072,"props":16870,"children":16871},{"class":2074,"line":4116},[16872,16876,16880,16885],{"type":21,"tag":2072,"props":16873,"children":16874},{"style":2079},[16875],{"type":26,"value":7021},{"type":21,"tag":2072,"props":16877,"children":16878},{"style":2097},[16879],{"type":26,"value":4068},{"type":21,"tag":2072,"props":16881,"children":16882},{"style":2079},[16883],{"type":26,"value":16884},"(n_count))             ",{"type":21,"tag":2072,"props":16886,"children":16887},{"style":3985},[16888],{"type":26,"value":16889},"# counting register in superposition\n",{"type":21,"tag":2072,"props":16891,"children":16892},{"class":2074,"line":4138},[16893,16898],{"type":21,"tag":2072,"props":16894,"children":16895},{"style":2079},[16896],{"type":26,"value":16897},"    qc.x(n_count)                    ",{"type":21,"tag":2072,"props":16899,"children":16900},{"style":3985},[16901],{"type":26,"value":16902},"# prepare the eigenstate |1>\n",{"type":21,"tag":2072,"props":16904,"children":16905},{"class":2074,"line":4184},[16906],{"type":21,"tag":2072,"props":16907,"children":16908},{"emptyLinePlaceholder":3460},[16909],{"type":26,"value":3463},{"type":21,"tag":2072,"props":16911,"children":16912},{"class":2074,"line":4197},[16913,16917,16921,16925,16929,16934],{"type":21,"tag":2072,"props":16914,"children":16915},{"style":3372},[16916],{"type":26,"value":3859},{"type":21,"tag":2072,"props":16918,"children":16919},{"style":2079},[16920],{"type":26,"value":13554},{"type":21,"tag":2072,"props":16922,"children":16923},{"style":3372},[16924],{"type":26,"value":3869},{"type":21,"tag":2072,"props":16926,"children":16927},{"style":2097},[16928],{"type":26,"value":3874},{"type":21,"tag":2072,"props":16930,"children":16931},{"style":2079},[16932],{"type":26,"value":16933},"(n_count):         ",{"type":21,"tag":2072,"props":16935,"children":16936},{"style":3985},[16937],{"type":26,"value":16938},"# controlled-U^(2^k) = CP(2*pi*theta*2^k)\n",{"type":21,"tag":2072,"props":16940,"children":16941},{"class":2074,"line":4205},[16942,16947,16951,16955,16960,16964,16969,16973,16977,16981],{"type":21,"tag":2072,"props":16943,"children":16944},{"style":2079},[16945],{"type":26,"value":16946},"        qc.cp(",{"type":21,"tag":2072,"props":16948,"children":16949},{"style":2097},[16950],{"type":26,"value":2170},{"type":21,"tag":2072,"props":16952,"children":16953},{"style":3372},[16954],{"type":26,"value":7478},{"type":21,"tag":2072,"props":16956,"children":16957},{"style":2079},[16958],{"type":26,"value":16959}," np.pi ",{"type":21,"tag":2072,"props":16961,"children":16962},{"style":3372},[16963],{"type":26,"value":5522},{"type":21,"tag":2072,"props":16965,"children":16966},{"style":2079},[16967],{"type":26,"value":16968}," theta ",{"type":21,"tag":2072,"props":16970,"children":16971},{"style":3372},[16972],{"type":26,"value":5522},{"type":21,"tag":2072,"props":16974,"children":16975},{"style":2097},[16976],{"type":26,"value":5513},{"type":21,"tag":2072,"props":16978,"children":16979},{"style":3372},[16980],{"type":26,"value":7442},{"type":21,"tag":2072,"props":16982,"children":16983},{"style":2079},[16984],{"type":26,"value":16985}," k, k, n_count)\n",{"type":21,"tag":2072,"props":16987,"children":16988},{"class":2074,"line":4223},[16989],{"type":21,"tag":2072,"props":16990,"children":16991},{"emptyLinePlaceholder":3460},[16992],{"type":26,"value":3463},{"type":21,"tag":2072,"props":16994,"children":16995},{"class":2074,"line":4241},[16996,17001,17005,17009,17013,17018,17022,17026,17030],{"type":21,"tag":2072,"props":16997,"children":16998},{"style":2079},[16999],{"type":26,"value":17000},"    qc.compose(qft(n_count).inverse(), ",{"type":21,"tag":2072,"props":17002,"children":17003},{"style":3735},[17004],{"type":26,"value":685},{"type":21,"tag":2072,"props":17006,"children":17007},{"style":3372},[17008],{"type":26,"value":3487},{"type":21,"tag":2072,"props":17010,"children":17011},{"style":2097},[17012],{"type":26,"value":4068},{"type":21,"tag":2072,"props":17014,"children":17015},{"style":2079},[17016],{"type":26,"value":17017},"(n_count), ",{"type":21,"tag":2072,"props":17019,"children":17020},{"style":3735},[17021],{"type":26,"value":7331},{"type":21,"tag":2072,"props":17023,"children":17024},{"style":3372},[17025],{"type":26,"value":3487},{"type":21,"tag":2072,"props":17027,"children":17028},{"style":2097},[17029],{"type":26,"value":7340},{"type":21,"tag":2072,"props":17031,"children":17032},{"style":2079},[17033],{"type":26,"value":4281},{"type":21,"tag":2072,"props":17035,"children":17036},{"class":2074,"line":4249},[17037,17041,17045,17049,17053],{"type":21,"tag":2072,"props":17038,"children":17039},{"style":2079},[17040],{"type":26,"value":7387},{"type":21,"tag":2072,"props":17042,"children":17043},{"style":2097},[17044],{"type":26,"value":4068},{"type":21,"tag":2072,"props":17046,"children":17047},{"style":2079},[17048],{"type":26,"value":17017},{"type":21,"tag":2072,"props":17050,"children":17051},{"style":2097},[17052],{"type":26,"value":4068},{"type":21,"tag":2072,"props":17054,"children":17055},{"style":2079},[17056],{"type":26,"value":17057},"(n_count))\n",{"type":21,"tag":2072,"props":17059,"children":17060},{"class":2074,"line":4284},[17061,17065],{"type":21,"tag":2072,"props":17062,"children":17063},{"style":3372},[17064],{"type":26,"value":3701},{"type":21,"tag":2072,"props":17066,"children":17067},{"style":2079},[17068],{"type":26,"value":6910},{"type":21,"tag":2072,"props":17070,"children":17071},{"class":2074,"line":4302},[17072],{"type":21,"tag":2072,"props":17073,"children":17074},{"emptyLinePlaceholder":3460},[17075],{"type":26,"value":3463},{"type":21,"tag":2072,"props":17077,"children":17078},{"class":2074,"line":4327},[17079],{"type":21,"tag":2072,"props":17080,"children":17081},{"emptyLinePlaceholder":3460},[17082],{"type":26,"value":3463},{"type":21,"tag":2072,"props":17084,"children":17085},{"class":2074,"line":4369},[17086,17090,17094],{"type":21,"tag":2072,"props":17087,"children":17088},{"style":2079},[17089],{"type":26,"value":7558},{"type":21,"tag":2072,"props":17091,"children":17092},{"style":3372},[17093],{"type":26,"value":3487},{"type":21,"tag":2072,"props":17095,"children":17096},{"style":2079},[17097],{"type":26,"value":7567},{"type":21,"tag":2072,"props":17099,"children":17100},{"class":2074,"line":4377},[17101,17105,17109,17114,17118,17122,17127,17132],{"type":21,"tag":2072,"props":17102,"children":17103},{"style":2079},[17104],{"type":26,"value":6514},{"type":21,"tag":2072,"props":17106,"children":17107},{"style":3372},[17108],{"type":26,"value":3487},{"type":21,"tag":2072,"props":17110,"children":17111},{"style":2079},[17112],{"type":26,"value":17113}," qpe_phase_gate(",{"type":21,"tag":2072,"props":17115,"children":17116},{"style":2097},[17117],{"type":26,"value":4661},{"type":21,"tag":2072,"props":17119,"children":17120},{"style":2079},[17121],{"type":26,"value":798},{"type":21,"tag":2072,"props":17123,"children":17124},{"style":2097},[17125],{"type":26,"value":17126},"0.625",{"type":21,"tag":2072,"props":17128,"children":17129},{"style":2079},[17130],{"type":26,"value":17131},")        ",{"type":21,"tag":2072,"props":17133,"children":17134},{"style":3985},[17135],{"type":26,"value":17136},"# theta = 0.625 = 0.1010 in binary\n",{"type":21,"tag":2072,"props":17138,"children":17139},{"class":2074,"line":4412},[17140,17144,17148,17152,17156,17160,17164],{"type":21,"tag":2072,"props":17141,"children":17142},{"style":2079},[17143],{"type":26,"value":7591},{"type":21,"tag":2072,"props":17145,"children":17146},{"style":3372},[17147],{"type":26,"value":3487},{"type":21,"tag":2072,"props":17149,"children":17150},{"style":2079},[17151],{"type":26,"value":7600},{"type":21,"tag":2072,"props":17153,"children":17154},{"style":3735},[17155],{"type":26,"value":3226},{"type":21,"tag":2072,"props":17157,"children":17158},{"style":3372},[17159],{"type":26,"value":3487},{"type":21,"tag":2072,"props":17161,"children":17162},{"style":2097},[17163],{"type":26,"value":7613},{"type":21,"tag":2072,"props":17165,"children":17166},{"style":2079},[17167],{"type":26,"value":4409},{"type":21,"tag":2072,"props":17169,"children":17170},{"class":2074,"line":4529},[17171],{"type":21,"tag":2072,"props":17172,"children":17173},{"emptyLinePlaceholder":3460},[17174],{"type":26,"value":3463},{"type":21,"tag":2072,"props":17176,"children":17177},{"class":2074,"line":4537},[17178,17182,17187,17191,17196,17200,17204,17208,17212,17216,17220,17224],{"type":21,"tag":2072,"props":17179,"children":17180},{"style":3372},[17181],{"type":26,"value":4479},{"type":21,"tag":2072,"props":17183,"children":17184},{"style":2079},[17185],{"type":26,"value":17186}," bits, c ",{"type":21,"tag":2072,"props":17188,"children":17189},{"style":3372},[17190],{"type":26,"value":3869},{"type":21,"tag":2072,"props":17192,"children":17193},{"style":2097},[17194],{"type":26,"value":17195}," sorted",{"type":21,"tag":2072,"props":17197,"children":17198},{"style":2079},[17199],{"type":26,"value":13223},{"type":21,"tag":2072,"props":17201,"children":17202},{"style":3735},[17203],{"type":26,"value":10631},{"type":21,"tag":2072,"props":17205,"children":17206},{"style":3372},[17207],{"type":26,"value":10636},{"type":21,"tag":2072,"props":17209,"children":17210},{"style":2079},[17211],{"type":26,"value":13236},{"type":21,"tag":2072,"props":17213,"children":17214},{"style":3372},[17215],{"type":26,"value":3973},{"type":21,"tag":2072,"props":17217,"children":17218},{"style":2079},[17219],{"type":26,"value":13245},{"type":21,"tag":2072,"props":17221,"children":17222},{"style":2097},[17223],{"type":26,"value":3555},{"type":21,"tag":2072,"props":17225,"children":17226},{"style":2079},[17227],{"type":26,"value":17228},"]):\n",{"type":21,"tag":2072,"props":17230,"children":17231},{"class":2074,"line":4582},[17232,17237,17241,17246,17251,17255,17259,17263,17267,17271],{"type":21,"tag":2072,"props":17233,"children":17234},{"style":2079},[17235],{"type":26,"value":17236},"    est ",{"type":21,"tag":2072,"props":17238,"children":17239},{"style":3372},[17240],{"type":26,"value":3487},{"type":21,"tag":2072,"props":17242,"children":17243},{"style":2097},[17244],{"type":26,"value":17245}," int",{"type":21,"tag":2072,"props":17247,"children":17248},{"style":2079},[17249],{"type":26,"value":17250},"(bits, ",{"type":21,"tag":2072,"props":17252,"children":17253},{"style":2097},[17254],{"type":26,"value":2170},{"type":21,"tag":2072,"props":17256,"children":17257},{"style":2079},[17258],{"type":26,"value":4474},{"type":21,"tag":2072,"props":17260,"children":17261},{"style":3372},[17262],{"type":26,"value":1926},{"type":21,"tag":2072,"props":17264,"children":17265},{"style":2097},[17266],{"type":26,"value":5513},{"type":21,"tag":2072,"props":17268,"children":17269},{"style":3372},[17270],{"type":26,"value":7442},{"type":21,"tag":2072,"props":17272,"children":17273},{"style":2097},[17274],{"type":26,"value":12528},{"type":21,"tag":2072,"props":17276,"children":17277},{"class":2074,"line":4600},[17278,17283,17287,17291,17295,17299,17304,17308,17313,17318,17322,17326,17331,17335,17340,17344,17349,17353,17357,17362,17366,17371,17375,17379],{"type":21,"tag":2072,"props":17279,"children":17280},{"style":2097},[17281],{"type":26,"value":17282},"    print",{"type":21,"tag":2072,"props":17284,"children":17285},{"style":2079},[17286],{"type":26,"value":3879},{"type":21,"tag":2072,"props":17288,"children":17289},{"style":3372},[17290],{"type":26,"value":3938},{"type":21,"tag":2072,"props":17292,"children":17293},{"style":2108},[17294],{"type":26,"value":7539},{"type":21,"tag":2072,"props":17296,"children":17297},{"style":2097},[17298],{"type":26,"value":3948},{"type":21,"tag":2072,"props":17300,"children":17301},{"style":2079},[17302],{"type":26,"value":17303},"bits",{"type":21,"tag":2072,"props":17305,"children":17306},{"style":2097},[17307],{"type":26,"value":3958},{"type":21,"tag":2072,"props":17309,"children":17310},{"style":2108},[17311],{"type":26,"value":17312}," -> theta = ",{"type":21,"tag":2072,"props":17314,"children":17315},{"style":2097},[17316],{"type":26,"value":17317},"{int",{"type":21,"tag":2072,"props":17319,"children":17320},{"style":2079},[17321],{"type":26,"value":17250},{"type":21,"tag":2072,"props":17323,"children":17324},{"style":2097},[17325],{"type":26,"value":2170},{"type":21,"tag":2072,"props":17327,"children":17328},{"style":2079},[17329],{"type":26,"value":17330},")",{"type":21,"tag":2072,"props":17332,"children":17333},{"style":2097},[17334],{"type":26,"value":3958},{"type":21,"tag":2072,"props":17336,"children":17337},{"style":2108},[17338],{"type":26,"value":17339},"\u002F16 = ",{"type":21,"tag":2072,"props":17341,"children":17342},{"style":2097},[17343],{"type":26,"value":3948},{"type":21,"tag":2072,"props":17345,"children":17346},{"style":2079},[17347],{"type":26,"value":17348},"est",{"type":21,"tag":2072,"props":17350,"children":17351},{"style":3372},[17352],{"type":26,"value":10733},{"type":21,"tag":2072,"props":17354,"children":17355},{"style":2097},[17356],{"type":26,"value":3958},{"type":21,"tag":2072,"props":17358,"children":17359},{"style":2108},[17360],{"type":26,"value":17361},"   counts = ",{"type":21,"tag":2072,"props":17363,"children":17364},{"style":2097},[17365],{"type":26,"value":3948},{"type":21,"tag":2072,"props":17367,"children":17368},{"style":2079},[17369],{"type":26,"value":17370},"c",{"type":21,"tag":2072,"props":17372,"children":17373},{"style":2097},[17374],{"type":26,"value":3958},{"type":21,"tag":2072,"props":17376,"children":17377},{"style":2108},[17378],{"type":26,"value":7539},{"type":21,"tag":2072,"props":17380,"children":17381},{"style":2079},[17382],{"type":26,"value":4281},{"type":21,"tag":22,"props":17384,"children":17385},{},[17386],{"type":26,"value":12446},{"type":21,"tag":2062,"props":17388,"children":17390},{"code":17389},"1010 -> theta = 10\u002F16 = 0.6250   counts = 4096\n",[17391],{"type":21,"tag":1831,"props":17392,"children":17393},{"__ignoreMap":7},[17394],{"type":26,"value":17389},{"type":21,"tag":22,"props":17396,"children":17397},{},[17398,17403],{"type":21,"tag":784,"props":17399,"children":17400},{},[17401],{"type":26,"value":17402},"4096 out of 4096 shots.",{"type":26,"value":17404}," θ = 0.625 is exactly representable in 4 bits (0.1010₂ = 1\u002F2 + 1\u002F8), so QPE returns it with certainty. Three counting qubits and θ = 0.125 behaves the same way:",{"type":21,"tag":2062,"props":17406,"children":17408},{"code":17407},"[('001', 4096)]\n",[17409],{"type":21,"tag":1831,"props":17410,"children":17411},{"__ignoreMap":7},[17412],{"type":26,"value":17407},{"type":21,"tag":22,"props":17414,"children":17415},{},[17416],{"type":26,"value":17417},"001 = 1, and 1\u002F8 = 0.125. Exact again.",{"type":21,"tag":17419,"props":17420,"children":17422},"h3",{"id":17421},"the-endianness-trap",[17423],{"type":26,"value":17424},"The endianness trap",{"type":21,"tag":22,"props":17426,"children":17427},{},[17428,17434,17436,17441,17443,17447,17449,17455],{"type":21,"tag":1831,"props":17429,"children":17431},{"className":17430},[],[17432],{"type":26,"value":17433},"int(bits, 2) \u002F 2**n",{"type":26,"value":17435}," worked above, and it is worth understanding ",{"type":21,"tag":103,"props":17437,"children":17438},{},[17439],{"type":26,"value":17440},"why",{"type":26,"value":17442}," rather than copying it. Qiskit prints bitstrings with classical bit 0 on the ",{"type":21,"tag":784,"props":17444,"children":17445},{},[17446],{"type":26,"value":6920},{"type":26,"value":17448},", and our counting qubit 0 (the one that got the smallest rotation, ",{"type":21,"tag":1831,"props":17450,"children":17452},{"className":17451},[],[17453],{"type":26,"value":17454},"U^1",{"type":26,"value":17456},") is the least significant bit of j. The QFT's final swap network is what lines those two conventions up.",{"type":21,"tag":22,"props":17458,"children":17459},{},[17460,17462,17468],{"type":26,"value":17461},"Drop the swaps from ",{"type":21,"tag":1831,"props":17463,"children":17465},{"className":17464},[],[17466],{"type":26,"value":17467},"qft()",{"type":26,"value":17469}," (a tempting \"optimization\", since they look cosmetic) and rerun the exact θ = 0.625 case. Real output over 2048 shots:",{"type":21,"tag":2062,"props":17471,"children":17473},{"code":17472},"{'1101': 1007, '0101': 470, '0001': 251, '0100': 80, '1100': 77,\n '0010': 66, '1110': 64, '0110': 16, '1010': 9, '1001': 8}\n",[17474],{"type":21,"tag":1831,"props":17475,"children":17476},{"__ignoreMap":7},[17477],{"type":26,"value":17472},{"type":21,"tag":22,"props":17479,"children":17480},{},[17481,17483,17489,17491,17496],{"type":26,"value":17482},"The correct answer ",{"type":21,"tag":1831,"props":17484,"children":17486},{"className":17485},[],[17487],{"type":26,"value":17488},"1010",{"type":26,"value":17490}," now gets ",{"type":21,"tag":784,"props":17492,"children":17493},{},[17494],{"type":26,"value":17495},"9 shots out of 2048",{"type":26,"value":17497},". The distribution smeared across the register with its largest peak at 1101, a confidently wrong 0.8125. Nothing errors. Nothing warns. You publish the wrong number, and with a θ you didn't already know you would have no way to tell. This is the same silent-failure class as the endianness bug in the Grover oracle, and it's why the QFT post insisted on keeping the swaps in a reusable block.",{"type":21,"tag":22,"props":17499,"children":17500},{},[17501],{"type":26,"value":17502},"Always sanity-check a QPE implementation against a θ you already know before pointing it at one you don't.",{"type":21,"tag":43,"props":17504,"children":17506},{"id":17505},"when-θ-doesnt-fit-in-n-bits",[17507],{"type":26,"value":17508},"When θ doesn't fit in n bits",{"type":21,"tag":22,"props":17510,"children":17511},{},[17512],{"type":26,"value":17513},"Real eigenphases are not tidy binary fractions. Try θ = 0.3, which has an infinite binary expansion, with 4 counting qubits:",{"type":21,"tag":2062,"props":17515,"children":17517},{"code":17516,"language":3361,"meta":7,"className":3362,"style":7},"qc = qpe_phase_gate(4, 0.3)\ncounts = sim.run(transpile(qc, sim), shots=4096).result().get_counts()\nfor bits, c in sorted(counts.items(), key=lambda kv: -kv[1])[:6]:\n    print(f\"{bits}  theta_est = {int(bits, 2) \u002F 2**4:.4f}   p = {c \u002F 4096:.4f}\")\n",[17518],{"type":21,"tag":1831,"props":17519,"children":17520},{"__ignoreMap":7},[17521,17552,17583,17644],{"type":21,"tag":2072,"props":17522,"children":17523},{"class":2074,"line":2075},[17524,17528,17532,17536,17540,17544,17548],{"type":21,"tag":2072,"props":17525,"children":17526},{"style":2079},[17527],{"type":26,"value":6514},{"type":21,"tag":2072,"props":17529,"children":17530},{"style":3372},[17531],{"type":26,"value":3487},{"type":21,"tag":2072,"props":17533,"children":17534},{"style":2079},[17535],{"type":26,"value":17113},{"type":21,"tag":2072,"props":17537,"children":17538},{"style":2097},[17539],{"type":26,"value":4661},{"type":21,"tag":2072,"props":17541,"children":17542},{"style":2079},[17543],{"type":26,"value":798},{"type":21,"tag":2072,"props":17545,"children":17546},{"style":2097},[17547],{"type":26,"value":14803},{"type":21,"tag":2072,"props":17549,"children":17550},{"style":2079},[17551],{"type":26,"value":4281},{"type":21,"tag":2072,"props":17553,"children":17554},{"class":2074,"line":164},[17555,17559,17563,17567,17571,17575,17579],{"type":21,"tag":2072,"props":17556,"children":17557},{"style":2079},[17558],{"type":26,"value":7591},{"type":21,"tag":2072,"props":17560,"children":17561},{"style":3372},[17562],{"type":26,"value":3487},{"type":21,"tag":2072,"props":17564,"children":17565},{"style":2079},[17566],{"type":26,"value":7600},{"type":21,"tag":2072,"props":17568,"children":17569},{"style":3735},[17570],{"type":26,"value":3226},{"type":21,"tag":2072,"props":17572,"children":17573},{"style":3372},[17574],{"type":26,"value":3487},{"type":21,"tag":2072,"props":17576,"children":17577},{"style":2097},[17578],{"type":26,"value":7613},{"type":21,"tag":2072,"props":17580,"children":17581},{"style":2079},[17582],{"type":26,"value":4409},{"type":21,"tag":2072,"props":17584,"children":17585},{"class":2074,"line":2093},[17586,17590,17594,17598,17602,17606,17610,17614,17618,17622,17626,17630,17635,17639],{"type":21,"tag":2072,"props":17587,"children":17588},{"style":3372},[17589],{"type":26,"value":4479},{"type":21,"tag":2072,"props":17591,"children":17592},{"style":2079},[17593],{"type":26,"value":17186},{"type":21,"tag":2072,"props":17595,"children":17596},{"style":3372},[17597],{"type":26,"value":3869},{"type":21,"tag":2072,"props":17599,"children":17600},{"style":2097},[17601],{"type":26,"value":17195},{"type":21,"tag":2072,"props":17603,"children":17604},{"style":2079},[17605],{"type":26,"value":13223},{"type":21,"tag":2072,"props":17607,"children":17608},{"style":3735},[17609],{"type":26,"value":10631},{"type":21,"tag":2072,"props":17611,"children":17612},{"style":3372},[17613],{"type":26,"value":10636},{"type":21,"tag":2072,"props":17615,"children":17616},{"style":2079},[17617],{"type":26,"value":13236},{"type":21,"tag":2072,"props":17619,"children":17620},{"style":3372},[17621],{"type":26,"value":3973},{"type":21,"tag":2072,"props":17623,"children":17624},{"style":2079},[17625],{"type":26,"value":13245},{"type":21,"tag":2072,"props":17627,"children":17628},{"style":2097},[17629],{"type":26,"value":3555},{"type":21,"tag":2072,"props":17631,"children":17632},{"style":2079},[17633],{"type":26,"value":17634},"])[:",{"type":21,"tag":2072,"props":17636,"children":17637},{"style":2097},[17638],{"type":26,"value":13739},{"type":21,"tag":2072,"props":17640,"children":17641},{"style":2079},[17642],{"type":26,"value":17643},"]:\n",{"type":21,"tag":2072,"props":17645,"children":17646},{"class":2074,"line":2155},[17647,17651,17655,17659,17663,17667,17671,17675,17680,17684,17688,17692,17696,17700,17704,17708,17712,17716,17720,17724,17728,17733,17737,17742,17746,17750,17754],{"type":21,"tag":2072,"props":17648,"children":17649},{"style":2097},[17650],{"type":26,"value":17282},{"type":21,"tag":2072,"props":17652,"children":17653},{"style":2079},[17654],{"type":26,"value":3879},{"type":21,"tag":2072,"props":17656,"children":17657},{"style":3372},[17658],{"type":26,"value":3938},{"type":21,"tag":2072,"props":17660,"children":17661},{"style":2108},[17662],{"type":26,"value":7539},{"type":21,"tag":2072,"props":17664,"children":17665},{"style":2097},[17666],{"type":26,"value":3948},{"type":21,"tag":2072,"props":17668,"children":17669},{"style":2079},[17670],{"type":26,"value":17303},{"type":21,"tag":2072,"props":17672,"children":17673},{"style":2097},[17674],{"type":26,"value":3958},{"type":21,"tag":2072,"props":17676,"children":17677},{"style":2108},[17678],{"type":26,"value":17679},"  theta_est = ",{"type":21,"tag":2072,"props":17681,"children":17682},{"style":2097},[17683],{"type":26,"value":17317},{"type":21,"tag":2072,"props":17685,"children":17686},{"style":2079},[17687],{"type":26,"value":17250},{"type":21,"tag":2072,"props":17689,"children":17690},{"style":2097},[17691],{"type":26,"value":2170},{"type":21,"tag":2072,"props":17693,"children":17694},{"style":2079},[17695],{"type":26,"value":4474},{"type":21,"tag":2072,"props":17697,"children":17698},{"style":3372},[17699],{"type":26,"value":1926},{"type":21,"tag":2072,"props":17701,"children":17702},{"style":2097},[17703],{"type":26,"value":5513},{"type":21,"tag":2072,"props":17705,"children":17706},{"style":3372},[17707],{"type":26,"value":3832},{"type":21,"tag":2072,"props":17709,"children":17710},{"style":2097},[17711],{"type":26,"value":4661},{"type":21,"tag":2072,"props":17713,"children":17714},{"style":3372},[17715],{"type":26,"value":10733},{"type":21,"tag":2072,"props":17717,"children":17718},{"style":2097},[17719],{"type":26,"value":3958},{"type":21,"tag":2072,"props":17721,"children":17722},{"style":2108},[17723],{"type":26,"value":13027},{"type":21,"tag":2072,"props":17725,"children":17726},{"style":2097},[17727],{"type":26,"value":3948},{"type":21,"tag":2072,"props":17729,"children":17730},{"style":2079},[17731],{"type":26,"value":17732},"c ",{"type":21,"tag":2072,"props":17734,"children":17735},{"style":3372},[17736],{"type":26,"value":1926},{"type":21,"tag":2072,"props":17738,"children":17739},{"style":2097},[17740],{"type":26,"value":17741}," 4096",{"type":21,"tag":2072,"props":17743,"children":17744},{"style":3372},[17745],{"type":26,"value":10733},{"type":21,"tag":2072,"props":17747,"children":17748},{"style":2097},[17749],{"type":26,"value":3958},{"type":21,"tag":2072,"props":17751,"children":17752},{"style":2108},[17753],{"type":26,"value":7539},{"type":21,"tag":2072,"props":17755,"children":17756},{"style":2079},[17757],{"type":26,"value":4281},{"type":21,"tag":22,"props":17759,"children":17760},{},[17761],{"type":26,"value":12446},{"type":21,"tag":2062,"props":17763,"children":17765},{"code":17764},"0101  theta_est = 0.3125   p = 0.8823\n0100  theta_est = 0.2500   p = 0.0542\n0110  theta_est = 0.3750   p = 0.0220\n0011  theta_est = 0.1875   p = 0.0093\n0111  theta_est = 0.4375   p = 0.0063\n0010  theta_est = 0.1250   p = 0.0049\n",[17766],{"type":21,"tag":1831,"props":17767,"children":17768},{"__ignoreMap":7},[17769],{"type":26,"value":17764},{"type":21,"tag":22,"props":17771,"children":17772},{},[17773,17775,17780],{"type":26,"value":17774},"The distribution is peaked, not delta-shaped. 88% of shots land on 5\u002F16 = 0.3125, the closest 4-bit value to 0.3. The rest spread out, decaying fast as you move away from the peak. This is the generic behaviour: ",{"type":21,"tag":784,"props":17776,"children":17777},{},[17778],{"type":26,"value":17779},"you get the nearest n-bit value with high probability, not certainty.",{"type":26,"value":17781}," The standard guarantee is that the best n-bit estimate appears with probability at least 4\u002Fπ² ≈ 40.5%. Here we're comfortably above that.",{"type":21,"tag":22,"props":17783,"children":17784},{},[17785,17787,17792],{"type":26,"value":17786},"Two things improve together when you add counting qubits: finer resolution ",{"type":21,"tag":103,"props":17788,"children":17789},{},[17790],{"type":26,"value":17791},"and",{"type":26,"value":17793}," a tighter peak. Same θ = 0.3 with 8 counting qubits:",{"type":21,"tag":2062,"props":17795,"children":17797},{"code":17796},"01001101  theta_est = 0.30078   p = 0.8718\n01001100  theta_est = 0.29688   p = 0.0596\n01001110  theta_est = 0.30469   p = 0.0276\n01001111  theta_est = 0.30859   p = 0.0076\n01001011  theta_est = 0.29297   p = 0.0073\n",[17798],{"type":21,"tag":1831,"props":17799,"children":17800},{"__ignoreMap":7},[17801],{"type":26,"value":17796},{"type":21,"tag":22,"props":17803,"children":17804},{},[17805,17807,17812],{"type":26,"value":17806},"Resolution went from ±0.031 to ±0.002, and the peak stayed at 87%. In general, to get n bits of precision with success probability 1 − ε you use n + O(log(1\u002Fε)) counting qubits. A handful of extra ",{"type":21,"tag":29,"props":17808,"children":17809},{"href":8113},[17810],{"type":26,"value":17811},"ancillas",{"type":26,"value":17813}," buys you a lot of confidence.",{"type":21,"tag":22,"props":17815,"children":17816},{},[17817,17819,17824],{"type":26,"value":17818},"The cost is the part people underestimate. Counting qubit k needs U applied 2^k times. Total controlled-U applications across the register: 2ⁿ − 1. Every bit of precision ",{"type":21,"tag":784,"props":17820,"children":17821},{},[17822],{"type":26,"value":17823},"doubles",{"type":26,"value":17825}," the circuit depth. That's fine when U^(2^k) has an efficient closed form. For a phase gate it's only one gate with a bigger angle, which is why the demo above is cheap. For modular exponentiation in Shor's it's a genuine arithmetic circuit repeated exponentially many times, and the depth is brutal.",{"type":21,"tag":43,"props":17827,"children":17829},{"id":17828},"where-qpe-gets-used",[17830],{"type":26,"value":17831},"Where QPE gets used",{"type":21,"tag":22,"props":17833,"children":17834},{},[17835,17840,17842,17846,17848,17853],{"type":21,"tag":784,"props":17836,"children":17837},{},[17838],{"type":26,"value":17839},"Shor's algorithm.",{"type":26,"value":17841}," Take U|y⟩ = |ay mod N⟩. Its eigenphases are s\u002Fr for integer s, where r is the multiplicative order of a mod N. Run QPE, measure s\u002Fr as a binary fraction, recover r by continued fractions, and factor N with a GCD. That's the whole quantum part. Everything else in ",{"type":21,"tag":29,"props":17843,"children":17844},{"href":7742},[17845],{"type":26,"value":8787},{"type":26,"value":17847}," is number theory. Order finding is QPE. QPE is controlled powers plus an inverse QFT. The chain from the QFT post now closes. (The algorithm was recently ",{"type":21,"tag":29,"props":17849,"children":17850},{"href":8798},[17851],{"type":26,"value":17852},"machine-verified in Lean",{"type":26,"value":17854},", if you want the formal treatment.)",{"type":21,"tag":22,"props":17856,"children":17857},{},[17858,17863,17865,17870],{"type":21,"tag":784,"props":17859,"children":17860},{},[17861],{"type":26,"value":17862},"Quantum chemistry.",{"type":26,"value":17864}," Set U = e^{-iHt}. QPE returns the ground-state energy to whatever precision you're willing to pay depth for, and crucially, it returns it with a ",{"type":21,"tag":103,"props":17866,"children":17867},{},[17868],{"type":26,"value":17869},"provable",{"type":26,"value":17871}," error bound rather than a variational estimate. This is the long-term goal of quantum simulation, and it's the application most likely to matter commercially before cryptanalysis does.",{"type":21,"tag":22,"props":17873,"children":17874},{},[17875,17880,17881,17885,17887,17891,17893,17898],{"type":21,"tag":784,"props":17876,"children":17877},{},[17878],{"type":26,"value":17879},"Contrast with VQE.",{"type":26,"value":790},{"type":21,"tag":29,"props":17882,"children":17883},{"href":62},[17884],{"type":26,"value":14},{"type":26,"value":17886}," attacks the same chemistry problem from the opposite direction. Instead of one deep coherent circuit, it uses a shallow ",{"type":21,"tag":29,"props":17888,"children":17889},{"href":13894},[17890],{"type":26,"value":13897},{"type":26,"value":17892}," plus a classical optimizer, as introduced in ",{"type":21,"tag":29,"props":17894,"children":17895},{"href":69},[17896],{"type":26,"value":17897},"Peruzzo et al. 2014",{"type":26,"value":17899},". The trade is explicit:",{"type":21,"tag":3169,"props":17901,"children":17902},{},[17903,17921],{"type":21,"tag":3173,"props":17904,"children":17905},{},[17906],{"type":21,"tag":3177,"props":17907,"children":17908},{},[17909,17912,17917],{"type":21,"tag":3181,"props":17910,"children":17911},{},[],{"type":21,"tag":3181,"props":17913,"children":17914},{},[17915],{"type":26,"value":17916},"QPE",{"type":21,"tag":3181,"props":17918,"children":17919},{},[17920],{"type":26,"value":14},{"type":21,"tag":3195,"props":17922,"children":17923},{},[17924,17942,17960,17978],{"type":21,"tag":3177,"props":17925,"children":17926},{},[17927,17932,17937],{"type":21,"tag":3202,"props":17928,"children":17929},{},[17930],{"type":26,"value":17931},"Circuit depth",{"type":21,"tag":3202,"props":17933,"children":17934},{},[17935],{"type":26,"value":17936},"Deep, grows as 2ⁿ in precision bits",{"type":21,"tag":3202,"props":17938,"children":17939},{},[17940],{"type":26,"value":17941},"Shallow, fixed ansatz",{"type":21,"tag":3177,"props":17943,"children":17944},{},[17945,17950,17955],{"type":21,"tag":3202,"props":17946,"children":17947},{},[17948],{"type":26,"value":17949},"Precision",{"type":21,"tag":3202,"props":17951,"children":17952},{},[17953],{"type":26,"value":17954},"Provable, arbitrary",{"type":21,"tag":3202,"props":17956,"children":17957},{},[17958],{"type":26,"value":17959},"Heuristic, ansatz-limited",{"type":21,"tag":3177,"props":17961,"children":17962},{},[17963,17968,17973],{"type":21,"tag":3202,"props":17964,"children":17965},{},[17966],{"type":26,"value":17967},"Measurements",{"type":21,"tag":3202,"props":17969,"children":17970},{},[17971],{"type":26,"value":17972},"Few shots",{"type":21,"tag":3202,"props":17974,"children":17975},{},[17976],{"type":26,"value":17977},"Many thousands per iteration",{"type":21,"tag":3177,"props":17979,"children":17980},{},[17981,17986,17991],{"type":21,"tag":3202,"props":17982,"children":17983},{},[17984],{"type":26,"value":17985},"Hardware era",{"type":21,"tag":3202,"props":17987,"children":17988},{},[17989],{"type":26,"value":17990},"Fault-tolerant",{"type":21,"tag":3202,"props":17992,"children":17993},{},[17994],{"type":21,"tag":29,"props":17995,"children":17996},{"href":120},[17997],{"type":26,"value":2016},{"type":21,"tag":22,"props":17999,"children":18000},{},[18001,18003,18008,18010,18014,18016,18020],{"type":26,"value":18002},"VQE runs today and gives you an answer you can't fully trust. QPE gives you an answer you trust and can't run today. Our ",{"type":21,"tag":29,"props":18004,"children":18005},{"href":31},[18006],{"type":26,"value":18007},"VQE walkthrough in PennyLane",{"type":26,"value":18009}," covers the near-term side. ",{"type":21,"tag":29,"props":18011,"children":18012},{"href":14130},[18013],{"type":26,"value":13846},{"type":26,"value":18015}," is generally the better fit for variational work while ",{"type":21,"tag":29,"props":18017,"children":18018},{"href":6223},[18019],{"type":26,"value":852},{"type":26,"value":18021}," suits structured circuits like this one.",{"type":21,"tag":43,"props":18023,"children":18025},{"id":18024},"the-honest-caveat",[18026],{"type":26,"value":18027},"The honest caveat",{"type":21,"tag":22,"props":18029,"children":18030},{},[18031,18033,18037],{"type":26,"value":18032},"QPE is not a NISQ algorithm and no amount of clever ",{"type":21,"tag":29,"props":18034,"children":18035},{"href":4884},[18036],{"type":26,"value":4887},{"type":26,"value":18038}," will make it one.",{"type":21,"tag":22,"props":18040,"children":18041},{},[18042,18044,18048],{"type":26,"value":18043},"The circuit must stay coherent through 2ⁿ − 1 controlled-U applications, each of which decomposes into many native two-qubit gates. With two-qubit error around 0.5% on current hardware, a few hundred entangling gates leaves you with noise. ",{"type":21,"tag":29,"props":18045,"children":18046},{"href":8065},[18047],{"type":26,"value":15878},{"type":26,"value":18049}," sets a hard wall long before you reach chemically useful precision. Published hardware demonstrations of QPE are toy instances with 2-4 counting qubits, real, but not computations anyone needed done.",{"type":21,"tag":22,"props":18051,"children":18052},{},[18053,18055,18059,18061,18066,18068,18072,18074,18078,18080,18084,18086,18091],{"type":26,"value":18054},"QPE becomes practical when circuits run on ",{"type":21,"tag":29,"props":18056,"children":18057},{"href":874},[18058],{"type":26,"value":877},{"type":26,"value":18060}," rather than physical ones. Google's ",{"type":21,"tag":29,"props":18062,"children":18063},{"href":8250},[18064],{"type":26,"value":18065},"below-threshold result",{"type":26,"value":18067}," is the first real evidence that path is open, and our ",{"type":21,"tag":29,"props":18069,"children":18070},{"href":487},[18071],{"type":26,"value":987},{"type":26,"value":18073}," covers what still has to happen. Until then: develop QPE on ",{"type":21,"tag":29,"props":18075,"children":18076},{"href":150},[18077],{"type":26,"value":7908},{"type":26,"value":18079},", where you verify it exactly, and reach for VQE or ",{"type":21,"tag":29,"props":18081,"children":18082},{"href":3086},[18083],{"type":26,"value":8416},{"type":26,"value":18085}," if you need results from ",{"type":21,"tag":29,"props":18087,"children":18088},{"href":590},[18089],{"type":26,"value":18090},"today's hardware",{"type":26,"value":237},{"type":21,"tag":22,"props":18093,"children":18094},{},[18095],{"type":26,"value":18096},"That's not a reason to skip learning it. QPE is the template for what a fault-tolerant algorithm looks like (deep, exact, and structured) and it's the piece that makes the QFT worth building.",{"type":21,"tag":43,"props":18098,"children":18099},{"id":7920},[18100],{"type":26,"value":18101},"Next steps",{"type":21,"tag":7925,"props":18103,"children":18104},{},[18105,18117,18130,18154],{"type":21,"tag":6142,"props":18106,"children":18107},{},[18108,18115],{"type":21,"tag":784,"props":18109,"children":18110},{},[18111],{"type":21,"tag":29,"props":18112,"children":18113},{"href":1206},[18114],{"type":26,"value":7963},{"type":26,"value":18116},": build the same QPE circuit in Cirq or Braket",{"type":21,"tag":6142,"props":18118,"children":18119},{},[18120,18128],{"type":21,"tag":784,"props":18121,"children":18122},{},[18123],{"type":21,"tag":29,"props":18124,"children":18125},{"href":8433},[18126],{"type":26,"value":18127},"Courses",{"type":26,"value":18129},": structured paths through the algorithm canon",{"type":21,"tag":6142,"props":18131,"children":18132},{},[18133,18140,18141,18147,18148,18153],{"type":21,"tag":784,"props":18134,"children":18135},{},[18136],{"type":21,"tag":29,"props":18137,"children":18138},{"href":7982},[18139],{"type":26,"value":7985},{"type":26,"value":66},{"type":21,"tag":29,"props":18142,"children":18144},{"href":18143},"\u002Fglossary\u002Fquantum-gate",[18145],{"type":26,"value":18146},"quantum gate",{"type":26,"value":798},{"type":21,"tag":29,"props":18149,"children":18150},{"href":8113},[18151],{"type":26,"value":18152},"ancilla qubit",{"type":26,"value":8001},{"type":21,"tag":6142,"props":18155,"children":18156},{},[18157],{"type":26,"value":18158},"Extend the code above to a 2-qubit U with two eigenstates, feed in a superposition of both, and watch the counting register entangle with the eigenstate register. That's the mechanism behind order finding.",{"type":21,"tag":2445,"props":18160,"children":18161},{},[18162],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":18164},[18165,18166,18167,18168,18171,18172,18173,18174],{"id":16134,"depth":164,"text":16137},{"id":16225,"depth":164,"text":16228},{"id":16330,"depth":164,"text":16333},{"id":11826,"depth":164,"text":11829,"children":18169},[18170],{"id":17421,"depth":2093,"text":17424},{"id":17505,"depth":164,"text":17508},{"id":17828,"depth":164,"text":17831},{"id":18024,"depth":164,"text":18027},{"id":7920,"depth":164,"text":18101},"content:blog:quantum-phase-estimation-tutorial.md","blog\u002Fquantum-phase-estimation-tutorial.md","blog\u002Fquantum-phase-estimation-tutorial",{"_path":18179,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":18180,"description":18181,"date":18182,"author":11,"tags":18183,"readingTime":853,"body":18185,"_type":171,"_id":19270,"_source":173,"_file":19271,"_stem":19272,"_extension":176},"\u002Fblog\u002Fquantum-computing-new-vocabulary","The New Vocabulary of Quantum Computing: 16 Terms That Will Go Mainstream","As AI gave us 'tokens', 'hallucinations', and 'fine-tuning', quantum computing is building its own vocabulary. Here are the terms developers and businesses will be using within a few years.","2026-03-15",[6281,287,18184],"Terminology",{"type":18,"children":18186,"toc":19251},[18187,18224,18229,18234,18238,18244,18252,18257,18288,18293,18296,18302,18310,18329,18340,18348,18353,18356,18362,18370,18388,18399,18411,18414,18420,18428,18442,18454,18457,18463,18471,18486,18576,18581,18584,18590,18598,18625,18637,18645,18650,18653,18659,18667,18683,18688,18691,18697,18705,18717,18722,18725,18731,18739,18766,18778,18783,18788,18791,18797,18805,18820,18832,18844,18847,18853,18861,18876,18881,18884,18890,18898,18918,18923,18926,18932,18940,18952,18957,18960,18966,18974,18997,19002,19005,19011,19019,19024,19037,19056,19061,19064,19070,19078,19094,19117,19130,19133,19139,19144,19217,19222,19227,19247],{"type":21,"tag":22,"props":18188,"children":18189},{},[18190,18192,18197,18198,18203,18204,18209,18210,18215,18217,18222],{"type":26,"value":18191},"When deep learning broke into the mainstream around 2022–2023, it dragged a whole new vocabulary into everyday conversation. Suddenly everyone was talking about ",{"type":21,"tag":103,"props":18193,"children":18194},{},[18195],{"type":26,"value":18196},"tokens",{"type":26,"value":798},{"type":21,"tag":103,"props":18199,"children":18200},{},[18201],{"type":26,"value":18202},"hallucinations",{"type":26,"value":798},{"type":21,"tag":103,"props":18205,"children":18206},{},[18207],{"type":26,"value":18208},"context windows",{"type":26,"value":798},{"type":21,"tag":103,"props":18211,"children":18212},{},[18213],{"type":26,"value":18214},"fine-tuning",{"type":26,"value":18216},", and ",{"type":21,"tag":103,"props":18218,"children":18219},{},[18220],{"type":26,"value":18221},"prompt engineering",{"type":26,"value":18223},", terms that barely existed in the common developer lexicon a decade earlier. A new generation of \"AI engineers\" emerged, GPU time became a precious commodity, and \"inference cost\" became a line item in engineering budgets.",{"type":21,"tag":22,"props":18225,"children":18226},{},[18227],{"type":26,"value":18228},"Quantum computing is on a similar trajectory. It's earlier in the curve, but the inflection point is coming, and with it, a new set of terms that will move from research papers into job descriptions, startup pitches, and Stack Overflow questions. Some of these already exist in the quantum community. Most are unknown outside it. All of them are worth learning now, before everyone else does.",{"type":21,"tag":22,"props":18230,"children":18231},{},[18232],{"type":26,"value":18233},"Here are 16 terms from the quantum computing world that are positioned to go mainstream.",{"type":21,"tag":18235,"props":18236,"children":18237},"hr",{},[],{"type":21,"tag":43,"props":18239,"children":18241},{"id":18240},"_1-qpu-quantum-processing-unit",[18242],{"type":26,"value":18243},"1. QPU (Quantum Processing Unit)",{"type":21,"tag":22,"props":18245,"children":18246},{},[18247],{"type":21,"tag":784,"props":18248,"children":18249},{},[18250],{"type":26,"value":18251},"The AI parallel: GPU",{"type":21,"tag":22,"props":18253,"children":18254},{},[18255],{"type":26,"value":18256},"\"Do you have GPU access?\" became a standard question in ML teams. \"Do you have QPU access?\" will become its quantum equivalent.",{"type":21,"tag":22,"props":18258,"children":18259},{},[18260,18261,18265,18267,18272,18274,18279,18281,18286],{"type":26,"value":8055},{"type":21,"tag":29,"props":18262,"children":18263},{"href":11470},[18264],{"type":26,"value":8025},{"type":26,"value":18266}," is the hardware chip that executes quantum circuits. IBM calls their systems ",{"type":21,"tag":103,"props":18268,"children":18269},{},[18270],{"type":26,"value":18271},"quantum computers",{"type":26,"value":18273},", NVIDIA has ",{"type":21,"tag":784,"props":18275,"children":18276},{},[18277],{"type":26,"value":18278},"CUDA-Q",{"type":26,"value":18280}," for GPU-accelerated simulation, and IonQ's trapped-ion systems are the highest-fidelity QPUs available today. As \"GPU time\" became a resource engineers fight over, ",{"type":21,"tag":784,"props":18282,"children":18283},{},[18284],{"type":26,"value":18285},"QPU time",{"type":26,"value":18287}," (actual execution cycles on quantum hardware) will become a premium, schedulable resource.",{"type":21,"tag":22,"props":18289,"children":18290},{},[18291],{"type":26,"value":18292},"The term already appears in cloud pricing pages (AWS Braket, Azure Quantum). It will be in job descriptions within five years.",{"type":21,"tag":18235,"props":18294,"children":18295},{},[],{"type":21,"tag":43,"props":18297,"children":18299},{"id":18298},"_2-shot-budget",[18300],{"type":26,"value":18301},"2. Shot Budget",{"type":21,"tag":22,"props":18303,"children":18304},{},[18305],{"type":21,"tag":784,"props":18306,"children":18307},{},[18308],{"type":26,"value":18309},"The AI parallel: Token budget \u002F context window",{"type":21,"tag":22,"props":18311,"children":18312},{},[18313,18315,18320,18322,18327],{"type":26,"value":18314},"When you run a quantum circuit, you don't get a single answer. You get a ",{"type":21,"tag":103,"props":18316,"children":18317},{},[18318],{"type":26,"value":18319},"probability distribution",{"type":26,"value":18321}," sampled by running the circuit many times. Each run is called a ",{"type":21,"tag":784,"props":18323,"children":18324},{},[18325],{"type":26,"value":18326},"shot",{"type":26,"value":18328},". A circuit run 1,000 times costs more QPU time than the same circuit run 100 times.",{"type":21,"tag":22,"props":18330,"children":18331},{},[18332,18334,18338],{"type":26,"value":18333},"The \"",{"type":21,"tag":29,"props":18335,"children":18336},{"href":6120},[18337],{"type":26,"value":6123},{"type":26,"value":18339},"\" (how many executions you afford) will become a real optimization concern as QPU access scales. As developers learned to trim prompts to stay within token limits, quantum developers will learn to design circuits that extract maximum signal from a minimum shot budget.",{"type":21,"tag":1952,"props":18341,"children":18342},{},[18343],{"type":21,"tag":22,"props":18344,"children":18345},{},[18346],{"type":26,"value":18347},"\"We got the VQE to converge in 200 shots instead of 2,000. That cut our QPU costs by 90%.\"",{"type":21,"tag":22,"props":18349,"children":18350},{},[18351],{"type":26,"value":18352},"This is already a real concern in variational algorithms like VQE and QAOA, where shot noise directly impacts result quality.",{"type":21,"tag":18235,"props":18354,"children":18355},{},[],{"type":21,"tag":43,"props":18357,"children":18359},{"id":18358},"_3-quantum-advantage",[18360],{"type":26,"value":18361},"3. Quantum Advantage",{"type":21,"tag":22,"props":18363,"children":18364},{},[18365],{"type":21,"tag":784,"props":18366,"children":18367},{},[18368],{"type":26,"value":18369},"The AI parallel: 10x speedup, \"better than human\"",{"type":21,"tag":22,"props":18371,"children":18372},{},[18373,18374,18379,18381,18386],{"type":26,"value":7539},{"type":21,"tag":29,"props":18375,"children":18376},{"href":7996},[18377],{"type":26,"value":18378},"Quantum advantage",{"type":26,"value":18380},"\" is the moment a quantum computer solves a specific, real-world problem ",{"type":21,"tag":103,"props":18382,"children":18383},{},[18384],{"type":26,"value":18385},"faster or better",{"type":26,"value":18387}," than any classical computer does. It is the quantum equivalent of \"superhuman performance\" in AI benchmarks.",{"type":21,"tag":22,"props":18389,"children":18390},{},[18391,18393,18397],{"type":26,"value":18392},"IBM introduced the related term ",{"type":21,"tag":784,"props":18394,"children":18395},{},[18396],{"type":26,"value":948},{"type":26,"value":18398}," in 2023 to describe circuits that are too complex to classically simulate but practically useful, a more grounded precursor to full quantum advantage. Expect both terms to appear in press releases, funding announcements, and regulatory discussions as hardware matures.",{"type":21,"tag":22,"props":18400,"children":18401},{},[18402,18404,18409],{"type":26,"value":18403},"The distinction matters: quantum advantage is a property of a ",{"type":21,"tag":103,"props":18405,"children":18406},{},[18407],{"type":26,"value":18408},"problem + hardware combination",{"type":26,"value":18410},", not a blanket statement about quantum computers being \"better.\" Understanding this will separate informed quantum conversations from hype.",{"type":21,"tag":18235,"props":18412,"children":18413},{},[],{"type":21,"tag":43,"props":18415,"children":18417},{"id":18416},"_4-quantum-utility",[18418],{"type":26,"value":18419},"4. Quantum Utility",{"type":21,"tag":22,"props":18421,"children":18422},{},[18423],{"type":21,"tag":784,"props":18424,"children":18425},{},[18426],{"type":26,"value":18427},"The AI parallel: \"Production AI\" vs. research demos",{"type":21,"tag":22,"props":18429,"children":18430},{},[18431,18433,18440],{"type":26,"value":18432},"Closely related to quantum advantage, ",{"type":21,"tag":784,"props":18434,"children":18435},{},[18436],{"type":21,"tag":29,"props":18437,"children":18438},{"href":6253},[18439],{"type":26,"value":948},{"type":26,"value":18441}," specifically means: a quantum circuit that produces results useful for a real application, even if classical simulation of that exact circuit is still possible in principle but impractical.",{"type":21,"tag":22,"props":18443,"children":18444},{},[18445,18447,18452],{"type":26,"value":18446},"IBM first used the term in a 2023 ",{"type":21,"tag":103,"props":18448,"children":18449},{},[18450],{"type":26,"value":18451},"Nature",{"type":26,"value":18453}," paper demonstrating that certain quantum circuits running on their Eagle processor produced results that classical simulation couldn't easily verify. It's a more achievable, near-term milestone than full quantum advantage, and the one we're most likely to hear about in the next few years.",{"type":21,"tag":18235,"props":18455,"children":18456},{},[],{"type":21,"tag":43,"props":18458,"children":18460},{"id":18459},"_5-transpilation",[18461],{"type":26,"value":18462},"5. Transpilation",{"type":21,"tag":22,"props":18464,"children":18465},{},[18466],{"type":21,"tag":784,"props":18467,"children":18468},{},[18469],{"type":26,"value":18470},"The AI parallel: Model compilation \u002F quantization",{"type":21,"tag":22,"props":18472,"children":18473},{},[18474,18476,18484],{"type":26,"value":18475},"Before a quantum circuit runs on real hardware, it must be ",{"type":21,"tag":103,"props":18477,"children":18478},{},[18479],{"type":21,"tag":29,"props":18480,"children":18481},{"href":4884},[18482],{"type":26,"value":18483},"transpiled",{"type":26,"value":18485},": converted from abstract operations into the hardware's native gate set, with qubit operations rerouted to respect physical connectivity constraints. This is analogous to how a deep learning model must be compiled and optimized for a specific chip architecture.",{"type":21,"tag":2062,"props":18487,"children":18489},{"className":3362,"code":18488,"language":3361,"meta":7,"style":7},"from qiskit.compiler import transpile\n\n# Circuit written in abstract gates\ntranspiled = transpile(circuit, backend=real_qpu, optimization_level=3)\n",[18490],{"type":21,"tag":1831,"props":18491,"children":18492},{"__ignoreMap":7},[18493,18514,18521,18529],{"type":21,"tag":2072,"props":18494,"children":18495},{"class":2074,"line":2075},[18496,18500,18505,18509],{"type":21,"tag":2072,"props":18497,"children":18498},{"style":3372},[18499],{"type":26,"value":3398},{"type":21,"tag":2072,"props":18501,"children":18502},{"style":2079},[18503],{"type":26,"value":18504}," qiskit.compiler ",{"type":21,"tag":2072,"props":18506,"children":18507},{"style":3372},[18508],{"type":26,"value":3375},{"type":21,"tag":2072,"props":18510,"children":18511},{"style":2079},[18512],{"type":26,"value":18513}," transpile\n",{"type":21,"tag":2072,"props":18515,"children":18516},{"class":2074,"line":164},[18517],{"type":21,"tag":2072,"props":18518,"children":18519},{"emptyLinePlaceholder":3460},[18520],{"type":26,"value":3463},{"type":21,"tag":2072,"props":18522,"children":18523},{"class":2074,"line":2093},[18524],{"type":21,"tag":2072,"props":18525,"children":18526},{"style":3985},[18527],{"type":26,"value":18528},"# Circuit written in abstract gates\n",{"type":21,"tag":2072,"props":18530,"children":18531},{"class":2074,"line":2155},[18532,18537,18541,18546,18551,18555,18560,18564,18568,18572],{"type":21,"tag":2072,"props":18533,"children":18534},{"style":2079},[18535],{"type":26,"value":18536},"transpiled ",{"type":21,"tag":2072,"props":18538,"children":18539},{"style":3372},[18540],{"type":26,"value":3487},{"type":21,"tag":2072,"props":18542,"children":18543},{"style":2079},[18544],{"type":26,"value":18545}," transpile(circuit, ",{"type":21,"tag":2072,"props":18547,"children":18548},{"style":3735},[18549],{"type":26,"value":18550},"backend",{"type":21,"tag":2072,"props":18552,"children":18553},{"style":3372},[18554],{"type":26,"value":3487},{"type":21,"tag":2072,"props":18556,"children":18557},{"style":2079},[18558],{"type":26,"value":18559},"real_qpu, ",{"type":21,"tag":2072,"props":18561,"children":18562},{"style":3735},[18563],{"type":26,"value":5404},{"type":21,"tag":2072,"props":18565,"children":18566},{"style":3372},[18567],{"type":26,"value":3487},{"type":21,"tag":2072,"props":18569,"children":18570},{"style":2097},[18571],{"type":26,"value":5641},{"type":21,"tag":2072,"props":18573,"children":18574},{"style":2079},[18575],{"type":26,"value":4281},{"type":21,"tag":22,"props":18577,"children":18578},{},[18579],{"type":26,"value":18580},"As quantum moves to production, \"transpilation overhead\" and \"transpilation depth\" will become standard engineering concerns, the way inference latency and model quantization are today.",{"type":21,"tag":18235,"props":18582,"children":18583},{},[],{"type":21,"tag":43,"props":18585,"children":18587},{"id":18586},"_6-coherence-time-t1-t2",[18588],{"type":26,"value":18589},"6. Coherence Time (T1 \u002F T2)",{"type":21,"tag":22,"props":18591,"children":18592},{},[18593],{"type":21,"tag":784,"props":18594,"children":18595},{},[18596],{"type":26,"value":18597},"The AI parallel: Context window \u002F memory limit",{"type":21,"tag":22,"props":18599,"children":18600},{},[18601,18603,18607,18608,18616,18618,18623],{"type":26,"value":18602},"A qubit doesn't stay quantum forever. It decays. It loses its superposition through environmental noise in a process called ",{"type":21,"tag":103,"props":18604,"children":18605},{},[18606],{"type":26,"value":8068},{"type":26,"value":11548},{"type":21,"tag":784,"props":18609,"children":18610},{},[18611],{"type":21,"tag":29,"props":18612,"children":18613},{"href":4863},[18614],{"type":26,"value":18615},"T1 time",{"type":26,"value":18617}," (energy relaxation) and ",{"type":21,"tag":784,"props":18619,"children":18620},{},[18621],{"type":26,"value":18622},"T2 time",{"type":26,"value":18624}," (phase coherence) measure how long a qubit stays usable.",{"type":21,"tag":22,"props":18626,"children":18627},{},[18628,18630,18635],{"type":26,"value":18629},"This is the quantum equivalent of a context window: it defines the ",{"type":21,"tag":103,"props":18631,"children":18632},{},[18633],{"type":26,"value":18634},"maximum circuit depth",{"type":26,"value":18636}," you execute before your qubits become classical noise. IBM's superconducting qubits have T2 times around 100–300 microseconds. IonQ's trapped-ion qubits have T2 times exceeding one second, which is why their circuits reach much greater depth.",{"type":21,"tag":1952,"props":18638,"children":18639},{},[18640],{"type":21,"tag":22,"props":18641,"children":18642},{},[18643],{"type":26,"value":18644},"\"Our circuit is too deep for this backend. We'll hit T2 before the last gate executes.\"",{"type":21,"tag":22,"props":18646,"children":18647},{},[18648],{"type":26,"value":18649},"Developers will learn to budget coherence time the way they budget memory.",{"type":21,"tag":18235,"props":18651,"children":18652},{},[],{"type":21,"tag":43,"props":18654,"children":18656},{"id":18655},"_7-decoherence-budget",[18657],{"type":26,"value":18658},"7. Decoherence Budget",{"type":21,"tag":22,"props":18660,"children":18661},{},[18662],{"type":21,"tag":784,"props":18663,"children":18664},{},[18665],{"type":26,"value":18666},"The AI parallel: Latency budget \u002F compute budget",{"type":21,"tag":22,"props":18668,"children":18669},{},[18670,18672,18681],{"type":26,"value":18671},"A natural extension of T1\u002FT2: the ",{"type":21,"tag":784,"props":18673,"children":18674},{},[18675],{"type":21,"tag":29,"props":18676,"children":18678},{"href":18677},"\u002Fglossary\u002Fdecoherence-budget",[18679],{"type":26,"value":18680},"decoherence budget",{"type":26,"value":18682}," is the total \"coherence time\" available for a circuit to complete before errors accumulate beyond usefulness. Longer circuits consume more decoherence budget.",{"type":21,"tag":22,"props":18684,"children":18685},{},[18686],{"type":26,"value":18687},"As quantum applications grow more complex, architects will design systems that stay within decoherence budgets, trading off circuit depth vs. result fidelity, similar to how backend engineers trade off response latency vs. compute cost today.",{"type":21,"tag":18235,"props":18689,"children":18690},{},[],{"type":21,"tag":43,"props":18692,"children":18694},{"id":18693},"_8-circuit-fidelity",[18695],{"type":26,"value":18696},"8. Circuit Fidelity",{"type":21,"tag":22,"props":18698,"children":18699},{},[18700],{"type":21,"tag":784,"props":18701,"children":18702},{},[18703],{"type":26,"value":18704},"The AI parallel: Model accuracy \u002F F1 score",{"type":21,"tag":22,"props":18706,"children":18707},{},[18708,18715],{"type":21,"tag":784,"props":18709,"children":18710},{},[18711],{"type":21,"tag":29,"props":18712,"children":18713},{"href":8149},[18714],{"type":26,"value":13692},{"type":26,"value":18716}," measures how close the actual quantum state produced by a circuit is to the ideal theoretical state. A circuit with 99% fidelity is excellent. One at 90% is sometimes useless for precision applications.",{"type":21,"tag":22,"props":18718,"children":18719},{},[18720],{"type":26,"value":18721},"Fidelity degrades with every gate applied (each gate has an error rate) and with circuit depth (longer circuits decohere more). It will become the primary quality metric for QPU results, the quantum equivalent of model accuracy on a benchmark.",{"type":21,"tag":18235,"props":18723,"children":18724},{},[],{"type":21,"tag":43,"props":18726,"children":18728},{"id":18727},"_9-physical-vs-logical-qubit",[18729],{"type":26,"value":18730},"9. Physical vs. Logical Qubit",{"type":21,"tag":22,"props":18732,"children":18733},{},[18734],{"type":21,"tag":784,"props":18735,"children":18736},{},[18737],{"type":26,"value":18738},"The AI parallel: Raw parameters vs. effective model capacity",{"type":21,"tag":22,"props":18740,"children":18741},{},[18742,18744,18748,18750,18757,18759,18764],{"type":26,"value":18743},"One of the most important distinctions going mainstream: a ",{"type":21,"tag":784,"props":18745,"children":18746},{},[18747],{"type":26,"value":8060},{"type":26,"value":18749}," is a real hardware qubit (noisy, prone to error). A ",{"type":21,"tag":784,"props":18751,"children":18752},{},[18753],{"type":21,"tag":29,"props":18754,"children":18755},{"href":874},[18756],{"type":26,"value":8089},{"type":26,"value":18758}," is an ",{"type":21,"tag":103,"props":18760,"children":18761},{},[18762],{"type":26,"value":18763},"error-corrected",{"type":26,"value":18765}," qubit encoded across many physical qubits, reliable, but expensive.",{"type":21,"tag":22,"props":18767,"children":18768},{},[18769,18771,18776],{"type":26,"value":18770},"Today's best hardware (IBM, IonQ) operates with physical qubits. Full fault-tolerant quantum computing requires logical qubits. Current estimates put the ratio at ",{"type":21,"tag":784,"props":18772,"children":18773},{},[18774],{"type":26,"value":18775},"1,000–10,000 physical qubits per logical qubit",{"type":26,"value":18777}," for surface code error correction.",{"type":21,"tag":22,"props":18779,"children":18780},{},[18781],{"type":26,"value":18782},"When you hear \"IBM has 1,000 qubits,\" that's physical qubits. A fault-tolerant computer capable of running Shor's algorithm against RSA-2048 would need millions of physical qubits.",{"type":21,"tag":22,"props":18784,"children":18785},{},[18786],{"type":26,"value":18787},"Understanding this distinction will be essential for separating quantum hardware marketing from technical reality.",{"type":21,"tag":18235,"props":18789,"children":18790},{},[],{"type":21,"tag":43,"props":18792,"children":18794},{"id":18793},"_10-quantum-safe-post-quantum-cryptography",[18795],{"type":26,"value":18796},"10. Quantum-Safe \u002F Post-Quantum Cryptography",{"type":21,"tag":22,"props":18798,"children":18799},{},[18800],{"type":21,"tag":784,"props":18801,"children":18802},{},[18803],{"type":26,"value":18804},"The AI parallel: \"AI-resistant\" (less apt), closer to \"GDPR for algorithms\"",{"type":21,"tag":22,"props":18806,"children":18807},{},[18808,18810,18818],{"type":26,"value":18809},"This one is already leaving the research world. ",{"type":21,"tag":784,"props":18811,"children":18812},{},[18813],{"type":21,"tag":29,"props":18814,"children":18815},{"href":8498},[18816],{"type":26,"value":18817},"Post-quantum cryptography",{"type":26,"value":18819}," (PQC) refers to classical cryptographic algorithms designed to resist attacks from quantum computers. The threat: Shor's algorithm factors the large primes that underpin RSA, breaking most of today's public-key encryption.",{"type":21,"tag":22,"props":18821,"children":18822},{},[18823,18825,18830],{"type":26,"value":18824},"NIST finalized its first post-quantum cryptography standards in 2024 (CRYSTALS-Kyber, CRYSTALS-Dilithium). ",{"type":21,"tag":784,"props":18826,"children":18827},{},[18828],{"type":26,"value":18829},"\"Quantum-safe\"",{"type":26,"value":18831}," will be a certification and compliance term within five years, appearing in security audits, procurement requirements, and cloud provider documentation.",{"type":21,"tag":22,"props":18833,"children":18834},{},[18835,18837,18842],{"type":26,"value":18836},"The attack vector most organizations should prepare for: ",{"type":21,"tag":784,"props":18838,"children":18839},{},[18840],{"type":26,"value":18841},"\"harvest now, decrypt later\"",{"type":26,"value":18843},": adversaries collecting encrypted data today with the intent to decrypt it once quantum computers are capable enough.",{"type":21,"tag":18235,"props":18845,"children":18846},{},[],{"type":21,"tag":43,"props":18848,"children":18850},{"id":18849},"_11-hybrid-algorithm-quantum-classical-hybrid",[18851],{"type":26,"value":18852},"11. Hybrid Algorithm \u002F Quantum-Classical Hybrid",{"type":21,"tag":22,"props":18854,"children":18855},{},[18856],{"type":21,"tag":784,"props":18857,"children":18858},{},[18859],{"type":26,"value":18860},"The AI parallel: \"AI-assisted\" workflows, CPU+GPU heterogeneous computing",{"type":21,"tag":22,"props":18862,"children":18863},{},[18864,18866,18874],{"type":26,"value":18865},"Almost all near-term quantum applications are ",{"type":21,"tag":784,"props":18867,"children":18868},{},[18869],{"type":21,"tag":29,"props":18870,"children":18871},{"href":112},[18872],{"type":26,"value":18873},"hybrid",{"type":26,"value":18875},": a classical optimizer calls a quantum circuit repeatedly, using quantum hardware for the parts classical computers struggle with (state preparation, interference) while classical computers handle optimization loops.",{"type":21,"tag":22,"props":18877,"children":18878},{},[18879],{"type":26,"value":18880},"VQE and QAOA are the canonical hybrid algorithms. As quantum programming frameworks mature, \"hybrid workflow orchestration\" (managing the handoff between classical and quantum compute) will become a standard software engineering problem. Expect tools, frameworks, and job titles built around it.",{"type":21,"tag":18235,"props":18882,"children":18883},{},[],{"type":21,"tag":43,"props":18885,"children":18887},{"id":18886},"_12-variational-circuit-parameterized-quantum-circuit",[18888],{"type":26,"value":18889},"12. Variational Circuit (Parameterized Quantum Circuit)",{"type":21,"tag":22,"props":18891,"children":18892},{},[18893],{"type":21,"tag":784,"props":18894,"children":18895},{},[18896],{"type":26,"value":18897},"The AI parallel: Neural network (trainable weights)",{"type":21,"tag":22,"props":18899,"children":18900},{},[18901,18902,18909,18911,18916],{"type":26,"value":8055},{"type":21,"tag":784,"props":18903,"children":18904},{},[18905],{"type":21,"tag":29,"props":18906,"children":18907},{"href":13894},[18908],{"type":26,"value":13897},{"type":26,"value":18910}," or ",{"type":21,"tag":784,"props":18912,"children":18913},{},[18914],{"type":26,"value":18915},"parameterized quantum circuit (PQC)",{"type":26,"value":18917}," is a quantum circuit with tunable rotation angles, essentially a quantum neural network layer. The parameters are adjusted by a classical optimizer to minimize a cost function.",{"type":21,"tag":22,"props":18919,"children":18920},{},[18921],{"type":26,"value":18922},"VQE uses a variational circuit as an energy estimator. QAOA uses one to encode optimization problems. As quantum machine learning develops, \"training a quantum circuit\" will become as natural a phrase as \"training a neural network.\"",{"type":21,"tag":18235,"props":18924,"children":18925},{},[],{"type":21,"tag":43,"props":18927,"children":18929},{"id":18928},"_13-quantum-volume-qv",[18930],{"type":26,"value":18931},"13. Quantum Volume (QV)",{"type":21,"tag":22,"props":18933,"children":18934},{},[18935],{"type":21,"tag":784,"props":18936,"children":18937},{},[18938],{"type":26,"value":18939},"The AI parallel: FLOPS, benchmark scores (MLPerf)",{"type":21,"tag":22,"props":18941,"children":18942},{},[18943,18950],{"type":21,"tag":784,"props":18944,"children":18945},{},[18946],{"type":21,"tag":29,"props":18947,"children":18948},{"href":8162},[18949],{"type":26,"value":8165},{"type":26,"value":18951}," is a single-number benchmark introduced by IBM that captures QPU performance holistically, accounting for qubit count, gate fidelity, connectivity, and maximum executable circuit depth simultaneously.",{"type":21,"tag":22,"props":18953,"children":18954},{},[18955],{"type":26,"value":18956},"A QPU with QV 128 (= 2^7, a 7-qubit-equivalent circuit) outperforms one with QV 64 even if the lower-QV machine has more raw qubits. It's the \"MLPerf score\" of the quantum world, a number vendors will advertise and developers will use to compare hardware.",{"type":21,"tag":18235,"props":18958,"children":18959},{},[],{"type":21,"tag":43,"props":18961,"children":18963},{"id":18962},"_14-quantum-job-quantum-queue",[18964],{"type":26,"value":18965},"14. Quantum Job \u002F Quantum Queue",{"type":21,"tag":22,"props":18967,"children":18968},{},[18969],{"type":21,"tag":784,"props":18970,"children":18971},{},[18972],{"type":26,"value":18973},"The AI parallel: Batch inference jobs, GPU queue",{"type":21,"tag":22,"props":18975,"children":18976},{},[18977,18979,18988,18990,18995],{"type":26,"value":18978},"When you submit a circuit to a real QPU, you submit a ",{"type":21,"tag":784,"props":18980,"children":18981},{},[18982],{"type":21,"tag":29,"props":18983,"children":18985},{"href":18984},"\u002Fglossary\u002Fquantum-job",[18986],{"type":26,"value":18987},"quantum job",{"type":26,"value":18989}," that enters a ",{"type":21,"tag":784,"props":18991,"children":18992},{},[18993],{"type":26,"value":18994},"quantum queue",{"type":26,"value":18996},": a scheduling system that manages access to shared hardware. IBM Quantum's free tier jobs often wait minutes or hours in queue behind paid-tier customers.",{"type":21,"tag":22,"props":18998,"children":18999},{},[19000],{"type":26,"value":19001},"\"Job throughput,\" \"queue depth,\" and \"job priority\" will become operational metrics for quantum infrastructure teams, identical in spirit to managing GPU cluster job queues today.",{"type":21,"tag":18235,"props":19003,"children":19004},{},[],{"type":21,"tag":43,"props":19006,"children":19008},{"id":19007},"_15-error-mitigation-vs-error-correction",[19009],{"type":26,"value":19010},"15. Error Mitigation vs. Error Correction",{"type":21,"tag":22,"props":19012,"children":19013},{},[19014],{"type":21,"tag":784,"props":19015,"children":19016},{},[19017],{"type":26,"value":19018},"The AI parallel: Regularization (mitigation) vs. hardware ECC (correction)",{"type":21,"tag":22,"props":19020,"children":19021},{},[19022],{"type":26,"value":19023},"This distinction matters and will be misused constantly once quantum goes mainstream.",{"type":21,"tag":22,"props":19025,"children":19026},{},[19027,19035],{"type":21,"tag":784,"props":19028,"children":19029},{},[19030],{"type":21,"tag":29,"props":19031,"children":19032},{"href":409},[19033],{"type":26,"value":19034},"Error correction",{"type":26,"value":19036},": encoding logical qubits with redundancy so errors are detected and fixed. Requires ~1,000:1 physical-to-logical qubit overhead. Not available at scale yet.",{"type":21,"tag":22,"props":19038,"children":19039},{},[19040,19047,19049,19054],{"type":21,"tag":784,"props":19041,"children":19042},{},[19043],{"type":21,"tag":29,"props":19044,"children":19045},{"href":3150},[19046],{"type":26,"value":3153},{"type":26,"value":19048},": classical post-processing techniques that statistically reduce the effect of noise ",{"type":21,"tag":103,"props":19050,"children":19051},{},[19052],{"type":26,"value":19053},"without",{"type":26,"value":19055}," physically correcting it. Zero-noise extrapolation, probabilistic error cancellation, measurement error mitigation. Available now, on NISQ hardware.",{"type":21,"tag":22,"props":19057,"children":19058},{},[19059],{"type":26,"value":19060},"When a vendor claims their QPU \"handles errors,\" always ask which one they mean.",{"type":21,"tag":18235,"props":19062,"children":19063},{},[],{"type":21,"tag":43,"props":19065,"children":19067},{"id":19066},"_16-quantum-developer-quantum-engineer",[19068],{"type":26,"value":19069},"16. Quantum Developer \u002F Quantum Engineer",{"type":21,"tag":22,"props":19071,"children":19072},{},[19073],{"type":21,"tag":784,"props":19074,"children":19075},{},[19076],{"type":26,"value":19077},"The AI parallel: ML Engineer, AI Engineer, Prompt Engineer",{"type":21,"tag":22,"props":19079,"children":19080},{},[19081,19083,19092],{"type":26,"value":19082},"Perhaps the most consequential new term: the ",{"type":21,"tag":784,"props":19084,"children":19085},{},[19086],{"type":21,"tag":29,"props":19087,"children":19089},{"href":19088},"\u002Fglossary\u002Fquantum-developer",[19090],{"type":26,"value":19091},"quantum developer",{"type":26,"value":19093},". As the \"AI engineer\" role crystallized around 2023 (distinct from both traditional software engineering and ML research), the \"quantum developer\" role is emerging around a specific skill set:",{"type":21,"tag":7925,"props":19095,"children":19096},{},[19097,19102,19107,19112],{"type":21,"tag":6142,"props":19098,"children":19099},{},[19100],{"type":26,"value":19101},"Writing circuits in frameworks like Qiskit, Cirq, or HLQuantum",{"type":21,"tag":6142,"props":19103,"children":19104},{},[19105],{"type":26,"value":19106},"Understanding hardware constraints (connectivity, noise, coherence)",{"type":21,"tag":6142,"props":19108,"children":19109},{},[19110],{"type":26,"value":19111},"Designing hybrid classical-quantum workflows",{"type":21,"tag":6142,"props":19113,"children":19114},{},[19115],{"type":26,"value":19116},"Interpreting probabilistic results and fidelity metrics",{"type":21,"tag":22,"props":19118,"children":19119},{},[19120,19122,19128],{"type":26,"value":19121},"Tools like ",{"type":21,"tag":29,"props":19123,"children":19125},{"href":19124},"\u002Fhlquantum",[19126],{"type":26,"value":19127},"HLQuantum",{"type":26,"value":19129}," (which provide a unified API across all backends) are accelerating this by letting developers write portable quantum code without deep expertise in every SDK's idiosyncrasies. The \"quantum developer\" of 2028 will likely use an abstraction layer the way today's web developer uses a framework, rather than writing raw circuits for each backend.",{"type":21,"tag":18235,"props":19131,"children":19132},{},[],{"type":21,"tag":43,"props":19134,"children":19136},{"id":19135},"the-pattern",[19137],{"type":26,"value":19138},"The Pattern",{"type":21,"tag":22,"props":19140,"children":19141},{},[19142],{"type":26,"value":19143},"Looking across these 16 terms, a pattern emerges. Every major platform shift generates:",{"type":21,"tag":6138,"props":19145,"children":19146},{},[19147,19157,19167,19177,19187,19197,19207],{"type":21,"tag":6142,"props":19148,"children":19149},{},[19150,19155],{"type":21,"tag":784,"props":19151,"children":19152},{},[19153],{"type":26,"value":19154},"A new unit of compute",{"type":26,"value":19156},": GPU → QPU, tokens → shots",{"type":21,"tag":6142,"props":19158,"children":19159},{},[19160,19165],{"type":21,"tag":784,"props":19161,"children":19162},{},[19163],{"type":26,"value":19164},"A new resource constraint",{"type":26,"value":19166},": VRAM, context window → coherence time, shot budget",{"type":21,"tag":6142,"props":19168,"children":19169},{},[19170,19175],{"type":21,"tag":784,"props":19171,"children":19172},{},[19173],{"type":26,"value":19174},"A new quality metric",{"type":26,"value":19176},": accuracy, F1 → fidelity, quantum volume",{"type":21,"tag":6142,"props":19178,"children":19179},{},[19180,19185],{"type":21,"tag":784,"props":19181,"children":19182},{},[19183],{"type":26,"value":19184},"A new compilation step",{"type":26,"value":19186},": model quantization → transpilation",{"type":21,"tag":6142,"props":19188,"children":19189},{},[19190,19195],{"type":21,"tag":784,"props":19191,"children":19192},{},[19193],{"type":26,"value":19194},"A new hybrid architecture",{"type":26,"value":19196},": CPU+GPU → classical+quantum",{"type":21,"tag":6142,"props":19198,"children":19199},{},[19200,19205],{"type":21,"tag":784,"props":19201,"children":19202},{},[19203],{"type":26,"value":19204},"A new security surface",{"type":26,"value":19206},": adversarial ML → post-quantum cryptography",{"type":21,"tag":6142,"props":19208,"children":19209},{},[19210,19215],{"type":21,"tag":784,"props":19211,"children":19212},{},[19213],{"type":26,"value":19214},"A new job title",{"type":26,"value":19216},": ML engineer → quantum engineer",{"type":21,"tag":22,"props":19218,"children":19219},{},[19220],{"type":26,"value":19221},"The quantum computing vocabulary isn't only jargon. It maps directly to real engineering constraints, real tradeoffs, and real opportunities. Learning it before the mainstream wave arrives is the same bet early cloud engineers made when they started caring about \"latency\" and \"throughput\" before most developers did.",{"type":21,"tag":22,"props":19223,"children":19224},{},[19225],{"type":26,"value":19226},"The best time to start was five years ago. The second best time is now, while the hardware is still free to access and the learning curve is lowest.",{"type":21,"tag":22,"props":19228,"children":19229},{},[19230,19235,19236,19241,19242],{"type":21,"tag":784,"props":19231,"children":19232},{},[19233],{"type":26,"value":19234},"Start here:",{"type":26,"value":790},{"type":21,"tag":29,"props":19237,"children":19238},{"href":150},[19239],{"type":26,"value":19240},"Run your first quantum circuit for free →",{"type":26,"value":6244},{"type":21,"tag":29,"props":19243,"children":19244},{"href":7982},[19245],{"type":26,"value":19246},"Full glossary of quantum terms",{"type":21,"tag":2445,"props":19248,"children":19249},{},[19250],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":19252},[19253,19254,19255,19256,19257,19258,19259,19260,19261,19262,19263,19264,19265,19266,19267,19268,19269],{"id":18240,"depth":164,"text":18243},{"id":18298,"depth":164,"text":18301},{"id":18358,"depth":164,"text":18361},{"id":18416,"depth":164,"text":18419},{"id":18459,"depth":164,"text":18462},{"id":18586,"depth":164,"text":18589},{"id":18655,"depth":164,"text":18658},{"id":18693,"depth":164,"text":18696},{"id":18727,"depth":164,"text":18730},{"id":18793,"depth":164,"text":18796},{"id":18849,"depth":164,"text":18852},{"id":18886,"depth":164,"text":18889},{"id":18928,"depth":164,"text":18931},{"id":18962,"depth":164,"text":18965},{"id":19007,"depth":164,"text":19010},{"id":19066,"depth":164,"text":19069},{"id":19135,"depth":164,"text":19138},"content:blog:quantum-computing-new-vocabulary.md","blog\u002Fquantum-computing-new-vocabulary.md","blog\u002Fquantum-computing-new-vocabulary",{"_path":19274,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":19275,"description":19276,"date":19277,"author":11,"tags":19278,"readingTime":853,"body":19279,"_type":171,"_id":20331,"_source":173,"_file":20332,"_stem":20333,"_extension":176},"\u002Fblog\u002Fquantum-use-cases-2026","What Quantum Computers Do in 2026","A realistic look at which quantum computing applications are production-ready now, which are near-term, and which remain long-term research goals, separating genuine progress from hype.","2026-03-12",[287,1778,6280],{"type":18,"children":19280,"toc":20311},[19281,19286,19291,19297,19302,19339,19344,19347,19353,19359,19381,19391,19401,19411,19421,19586,19589,19595,19604,19620,19629,19639,19648,19651,19657,19666,19683,19692,19709,19712,19718,19727,19748,19765,19781,19784,19790,19796,19805,19814,19824,19834,19837,19843,19868,19877,19886,19889,19895,19904,19913,19922,19931,19934,19940,19946,19955,19965,19975,19991,19994,20000,20009,20018,20027,20030,20036,20045,20054,20063,20066,20072,20238,20265,20276,20281,20307],{"type":21,"tag":22,"props":19282,"children":19283},{},[19284],{"type":26,"value":19285},"\"Quantum computers will transform drug discovery, break all encryption, and solve climate change.\" You've heard the pitch. Now here's the honest answer: what do quantum computers do in 2026, on the hardware that exists today?",{"type":21,"tag":22,"props":19287,"children":19288},{},[19289],{"type":26,"value":19290},"The honest answer is nuanced, and more interesting than either the hype or the skepticism suggests.",{"type":21,"tag":43,"props":19292,"children":19294},{"id":19293},"how-to-think-about-quantum-readiness",[19295],{"type":26,"value":19296},"How to Think About Quantum Readiness",{"type":21,"tag":22,"props":19298,"children":19299},{},[19300],{"type":26,"value":19301},"Quantum applications fall into three categories:",{"type":21,"tag":7925,"props":19303,"children":19304},{},[19305,19319,19329],{"type":21,"tag":6142,"props":19306,"children":19307},{},[19308,19317],{"type":21,"tag":784,"props":19309,"children":19310},{},[19311,19315],{"type":21,"tag":29,"props":19312,"children":19313},{"href":120},[19314],{"type":26,"value":2016},{"type":26,"value":19316},"-era applications (now):",{"type":26,"value":19318}," Algorithms that work on today's noisy 50–1000 qubit hardware with limited circuit depth. Results are often approximate. Value is exploratory or demonstrational.",{"type":21,"tag":6142,"props":19320,"children":19321},{},[19322,19327],{"type":21,"tag":784,"props":19323,"children":19324},{},[19325],{"type":26,"value":19326},"Near-term applications (2–7 years):",{"type":26,"value":19328}," Require modest error correction: hundreds to a few thousand logical qubits. Practical speedups for specific problem instances begin to appear.",{"type":21,"tag":6142,"props":19330,"children":19331},{},[19332,19337],{"type":21,"tag":784,"props":19333,"children":19334},{},[19335],{"type":26,"value":19336},"Long-term applications (7–20+ years):",{"type":26,"value":19338}," Require millions of physical qubits and full fault tolerance. Transformational impact.",{"type":21,"tag":22,"props":19340,"children":19341},{},[19342],{"type":26,"value":19343},"The gap between hype and reality mostly comes from confusing these three categories.",{"type":21,"tag":18235,"props":19345,"children":19346},{},[],{"type":21,"tag":43,"props":19348,"children":19350},{"id":19349},"what-works-now-nisq-era",[19351],{"type":26,"value":19352},"What Works Now (NISQ Era)",{"type":21,"tag":17419,"props":19354,"children":19356},{"id":19355},"quantum-chemistry-simulation-limited-molecules",[19357],{"type":26,"value":19358},"Quantum Chemistry Simulation: Limited Molecules",{"type":21,"tag":22,"props":19360,"children":19361},{},[19362,19367,19369,19373,19375,19380],{"type":21,"tag":784,"props":19363,"children":19364},{},[19365],{"type":26,"value":19366},"What:",{"type":26,"value":19368}," Simulating the ground state energy of small molecules using ",{"type":21,"tag":29,"props":19370,"children":19371},{"href":31},[19372],{"type":26,"value":14},{"type":26,"value":19374},", the application ",{"type":21,"tag":29,"props":19376,"children":19377},{"href":54},[19378],{"type":26,"value":19379},"Feynman proposed quantum computers for in the first place",{"type":26,"value":237},{"type":21,"tag":22,"props":19382,"children":19383},{},[19384,19389],{"type":21,"tag":784,"props":19385,"children":19386},{},[19387],{"type":26,"value":19388},"Demonstrated:",{"type":26,"value":19390}," IBM and others have computed ground state energies for H₂, LiH, BeH₂, and small hydrocarbons on real QPUs. Results agree with classical methods for 4–12 qubit problems.",{"type":21,"tag":22,"props":19392,"children":19393},{},[19394,19399],{"type":21,"tag":784,"props":19395,"children":19396},{},[19397],{"type":26,"value":19398},"Practical value now:",{"type":26,"value":19400}," Research and benchmarking. For molecules that classical computers also simulate exactly, there's no advantage, but the methods are being validated.",{"type":21,"tag":22,"props":19402,"children":19403},{},[19404,19409],{"type":21,"tag":784,"props":19405,"children":19406},{},[19407],{"type":26,"value":19408},"Bottleneck:",{"type":26,"value":19410}," Scaling to molecules with practical pharmaceutical relevance (50+ atoms) requires 100s of logical qubits. Not possible on current noisy hardware.",{"type":21,"tag":22,"props":19412,"children":19413},{},[19414,19419],{"type":21,"tag":784,"props":19415,"children":19416},{},[19417],{"type":26,"value":19418},"Who's doing it:",{"type":26,"value":19420}," IBM Quantum, IonQ (for drug discovery partnerships), Quantinuum.",{"type":21,"tag":2062,"props":19422,"children":19424},{"className":3362,"code":19423,"language":3361,"meta":7,"style":7},"import hlquantum as hlq\n\n# VQE for H2 (works today, results match classical)\nresult = hlq.algorithms.vqe(molecule='H2', basis='sto-3g', backend='qiskit')\nprint(f\"Ground state: {result.energy:.4f} Ha\")  # -1.1372 Ha\n",[19425],{"type":21,"tag":1831,"props":19426,"children":19427},{"__ignoreMap":7},[19428,19449,19456,19464,19534],{"type":21,"tag":2072,"props":19429,"children":19430},{"class":2074,"line":2075},[19431,19435,19440,19444],{"type":21,"tag":2072,"props":19432,"children":19433},{"style":3372},[19434],{"type":26,"value":3375},{"type":21,"tag":2072,"props":19436,"children":19437},{"style":2079},[19438],{"type":26,"value":19439}," hlquantum ",{"type":21,"tag":2072,"props":19441,"children":19442},{"style":3372},[19443],{"type":26,"value":3385},{"type":21,"tag":2072,"props":19445,"children":19446},{"style":2079},[19447],{"type":26,"value":19448}," hlq\n",{"type":21,"tag":2072,"props":19450,"children":19451},{"class":2074,"line":164},[19452],{"type":21,"tag":2072,"props":19453,"children":19454},{"emptyLinePlaceholder":3460},[19455],{"type":26,"value":3463},{"type":21,"tag":2072,"props":19457,"children":19458},{"class":2074,"line":2093},[19459],{"type":21,"tag":2072,"props":19460,"children":19461},{"style":3985},[19462],{"type":26,"value":19463},"# VQE for H2 (works today, results match classical)\n",{"type":21,"tag":2072,"props":19465,"children":19466},{"class":2074,"line":2155},[19467,19472,19476,19481,19486,19490,19495,19499,19504,19508,19513,19517,19521,19525,19530],{"type":21,"tag":2072,"props":19468,"children":19469},{"style":2079},[19470],{"type":26,"value":19471},"result ",{"type":21,"tag":2072,"props":19473,"children":19474},{"style":3372},[19475],{"type":26,"value":3487},{"type":21,"tag":2072,"props":19477,"children":19478},{"style":2079},[19479],{"type":26,"value":19480}," hlq.algorithms.vqe(",{"type":21,"tag":2072,"props":19482,"children":19483},{"style":3735},[19484],{"type":26,"value":19485},"molecule",{"type":21,"tag":2072,"props":19487,"children":19488},{"style":3372},[19489],{"type":26,"value":3487},{"type":21,"tag":2072,"props":19491,"children":19492},{"style":2108},[19493],{"type":26,"value":19494},"'H2'",{"type":21,"tag":2072,"props":19496,"children":19497},{"style":2079},[19498],{"type":26,"value":798},{"type":21,"tag":2072,"props":19500,"children":19501},{"style":3735},[19502],{"type":26,"value":19503},"basis",{"type":21,"tag":2072,"props":19505,"children":19506},{"style":3372},[19507],{"type":26,"value":3487},{"type":21,"tag":2072,"props":19509,"children":19510},{"style":2108},[19511],{"type":26,"value":19512},"'sto-3g'",{"type":21,"tag":2072,"props":19514,"children":19515},{"style":2079},[19516],{"type":26,"value":798},{"type":21,"tag":2072,"props":19518,"children":19519},{"style":3735},[19520],{"type":26,"value":18550},{"type":21,"tag":2072,"props":19522,"children":19523},{"style":3372},[19524],{"type":26,"value":3487},{"type":21,"tag":2072,"props":19526,"children":19527},{"style":2108},[19528],{"type":26,"value":19529},"'qiskit'",{"type":21,"tag":2072,"props":19531,"children":19532},{"style":2079},[19533],{"type":26,"value":4281},{"type":21,"tag":2072,"props":19535,"children":19536},{"class":2074,"line":2178},[19537,19541,19545,19549,19554,19558,19563,19567,19571,19576,19581],{"type":21,"tag":2072,"props":19538,"children":19539},{"style":2097},[19540],{"type":26,"value":4614},{"type":21,"tag":2072,"props":19542,"children":19543},{"style":2079},[19544],{"type":26,"value":3879},{"type":21,"tag":2072,"props":19546,"children":19547},{"style":3372},[19548],{"type":26,"value":3938},{"type":21,"tag":2072,"props":19550,"children":19551},{"style":2108},[19552],{"type":26,"value":19553},"\"Ground state: ",{"type":21,"tag":2072,"props":19555,"children":19556},{"style":2097},[19557],{"type":26,"value":3948},{"type":21,"tag":2072,"props":19559,"children":19560},{"style":2079},[19561],{"type":26,"value":19562},"result.energy",{"type":21,"tag":2072,"props":19564,"children":19565},{"style":3372},[19566],{"type":26,"value":10733},{"type":21,"tag":2072,"props":19568,"children":19569},{"style":2097},[19570],{"type":26,"value":3958},{"type":21,"tag":2072,"props":19572,"children":19573},{"style":2108},[19574],{"type":26,"value":19575}," Ha\"",{"type":21,"tag":2072,"props":19577,"children":19578},{"style":2079},[19579],{"type":26,"value":19580},")  ",{"type":21,"tag":2072,"props":19582,"children":19583},{"style":3985},[19584],{"type":26,"value":19585},"# -1.1372 Ha\n",{"type":21,"tag":18235,"props":19587,"children":19588},{},[],{"type":21,"tag":17419,"props":19590,"children":19592},{"id":19591},"quantum-machine-learning-proof-of-concept",[19593],{"type":26,"value":19594},"Quantum Machine Learning: Proof of Concept",{"type":21,"tag":22,"props":19596,"children":19597},{},[19598,19602],{"type":21,"tag":784,"props":19599,"children":19600},{},[19601],{"type":26,"value":19366},{"type":26,"value":19603}," Quantum neural networks (QNNs) and quantum kernel methods for classification.",{"type":21,"tag":22,"props":19605,"children":19606},{},[19607,19611,19613,19618],{"type":21,"tag":784,"props":19608,"children":19609},{},[19610],{"type":26,"value":19388},{"type":26,"value":19612}," Quantum kernels have been shown to work on toy datasets. No quantum advantage over classical ML has been demonstrated for practical datasets. See our ",{"type":21,"tag":29,"props":19614,"children":19615},{"href":13841},[19616],{"type":26,"value":19617},"QML reality check",{"type":26,"value":19619}," for the evidence.",{"type":21,"tag":22,"props":19621,"children":19622},{},[19623,19627],{"type":21,"tag":784,"props":19624,"children":19625},{},[19626],{"type":26,"value":19398},{"type":26,"value":19628}," Research. The \"no free lunch\" problem applies: quantum advantage in QML, if it exists, will be for specific data with specific quantum structure.",{"type":21,"tag":22,"props":19630,"children":19631},{},[19632,19637],{"type":21,"tag":784,"props":19633,"children":19634},{},[19635],{"type":26,"value":19636},"Realistic use case emerging:",{"type":26,"value":19638}," Quantum kernels for datasets that arise from quantum physics experiments sometimes have inherent quantum structure that quantum ML exploits better than classical methods.",{"type":21,"tag":22,"props":19640,"children":19641},{},[19642,19646],{"type":21,"tag":784,"props":19643,"children":19644},{},[19645],{"type":26,"value":19418},{"type":26,"value":19647}," PennyLane\u002FXanadu (QML focus), IBM, Google (Quantum AI).",{"type":21,"tag":18235,"props":19649,"children":19650},{},[],{"type":21,"tag":17419,"props":19652,"children":19654},{"id":19653},"optimization-benchmarking-qaoa",[19655],{"type":26,"value":19656},"Optimization Benchmarking (QAOA)",{"type":21,"tag":22,"props":19658,"children":19659},{},[19660,19664],{"type":21,"tag":784,"props":19661,"children":19662},{},[19663],{"type":26,"value":19366},{"type":26,"value":19665}," QAOA applied to Max-Cut, portfolio optimization, vehicle routing.",{"type":21,"tag":22,"props":19667,"children":19668},{},[19669,19673,19675,19681],{"type":21,"tag":784,"props":19670,"children":19671},{},[19672],{"type":26,"value":19388},{"type":26,"value":19674}," QAOA circuits have been run on real hardware. At ",{"type":21,"tag":1831,"props":19676,"children":19678},{"className":19677},[],[19679],{"type":26,"value":19680},"p=1",{"type":26,"value":19682},", approximation ratios of ~0.75 on Max-Cut are achievable on NISQ devices.",{"type":21,"tag":22,"props":19684,"children":19685},{},[19686,19690],{"type":21,"tag":784,"props":19687,"children":19688},{},[19689],{"type":26,"value":19398},{"type":26,"value":19691}," Not competitive with classical solvers (simulated annealing, GUROBI) for real problem sizes. Valuable for research and hardware benchmarking.",{"type":21,"tag":22,"props":19693,"children":19694},{},[19695,19700,19702,19707],{"type":21,"tag":784,"props":19696,"children":19697},{},[19698],{"type":26,"value":19699},"When it matters:",{"type":26,"value":19701}," At ",{"type":21,"tag":1831,"props":19703,"children":19705},{"className":19704},[],[19706],{"type":26,"value":22},{"type":26,"value":19708}," large enough for significant advantage, circuits are too deep for NISQ devices. Need error correction.",{"type":21,"tag":18235,"props":19710,"children":19711},{},[],{"type":21,"tag":17419,"props":19713,"children":19715},{"id":19714},"random-circuit-sampling-quantum-supremacy-claims",[19716],{"type":26,"value":19717},"Random Circuit Sampling (Quantum Supremacy Claims)",{"type":21,"tag":22,"props":19719,"children":19720},{},[19721,19725],{"type":21,"tag":784,"props":19722,"children":19723},{},[19724],{"type":26,"value":19366},{"type":26,"value":19726}," Sampling from random quantum circuits.",{"type":21,"tag":22,"props":19728,"children":19729},{},[19730,19734,19735,19740,19741,19746],{"type":21,"tag":784,"props":19731,"children":19732},{},[19733],{"type":26,"value":19388},{"type":26,"value":790},{"type":21,"tag":29,"props":19736,"children":19737},{"href":937},[19738],{"type":26,"value":19739},"Google (2019, Sycamore)",{"type":26,"value":798},{"type":21,"tag":29,"props":19742,"children":19743},{"href":945},[19744],{"type":26,"value":19745},"IBM (2023, Eagle)",{"type":26,"value":19747},", Chinese groups (2020, 2021).",{"type":21,"tag":22,"props":19749,"children":19750},{},[19751,19756,19758,19763],{"type":21,"tag":784,"props":19752,"children":19753},{},[19754],{"type":26,"value":19755},"Practical value:",{"type":26,"value":19757}," None currently. Random circuit sampling has no known application. It's a hardware benchmark demonstrating that quantum devices do ",{"type":21,"tag":103,"props":19759,"children":19760},{},[19761],{"type":26,"value":19762},"something",{"type":26,"value":19764}," that classical computers struggle to simulate.",{"type":21,"tag":22,"props":19766,"children":19767},{},[19768,19773,19775,19779],{"type":21,"tag":784,"props":19769,"children":19770},{},[19771],{"type":26,"value":19772},"Why it matters:",{"type":26,"value":19774}," Validates that quantum hardware is operating correctly and that classical simulation is becoming intractable for certain circuit sizes. It's also where the term ",{"type":21,"tag":29,"props":19776,"children":19777},{"href":6253},[19778],{"type":26,"value":948},{"type":26,"value":19780}," came from: a deliberately weaker, more defensible claim than full quantum advantage.",{"type":21,"tag":18235,"props":19782,"children":19783},{},[],{"type":21,"tag":43,"props":19785,"children":19787},{"id":19786},"whats-near-term-27-years",[19788],{"type":26,"value":19789},"What's Near-Term (2–7 Years)",{"type":21,"tag":17419,"props":19791,"children":19793},{"id":19792},"quantum-assisted-drug-discovery",[19794],{"type":26,"value":19795},"Quantum-Assisted Drug Discovery",{"type":21,"tag":22,"props":19797,"children":19798},{},[19799,19803],{"type":21,"tag":784,"props":19800,"children":19801},{},[19802],{"type":26,"value":19366},{"type":26,"value":19804}," Using quantum simulation to model protein-ligand binding energies, predicting which drug candidates are worth synthesizing.",{"type":21,"tag":22,"props":19806,"children":19807},{},[19808,19812],{"type":21,"tag":784,"props":19809,"children":19810},{},[19811],{"type":26,"value":19772},{"type":26,"value":19813}," Drug discovery costs ~$2.5 billion per approved drug. Reducing failed clinical trials by better computational screening is enormously valuable.",{"type":21,"tag":22,"props":19815,"children":19816},{},[19817,19822],{"type":21,"tag":784,"props":19818,"children":19819},{},[19820],{"type":26,"value":19821},"Current state:",{"type":26,"value":19823}," IBM and pharmaceutical partners (Pfizer, AstraZeneca, JSR) are running VQE on molecules up to ~50 qubits on quantum hardware. Still demonstrational. Classical methods remain more accurate for commercially relevant molecules.",{"type":21,"tag":22,"props":19825,"children":19826},{},[19827,19832],{"type":21,"tag":784,"props":19828,"children":19829},{},[19830],{"type":26,"value":19831},"When it becomes real:",{"type":26,"value":19833}," When logical qubit counts reach ~1,000–5,000. Then quantum simulation outperforms classical methods for key molecular classes. Current estimates: 5–10 years.",{"type":21,"tag":18235,"props":19835,"children":19836},{},[],{"type":21,"tag":17419,"props":19838,"children":19840},{"id":19839},"quantum-finance-monte-carlo-speedup",[19841],{"type":26,"value":19842},"Quantum Finance: Monte Carlo Speedup",{"type":21,"tag":22,"props":19844,"children":19845},{},[19846,19850,19852,19858,19860,19866],{"type":21,"tag":784,"props":19847,"children":19848},{},[19849],{"type":26,"value":19366},{"type":26,"value":19851}," Quantum amplitude estimation theoretically speeds up Monte Carlo integration from ",{"type":21,"tag":1831,"props":19853,"children":19855},{"className":19854},[],[19856],{"type":26,"value":19857},"O(1\u002Fε²)",{"type":26,"value":19859}," to ",{"type":21,"tag":1831,"props":19861,"children":19863},{"className":19862},[],[19864],{"type":26,"value":19865},"O(1\u002Fε)",{"type":26,"value":19867},", a quadratic speedup that matters enormously for option pricing and risk simulation.",{"type":21,"tag":22,"props":19869,"children":19870},{},[19871,19875],{"type":21,"tag":784,"props":19872,"children":19873},{},[19874],{"type":26,"value":19821},{"type":26,"value":19876}," Goldman Sachs, JPMorgan, and BBVA are actively researching this. Small-scale demonstrations have been done. Not yet production-scale.",{"type":21,"tag":22,"props":19878,"children":19879},{},[19880,19884],{"type":21,"tag":784,"props":19881,"children":19882},{},[19883],{"type":26,"value":19831},{"type":26,"value":19885}," Modest fault tolerance (thousands of logical qubits) is needed. Estimates range from 5–15 years for practical financial speedups.",{"type":21,"tag":18235,"props":19887,"children":19888},{},[],{"type":21,"tag":17419,"props":19890,"children":19892},{"id":19891},"materials-science-battery-and-solar-cell-design",[19893],{"type":26,"value":19894},"Materials Science: Battery and Solar Cell Design",{"type":21,"tag":22,"props":19896,"children":19897},{},[19898,19902],{"type":21,"tag":784,"props":19899,"children":19900},{},[19901],{"type":26,"value":19366},{"type":26,"value":19903}," Quantum simulation of candidate materials for lithium-air batteries, nitrogen fixation catalysts (replacing the Haber-Bosch process), and photovoltaic materials.",{"type":21,"tag":22,"props":19905,"children":19906},{},[19907,19911],{"type":21,"tag":784,"props":19908,"children":19909},{},[19910],{"type":26,"value":19772},{"type":26,"value":19912}," Better batteries = EV revolution. Efficient N₂ fixation = dramatically reduced fertilizer energy use (currently 1–2% of global energy consumption). These are trillion-dollar problems.",{"type":21,"tag":22,"props":19914,"children":19915},{},[19916,19920],{"type":21,"tag":784,"props":19917,"children":19918},{},[19919],{"type":26,"value":19821},{"type":26,"value":19921}," Microsoft (StationQ), IBM, and startups like QunaSys and Good Chemistry are pursuing this. Early-stage research.",{"type":21,"tag":22,"props":19923,"children":19924},{},[19925,19929],{"type":21,"tag":784,"props":19926,"children":19927},{},[19928],{"type":26,"value":19831},{"type":26,"value":19930}," 5–20 years, depending on target accuracy and molecule size.",{"type":21,"tag":18235,"props":19932,"children":19933},{},[],{"type":21,"tag":43,"props":19935,"children":19937},{"id":19936},"what-requires-full-fault-tolerance-720-years",[19938],{"type":26,"value":19939},"What Requires Full Fault Tolerance (7–20+ Years)",{"type":21,"tag":17419,"props":19941,"children":19943},{"id":19942},"breaking-rsaecc-with-shors-algorithm",[19944],{"type":26,"value":19945},"Breaking RSA\u002FECC with Shor's Algorithm",{"type":21,"tag":22,"props":19947,"children":19948},{},[19949,19953],{"type":21,"tag":784,"props":19950,"children":19951},{},[19952],{"type":26,"value":19366},{"type":26,"value":19954}," Factoring the large primes underlying RSA-2048.",{"type":21,"tag":22,"props":19956,"children":19957},{},[19958,19963],{"type":21,"tag":784,"props":19959,"children":19960},{},[19961],{"type":26,"value":19962},"Required:",{"type":26,"value":19964}," ~4,000 logical qubits (each requiring ~1,000 physical qubits = ~4 million physical qubits). Current state: hundreds of physical qubits, still noisy.",{"type":21,"tag":22,"props":19966,"children":19967},{},[19968,19973],{"type":21,"tag":784,"props":19969,"children":19970},{},[19971],{"type":26,"value":19972},"Timeline:",{"type":26,"value":19974}," Most estimates put RSA-threatening quantum computers at 2030–2040. Some say never. The engineering challenges are potentially unsolvable at this scale.",{"type":21,"tag":22,"props":19976,"children":19977},{},[19978,19983,19984,19989],{"type":21,"tag":784,"props":19979,"children":19980},{},[19981],{"type":26,"value":19982},"What to do now:",{"type":26,"value":790},{"type":21,"tag":29,"props":19985,"children":19986},{"href":8518},[19987],{"type":26,"value":19988},"Migrate to post-quantum cryptography",{"type":26,"value":19990}," regardless of timeline. The transition takes years, and HNDL attacks are happening now.",{"type":21,"tag":18235,"props":19992,"children":19993},{},[],{"type":21,"tag":17419,"props":19995,"children":19997},{"id":19996},"grovers-search-at-scale",[19998],{"type":26,"value":19999},"Grover's Search at Scale",{"type":21,"tag":22,"props":20001,"children":20002},{},[20003,20007],{"type":21,"tag":784,"props":20004,"children":20005},{},[20006],{"type":26,"value":19366},{"type":26,"value":20008}," Quadratic speedup for searching unsorted databases, solving NP-hard problems.",{"type":21,"tag":22,"props":20010,"children":20011},{},[20012,20016],{"type":21,"tag":784,"props":20013,"children":20014},{},[20015],{"type":26,"value":19962},{"type":26,"value":20017}," Deep, error-corrected circuits. Quadratic speedup means √N is still enormous for large N, and the constant factors must favor quantum hardware.",{"type":21,"tag":22,"props":20019,"children":20020},{},[20021,20025],{"type":21,"tag":784,"props":20022,"children":20023},{},[20024],{"type":26,"value":19972},{"type":26,"value":20026}," Long-term research.",{"type":21,"tag":18235,"props":20028,"children":20029},{},[],{"type":21,"tag":17419,"props":20031,"children":20033},{"id":20032},"climate-modeling-and-fluid-dynamics",[20034],{"type":26,"value":20035},"Climate Modeling and Fluid Dynamics",{"type":21,"tag":22,"props":20037,"children":20038},{},[20039,20043],{"type":21,"tag":784,"props":20040,"children":20041},{},[20042],{"type":26,"value":19366},{"type":26,"value":20044}," Quantum algorithms for solving differential equations (the HHL algorithm) are proposed to accelerate climate simulations, fluid dynamics, and financial modeling.",{"type":21,"tag":22,"props":20046,"children":20047},{},[20048,20052],{"type":21,"tag":784,"props":20049,"children":20050},{},[20051],{"type":26,"value":19962},{"type":26,"value":20053}," Full fault tolerance. The HHL algorithm has enormous overhead that makes practical advantage far from clear even in theory.",{"type":21,"tag":22,"props":20055,"children":20056},{},[20057,20061],{"type":21,"tag":784,"props":20058,"children":20059},{},[20060],{"type":26,"value":19972},{"type":26,"value":20062}," This is the most speculative category. Quantum advantage for PDE solving remains unproven in practice.",{"type":21,"tag":18235,"props":20064,"children":20065},{},[],{"type":21,"tag":43,"props":20067,"children":20069},{"id":20068},"the-honest-bottom-line",[20070],{"type":26,"value":20071},"The Honest Bottom Line",{"type":21,"tag":3169,"props":20073,"children":20074},{},[20075,20096],{"type":21,"tag":3173,"props":20076,"children":20077},{},[20078],{"type":21,"tag":3177,"props":20079,"children":20080},{},[20081,20086,20091],{"type":21,"tag":3181,"props":20082,"children":20083},{},[20084],{"type":26,"value":20085},"Application",{"type":21,"tag":3181,"props":20087,"children":20088},{},[20089],{"type":26,"value":20090},"Quantum advantage today?",{"type":21,"tag":3181,"props":20092,"children":20093},{},[20094],{"type":26,"value":20095},"Horizon",{"type":21,"tag":3195,"props":20097,"children":20098},{},[20099,20117,20135,20152,20170,20188,20204,20221],{"type":21,"tag":3177,"props":20100,"children":20101},{},[20102,20107,20112],{"type":21,"tag":3202,"props":20103,"children":20104},{},[20105],{"type":26,"value":20106},"Random circuit sampling",{"type":21,"tag":3202,"props":20108,"children":20109},{},[20110],{"type":26,"value":20111},"Marginal, no application",{"type":21,"tag":3202,"props":20113,"children":20114},{},[20115],{"type":26,"value":20116},"Now (research only)",{"type":21,"tag":3177,"props":20118,"children":20119},{},[20120,20125,20130],{"type":21,"tag":3202,"props":20121,"children":20122},{},[20123],{"type":26,"value":20124},"VQE for small molecules",{"type":21,"tag":3202,"props":20126,"children":20127},{},[20128],{"type":26,"value":20129},"No classical advantage",{"type":21,"tag":3202,"props":20131,"children":20132},{},[20133],{"type":26,"value":20134},"3–5 years for useful molecules",{"type":21,"tag":3177,"props":20136,"children":20137},{},[20138,20143,20147],{"type":21,"tag":3202,"props":20139,"children":20140},{},[20141],{"type":26,"value":20142},"QAOA for optimization",{"type":21,"tag":3202,"props":20144,"children":20145},{},[20146],{"type":26,"value":20129},{"type":21,"tag":3202,"props":20148,"children":20149},{},[20150],{"type":26,"value":20151},"5–10 years",{"type":21,"tag":3177,"props":20153,"children":20154},{},[20155,20160,20165],{"type":21,"tag":3202,"props":20156,"children":20157},{},[20158],{"type":26,"value":20159},"QML \u002F quantum kernels",{"type":21,"tag":3202,"props":20161,"children":20162},{},[20163],{"type":26,"value":20164},"No advantage for real data",{"type":21,"tag":3202,"props":20166,"children":20167},{},[20168],{"type":26,"value":20169},"Uncertain",{"type":21,"tag":3177,"props":20171,"children":20172},{},[20173,20178,20183],{"type":21,"tag":3202,"props":20174,"children":20175},{},[20176],{"type":26,"value":20177},"Drug discovery",{"type":21,"tag":3202,"props":20179,"children":20180},{},[20181],{"type":26,"value":20182},"No",{"type":21,"tag":3202,"props":20184,"children":20185},{},[20186],{"type":26,"value":20187},"7–10 years",{"type":21,"tag":3177,"props":20189,"children":20190},{},[20191,20196,20200],{"type":21,"tag":3202,"props":20192,"children":20193},{},[20194],{"type":26,"value":20195},"Finance (Monte Carlo)",{"type":21,"tag":3202,"props":20197,"children":20198},{},[20199],{"type":26,"value":20182},{"type":21,"tag":3202,"props":20201,"children":20202},{},[20203],{"type":26,"value":20151},{"type":21,"tag":3177,"props":20205,"children":20206},{},[20207,20212,20216],{"type":21,"tag":3202,"props":20208,"children":20209},{},[20210],{"type":26,"value":20211},"Materials simulation",{"type":21,"tag":3202,"props":20213,"children":20214},{},[20215],{"type":26,"value":20182},{"type":21,"tag":3202,"props":20217,"children":20218},{},[20219],{"type":26,"value":20220},"7–15 years",{"type":21,"tag":3177,"props":20222,"children":20223},{},[20224,20229,20233],{"type":21,"tag":3202,"props":20225,"children":20226},{},[20227],{"type":26,"value":20228},"Cryptography (Shor's)",{"type":21,"tag":3202,"props":20230,"children":20231},{},[20232],{"type":26,"value":20182},{"type":21,"tag":3202,"props":20234,"children":20235},{},[20236],{"type":26,"value":20237},"10–20+ years",{"type":21,"tag":22,"props":20239,"children":20240},{},[20241,20243,20248,20250,20255,20257,20263],{"type":26,"value":20242},"The most immediate quantum value is ",{"type":21,"tag":784,"props":20244,"children":20245},{},[20246],{"type":26,"value":20247},"not",{"type":26,"value":20249}," in running algorithms. It's in ",{"type":21,"tag":784,"props":20251,"children":20252},{},[20253],{"type":26,"value":20254},"learning the field early",{"type":26,"value":20256},". Our ",{"type":21,"tag":29,"props":20258,"children":20260},{"href":20259},"\u002Fguides\u002Fquantum-computing-learning-path-2026",[20261],{"type":26,"value":20262},"learning path",{"type":26,"value":20264}," lays out a sequence for doing that. Companies like IBM, Google, NVIDIA, AWS, IonQ, and dozens of startups are hiring quantum engineers. The skill set (circuit design, variational algorithms, quantum-classical hybrid workflows) is genuinely rare. That gap will close, and the people who learned early will be well positioned.",{"type":21,"tag":22,"props":20266,"children":20267},{},[20268,20270,20274],{"type":26,"value":20269},"The second most immediate value is ",{"type":21,"tag":784,"props":20271,"children":20272},{},[20273],{"type":26,"value":8501},{"type":26,"value":20275},": a classical software problem with a quantum threat, and where the action required is clear and urgent.",{"type":21,"tag":22,"props":20277,"children":20278},{},[20279],{"type":26,"value":20280},"For everything else: the hardware is real, the progress is genuine, the hype is premature, and the trajectory is steep.",{"type":21,"tag":22,"props":20282,"children":20283},{},[20284,20289,20290,20295,20296,20301,20302],{"type":21,"tag":784,"props":20285,"children":20286},{},[20287],{"type":26,"value":20288},"Explore the hardware:",{"type":26,"value":790},{"type":21,"tag":29,"props":20291,"children":20292},{"href":590},[20293],{"type":26,"value":20294},"Free QPU access",{"type":26,"value":6244},{"type":21,"tag":29,"props":20297,"children":20298},{"href":150},[20299],{"type":26,"value":20300},"Compare all simulators",{"type":26,"value":6244},{"type":21,"tag":29,"props":20303,"children":20304},{"href":11566},[20305],{"type":26,"value":20306},"Quantum use cases deep dive",{"type":21,"tag":2445,"props":20308,"children":20309},{},[20310],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":20312},[20313,20314,20320,20325,20330],{"id":19293,"depth":164,"text":19296},{"id":19349,"depth":164,"text":19352,"children":20315},[20316,20317,20318,20319],{"id":19355,"depth":2093,"text":19358},{"id":19591,"depth":2093,"text":19594},{"id":19653,"depth":2093,"text":19656},{"id":19714,"depth":2093,"text":19717},{"id":19786,"depth":164,"text":19789,"children":20321},[20322,20323,20324],{"id":19792,"depth":2093,"text":19795},{"id":19839,"depth":2093,"text":19842},{"id":19891,"depth":2093,"text":19894},{"id":19936,"depth":164,"text":19939,"children":20326},[20327,20328,20329],{"id":19942,"depth":2093,"text":19945},{"id":19996,"depth":2093,"text":19999},{"id":20032,"depth":2093,"text":20035},{"id":20068,"depth":164,"text":20071},"content:blog:quantum-use-cases-2026.md","blog\u002Fquantum-use-cases-2026.md","blog\u002Fquantum-use-cases-2026",{"_path":10987,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":20335,"description":20336,"date":20337,"author":11,"tags":20338,"readingTime":288,"body":20340,"_type":171,"_id":21219,"_source":173,"_file":21220,"_stem":21221,"_extension":176},"Getting Started with Free Quantum Computing in 2026","A complete beginner's guide to running your first quantum circuit for free, no expensive hardware, no paid subscriptions.","2026-03-10",[6281,20339,852],"Simulators",{"type":18,"children":20341,"toc":21211},[20342,20347,20353,20358,20391,20396,20402,20407,20432,20457,20667,20700,20706,20711,20785,20805,20811,20830,20857,20943,20951,20956,20962,21076,21087,21093,21098,21153,21186,21189,21207],{"type":21,"tag":22,"props":20343,"children":20344},{},[20345],{"type":26,"value":20346},"Quantum computing is no longer locked behind million-dollar research lab equipment. Today, you write and run a quantum circuit on a real 127-qubit machine, for free, from your laptop. This guide walks you through every option available to you right now.",{"type":21,"tag":43,"props":20348,"children":20350},{"id":20349},"what-you-need",[20351],{"type":26,"value":20352},"What You Need",{"type":21,"tag":22,"props":20354,"children":20355},{},[20356],{"type":26,"value":20357},"To get started, you need exactly three things:",{"type":21,"tag":6138,"props":20359,"children":20360},{},[20361,20371,20381],{"type":21,"tag":6142,"props":20362,"children":20363},{},[20364,20369],{"type":21,"tag":784,"props":20365,"children":20366},{},[20367],{"type":26,"value":20368},"Python 3.9+",{"type":26,"value":20370}," installed on your machine",{"type":21,"tag":6142,"props":20372,"children":20373},{},[20374,20379],{"type":21,"tag":784,"props":20375,"children":20376},{},[20377],{"type":26,"value":20378},"A free account",{"type":26,"value":20380}," on one of the quantum cloud platforms (IBM Quantum is the easiest)",{"type":21,"tag":6142,"props":20382,"children":20383},{},[20384,20389],{"type":21,"tag":784,"props":20385,"children":20386},{},[20387],{"type":26,"value":20388},"Five minutes",{"type":26,"value":20390}," to run your first Bell state",{"type":21,"tag":22,"props":20392,"children":20393},{},[20394],{"type":26,"value":20395},"That's it. No GPU. No special hardware. No credit card.",{"type":21,"tag":43,"props":20397,"children":20399},{"id":20398},"your-first-quantum-circuit",[20400],{"type":26,"value":20401},"Your First Quantum Circuit",{"type":21,"tag":22,"props":20403,"children":20404},{},[20405],{"type":26,"value":20406},"Install Qiskit and its simulator:",{"type":21,"tag":2062,"props":20408,"children":20409},{"className":8882,"code":11843,"language":8884,"meta":7,"style":7},[20410],{"type":21,"tag":1831,"props":20411,"children":20412},{"__ignoreMap":7},[20413],{"type":21,"tag":2072,"props":20414,"children":20415},{"class":2074,"line":2075},[20416,20420,20424,20428],{"type":21,"tag":2072,"props":20417,"children":20418},{"style":3474},[20419],{"type":26,"value":11855},{"type":21,"tag":2072,"props":20421,"children":20422},{"style":2108},[20423],{"type":26,"value":11860},{"type":21,"tag":2072,"props":20425,"children":20426},{"style":2108},[20427],{"type":26,"value":11865},{"type":21,"tag":2072,"props":20429,"children":20430},{"style":2108},[20431],{"type":26,"value":11870},{"type":21,"tag":22,"props":20433,"children":20434},{},[20435,20437,20445,20447,20451,20452,20456],{"type":26,"value":20436},"Now create a ",{"type":21,"tag":784,"props":20438,"children":20439},{},[20440],{"type":21,"tag":29,"props":20441,"children":20442},{"href":15857},[20443],{"type":26,"value":20444},"Bell state",{"type":26,"value":20446},", the quintessential two-qubit circuit that demonstrates ",{"type":21,"tag":29,"props":20448,"children":20449},{"href":7989},[20450],{"type":26,"value":7992},{"type":26,"value":383},{"type":21,"tag":29,"props":20453,"children":20454},{"href":10952},[20455],{"type":26,"value":10955},{"type":26,"value":12478},{"type":21,"tag":2062,"props":20458,"children":20460},{"className":3362,"code":20459,"language":3361,"meta":7,"style":7},"from qiskit import QuantumCircuit\nfrom qiskit_aer import AerSimulator\n\n# Build the circuit\nqc = QuantumCircuit(2)\nqc.h(0)       # Hadamard: puts qubit 0 into superposition\nqc.cx(0, 1)   # CNOT: entangles qubit 1 with qubit 0\nqc.measure_all()\n\n# Run locally on a simulator\nresult = AerSimulator().run(qc, shots=1000).result()\nprint(result.get_counts())\n# {'00': 503, '11': 497}\n",[20461],{"type":21,"tag":1831,"props":20462,"children":20463},{"__ignoreMap":7},[20464,20484,20503,20510,20518,20541,20562,20591,20598,20605,20613,20647,20659],{"type":21,"tag":2072,"props":20465,"children":20466},{"class":2074,"line":2075},[20467,20471,20475,20479],{"type":21,"tag":2072,"props":20468,"children":20469},{"style":3372},[20470],{"type":26,"value":3398},{"type":21,"tag":2072,"props":20472,"children":20473},{"style":2079},[20474],{"type":26,"value":3403},{"type":21,"tag":2072,"props":20476,"children":20477},{"style":3372},[20478],{"type":26,"value":3375},{"type":21,"tag":2072,"props":20480,"children":20481},{"style":2079},[20482],{"type":26,"value":20483}," QuantumCircuit\n",{"type":21,"tag":2072,"props":20485,"children":20486},{"class":2074,"line":164},[20487,20491,20495,20499],{"type":21,"tag":2072,"props":20488,"children":20489},{"style":3372},[20490],{"type":26,"value":3398},{"type":21,"tag":2072,"props":20492,"children":20493},{"style":2079},[20494],{"type":26,"value":3424},{"type":21,"tag":2072,"props":20496,"children":20497},{"style":3372},[20498],{"type":26,"value":3375},{"type":21,"tag":2072,"props":20500,"children":20501},{"style":2079},[20502],{"type":26,"value":3433},{"type":21,"tag":2072,"props":20504,"children":20505},{"class":2074,"line":2093},[20506],{"type":21,"tag":2072,"props":20507,"children":20508},{"emptyLinePlaceholder":3460},[20509],{"type":26,"value":3463},{"type":21,"tag":2072,"props":20511,"children":20512},{"class":2074,"line":2155},[20513],{"type":21,"tag":2072,"props":20514,"children":20515},{"style":3985},[20516],{"type":26,"value":20517},"# Build the circuit\n",{"type":21,"tag":2072,"props":20519,"children":20520},{"class":2074,"line":2178},[20521,20525,20529,20533,20537],{"type":21,"tag":2072,"props":20522,"children":20523},{"style":2079},[20524],{"type":26,"value":6514},{"type":21,"tag":2072,"props":20526,"children":20527},{"style":3372},[20528],{"type":26,"value":3487},{"type":21,"tag":2072,"props":20530,"children":20531},{"style":2079},[20532],{"type":26,"value":4264},{"type":21,"tag":2072,"props":20534,"children":20535},{"style":2097},[20536],{"type":26,"value":2170},{"type":21,"tag":2072,"props":20538,"children":20539},{"style":2079},[20540],{"type":26,"value":4281},{"type":21,"tag":2072,"props":20542,"children":20543},{"class":2074,"line":288},[20544,20548,20552,20557],{"type":21,"tag":2072,"props":20545,"children":20546},{"style":2079},[20547],{"type":26,"value":6530},{"type":21,"tag":2072,"props":20549,"children":20550},{"style":2097},[20551],{"type":26,"value":4295},{"type":21,"tag":2072,"props":20553,"children":20554},{"style":2079},[20555],{"type":26,"value":20556},")       ",{"type":21,"tag":2072,"props":20558,"children":20559},{"style":3985},[20560],{"type":26,"value":20561},"# Hadamard: puts qubit 0 into superposition\n",{"type":21,"tag":2072,"props":20563,"children":20564},{"class":2074,"line":16},[20565,20570,20574,20578,20582,20586],{"type":21,"tag":2072,"props":20566,"children":20567},{"style":2079},[20568],{"type":26,"value":20569},"qc.cx(",{"type":21,"tag":2072,"props":20571,"children":20572},{"style":2097},[20573],{"type":26,"value":4295},{"type":21,"tag":2072,"props":20575,"children":20576},{"style":2079},[20577],{"type":26,"value":798},{"type":21,"tag":2072,"props":20579,"children":20580},{"style":2097},[20581],{"type":26,"value":3555},{"type":21,"tag":2072,"props":20583,"children":20584},{"style":2079},[20585],{"type":26,"value":5886},{"type":21,"tag":2072,"props":20587,"children":20588},{"style":3985},[20589],{"type":26,"value":20590},"# CNOT: entangles qubit 1 with qubit 0\n",{"type":21,"tag":2072,"props":20592,"children":20593},{"class":2074,"line":366},[20594],{"type":21,"tag":2072,"props":20595,"children":20596},{"style":2079},[20597],{"type":26,"value":13150},{"type":21,"tag":2072,"props":20599,"children":20600},{"class":2074,"line":853},[20601],{"type":21,"tag":2072,"props":20602,"children":20603},{"emptyLinePlaceholder":3460},[20604],{"type":26,"value":3463},{"type":21,"tag":2072,"props":20606,"children":20607},{"class":2074,"line":3092},[20608],{"type":21,"tag":2072,"props":20609,"children":20610},{"style":3985},[20611],{"type":26,"value":20612},"# Run locally on a simulator\n",{"type":21,"tag":2072,"props":20614,"children":20615},{"class":2074,"line":3651},[20616,20620,20624,20629,20633,20637,20642],{"type":21,"tag":2072,"props":20617,"children":20618},{"style":2079},[20619],{"type":26,"value":19471},{"type":21,"tag":2072,"props":20621,"children":20622},{"style":3372},[20623],{"type":26,"value":3487},{"type":21,"tag":2072,"props":20625,"children":20626},{"style":2079},[20627],{"type":26,"value":20628}," AerSimulator().run(qc, ",{"type":21,"tag":2072,"props":20630,"children":20631},{"style":3735},[20632],{"type":26,"value":3226},{"type":21,"tag":2072,"props":20634,"children":20635},{"style":3372},[20636],{"type":26,"value":3487},{"type":21,"tag":2072,"props":20638,"children":20639},{"style":2097},[20640],{"type":26,"value":20641},"1000",{"type":21,"tag":2072,"props":20643,"children":20644},{"style":2079},[20645],{"type":26,"value":20646},").result()\n",{"type":21,"tag":2072,"props":20648,"children":20649},{"class":2074,"line":2616},[20650,20654],{"type":21,"tag":2072,"props":20651,"children":20652},{"style":2097},[20653],{"type":26,"value":4614},{"type":21,"tag":2072,"props":20655,"children":20656},{"style":2079},[20657],{"type":26,"value":20658},"(result.get_counts())\n",{"type":21,"tag":2072,"props":20660,"children":20661},{"class":2074,"line":3695},[20662],{"type":21,"tag":2072,"props":20663,"children":20664},{"style":3985},[20665],{"type":26,"value":20666},"# {'00': 503, '11': 497}\n",{"type":21,"tag":22,"props":20668,"children":20669},{},[20670,20672,20677,20678,20683,20685,20691,20692,20698],{"type":26,"value":20671},"The output (roughly equal counts of ",{"type":21,"tag":1831,"props":20673,"children":20675},{"className":20674},[],[20676],{"type":26,"value":4805},{"type":26,"value":383},{"type":21,"tag":1831,"props":20679,"children":20681},{"className":20680},[],[20682],{"type":26,"value":4812},{"type":26,"value":20684},", never ",{"type":21,"tag":1831,"props":20686,"children":20688},{"className":20687},[],[20689],{"type":26,"value":20690},"01",{"type":26,"value":18910},{"type":21,"tag":1831,"props":20693,"children":20695},{"className":20694},[],[20696],{"type":26,"value":20697},"10",{"type":26,"value":20699},") is the signature of entanglement. Measure one qubit and you instantly know the other, regardless of the distance between them.",{"type":21,"tag":43,"props":20701,"children":20703},{"id":20702},"free-simulators-no-account-required",[20704],{"type":26,"value":20705},"Free Simulators: No Account Required",{"type":21,"tag":22,"props":20707,"children":20708},{},[20709],{"type":26,"value":20710},"All major SDKs include local simulators that run on your CPU or GPU with no sign-up required:",{"type":21,"tag":2062,"props":20712,"children":20714},{"className":8882,"code":20713,"language":8884,"meta":7,"style":7},"pip install qiskit qiskit-aer   # IBM Qiskit + Aer simulator\npip install cirq                 # Google Cirq\npip install pennylane            # PennyLane\n",[20715],{"type":21,"tag":1831,"props":20716,"children":20717},{"__ignoreMap":7},[20718,20743,20764],{"type":21,"tag":2072,"props":20719,"children":20720},{"class":2074,"line":2075},[20721,20725,20729,20733,20738],{"type":21,"tag":2072,"props":20722,"children":20723},{"style":3474},[20724],{"type":26,"value":11855},{"type":21,"tag":2072,"props":20726,"children":20727},{"style":2108},[20728],{"type":26,"value":11860},{"type":21,"tag":2072,"props":20730,"children":20731},{"style":2108},[20732],{"type":26,"value":11865},{"type":21,"tag":2072,"props":20734,"children":20735},{"style":2108},[20736],{"type":26,"value":20737}," qiskit-aer",{"type":21,"tag":2072,"props":20739,"children":20740},{"style":3985},[20741],{"type":26,"value":20742},"   # IBM Qiskit + Aer simulator\n",{"type":21,"tag":2072,"props":20744,"children":20745},{"class":2074,"line":164},[20746,20750,20754,20759],{"type":21,"tag":2072,"props":20747,"children":20748},{"style":3474},[20749],{"type":26,"value":11855},{"type":21,"tag":2072,"props":20751,"children":20752},{"style":2108},[20753],{"type":26,"value":11860},{"type":21,"tag":2072,"props":20755,"children":20756},{"style":2108},[20757],{"type":26,"value":20758}," cirq",{"type":21,"tag":2072,"props":20760,"children":20761},{"style":3985},[20762],{"type":26,"value":20763},"                 # Google Cirq\n",{"type":21,"tag":2072,"props":20765,"children":20766},{"class":2074,"line":2093},[20767,20771,20775,20780],{"type":21,"tag":2072,"props":20768,"children":20769},{"style":3474},[20770],{"type":26,"value":11855},{"type":21,"tag":2072,"props":20772,"children":20773},{"style":2108},[20774],{"type":26,"value":11860},{"type":21,"tag":2072,"props":20776,"children":20777},{"style":2108},[20778],{"type":26,"value":20779}," pennylane",{"type":21,"tag":2072,"props":20781,"children":20782},{"style":3985},[20783],{"type":26,"value":20784},"            # PennyLane\n",{"type":21,"tag":22,"props":20786,"children":20787},{},[20788,20790,20796,20798,20803],{"type":26,"value":20789},"Each handles 20–30 qubit circuits comfortably. For large circuits or GPU acceleration, ",{"type":21,"tag":29,"props":20791,"children":20793},{"href":20792},"\u002Fsdks\u002Fcudaq",[20794],{"type":26,"value":20795},"NVIDIA CUDA-Q",{"type":26,"value":20797}," simulates 34+ qubits on a single GPU. See the full ",{"type":21,"tag":29,"props":20799,"children":20800},{"href":150},[20801],{"type":26,"value":20802},"Simulators guide",{"type":26,"value":20804}," for a detailed comparison.",{"type":21,"tag":43,"props":20806,"children":20808},{"id":20807},"free-real-hardware-ibm-quantum",[20809],{"type":26,"value":20810},"Free Real Hardware: IBM Quantum",{"type":21,"tag":22,"props":20812,"children":20813},{},[20814,20816,20821,20823,20828],{"type":26,"value":20815},"IBM Quantum offers ",{"type":21,"tag":784,"props":20817,"children":20818},{},[20819],{"type":26,"value":20820},"completely free",{"type":26,"value":20822}," access to real quantum processors for anyone with an IBM ID. Our ",{"type":21,"tag":29,"props":20824,"children":20826},{"href":20825},"\u002Fguides\u002Fibm-quantum-free-tier-2026",[20827],{"type":26,"value":2300},{"type":26,"value":20829}," covers the limits in detail. Here's the short version:",{"type":21,"tag":6138,"props":20831,"children":20832},{},[20833,20847,20852],{"type":21,"tag":6142,"props":20834,"children":20835},{},[20836,20838,20845],{"type":26,"value":20837},"Go to ",{"type":21,"tag":29,"props":20839,"children":20842},{"href":20840,"rel":20841},"https:\u002F\u002Fquantum.ibm.com\u002F",[378],[20843],{"type":26,"value":20844},"quantum.ibm.com",{"type":26,"value":20846}," and create a free account",{"type":21,"tag":6142,"props":20848,"children":20849},{},[20850],{"type":26,"value":20851},"Copy your API token from Account settings",{"type":21,"tag":6142,"props":20853,"children":20854},{},[20855],{"type":26,"value":20856},"Configure Qiskit with your token:",{"type":21,"tag":2062,"props":20858,"children":20860},{"className":3362,"code":20859,"language":3361,"meta":7,"style":7},"from qiskit_ibm_runtime import QiskitRuntimeService\n\nQiskitRuntimeService.save_account(\n    channel=\"ibm_quantum\",\n    token=\"YOUR_TOKEN_HERE\"\n)\n",[20861],{"type":21,"tag":1831,"props":20862,"children":20863},{"__ignoreMap":7},[20864,20883,20890,20898,20919,20936],{"type":21,"tag":2072,"props":20865,"children":20866},{"class":2074,"line":2075},[20867,20871,20875,20879],{"type":21,"tag":2072,"props":20868,"children":20869},{"style":3372},[20870],{"type":26,"value":3398},{"type":21,"tag":2072,"props":20872,"children":20873},{"style":2079},[20874],{"type":26,"value":10321},{"type":21,"tag":2072,"props":20876,"children":20877},{"style":3372},[20878],{"type":26,"value":3375},{"type":21,"tag":2072,"props":20880,"children":20881},{"style":2079},[20882],{"type":26,"value":10330},{"type":21,"tag":2072,"props":20884,"children":20885},{"class":2074,"line":164},[20886],{"type":21,"tag":2072,"props":20887,"children":20888},{"emptyLinePlaceholder":3460},[20889],{"type":26,"value":3463},{"type":21,"tag":2072,"props":20891,"children":20892},{"class":2074,"line":2093},[20893],{"type":21,"tag":2072,"props":20894,"children":20895},{"style":2079},[20896],{"type":26,"value":20897},"QiskitRuntimeService.save_account(\n",{"type":21,"tag":2072,"props":20899,"children":20900},{"class":2074,"line":2155},[20901,20906,20910,20915],{"type":21,"tag":2072,"props":20902,"children":20903},{"style":3735},[20904],{"type":26,"value":20905},"    channel",{"type":21,"tag":2072,"props":20907,"children":20908},{"style":3372},[20909],{"type":26,"value":3487},{"type":21,"tag":2072,"props":20911,"children":20912},{"style":2108},[20913],{"type":26,"value":20914},"\"ibm_quantum\"",{"type":21,"tag":2072,"props":20916,"children":20917},{"style":2079},[20918],{"type":26,"value":2175},{"type":21,"tag":2072,"props":20920,"children":20921},{"class":2074,"line":2178},[20922,20927,20931],{"type":21,"tag":2072,"props":20923,"children":20924},{"style":3735},[20925],{"type":26,"value":20926},"    token",{"type":21,"tag":2072,"props":20928,"children":20929},{"style":3372},[20930],{"type":26,"value":3487},{"type":21,"tag":2072,"props":20932,"children":20933},{"style":2108},[20934],{"type":26,"value":20935},"\"YOUR_TOKEN_HERE\"\n",{"type":21,"tag":2072,"props":20937,"children":20938},{"class":2074,"line":288},[20939],{"type":21,"tag":2072,"props":20940,"children":20941},{"style":2079},[20942],{"type":26,"value":4281},{"type":21,"tag":6138,"props":20944,"children":20945},{"start":2155},[20946],{"type":21,"tag":6142,"props":20947,"children":20948},{},[20949],{"type":26,"value":20950},"Submit jobs to any of IBM's free public QPUs",{"type":21,"tag":22,"props":20952,"children":20953},{},[20954],{"type":26,"value":20955},"Queue times on the public systems are typically a few minutes to a few hours. You're sharing time with researchers and students worldwide. That's the only catch.",{"type":21,"tag":43,"props":20957,"children":20959},{"id":20958},"choosing-your-first-sdk",[20960],{"type":26,"value":20961},"Choosing Your First SDK",{"type":21,"tag":3169,"props":20963,"children":20964},{},[20965,20986],{"type":21,"tag":3173,"props":20966,"children":20967},{},[20968],{"type":21,"tag":3177,"props":20969,"children":20970},{},[20971,20976,20981],{"type":21,"tag":3181,"props":20972,"children":20973},{},[20974],{"type":26,"value":20975},"SDK",{"type":21,"tag":3181,"props":20977,"children":20978},{},[20979],{"type":26,"value":20980},"Best for",{"type":21,"tag":3181,"props":20982,"children":20983},{},[20984],{"type":26,"value":20985},"Free tier",{"type":21,"tag":3195,"props":20987,"children":20988},{},[20989,21007,21024,21041,21059],{"type":21,"tag":3177,"props":20990,"children":20991},{},[20992,20997,21002],{"type":21,"tag":3202,"props":20993,"children":20994},{},[20995],{"type":26,"value":20996},"IBM Qiskit",{"type":21,"tag":3202,"props":20998,"children":20999},{},[21000],{"type":26,"value":21001},"General purpose, real hardware",{"type":21,"tag":3202,"props":21003,"children":21004},{},[21005],{"type":26,"value":21006},"Full: local + real QPU",{"type":21,"tag":3177,"props":21008,"children":21009},{},[21010,21014,21019],{"type":21,"tag":3202,"props":21011,"children":21012},{},[21013],{"type":26,"value":13846},{"type":21,"tag":3202,"props":21015,"children":21016},{},[21017],{"type":26,"value":21018},"Quantum ML, gradients",{"type":21,"tag":3202,"props":21020,"children":21021},{},[21022],{"type":26,"value":21023},"Full: local simulators",{"type":21,"tag":3177,"props":21025,"children":21026},{},[21027,21032,21037],{"type":21,"tag":3202,"props":21028,"children":21029},{},[21030],{"type":26,"value":21031},"Google Cirq",{"type":21,"tag":3202,"props":21033,"children":21034},{},[21035],{"type":26,"value":21036},"NISQ research",{"type":21,"tag":3202,"props":21038,"children":21039},{},[21040],{"type":26,"value":21023},{"type":21,"tag":3177,"props":21042,"children":21043},{},[21044,21049,21054],{"type":21,"tag":3202,"props":21045,"children":21046},{},[21047],{"type":26,"value":21048},"Amazon Braket",{"type":21,"tag":3202,"props":21050,"children":21051},{},[21052],{"type":26,"value":21053},"AWS integration",{"type":21,"tag":3202,"props":21055,"children":21056},{},[21057],{"type":26,"value":21058},"Free local sim, paid cloud",{"type":21,"tag":3177,"props":21060,"children":21061},{},[21062,21066,21071],{"type":21,"tag":3202,"props":21063,"children":21064},{},[21065],{"type":26,"value":20795},{"type":21,"tag":3202,"props":21067,"children":21068},{},[21069],{"type":26,"value":21070},"GPU acceleration",{"type":21,"tag":3202,"props":21072,"children":21073},{},[21074],{"type":26,"value":21075},"Full: local GPU",{"type":21,"tag":22,"props":21077,"children":21078},{},[21079,21081,21085],{"type":26,"value":21080},"For most beginners, ",{"type":21,"tag":784,"props":21082,"children":21083},{},[21084],{"type":26,"value":852},{"type":26,"value":21086}," is the best starting point. It has the largest community, the most documentation, and direct access to real IBM hardware.",{"type":21,"tag":43,"props":21088,"children":21090},{"id":21089},"what-to-build-next",[21091],{"type":26,"value":21092},"What to Build Next",{"type":21,"tag":22,"props":21094,"children":21095},{},[21096],{"type":26,"value":21097},"Once your Bell state runs, here's a progression of interesting circuits to try:",{"type":21,"tag":7925,"props":21099,"children":21100},{},[21101,21118,21128,21141],{"type":21,"tag":6142,"props":21102,"children":21103},{},[21104,21109,21111,21117],{"type":21,"tag":784,"props":21105,"children":21106},{},[21107],{"type":26,"value":21108},"GHZ state",{"type":26,"value":21110},": a 3-qubit entangled state (",{"type":21,"tag":1831,"props":21112,"children":21114},{"className":21113},[],[21115],{"type":26,"value":21116},"h(0).cx(0,1).cx(0,2)",{"type":26,"value":17330},{"type":21,"tag":6142,"props":21119,"children":21120},{},[21121,21126],{"type":21,"tag":784,"props":21122,"children":21123},{},[21124],{"type":26,"value":21125},"Quantum teleportation",{"type":26,"value":21127},": transfer a qubit state using entanglement and classical communication",{"type":21,"tag":6142,"props":21129,"children":21130},{},[21131,21139],{"type":21,"tag":784,"props":21132,"children":21133},{},[21134],{"type":21,"tag":29,"props":21135,"children":21136},{"href":6276},[21137],{"type":26,"value":21138},"Grover's search",{"type":26,"value":21140},": find a marked item in a list quadratically faster than brute force",{"type":21,"tag":6142,"props":21142,"children":21143},{},[21144,21151],{"type":21,"tag":784,"props":21145,"children":21146},{},[21147],{"type":21,"tag":29,"props":21148,"children":21149},{"href":31},[21150],{"type":26,"value":14},{"type":26,"value":21152},": estimate molecular ground state energies with a variational algorithm",{"type":21,"tag":22,"props":21154,"children":21155},{},[21156,21158,21164,21165,21170,21172,21177,21179,21184],{"type":26,"value":21157},"Check out the ",{"type":21,"tag":29,"props":21159,"children":21161},{"href":21160},"\u002Fblog\u002Fquantum-simulators-compared",[21162],{"type":26,"value":21163},"simulator comparison",{"type":26,"value":667},{"type":21,"tag":29,"props":21166,"children":21167},{"href":590},[21168],{"type":26,"value":21169},"Hardware guide",{"type":26,"value":21171}," to go deeper. If you'd rather follow a structured route, the ",{"type":21,"tag":29,"props":21173,"children":21174},{"href":20259},[21175],{"type":26,"value":21176},"quantum computing learning path",{"type":26,"value":21178}," sequences these topics, and our ",{"type":21,"tag":29,"props":21180,"children":21181},{"href":8433},[21182],{"type":26,"value":21183},"curated courses",{"type":26,"value":21185}," list the best free material for each stage.",{"type":21,"tag":18235,"props":21187,"children":21188},{},[],{"type":21,"tag":22,"props":21190,"children":21191},{},[21192,21194,21199,21201,21205],{"type":26,"value":21193},"💡 ",{"type":21,"tag":784,"props":21195,"children":21196},{},[21197],{"type":26,"value":21198},"Tip:",{"type":26,"value":21200}," If you plan to experiment across multiple SDKs without rewriting your circuits each time, ",{"type":21,"tag":29,"props":21202,"children":21203},{"href":19124},[21204],{"type":26,"value":19127},{"type":26,"value":21206}," provides a unified API that runs the same circuit on Qiskit, Cirq, PennyLane, Braket, CUDA-Q, or IonQ with a single backend flag.",{"type":21,"tag":2445,"props":21208,"children":21209},{},[21210],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":21212},[21213,21214,21215,21216,21217,21218],{"id":20349,"depth":164,"text":20352},{"id":20398,"depth":164,"text":20401},{"id":20702,"depth":164,"text":20705},{"id":20807,"depth":164,"text":20810},{"id":20958,"depth":164,"text":20961},{"id":21089,"depth":164,"text":21092},"content:blog:getting-started-free-quantum-computing.md","blog\u002Fgetting-started-free-quantum-computing.md","blog\u002Fgetting-started-free-quantum-computing",{"_path":21223,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":21224,"description":21225,"date":21226,"author":11,"tags":21227,"readingTime":16,"body":21229,"_type":171,"_id":23742,"_source":173,"_file":23743,"_stem":23744,"_extension":176},"\u002Fblog\u002Fhlquantum-vs-qiskit","HLQuantum vs Raw Qiskit: When to Use an Abstraction Layer","A practical comparison of writing quantum circuits directly in Qiskit versus using HLQuantum's unified API, with side-by-side code and a framework for deciding which to use.","2026-03-08",[19127,852,6281,21228],"Best Practices",{"type":18,"children":21230,"toc":23732},[21231,21236,21241,21247,21275,21310,21316,21324,21556,21564,21725,21730,21736,21744,22260,22268,22605,22610,22616,22624,23015,23023,23266,23278,23284,23289,23379,23385,23390,23464,23470,23475,23684,23689,23695,23703,23708,23728],{"type":21,"tag":22,"props":21232,"children":21233},{},[21234],{"type":26,"value":21235},"There's a real question when starting a quantum computing project: should you write circuits directly in Qiskit, or use HLQuantum's abstraction layer on top? Both are valid choices, and the right answer depends on what you're building.",{"type":21,"tag":22,"props":21237,"children":21238},{},[21239],{"type":26,"value":21240},"This post gives you a concrete, code-driven comparison to help you decide.",{"type":21,"tag":43,"props":21242,"children":21244},{"id":21243},"the-core-difference",[21245],{"type":26,"value":21246},"The Core Difference",{"type":21,"tag":22,"props":21248,"children":21249},{},[21250,21257,21259,21263,21264,21268,21269,21273],{"type":21,"tag":784,"props":21251,"children":21252},{},[21253],{"type":21,"tag":29,"props":21254,"children":21255},{"href":6223},[21256],{"type":26,"value":852},{"type":26,"value":21258}," is IBM's quantum SDK. It gives you direct, precise control over every ",{"type":21,"tag":29,"props":21260,"children":21261},{"href":18143},[21262],{"type":26,"value":1608},{"type":26,"value":798},{"type":21,"tag":29,"props":21265,"children":21266},{"href":682},[21267],{"type":26,"value":2533},{"type":26,"value":798},{"type":21,"tag":29,"props":21270,"children":21271},{"href":6552},[21272],{"type":26,"value":11161},{"type":26,"value":21274},", and compilation step. It targets IBM hardware natively and has the deepest ecosystem for IBM-specific workflows.",{"type":21,"tag":22,"props":21276,"children":21277},{},[21278,21285,21287,21291,21292,21296,21297,21303,21304,21308],{"type":21,"tag":784,"props":21279,"children":21280},{},[21281],{"type":21,"tag":29,"props":21282,"children":21283},{"href":19124},[21284],{"type":26,"value":19127},{"type":26,"value":21286}," is a unified API that sits above Qiskit, ",{"type":21,"tag":29,"props":21288,"children":21289},{"href":7968},[21290],{"type":26,"value":7971},{"type":26,"value":798},{"type":21,"tag":29,"props":21293,"children":21294},{"href":14130},[21295],{"type":26,"value":13846},{"type":26,"value":798},{"type":21,"tag":29,"props":21298,"children":21300},{"href":21299},"\u002Fsdks\u002Fbraket",[21301],{"type":26,"value":21302},"Braket",{"type":26,"value":798},{"type":21,"tag":29,"props":21305,"children":21306},{"href":20792},[21307],{"type":26,"value":18278},{"type":26,"value":21309},", and IonQ. You write one circuit, and it translates and dispatches to whichever backend you point it at. It trades some low-level control for portability and simplicity.",{"type":21,"tag":43,"props":21311,"children":21313},{"id":21312},"side-by-side-bell-state",[21314],{"type":26,"value":21315},"Side-by-Side: Bell State",{"type":21,"tag":22,"props":21317,"children":21318},{},[21319],{"type":21,"tag":784,"props":21320,"children":21321},{},[21322],{"type":26,"value":21323},"Raw Qiskit:",{"type":21,"tag":2062,"props":21325,"children":21327},{"code":21326,"language":3361,"meta":7,"className":3362,"style":7},"from qiskit import QuantumCircuit\nfrom qiskit_aer import AerSimulator\n\nqc = QuantumCircuit(2, 2)\nqc.h(0)\nqc.cx(0, 1)\nqc.measure([0, 1], [0, 1])\n\nsim = AerSimulator()\nresult = sim.run(qc, shots=1000).result()\nprint(result.get_counts())  # {'00': 501, '11': 499}\n",[21328],{"type":21,"tag":1831,"props":21329,"children":21330},{"__ignoreMap":7},[21331,21350,21369,21376,21407,21422,21445,21485,21492,21507,21539],{"type":21,"tag":2072,"props":21332,"children":21333},{"class":2074,"line":2075},[21334,21338,21342,21346],{"type":21,"tag":2072,"props":21335,"children":21336},{"style":3372},[21337],{"type":26,"value":3398},{"type":21,"tag":2072,"props":21339,"children":21340},{"style":2079},[21341],{"type":26,"value":3403},{"type":21,"tag":2072,"props":21343,"children":21344},{"style":3372},[21345],{"type":26,"value":3375},{"type":21,"tag":2072,"props":21347,"children":21348},{"style":2079},[21349],{"type":26,"value":20483},{"type":21,"tag":2072,"props":21351,"children":21352},{"class":2074,"line":164},[21353,21357,21361,21365],{"type":21,"tag":2072,"props":21354,"children":21355},{"style":3372},[21356],{"type":26,"value":3398},{"type":21,"tag":2072,"props":21358,"children":21359},{"style":2079},[21360],{"type":26,"value":3424},{"type":21,"tag":2072,"props":21362,"children":21363},{"style":3372},[21364],{"type":26,"value":3375},{"type":21,"tag":2072,"props":21366,"children":21367},{"style":2079},[21368],{"type":26,"value":3433},{"type":21,"tag":2072,"props":21370,"children":21371},{"class":2074,"line":2093},[21372],{"type":21,"tag":2072,"props":21373,"children":21374},{"emptyLinePlaceholder":3460},[21375],{"type":26,"value":3463},{"type":21,"tag":2072,"props":21377,"children":21378},{"class":2074,"line":2155},[21379,21383,21387,21391,21395,21399,21403],{"type":21,"tag":2072,"props":21380,"children":21381},{"style":2079},[21382],{"type":26,"value":6514},{"type":21,"tag":2072,"props":21384,"children":21385},{"style":3372},[21386],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21388,"children":21389},{"style":2079},[21390],{"type":26,"value":4264},{"type":21,"tag":2072,"props":21392,"children":21393},{"style":2097},[21394],{"type":26,"value":2170},{"type":21,"tag":2072,"props":21396,"children":21397},{"style":2079},[21398],{"type":26,"value":798},{"type":21,"tag":2072,"props":21400,"children":21401},{"style":2097},[21402],{"type":26,"value":2170},{"type":21,"tag":2072,"props":21404,"children":21405},{"style":2079},[21406],{"type":26,"value":4281},{"type":21,"tag":2072,"props":21408,"children":21409},{"class":2074,"line":2178},[21410,21414,21418],{"type":21,"tag":2072,"props":21411,"children":21412},{"style":2079},[21413],{"type":26,"value":6530},{"type":21,"tag":2072,"props":21415,"children":21416},{"style":2097},[21417],{"type":26,"value":4295},{"type":21,"tag":2072,"props":21419,"children":21420},{"style":2079},[21421],{"type":26,"value":4281},{"type":21,"tag":2072,"props":21423,"children":21424},{"class":2074,"line":288},[21425,21429,21433,21437,21441],{"type":21,"tag":2072,"props":21426,"children":21427},{"style":2079},[21428],{"type":26,"value":20569},{"type":21,"tag":2072,"props":21430,"children":21431},{"style":2097},[21432],{"type":26,"value":4295},{"type":21,"tag":2072,"props":21434,"children":21435},{"style":2079},[21436],{"type":26,"value":798},{"type":21,"tag":2072,"props":21438,"children":21439},{"style":2097},[21440],{"type":26,"value":3555},{"type":21,"tag":2072,"props":21442,"children":21443},{"style":2079},[21444],{"type":26,"value":4281},{"type":21,"tag":2072,"props":21446,"children":21447},{"class":2074,"line":16},[21448,21453,21457,21461,21465,21469,21473,21477,21481],{"type":21,"tag":2072,"props":21449,"children":21450},{"style":2079},[21451],{"type":26,"value":21452},"qc.measure([",{"type":21,"tag":2072,"props":21454,"children":21455},{"style":2097},[21456],{"type":26,"value":4295},{"type":21,"tag":2072,"props":21458,"children":21459},{"style":2079},[21460],{"type":26,"value":798},{"type":21,"tag":2072,"props":21462,"children":21463},{"style":2097},[21464],{"type":26,"value":3555},{"type":21,"tag":2072,"props":21466,"children":21467},{"style":2079},[21468],{"type":26,"value":4350},{"type":21,"tag":2072,"props":21470,"children":21471},{"style":2097},[21472],{"type":26,"value":4295},{"type":21,"tag":2072,"props":21474,"children":21475},{"style":2079},[21476],{"type":26,"value":798},{"type":21,"tag":2072,"props":21478,"children":21479},{"style":2097},[21480],{"type":26,"value":3555},{"type":21,"tag":2072,"props":21482,"children":21483},{"style":2079},[21484],{"type":26,"value":3597},{"type":21,"tag":2072,"props":21486,"children":21487},{"class":2074,"line":366},[21488],{"type":21,"tag":2072,"props":21489,"children":21490},{"emptyLinePlaceholder":3460},[21491],{"type":26,"value":3463},{"type":21,"tag":2072,"props":21493,"children":21494},{"class":2074,"line":853},[21495,21499,21503],{"type":21,"tag":2072,"props":21496,"children":21497},{"style":2079},[21498],{"type":26,"value":7558},{"type":21,"tag":2072,"props":21500,"children":21501},{"style":3372},[21502],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21504,"children":21505},{"style":2079},[21506],{"type":26,"value":7567},{"type":21,"tag":2072,"props":21508,"children":21509},{"class":2074,"line":3092},[21510,21514,21518,21523,21527,21531,21535],{"type":21,"tag":2072,"props":21511,"children":21512},{"style":2079},[21513],{"type":26,"value":19471},{"type":21,"tag":2072,"props":21515,"children":21516},{"style":3372},[21517],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21519,"children":21520},{"style":2079},[21521],{"type":26,"value":21522}," sim.run(qc, ",{"type":21,"tag":2072,"props":21524,"children":21525},{"style":3735},[21526],{"type":26,"value":3226},{"type":21,"tag":2072,"props":21528,"children":21529},{"style":3372},[21530],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21532,"children":21533},{"style":2097},[21534],{"type":26,"value":20641},{"type":21,"tag":2072,"props":21536,"children":21537},{"style":2079},[21538],{"type":26,"value":20646},{"type":21,"tag":2072,"props":21540,"children":21541},{"class":2074,"line":3651},[21542,21546,21551],{"type":21,"tag":2072,"props":21543,"children":21544},{"style":2097},[21545],{"type":26,"value":4614},{"type":21,"tag":2072,"props":21547,"children":21548},{"style":2079},[21549],{"type":26,"value":21550},"(result.get_counts())  ",{"type":21,"tag":2072,"props":21552,"children":21553},{"style":3985},[21554],{"type":26,"value":21555},"# {'00': 501, '11': 499}\n",{"type":21,"tag":22,"props":21557,"children":21558},{},[21559],{"type":21,"tag":784,"props":21560,"children":21561},{},[21562],{"type":26,"value":21563},"HLQuantum:",{"type":21,"tag":2062,"props":21565,"children":21567},{"code":21566,"language":3361,"meta":7,"className":3362,"style":7},"import hlquantum as hlq\n\nqc = hlq.Circuit(2)\nqc.h(0).cx(0, 1).measure_all()\n\nresult = hlq.run(qc, backend='qiskit', shots=1000)\nprint(result.counts)  # {'00': 501, '11': 499}\n",[21568],{"type":21,"tag":1831,"props":21569,"children":21570},{"__ignoreMap":7},[21571,21590,21597,21621,21654,21661,21709],{"type":21,"tag":2072,"props":21572,"children":21573},{"class":2074,"line":2075},[21574,21578,21582,21586],{"type":21,"tag":2072,"props":21575,"children":21576},{"style":3372},[21577],{"type":26,"value":3375},{"type":21,"tag":2072,"props":21579,"children":21580},{"style":2079},[21581],{"type":26,"value":19439},{"type":21,"tag":2072,"props":21583,"children":21584},{"style":3372},[21585],{"type":26,"value":3385},{"type":21,"tag":2072,"props":21587,"children":21588},{"style":2079},[21589],{"type":26,"value":19448},{"type":21,"tag":2072,"props":21591,"children":21592},{"class":2074,"line":164},[21593],{"type":21,"tag":2072,"props":21594,"children":21595},{"emptyLinePlaceholder":3460},[21596],{"type":26,"value":3463},{"type":21,"tag":2072,"props":21598,"children":21599},{"class":2074,"line":2093},[21600,21604,21608,21613,21617],{"type":21,"tag":2072,"props":21601,"children":21602},{"style":2079},[21603],{"type":26,"value":6514},{"type":21,"tag":2072,"props":21605,"children":21606},{"style":3372},[21607],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21609,"children":21610},{"style":2079},[21611],{"type":26,"value":21612}," hlq.Circuit(",{"type":21,"tag":2072,"props":21614,"children":21615},{"style":2097},[21616],{"type":26,"value":2170},{"type":21,"tag":2072,"props":21618,"children":21619},{"style":2079},[21620],{"type":26,"value":4281},{"type":21,"tag":2072,"props":21622,"children":21623},{"class":2074,"line":2155},[21624,21628,21632,21637,21641,21645,21649],{"type":21,"tag":2072,"props":21625,"children":21626},{"style":2079},[21627],{"type":26,"value":6530},{"type":21,"tag":2072,"props":21629,"children":21630},{"style":2097},[21631],{"type":26,"value":4295},{"type":21,"tag":2072,"props":21633,"children":21634},{"style":2079},[21635],{"type":26,"value":21636},").cx(",{"type":21,"tag":2072,"props":21638,"children":21639},{"style":2097},[21640],{"type":26,"value":4295},{"type":21,"tag":2072,"props":21642,"children":21643},{"style":2079},[21644],{"type":26,"value":798},{"type":21,"tag":2072,"props":21646,"children":21647},{"style":2097},[21648],{"type":26,"value":3555},{"type":21,"tag":2072,"props":21650,"children":21651},{"style":2079},[21652],{"type":26,"value":21653},").measure_all()\n",{"type":21,"tag":2072,"props":21655,"children":21656},{"class":2074,"line":2178},[21657],{"type":21,"tag":2072,"props":21658,"children":21659},{"emptyLinePlaceholder":3460},[21660],{"type":26,"value":3463},{"type":21,"tag":2072,"props":21662,"children":21663},{"class":2074,"line":288},[21664,21668,21672,21677,21681,21685,21689,21693,21697,21701,21705],{"type":21,"tag":2072,"props":21665,"children":21666},{"style":2079},[21667],{"type":26,"value":19471},{"type":21,"tag":2072,"props":21669,"children":21670},{"style":3372},[21671],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21673,"children":21674},{"style":2079},[21675],{"type":26,"value":21676}," hlq.run(qc, ",{"type":21,"tag":2072,"props":21678,"children":21679},{"style":3735},[21680],{"type":26,"value":18550},{"type":21,"tag":2072,"props":21682,"children":21683},{"style":3372},[21684],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21686,"children":21687},{"style":2108},[21688],{"type":26,"value":19529},{"type":21,"tag":2072,"props":21690,"children":21691},{"style":2079},[21692],{"type":26,"value":798},{"type":21,"tag":2072,"props":21694,"children":21695},{"style":3735},[21696],{"type":26,"value":3226},{"type":21,"tag":2072,"props":21698,"children":21699},{"style":3372},[21700],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21702,"children":21703},{"style":2097},[21704],{"type":26,"value":20641},{"type":21,"tag":2072,"props":21706,"children":21707},{"style":2079},[21708],{"type":26,"value":4281},{"type":21,"tag":2072,"props":21710,"children":21711},{"class":2074,"line":16},[21712,21716,21721],{"type":21,"tag":2072,"props":21713,"children":21714},{"style":2097},[21715],{"type":26,"value":4614},{"type":21,"tag":2072,"props":21717,"children":21718},{"style":2079},[21719],{"type":26,"value":21720},"(result.counts)  ",{"type":21,"tag":2072,"props":21722,"children":21723},{"style":3985},[21724],{"type":26,"value":21555},{"type":21,"tag":22,"props":21726,"children":21727},{},[21728],{"type":26,"value":21729},"About the same verbosity for a single backend. The difference shows up when you add more backends.",{"type":21,"tag":43,"props":21731,"children":21733},{"id":21732},"side-by-side-running-on-multiple-backends",[21734],{"type":26,"value":21735},"Side-by-Side: Running on Multiple Backends",{"type":21,"tag":22,"props":21737,"children":21738},{},[21739],{"type":21,"tag":784,"props":21740,"children":21741},{},[21742],{"type":26,"value":21743},"Raw Qiskit (to add a second backend, you rewrite):",{"type":21,"tag":2062,"props":21745,"children":21747},{"code":21746,"language":3361,"meta":7,"className":3362,"style":7},"# Qiskit Aer\nfrom qiskit import QuantumCircuit\nfrom qiskit_aer import AerSimulator\nqc_qiskit = QuantumCircuit(2, 2)\nqc_qiskit.h(0); qc_qiskit.cx(0, 1); qc_qiskit.measure_all()\nresult_qiskit = AerSimulator().run(qc_qiskit, shots=1000).result()\n\n# PennyLane: completely different API, rewrite circuit\nimport pennylane as qml\ndev = qml.device('default.qubit', wires=2)\n@qml.qnode(dev)\ndef bell():\n    qml.Hadamard(wires=0)\n    qml.CNOT(wires=[0, 1])\n    return qml.probs(wires=[0, 1])\nresult_pennylane = bell()\n\n# CUDA-Q: yet another API, rewrite again\nimport cudaq\n@cudaq.kernel\ndef bell():\n    qvec = cudaq.qvector(2)\n    h(qvec[0]); cx(qvec[0], qvec[1]); mz(qvec)\nresult_cudaq = cudaq.sample(bell, shots_count=1000)\n",[21748],{"type":21,"tag":1831,"props":21749,"children":21750},{"__ignoreMap":7},[21751,21759,21778,21797,21829,21863,21896,21903,21911,21930,21970,21981,21998,22022,22059,22099,22116,22123,22131,22143,22151,22166,22191,22226],{"type":21,"tag":2072,"props":21752,"children":21753},{"class":2074,"line":2075},[21754],{"type":21,"tag":2072,"props":21755,"children":21756},{"style":3985},[21757],{"type":26,"value":21758},"# Qiskit Aer\n",{"type":21,"tag":2072,"props":21760,"children":21761},{"class":2074,"line":164},[21762,21766,21770,21774],{"type":21,"tag":2072,"props":21763,"children":21764},{"style":3372},[21765],{"type":26,"value":3398},{"type":21,"tag":2072,"props":21767,"children":21768},{"style":2079},[21769],{"type":26,"value":3403},{"type":21,"tag":2072,"props":21771,"children":21772},{"style":3372},[21773],{"type":26,"value":3375},{"type":21,"tag":2072,"props":21775,"children":21776},{"style":2079},[21777],{"type":26,"value":20483},{"type":21,"tag":2072,"props":21779,"children":21780},{"class":2074,"line":2093},[21781,21785,21789,21793],{"type":21,"tag":2072,"props":21782,"children":21783},{"style":3372},[21784],{"type":26,"value":3398},{"type":21,"tag":2072,"props":21786,"children":21787},{"style":2079},[21788],{"type":26,"value":3424},{"type":21,"tag":2072,"props":21790,"children":21791},{"style":3372},[21792],{"type":26,"value":3375},{"type":21,"tag":2072,"props":21794,"children":21795},{"style":2079},[21796],{"type":26,"value":3433},{"type":21,"tag":2072,"props":21798,"children":21799},{"class":2074,"line":2155},[21800,21805,21809,21813,21817,21821,21825],{"type":21,"tag":2072,"props":21801,"children":21802},{"style":2079},[21803],{"type":26,"value":21804},"qc_qiskit ",{"type":21,"tag":2072,"props":21806,"children":21807},{"style":3372},[21808],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21810,"children":21811},{"style":2079},[21812],{"type":26,"value":4264},{"type":21,"tag":2072,"props":21814,"children":21815},{"style":2097},[21816],{"type":26,"value":2170},{"type":21,"tag":2072,"props":21818,"children":21819},{"style":2079},[21820],{"type":26,"value":798},{"type":21,"tag":2072,"props":21822,"children":21823},{"style":2097},[21824],{"type":26,"value":2170},{"type":21,"tag":2072,"props":21826,"children":21827},{"style":2079},[21828],{"type":26,"value":4281},{"type":21,"tag":2072,"props":21830,"children":21831},{"class":2074,"line":2178},[21832,21837,21841,21846,21850,21854,21858],{"type":21,"tag":2072,"props":21833,"children":21834},{"style":2079},[21835],{"type":26,"value":21836},"qc_qiskit.h(",{"type":21,"tag":2072,"props":21838,"children":21839},{"style":2097},[21840],{"type":26,"value":4295},{"type":21,"tag":2072,"props":21842,"children":21843},{"style":2079},[21844],{"type":26,"value":21845},"); qc_qiskit.cx(",{"type":21,"tag":2072,"props":21847,"children":21848},{"style":2097},[21849],{"type":26,"value":4295},{"type":21,"tag":2072,"props":21851,"children":21852},{"style":2079},[21853],{"type":26,"value":798},{"type":21,"tag":2072,"props":21855,"children":21856},{"style":2097},[21857],{"type":26,"value":3555},{"type":21,"tag":2072,"props":21859,"children":21860},{"style":2079},[21861],{"type":26,"value":21862},"); qc_qiskit.measure_all()\n",{"type":21,"tag":2072,"props":21864,"children":21865},{"class":2074,"line":288},[21866,21871,21875,21880,21884,21888,21892],{"type":21,"tag":2072,"props":21867,"children":21868},{"style":2079},[21869],{"type":26,"value":21870},"result_qiskit ",{"type":21,"tag":2072,"props":21872,"children":21873},{"style":3372},[21874],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21876,"children":21877},{"style":2079},[21878],{"type":26,"value":21879}," AerSimulator().run(qc_qiskit, ",{"type":21,"tag":2072,"props":21881,"children":21882},{"style":3735},[21883],{"type":26,"value":3226},{"type":21,"tag":2072,"props":21885,"children":21886},{"style":3372},[21887],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21889,"children":21890},{"style":2097},[21891],{"type":26,"value":20641},{"type":21,"tag":2072,"props":21893,"children":21894},{"style":2079},[21895],{"type":26,"value":20646},{"type":21,"tag":2072,"props":21897,"children":21898},{"class":2074,"line":16},[21899],{"type":21,"tag":2072,"props":21900,"children":21901},{"emptyLinePlaceholder":3460},[21902],{"type":26,"value":3463},{"type":21,"tag":2072,"props":21904,"children":21905},{"class":2074,"line":366},[21906],{"type":21,"tag":2072,"props":21907,"children":21908},{"style":3985},[21909],{"type":26,"value":21910},"# PennyLane: completely different API, rewrite circuit\n",{"type":21,"tag":2072,"props":21912,"children":21913},{"class":2074,"line":853},[21914,21918,21922,21926],{"type":21,"tag":2072,"props":21915,"children":21916},{"style":3372},[21917],{"type":26,"value":3375},{"type":21,"tag":2072,"props":21919,"children":21920},{"style":2079},[21921],{"type":26,"value":14153},{"type":21,"tag":2072,"props":21923,"children":21924},{"style":3372},[21925],{"type":26,"value":3385},{"type":21,"tag":2072,"props":21927,"children":21928},{"style":2079},[21929],{"type":26,"value":14162},{"type":21,"tag":2072,"props":21931,"children":21932},{"class":2074,"line":3092},[21933,21937,21941,21945,21950,21954,21958,21962,21966],{"type":21,"tag":2072,"props":21934,"children":21935},{"style":2079},[21936],{"type":26,"value":14286},{"type":21,"tag":2072,"props":21938,"children":21939},{"style":3372},[21940],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21942,"children":21943},{"style":2079},[21944],{"type":26,"value":14295},{"type":21,"tag":2072,"props":21946,"children":21947},{"style":2108},[21948],{"type":26,"value":21949},"'default.qubit'",{"type":21,"tag":2072,"props":21951,"children":21952},{"style":2079},[21953],{"type":26,"value":798},{"type":21,"tag":2072,"props":21955,"children":21956},{"style":3735},[21957],{"type":26,"value":14309},{"type":21,"tag":2072,"props":21959,"children":21960},{"style":3372},[21961],{"type":26,"value":3487},{"type":21,"tag":2072,"props":21963,"children":21964},{"style":2097},[21965],{"type":26,"value":2170},{"type":21,"tag":2072,"props":21967,"children":21968},{"style":2079},[21969],{"type":26,"value":4281},{"type":21,"tag":2072,"props":21971,"children":21972},{"class":2074,"line":3651},[21973,21977],{"type":21,"tag":2072,"props":21974,"children":21975},{"style":3474},[21976],{"type":26,"value":14333},{"type":21,"tag":2072,"props":21978,"children":21979},{"style":2079},[21980],{"type":26,"value":14338},{"type":21,"tag":2072,"props":21982,"children":21983},{"class":2074,"line":2616},[21984,21988,21993],{"type":21,"tag":2072,"props":21985,"children":21986},{"style":3372},[21987],{"type":26,"value":3471},{"type":21,"tag":2072,"props":21989,"children":21990},{"style":3474},[21991],{"type":26,"value":21992}," bell",{"type":21,"tag":2072,"props":21994,"children":21995},{"style":2079},[21996],{"type":26,"value":21997},"():\n",{"type":21,"tag":2072,"props":21999,"children":22000},{"class":2074,"line":3695},[22001,22006,22010,22014,22018],{"type":21,"tag":2072,"props":22002,"children":22003},{"style":2079},[22004],{"type":26,"value":22005},"    qml.Hadamard(",{"type":21,"tag":2072,"props":22007,"children":22008},{"style":3735},[22009],{"type":26,"value":14309},{"type":21,"tag":2072,"props":22011,"children":22012},{"style":3372},[22013],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22015,"children":22016},{"style":2097},[22017],{"type":26,"value":4295},{"type":21,"tag":2072,"props":22019,"children":22020},{"style":2079},[22021],{"type":26,"value":4281},{"type":21,"tag":2072,"props":22023,"children":22024},{"class":2074,"line":3709},[22025,22030,22034,22038,22043,22047,22051,22055],{"type":21,"tag":2072,"props":22026,"children":22027},{"style":2079},[22028],{"type":26,"value":22029},"    qml.CNOT(",{"type":21,"tag":2072,"props":22031,"children":22032},{"style":3735},[22033],{"type":26,"value":14309},{"type":21,"tag":2072,"props":22035,"children":22036},{"style":3372},[22037],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22039,"children":22040},{"style":2079},[22041],{"type":26,"value":22042},"[",{"type":21,"tag":2072,"props":22044,"children":22045},{"style":2097},[22046],{"type":26,"value":4295},{"type":21,"tag":2072,"props":22048,"children":22049},{"style":2079},[22050],{"type":26,"value":798},{"type":21,"tag":2072,"props":22052,"children":22053},{"style":2097},[22054],{"type":26,"value":3555},{"type":21,"tag":2072,"props":22056,"children":22057},{"style":2079},[22058],{"type":26,"value":3597},{"type":21,"tag":2072,"props":22060,"children":22061},{"class":2074,"line":3717},[22062,22066,22071,22075,22079,22083,22087,22091,22095],{"type":21,"tag":2072,"props":22063,"children":22064},{"style":3372},[22065],{"type":26,"value":3701},{"type":21,"tag":2072,"props":22067,"children":22068},{"style":2079},[22069],{"type":26,"value":22070}," qml.probs(",{"type":21,"tag":2072,"props":22072,"children":22073},{"style":3735},[22074],{"type":26,"value":14309},{"type":21,"tag":2072,"props":22076,"children":22077},{"style":3372},[22078],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22080,"children":22081},{"style":2079},[22082],{"type":26,"value":22042},{"type":21,"tag":2072,"props":22084,"children":22085},{"style":2097},[22086],{"type":26,"value":4295},{"type":21,"tag":2072,"props":22088,"children":22089},{"style":2079},[22090],{"type":26,"value":798},{"type":21,"tag":2072,"props":22092,"children":22093},{"style":2097},[22094],{"type":26,"value":3555},{"type":21,"tag":2072,"props":22096,"children":22097},{"style":2079},[22098],{"type":26,"value":3597},{"type":21,"tag":2072,"props":22100,"children":22101},{"class":2074,"line":3750},[22102,22107,22111],{"type":21,"tag":2072,"props":22103,"children":22104},{"style":2079},[22105],{"type":26,"value":22106},"result_pennylane ",{"type":21,"tag":2072,"props":22108,"children":22109},{"style":3372},[22110],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22112,"children":22113},{"style":2079},[22114],{"type":26,"value":22115}," bell()\n",{"type":21,"tag":2072,"props":22117,"children":22118},{"class":2074,"line":3769},[22119],{"type":21,"tag":2072,"props":22120,"children":22121},{"emptyLinePlaceholder":3460},[22122],{"type":26,"value":3463},{"type":21,"tag":2072,"props":22124,"children":22125},{"class":2074,"line":3777},[22126],{"type":21,"tag":2072,"props":22127,"children":22128},{"style":3985},[22129],{"type":26,"value":22130},"# CUDA-Q: yet another API, rewrite again\n",{"type":21,"tag":2072,"props":22132,"children":22133},{"class":2074,"line":3808},[22134,22138],{"type":21,"tag":2072,"props":22135,"children":22136},{"style":3372},[22137],{"type":26,"value":3375},{"type":21,"tag":2072,"props":22139,"children":22140},{"style":2079},[22141],{"type":26,"value":22142}," cudaq\n",{"type":21,"tag":2072,"props":22144,"children":22145},{"class":2074,"line":3853},[22146],{"type":21,"tag":2072,"props":22147,"children":22148},{"style":3474},[22149],{"type":26,"value":22150},"@cudaq.kernel\n",{"type":21,"tag":2072,"props":22152,"children":22153},{"class":2074,"line":3895},[22154,22158,22162],{"type":21,"tag":2072,"props":22155,"children":22156},{"style":3372},[22157],{"type":26,"value":3471},{"type":21,"tag":2072,"props":22159,"children":22160},{"style":3474},[22161],{"type":26,"value":21992},{"type":21,"tag":2072,"props":22163,"children":22164},{"style":2079},[22165],{"type":26,"value":21997},{"type":21,"tag":2072,"props":22167,"children":22168},{"class":2074,"line":3913},[22169,22174,22178,22183,22187],{"type":21,"tag":2072,"props":22170,"children":22171},{"style":2079},[22172],{"type":26,"value":22173},"    qvec ",{"type":21,"tag":2072,"props":22175,"children":22176},{"style":3372},[22177],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22179,"children":22180},{"style":2079},[22181],{"type":26,"value":22182}," cudaq.qvector(",{"type":21,"tag":2072,"props":22184,"children":22185},{"style":2097},[22186],{"type":26,"value":2170},{"type":21,"tag":2072,"props":22188,"children":22189},{"style":2079},[22190],{"type":26,"value":4281},{"type":21,"tag":2072,"props":22192,"children":22193},{"class":2074,"line":3991},[22194,22199,22203,22208,22212,22217,22221],{"type":21,"tag":2072,"props":22195,"children":22196},{"style":2079},[22197],{"type":26,"value":22198},"    h(qvec[",{"type":21,"tag":2072,"props":22200,"children":22201},{"style":2097},[22202],{"type":26,"value":4295},{"type":21,"tag":2072,"props":22204,"children":22205},{"style":2079},[22206],{"type":26,"value":22207},"]); cx(qvec[",{"type":21,"tag":2072,"props":22209,"children":22210},{"style":2097},[22211],{"type":26,"value":4295},{"type":21,"tag":2072,"props":22213,"children":22214},{"style":2079},[22215],{"type":26,"value":22216},"], qvec[",{"type":21,"tag":2072,"props":22218,"children":22219},{"style":2097},[22220],{"type":26,"value":3555},{"type":21,"tag":2072,"props":22222,"children":22223},{"style":2079},[22224],{"type":26,"value":22225},"]); mz(qvec)\n",{"type":21,"tag":2072,"props":22227,"children":22228},{"class":2074,"line":4019},[22229,22234,22238,22243,22248,22252,22256],{"type":21,"tag":2072,"props":22230,"children":22231},{"style":2079},[22232],{"type":26,"value":22233},"result_cudaq ",{"type":21,"tag":2072,"props":22235,"children":22236},{"style":3372},[22237],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22239,"children":22240},{"style":2079},[22241],{"type":26,"value":22242}," cudaq.sample(bell, ",{"type":21,"tag":2072,"props":22244,"children":22245},{"style":3735},[22246],{"type":26,"value":22247},"shots_count",{"type":21,"tag":2072,"props":22249,"children":22250},{"style":3372},[22251],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22253,"children":22254},{"style":2097},[22255],{"type":26,"value":20641},{"type":21,"tag":2072,"props":22257,"children":22258},{"style":2079},[22259],{"type":26,"value":4281},{"type":21,"tag":22,"props":22261,"children":22262},{},[22263],{"type":21,"tag":784,"props":22264,"children":22265},{},[22266],{"type":26,"value":22267},"HLQuantum (one circuit, any backend):",{"type":21,"tag":2062,"props":22269,"children":22271},{"code":22270,"language":3361,"meta":7,"className":3362,"style":7},"import hlquantum as hlq\n\nqc = hlq.Circuit(2)\nqc.h(0).cx(0, 1).measure_all()\n\n# Switch backends with one word\nresult_qiskit    = hlq.run(qc, backend='qiskit')\nresult_pennylane = hlq.run(qc, backend='pennylane')\nresult_cudaq     = hlq.run(qc, backend='cudaq')    # GPU\nresult_cirq      = hlq.run(qc, backend='cirq')\nresult_ionq      = hlq.run(qc, backend='ionq', device='aria-1')\nresult_ibm       = hlq.run(qc, backend='qiskit', device='ibm_sherbrooke')\n",[22272],{"type":21,"tag":1831,"props":22273,"children":22274},{"__ignoreMap":7},[22275,22294,22301,22324,22355,22362,22370,22402,22434,22472,22505,22556],{"type":21,"tag":2072,"props":22276,"children":22277},{"class":2074,"line":2075},[22278,22282,22286,22290],{"type":21,"tag":2072,"props":22279,"children":22280},{"style":3372},[22281],{"type":26,"value":3375},{"type":21,"tag":2072,"props":22283,"children":22284},{"style":2079},[22285],{"type":26,"value":19439},{"type":21,"tag":2072,"props":22287,"children":22288},{"style":3372},[22289],{"type":26,"value":3385},{"type":21,"tag":2072,"props":22291,"children":22292},{"style":2079},[22293],{"type":26,"value":19448},{"type":21,"tag":2072,"props":22295,"children":22296},{"class":2074,"line":164},[22297],{"type":21,"tag":2072,"props":22298,"children":22299},{"emptyLinePlaceholder":3460},[22300],{"type":26,"value":3463},{"type":21,"tag":2072,"props":22302,"children":22303},{"class":2074,"line":2093},[22304,22308,22312,22316,22320],{"type":21,"tag":2072,"props":22305,"children":22306},{"style":2079},[22307],{"type":26,"value":6514},{"type":21,"tag":2072,"props":22309,"children":22310},{"style":3372},[22311],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22313,"children":22314},{"style":2079},[22315],{"type":26,"value":21612},{"type":21,"tag":2072,"props":22317,"children":22318},{"style":2097},[22319],{"type":26,"value":2170},{"type":21,"tag":2072,"props":22321,"children":22322},{"style":2079},[22323],{"type":26,"value":4281},{"type":21,"tag":2072,"props":22325,"children":22326},{"class":2074,"line":2155},[22327,22331,22335,22339,22343,22347,22351],{"type":21,"tag":2072,"props":22328,"children":22329},{"style":2079},[22330],{"type":26,"value":6530},{"type":21,"tag":2072,"props":22332,"children":22333},{"style":2097},[22334],{"type":26,"value":4295},{"type":21,"tag":2072,"props":22336,"children":22337},{"style":2079},[22338],{"type":26,"value":21636},{"type":21,"tag":2072,"props":22340,"children":22341},{"style":2097},[22342],{"type":26,"value":4295},{"type":21,"tag":2072,"props":22344,"children":22345},{"style":2079},[22346],{"type":26,"value":798},{"type":21,"tag":2072,"props":22348,"children":22349},{"style":2097},[22350],{"type":26,"value":3555},{"type":21,"tag":2072,"props":22352,"children":22353},{"style":2079},[22354],{"type":26,"value":21653},{"type":21,"tag":2072,"props":22356,"children":22357},{"class":2074,"line":2178},[22358],{"type":21,"tag":2072,"props":22359,"children":22360},{"emptyLinePlaceholder":3460},[22361],{"type":26,"value":3463},{"type":21,"tag":2072,"props":22363,"children":22364},{"class":2074,"line":288},[22365],{"type":21,"tag":2072,"props":22366,"children":22367},{"style":3985},[22368],{"type":26,"value":22369},"# Switch backends with one word\n",{"type":21,"tag":2072,"props":22371,"children":22372},{"class":2074,"line":16},[22373,22378,22382,22386,22390,22394,22398],{"type":21,"tag":2072,"props":22374,"children":22375},{"style":2079},[22376],{"type":26,"value":22377},"result_qiskit    ",{"type":21,"tag":2072,"props":22379,"children":22380},{"style":3372},[22381],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22383,"children":22384},{"style":2079},[22385],{"type":26,"value":21676},{"type":21,"tag":2072,"props":22387,"children":22388},{"style":3735},[22389],{"type":26,"value":18550},{"type":21,"tag":2072,"props":22391,"children":22392},{"style":3372},[22393],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22395,"children":22396},{"style":2108},[22397],{"type":26,"value":19529},{"type":21,"tag":2072,"props":22399,"children":22400},{"style":2079},[22401],{"type":26,"value":4281},{"type":21,"tag":2072,"props":22403,"children":22404},{"class":2074,"line":366},[22405,22409,22413,22417,22421,22425,22430],{"type":21,"tag":2072,"props":22406,"children":22407},{"style":2079},[22408],{"type":26,"value":22106},{"type":21,"tag":2072,"props":22410,"children":22411},{"style":3372},[22412],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22414,"children":22415},{"style":2079},[22416],{"type":26,"value":21676},{"type":21,"tag":2072,"props":22418,"children":22419},{"style":3735},[22420],{"type":26,"value":18550},{"type":21,"tag":2072,"props":22422,"children":22423},{"style":3372},[22424],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22426,"children":22427},{"style":2108},[22428],{"type":26,"value":22429},"'pennylane'",{"type":21,"tag":2072,"props":22431,"children":22432},{"style":2079},[22433],{"type":26,"value":4281},{"type":21,"tag":2072,"props":22435,"children":22436},{"class":2074,"line":853},[22437,22442,22446,22450,22454,22458,22463,22467],{"type":21,"tag":2072,"props":22438,"children":22439},{"style":2079},[22440],{"type":26,"value":22441},"result_cudaq     ",{"type":21,"tag":2072,"props":22443,"children":22444},{"style":3372},[22445],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22447,"children":22448},{"style":2079},[22449],{"type":26,"value":21676},{"type":21,"tag":2072,"props":22451,"children":22452},{"style":3735},[22453],{"type":26,"value":18550},{"type":21,"tag":2072,"props":22455,"children":22456},{"style":3372},[22457],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22459,"children":22460},{"style":2108},[22461],{"type":26,"value":22462},"'cudaq'",{"type":21,"tag":2072,"props":22464,"children":22465},{"style":2079},[22466],{"type":26,"value":7345},{"type":21,"tag":2072,"props":22468,"children":22469},{"style":3985},[22470],{"type":26,"value":22471},"# GPU\n",{"type":21,"tag":2072,"props":22473,"children":22474},{"class":2074,"line":3092},[22475,22480,22484,22488,22492,22496,22501],{"type":21,"tag":2072,"props":22476,"children":22477},{"style":2079},[22478],{"type":26,"value":22479},"result_cirq      ",{"type":21,"tag":2072,"props":22481,"children":22482},{"style":3372},[22483],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22485,"children":22486},{"style":2079},[22487],{"type":26,"value":21676},{"type":21,"tag":2072,"props":22489,"children":22490},{"style":3735},[22491],{"type":26,"value":18550},{"type":21,"tag":2072,"props":22493,"children":22494},{"style":3372},[22495],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22497,"children":22498},{"style":2108},[22499],{"type":26,"value":22500},"'cirq'",{"type":21,"tag":2072,"props":22502,"children":22503},{"style":2079},[22504],{"type":26,"value":4281},{"type":21,"tag":2072,"props":22506,"children":22507},{"class":2074,"line":3651},[22508,22513,22517,22521,22525,22529,22534,22538,22543,22547,22552],{"type":21,"tag":2072,"props":22509,"children":22510},{"style":2079},[22511],{"type":26,"value":22512},"result_ionq      ",{"type":21,"tag":2072,"props":22514,"children":22515},{"style":3372},[22516],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22518,"children":22519},{"style":2079},[22520],{"type":26,"value":21676},{"type":21,"tag":2072,"props":22522,"children":22523},{"style":3735},[22524],{"type":26,"value":18550},{"type":21,"tag":2072,"props":22526,"children":22527},{"style":3372},[22528],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22530,"children":22531},{"style":2108},[22532],{"type":26,"value":22533},"'ionq'",{"type":21,"tag":2072,"props":22535,"children":22536},{"style":2079},[22537],{"type":26,"value":798},{"type":21,"tag":2072,"props":22539,"children":22540},{"style":3735},[22541],{"type":26,"value":22542},"device",{"type":21,"tag":2072,"props":22544,"children":22545},{"style":3372},[22546],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22548,"children":22549},{"style":2108},[22550],{"type":26,"value":22551},"'aria-1'",{"type":21,"tag":2072,"props":22553,"children":22554},{"style":2079},[22555],{"type":26,"value":4281},{"type":21,"tag":2072,"props":22557,"children":22558},{"class":2074,"line":2616},[22559,22564,22568,22572,22576,22580,22584,22588,22592,22596,22601],{"type":21,"tag":2072,"props":22560,"children":22561},{"style":2079},[22562],{"type":26,"value":22563},"result_ibm       ",{"type":21,"tag":2072,"props":22565,"children":22566},{"style":3372},[22567],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22569,"children":22570},{"style":2079},[22571],{"type":26,"value":21676},{"type":21,"tag":2072,"props":22573,"children":22574},{"style":3735},[22575],{"type":26,"value":18550},{"type":21,"tag":2072,"props":22577,"children":22578},{"style":3372},[22579],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22581,"children":22582},{"style":2108},[22583],{"type":26,"value":19529},{"type":21,"tag":2072,"props":22585,"children":22586},{"style":2079},[22587],{"type":26,"value":798},{"type":21,"tag":2072,"props":22589,"children":22590},{"style":3735},[22591],{"type":26,"value":22542},{"type":21,"tag":2072,"props":22593,"children":22594},{"style":3372},[22595],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22597,"children":22598},{"style":2108},[22599],{"type":26,"value":22600},"'ibm_sherbrooke'",{"type":21,"tag":2072,"props":22602,"children":22603},{"style":2079},[22604],{"type":26,"value":4281},{"type":21,"tag":22,"props":22606,"children":22607},{},[22608],{"type":26,"value":22609},"This is where HLQuantum pays off: prototyping on a local simulator and deploying to QPU without rewriting the circuit.",{"type":21,"tag":43,"props":22611,"children":22613},{"id":22612},"side-by-side-vqe",[22614],{"type":26,"value":22615},"Side-by-Side: VQE",{"type":21,"tag":22,"props":22617,"children":22618},{},[22619],{"type":21,"tag":784,"props":22620,"children":22621},{},[22622],{"type":26,"value":22623},"Raw Qiskit VQE:",{"type":21,"tag":2062,"props":22625,"children":22627},{"code":22626,"language":3361,"meta":7,"className":3362,"style":7},"from qiskit_nature.second_q.drivers import PySCFDriver\nfrom qiskit_nature.second_q.mappers import JordanWignerMapper\nfrom qiskit_nature.second_q.circuit.library import UCCSD\nfrom qiskit_algorithms import VQE\nfrom qiskit_algorithms.optimizers import COBYLA\nfrom qiskit.primitives import Estimator\n\ndriver = PySCFDriver(atom='H .0 .0 .0; H .0 .0 0.735')\nproblem = driver.run()\nmapper = JordanWignerMapper()\nhamiltonian = mapper.map(problem.second_q_ops()[0])\n\nansatz = UCCSD(\n    problem.num_spatial_orbitals,\n    problem.num_particles,\n    mapper,\n    initial_state=problem.reference_state,\n)\n\nvqe = VQE(Estimator(), ansatz, COBYLA())\nresult = vqe.compute_minimum_eigenvalue(hamiltonian)\nprint(f\"H2 ground state: {result.eigenvalue.real:.4f} Ha\")\n",[22628],{"type":21,"tag":1831,"props":22629,"children":22630},{"__ignoreMap":7},[22631,22652,22673,22694,22715,22736,22757,22764,22799,22816,22833,22858,22865,22882,22890,22898,22906,22923,22930,22937,22954,22970],{"type":21,"tag":2072,"props":22632,"children":22633},{"class":2074,"line":2075},[22634,22638,22643,22647],{"type":21,"tag":2072,"props":22635,"children":22636},{"style":3372},[22637],{"type":26,"value":3398},{"type":21,"tag":2072,"props":22639,"children":22640},{"style":2079},[22641],{"type":26,"value":22642}," qiskit_nature.second_q.drivers ",{"type":21,"tag":2072,"props":22644,"children":22645},{"style":3372},[22646],{"type":26,"value":3375},{"type":21,"tag":2072,"props":22648,"children":22649},{"style":2079},[22650],{"type":26,"value":22651}," PySCFDriver\n",{"type":21,"tag":2072,"props":22653,"children":22654},{"class":2074,"line":164},[22655,22659,22664,22668],{"type":21,"tag":2072,"props":22656,"children":22657},{"style":3372},[22658],{"type":26,"value":3398},{"type":21,"tag":2072,"props":22660,"children":22661},{"style":2079},[22662],{"type":26,"value":22663}," qiskit_nature.second_q.mappers ",{"type":21,"tag":2072,"props":22665,"children":22666},{"style":3372},[22667],{"type":26,"value":3375},{"type":21,"tag":2072,"props":22669,"children":22670},{"style":2079},[22671],{"type":26,"value":22672}," JordanWignerMapper\n",{"type":21,"tag":2072,"props":22674,"children":22675},{"class":2074,"line":2093},[22676,22680,22685,22689],{"type":21,"tag":2072,"props":22677,"children":22678},{"style":3372},[22679],{"type":26,"value":3398},{"type":21,"tag":2072,"props":22681,"children":22682},{"style":2079},[22683],{"type":26,"value":22684}," qiskit_nature.second_q.circuit.library ",{"type":21,"tag":2072,"props":22686,"children":22687},{"style":3372},[22688],{"type":26,"value":3375},{"type":21,"tag":2072,"props":22690,"children":22691},{"style":2097},[22692],{"type":26,"value":22693}," UCCSD\n",{"type":21,"tag":2072,"props":22695,"children":22696},{"class":2074,"line":2155},[22697,22701,22706,22710],{"type":21,"tag":2072,"props":22698,"children":22699},{"style":3372},[22700],{"type":26,"value":3398},{"type":21,"tag":2072,"props":22702,"children":22703},{"style":2079},[22704],{"type":26,"value":22705}," qiskit_algorithms ",{"type":21,"tag":2072,"props":22707,"children":22708},{"style":3372},[22709],{"type":26,"value":3375},{"type":21,"tag":2072,"props":22711,"children":22712},{"style":2097},[22713],{"type":26,"value":22714}," VQE\n",{"type":21,"tag":2072,"props":22716,"children":22717},{"class":2074,"line":2178},[22718,22722,22727,22731],{"type":21,"tag":2072,"props":22719,"children":22720},{"style":3372},[22721],{"type":26,"value":3398},{"type":21,"tag":2072,"props":22723,"children":22724},{"style":2079},[22725],{"type":26,"value":22726}," qiskit_algorithms.optimizers ",{"type":21,"tag":2072,"props":22728,"children":22729},{"style":3372},[22730],{"type":26,"value":3375},{"type":21,"tag":2072,"props":22732,"children":22733},{"style":2097},[22734],{"type":26,"value":22735}," COBYLA\n",{"type":21,"tag":2072,"props":22737,"children":22738},{"class":2074,"line":288},[22739,22743,22748,22752],{"type":21,"tag":2072,"props":22740,"children":22741},{"style":3372},[22742],{"type":26,"value":3398},{"type":21,"tag":2072,"props":22744,"children":22745},{"style":2079},[22746],{"type":26,"value":22747}," qiskit.primitives ",{"type":21,"tag":2072,"props":22749,"children":22750},{"style":3372},[22751],{"type":26,"value":3375},{"type":21,"tag":2072,"props":22753,"children":22754},{"style":2079},[22755],{"type":26,"value":22756}," Estimator\n",{"type":21,"tag":2072,"props":22758,"children":22759},{"class":2074,"line":16},[22760],{"type":21,"tag":2072,"props":22761,"children":22762},{"emptyLinePlaceholder":3460},[22763],{"type":26,"value":3463},{"type":21,"tag":2072,"props":22765,"children":22766},{"class":2074,"line":366},[22767,22772,22776,22781,22786,22790,22795],{"type":21,"tag":2072,"props":22768,"children":22769},{"style":2079},[22770],{"type":26,"value":22771},"driver ",{"type":21,"tag":2072,"props":22773,"children":22774},{"style":3372},[22775],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22777,"children":22778},{"style":2079},[22779],{"type":26,"value":22780}," PySCFDriver(",{"type":21,"tag":2072,"props":22782,"children":22783},{"style":3735},[22784],{"type":26,"value":22785},"atom",{"type":21,"tag":2072,"props":22787,"children":22788},{"style":3372},[22789],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22791,"children":22792},{"style":2108},[22793],{"type":26,"value":22794},"'H .0 .0 .0; H .0 .0 0.735'",{"type":21,"tag":2072,"props":22796,"children":22797},{"style":2079},[22798],{"type":26,"value":4281},{"type":21,"tag":2072,"props":22800,"children":22801},{"class":2074,"line":853},[22802,22807,22811],{"type":21,"tag":2072,"props":22803,"children":22804},{"style":2079},[22805],{"type":26,"value":22806},"problem ",{"type":21,"tag":2072,"props":22808,"children":22809},{"style":3372},[22810],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22812,"children":22813},{"style":2079},[22814],{"type":26,"value":22815}," driver.run()\n",{"type":21,"tag":2072,"props":22817,"children":22818},{"class":2074,"line":3092},[22819,22824,22828],{"type":21,"tag":2072,"props":22820,"children":22821},{"style":2079},[22822],{"type":26,"value":22823},"mapper ",{"type":21,"tag":2072,"props":22825,"children":22826},{"style":3372},[22827],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22829,"children":22830},{"style":2079},[22831],{"type":26,"value":22832}," JordanWignerMapper()\n",{"type":21,"tag":2072,"props":22834,"children":22835},{"class":2074,"line":3651},[22836,22841,22845,22850,22854],{"type":21,"tag":2072,"props":22837,"children":22838},{"style":2079},[22839],{"type":26,"value":22840},"hamiltonian ",{"type":21,"tag":2072,"props":22842,"children":22843},{"style":3372},[22844],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22846,"children":22847},{"style":2079},[22848],{"type":26,"value":22849}," mapper.map(problem.second_q_ops()[",{"type":21,"tag":2072,"props":22851,"children":22852},{"style":2097},[22853],{"type":26,"value":4295},{"type":21,"tag":2072,"props":22855,"children":22856},{"style":2079},[22857],{"type":26,"value":3597},{"type":21,"tag":2072,"props":22859,"children":22860},{"class":2074,"line":2616},[22861],{"type":21,"tag":2072,"props":22862,"children":22863},{"emptyLinePlaceholder":3460},[22864],{"type":26,"value":3463},{"type":21,"tag":2072,"props":22866,"children":22867},{"class":2074,"line":3695},[22868,22873,22877],{"type":21,"tag":2072,"props":22869,"children":22870},{"style":2079},[22871],{"type":26,"value":22872},"ansatz ",{"type":21,"tag":2072,"props":22874,"children":22875},{"style":3372},[22876],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22878,"children":22879},{"style":2079},[22880],{"type":26,"value":22881}," UCCSD(\n",{"type":21,"tag":2072,"props":22883,"children":22884},{"class":2074,"line":3709},[22885],{"type":21,"tag":2072,"props":22886,"children":22887},{"style":2079},[22888],{"type":26,"value":22889},"    problem.num_spatial_orbitals,\n",{"type":21,"tag":2072,"props":22891,"children":22892},{"class":2074,"line":3717},[22893],{"type":21,"tag":2072,"props":22894,"children":22895},{"style":2079},[22896],{"type":26,"value":22897},"    problem.num_particles,\n",{"type":21,"tag":2072,"props":22899,"children":22900},{"class":2074,"line":3750},[22901],{"type":21,"tag":2072,"props":22902,"children":22903},{"style":2079},[22904],{"type":26,"value":22905},"    mapper,\n",{"type":21,"tag":2072,"props":22907,"children":22908},{"class":2074,"line":3769},[22909,22914,22918],{"type":21,"tag":2072,"props":22910,"children":22911},{"style":3735},[22912],{"type":26,"value":22913},"    initial_state",{"type":21,"tag":2072,"props":22915,"children":22916},{"style":3372},[22917],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22919,"children":22920},{"style":2079},[22921],{"type":26,"value":22922},"problem.reference_state,\n",{"type":21,"tag":2072,"props":22924,"children":22925},{"class":2074,"line":3777},[22926],{"type":21,"tag":2072,"props":22927,"children":22928},{"style":2079},[22929],{"type":26,"value":4281},{"type":21,"tag":2072,"props":22931,"children":22932},{"class":2074,"line":3808},[22933],{"type":21,"tag":2072,"props":22934,"children":22935},{"emptyLinePlaceholder":3460},[22936],{"type":26,"value":3463},{"type":21,"tag":2072,"props":22938,"children":22939},{"class":2074,"line":3853},[22940,22945,22949],{"type":21,"tag":2072,"props":22941,"children":22942},{"style":2079},[22943],{"type":26,"value":22944},"vqe ",{"type":21,"tag":2072,"props":22946,"children":22947},{"style":3372},[22948],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22950,"children":22951},{"style":2079},[22952],{"type":26,"value":22953}," VQE(Estimator(), ansatz, COBYLA())\n",{"type":21,"tag":2072,"props":22955,"children":22956},{"class":2074,"line":3895},[22957,22961,22965],{"type":21,"tag":2072,"props":22958,"children":22959},{"style":2079},[22960],{"type":26,"value":19471},{"type":21,"tag":2072,"props":22962,"children":22963},{"style":3372},[22964],{"type":26,"value":3487},{"type":21,"tag":2072,"props":22966,"children":22967},{"style":2079},[22968],{"type":26,"value":22969}," vqe.compute_minimum_eigenvalue(hamiltonian)\n",{"type":21,"tag":2072,"props":22971,"children":22972},{"class":2074,"line":3913},[22973,22977,22981,22985,22990,22994,22999,23003,23007,23011],{"type":21,"tag":2072,"props":22974,"children":22975},{"style":2097},[22976],{"type":26,"value":4614},{"type":21,"tag":2072,"props":22978,"children":22979},{"style":2079},[22980],{"type":26,"value":3879},{"type":21,"tag":2072,"props":22982,"children":22983},{"style":3372},[22984],{"type":26,"value":3938},{"type":21,"tag":2072,"props":22986,"children":22987},{"style":2108},[22988],{"type":26,"value":22989},"\"H2 ground state: ",{"type":21,"tag":2072,"props":22991,"children":22992},{"style":2097},[22993],{"type":26,"value":3948},{"type":21,"tag":2072,"props":22995,"children":22996},{"style":2079},[22997],{"type":26,"value":22998},"result.eigenvalue.real",{"type":21,"tag":2072,"props":23000,"children":23001},{"style":3372},[23002],{"type":26,"value":10733},{"type":21,"tag":2072,"props":23004,"children":23005},{"style":2097},[23006],{"type":26,"value":3958},{"type":21,"tag":2072,"props":23008,"children":23009},{"style":2108},[23010],{"type":26,"value":19575},{"type":21,"tag":2072,"props":23012,"children":23013},{"style":2079},[23014],{"type":26,"value":4281},{"type":21,"tag":22,"props":23016,"children":23017},{},[23018],{"type":21,"tag":784,"props":23019,"children":23020},{},[23021],{"type":26,"value":23022},"HLQuantum VQE:",{"type":21,"tag":2062,"props":23024,"children":23026},{"code":23025,"language":3361,"meta":7,"className":3362,"style":7},"import hlquantum as hlq\n\nresult = hlq.algorithms.vqe(\n    molecule='H2',\n    basis='sto-3g',\n    backend='qiskit',\n    optimizer='COBYLA',\n)\nprint(f\"H2 ground state: {result.energy:.4f} Ha\")\n\n# Switch to GPU:\nresult_gpu = hlq.algorithms.vqe(molecule='H2', backend='cudaq')\n",[23027],{"type":21,"tag":1831,"props":23028,"children":23029},{"__ignoreMap":7},[23030,23049,23056,23072,23092,23112,23132,23153,23160,23203,23210,23218],{"type":21,"tag":2072,"props":23031,"children":23032},{"class":2074,"line":2075},[23033,23037,23041,23045],{"type":21,"tag":2072,"props":23034,"children":23035},{"style":3372},[23036],{"type":26,"value":3375},{"type":21,"tag":2072,"props":23038,"children":23039},{"style":2079},[23040],{"type":26,"value":19439},{"type":21,"tag":2072,"props":23042,"children":23043},{"style":3372},[23044],{"type":26,"value":3385},{"type":21,"tag":2072,"props":23046,"children":23047},{"style":2079},[23048],{"type":26,"value":19448},{"type":21,"tag":2072,"props":23050,"children":23051},{"class":2074,"line":164},[23052],{"type":21,"tag":2072,"props":23053,"children":23054},{"emptyLinePlaceholder":3460},[23055],{"type":26,"value":3463},{"type":21,"tag":2072,"props":23057,"children":23058},{"class":2074,"line":2093},[23059,23063,23067],{"type":21,"tag":2072,"props":23060,"children":23061},{"style":2079},[23062],{"type":26,"value":19471},{"type":21,"tag":2072,"props":23064,"children":23065},{"style":3372},[23066],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23068,"children":23069},{"style":2079},[23070],{"type":26,"value":23071}," hlq.algorithms.vqe(\n",{"type":21,"tag":2072,"props":23073,"children":23074},{"class":2074,"line":2155},[23075,23080,23084,23088],{"type":21,"tag":2072,"props":23076,"children":23077},{"style":3735},[23078],{"type":26,"value":23079},"    molecule",{"type":21,"tag":2072,"props":23081,"children":23082},{"style":3372},[23083],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23085,"children":23086},{"style":2108},[23087],{"type":26,"value":19494},{"type":21,"tag":2072,"props":23089,"children":23090},{"style":2079},[23091],{"type":26,"value":2175},{"type":21,"tag":2072,"props":23093,"children":23094},{"class":2074,"line":2178},[23095,23100,23104,23108],{"type":21,"tag":2072,"props":23096,"children":23097},{"style":3735},[23098],{"type":26,"value":23099},"    basis",{"type":21,"tag":2072,"props":23101,"children":23102},{"style":3372},[23103],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23105,"children":23106},{"style":2108},[23107],{"type":26,"value":19512},{"type":21,"tag":2072,"props":23109,"children":23110},{"style":2079},[23111],{"type":26,"value":2175},{"type":21,"tag":2072,"props":23113,"children":23114},{"class":2074,"line":288},[23115,23120,23124,23128],{"type":21,"tag":2072,"props":23116,"children":23117},{"style":3735},[23118],{"type":26,"value":23119},"    backend",{"type":21,"tag":2072,"props":23121,"children":23122},{"style":3372},[23123],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23125,"children":23126},{"style":2108},[23127],{"type":26,"value":19529},{"type":21,"tag":2072,"props":23129,"children":23130},{"style":2079},[23131],{"type":26,"value":2175},{"type":21,"tag":2072,"props":23133,"children":23134},{"class":2074,"line":16},[23135,23140,23144,23149],{"type":21,"tag":2072,"props":23136,"children":23137},{"style":3735},[23138],{"type":26,"value":23139},"    optimizer",{"type":21,"tag":2072,"props":23141,"children":23142},{"style":3372},[23143],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23145,"children":23146},{"style":2108},[23147],{"type":26,"value":23148},"'COBYLA'",{"type":21,"tag":2072,"props":23150,"children":23151},{"style":2079},[23152],{"type":26,"value":2175},{"type":21,"tag":2072,"props":23154,"children":23155},{"class":2074,"line":366},[23156],{"type":21,"tag":2072,"props":23157,"children":23158},{"style":2079},[23159],{"type":26,"value":4281},{"type":21,"tag":2072,"props":23161,"children":23162},{"class":2074,"line":853},[23163,23167,23171,23175,23179,23183,23187,23191,23195,23199],{"type":21,"tag":2072,"props":23164,"children":23165},{"style":2097},[23166],{"type":26,"value":4614},{"type":21,"tag":2072,"props":23168,"children":23169},{"style":2079},[23170],{"type":26,"value":3879},{"type":21,"tag":2072,"props":23172,"children":23173},{"style":3372},[23174],{"type":26,"value":3938},{"type":21,"tag":2072,"props":23176,"children":23177},{"style":2108},[23178],{"type":26,"value":22989},{"type":21,"tag":2072,"props":23180,"children":23181},{"style":2097},[23182],{"type":26,"value":3948},{"type":21,"tag":2072,"props":23184,"children":23185},{"style":2079},[23186],{"type":26,"value":19562},{"type":21,"tag":2072,"props":23188,"children":23189},{"style":3372},[23190],{"type":26,"value":10733},{"type":21,"tag":2072,"props":23192,"children":23193},{"style":2097},[23194],{"type":26,"value":3958},{"type":21,"tag":2072,"props":23196,"children":23197},{"style":2108},[23198],{"type":26,"value":19575},{"type":21,"tag":2072,"props":23200,"children":23201},{"style":2079},[23202],{"type":26,"value":4281},{"type":21,"tag":2072,"props":23204,"children":23205},{"class":2074,"line":3092},[23206],{"type":21,"tag":2072,"props":23207,"children":23208},{"emptyLinePlaceholder":3460},[23209],{"type":26,"value":3463},{"type":21,"tag":2072,"props":23211,"children":23212},{"class":2074,"line":3651},[23213],{"type":21,"tag":2072,"props":23214,"children":23215},{"style":3985},[23216],{"type":26,"value":23217},"# Switch to GPU:\n",{"type":21,"tag":2072,"props":23219,"children":23220},{"class":2074,"line":2616},[23221,23226,23230,23234,23238,23242,23246,23250,23254,23258,23262],{"type":21,"tag":2072,"props":23222,"children":23223},{"style":2079},[23224],{"type":26,"value":23225},"result_gpu ",{"type":21,"tag":2072,"props":23227,"children":23228},{"style":3372},[23229],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23231,"children":23232},{"style":2079},[23233],{"type":26,"value":19480},{"type":21,"tag":2072,"props":23235,"children":23236},{"style":3735},[23237],{"type":26,"value":19485},{"type":21,"tag":2072,"props":23239,"children":23240},{"style":3372},[23241],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23243,"children":23244},{"style":2108},[23245],{"type":26,"value":19494},{"type":21,"tag":2072,"props":23247,"children":23248},{"style":2079},[23249],{"type":26,"value":798},{"type":21,"tag":2072,"props":23251,"children":23252},{"style":3735},[23253],{"type":26,"value":18550},{"type":21,"tag":2072,"props":23255,"children":23256},{"style":3372},[23257],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23259,"children":23260},{"style":2108},[23261],{"type":26,"value":22462},{"type":21,"tag":2072,"props":23263,"children":23264},{"style":2079},[23265],{"type":26,"value":4281},{"type":21,"tag":22,"props":23267,"children":23268},{},[23269,23271,23276],{"type":26,"value":23270},"Both compute the same H₂ ground state energy. Our ",{"type":21,"tag":29,"props":23272,"children":23273},{"href":31},[23274],{"type":26,"value":23275},"VQE walkthrough",{"type":26,"value":23277}," explains what the optimization loop is doing. Raw Qiskit gives you full control over the ansatz, mapper, and driver. HLQuantum's one-liner is best for comparing backends or getting results quickly. Raw Qiskit is better when you need custom ansatze or algorithm tuning.",{"type":21,"tag":43,"props":23279,"children":23281},{"id":23280},"when-to-use-raw-qiskit",[23282],{"type":26,"value":23283},"When to Use Raw Qiskit",{"type":21,"tag":22,"props":23285,"children":23286},{},[23287],{"type":26,"value":23288},"Use Qiskit directly when:",{"type":21,"tag":6138,"props":23290,"children":23291},{},[23292,23309,23319,23359,23369],{"type":21,"tag":6142,"props":23293,"children":23294},{},[23295,23300,23302,23307],{"type":21,"tag":784,"props":23296,"children":23297},{},[23298],{"type":26,"value":23299},"You're targeting IBM hardware exclusively",{"type":26,"value":23301},": Qiskit's ",{"type":21,"tag":29,"props":23303,"children":23304},{"href":4884},[23305],{"type":26,"value":23306},"transpiler",{"type":26,"value":23308}," and IBM Runtime primitives give you the best performance on IBM QPUs. HLQuantum's abstraction adds overhead.",{"type":21,"tag":6142,"props":23310,"children":23311},{},[23312,23317],{"type":21,"tag":784,"props":23313,"children":23314},{},[23315],{"type":26,"value":23316},"You need fine-grained circuit control",{"type":26,"value":23318},": custom gate decompositions, specific transpiler passes, pulse-level control, dynamic circuits with mid-circuit measurements.",{"type":21,"tag":6142,"props":23320,"children":23321},{},[23322,23327,23329,23335,23336,23342,23343,23349,23351,23357],{"type":21,"tag":784,"props":23323,"children":23324},{},[23325],{"type":26,"value":23326},"You're doing IBM-ecosystem research",{"type":26,"value":23328},": using ",{"type":21,"tag":1831,"props":23330,"children":23332},{"className":23331},[],[23333],{"type":26,"value":23334},"qiskit-nature",{"type":26,"value":798},{"type":21,"tag":1831,"props":23337,"children":23339},{"className":23338},[],[23340],{"type":26,"value":23341},"qiskit-finance",{"type":26,"value":798},{"type":21,"tag":1831,"props":23344,"children":23346},{"className":23345},[],[23347],{"type":26,"value":23348},"qiskit-optimization",{"type":26,"value":23350},", or ",{"type":21,"tag":1831,"props":23352,"children":23354},{"className":23353},[],[23355],{"type":26,"value":23356},"qiskit-machine-learning",{"type":26,"value":23358},". These integrate most deeply with raw Qiskit.",{"type":21,"tag":6142,"props":23360,"children":23361},{},[23362,23367],{"type":21,"tag":784,"props":23363,"children":23364},{},[23365],{"type":26,"value":23366},"Performance is critical",{"type":26,"value":23368},": direct Qiskit code has less overhead than the translation layer in HLQuantum.",{"type":21,"tag":6142,"props":23370,"children":23371},{},[23372,23377],{"type":21,"tag":784,"props":23373,"children":23374},{},[23375],{"type":26,"value":23376},"You're contributing to the Qiskit ecosystem",{"type":26,"value":23378},": writing Qiskit plugins, tutorials, or research papers where Qiskit is the reference implementation.",{"type":21,"tag":43,"props":23380,"children":23382},{"id":23381},"when-to-use-hlquantum",[23383],{"type":26,"value":23384},"When to Use HLQuantum",{"type":21,"tag":22,"props":23386,"children":23387},{},[23388],{"type":26,"value":23389},"Use HLQuantum when:",{"type":21,"tag":6138,"props":23391,"children":23392},{},[23393,23403,23413,23423,23454],{"type":21,"tag":6142,"props":23394,"children":23395},{},[23396,23401],{"type":21,"tag":784,"props":23397,"children":23398},{},[23399],{"type":26,"value":23400},"You need backend flexibility",{"type":26,"value":23402},": comparing simulator performance, benchmarking circuits on different architectures, or accessing multiple cloud QPUs.",{"type":21,"tag":6142,"props":23404,"children":23405},{},[23406,23411],{"type":21,"tag":784,"props":23407,"children":23408},{},[23409],{"type":26,"value":23410},"You're prototyping algorithms",{"type":26,"value":23412},": write once, test everywhere. Don't rewire circuits when switching from local simulation to GPU to real hardware.",{"type":21,"tag":6142,"props":23414,"children":23415},{},[23416,23421],{"type":21,"tag":784,"props":23417,"children":23418},{},[23419],{"type":26,"value":23420},"You're teaching or learning",{"type":26,"value":23422},": one consistent API across all backends makes learning easier. No need to learn 6 different APIs.",{"type":21,"tag":6142,"props":23424,"children":23425},{},[23426,23431,23432,23438,23439,23445,23446,23452],{"type":21,"tag":784,"props":23427,"children":23428},{},[23429],{"type":26,"value":23430},"You want built-in algorithms",{"type":26,"value":66},{"type":21,"tag":1831,"props":23433,"children":23435},{"className":23434},[],[23436],{"type":26,"value":23437},"hlq.algorithms.vqe()",{"type":26,"value":798},{"type":21,"tag":1831,"props":23440,"children":23442},{"className":23441},[],[23443],{"type":26,"value":23444},"hlq.algorithms.qaoa()",{"type":26,"value":798},{"type":21,"tag":1831,"props":23447,"children":23449},{"className":23448},[],[23450],{"type":26,"value":23451},"hlq.algorithms.grover()",{"type":26,"value":23453}," handle the boilerplate.",{"type":21,"tag":6142,"props":23455,"children":23456},{},[23457,23462],{"type":21,"tag":784,"props":23458,"children":23459},{},[23460],{"type":26,"value":23461},"You're building multi-backend applications",{"type":26,"value":23463},": if your app needs to run on whatever QPU has the shortest queue or lowest cost, HLQuantum's dispatcher handles that.",{"type":21,"tag":43,"props":23465,"children":23467},{"id":23466},"migration-qiskit-hlquantum",[23468],{"type":26,"value":23469},"Migration: Qiskit → HLQuantum",{"type":21,"tag":22,"props":23471,"children":23472},{},[23473],{"type":26,"value":23474},"If you have existing Qiskit code, HLQuantum consumes Qiskit circuits directly:",{"type":21,"tag":2062,"props":23476,"children":23478},{"code":23477,"language":3361,"meta":7,"className":3362,"style":7},"import hlquantum as hlq\nfrom qiskit import QuantumCircuit\n\n# Existing Qiskit circuit\nqc = QuantumCircuit(3)\nqc.h(0); qc.cx(0, 1); qc.cx(1, 2)\n\n# Wrap and run on any backend\nresult = hlq.run(hlq.from_qiskit(qc), backend='pennylane')\nresult_gpu = hlq.run(hlq.from_qiskit(qc), backend='cudaq')\n",[23479],{"type":21,"tag":1831,"props":23480,"children":23481},{"__ignoreMap":7},[23482,23501,23520,23527,23535,23558,23606,23613,23621,23653],{"type":21,"tag":2072,"props":23483,"children":23484},{"class":2074,"line":2075},[23485,23489,23493,23497],{"type":21,"tag":2072,"props":23486,"children":23487},{"style":3372},[23488],{"type":26,"value":3375},{"type":21,"tag":2072,"props":23490,"children":23491},{"style":2079},[23492],{"type":26,"value":19439},{"type":21,"tag":2072,"props":23494,"children":23495},{"style":3372},[23496],{"type":26,"value":3385},{"type":21,"tag":2072,"props":23498,"children":23499},{"style":2079},[23500],{"type":26,"value":19448},{"type":21,"tag":2072,"props":23502,"children":23503},{"class":2074,"line":164},[23504,23508,23512,23516],{"type":21,"tag":2072,"props":23505,"children":23506},{"style":3372},[23507],{"type":26,"value":3398},{"type":21,"tag":2072,"props":23509,"children":23510},{"style":2079},[23511],{"type":26,"value":3403},{"type":21,"tag":2072,"props":23513,"children":23514},{"style":3372},[23515],{"type":26,"value":3375},{"type":21,"tag":2072,"props":23517,"children":23518},{"style":2079},[23519],{"type":26,"value":20483},{"type":21,"tag":2072,"props":23521,"children":23522},{"class":2074,"line":2093},[23523],{"type":21,"tag":2072,"props":23524,"children":23525},{"emptyLinePlaceholder":3460},[23526],{"type":26,"value":3463},{"type":21,"tag":2072,"props":23528,"children":23529},{"class":2074,"line":2155},[23530],{"type":21,"tag":2072,"props":23531,"children":23532},{"style":3985},[23533],{"type":26,"value":23534},"# Existing Qiskit circuit\n",{"type":21,"tag":2072,"props":23536,"children":23537},{"class":2074,"line":2178},[23538,23542,23546,23550,23554],{"type":21,"tag":2072,"props":23539,"children":23540},{"style":2079},[23541],{"type":26,"value":6514},{"type":21,"tag":2072,"props":23543,"children":23544},{"style":3372},[23545],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23547,"children":23548},{"style":2079},[23549],{"type":26,"value":4264},{"type":21,"tag":2072,"props":23551,"children":23552},{"style":2097},[23553],{"type":26,"value":5641},{"type":21,"tag":2072,"props":23555,"children":23556},{"style":2079},[23557],{"type":26,"value":4281},{"type":21,"tag":2072,"props":23559,"children":23560},{"class":2074,"line":288},[23561,23565,23569,23574,23578,23582,23586,23590,23594,23598,23602],{"type":21,"tag":2072,"props":23562,"children":23563},{"style":2079},[23564],{"type":26,"value":6530},{"type":21,"tag":2072,"props":23566,"children":23567},{"style":2097},[23568],{"type":26,"value":4295},{"type":21,"tag":2072,"props":23570,"children":23571},{"style":2079},[23572],{"type":26,"value":23573},"); qc.cx(",{"type":21,"tag":2072,"props":23575,"children":23576},{"style":2097},[23577],{"type":26,"value":4295},{"type":21,"tag":2072,"props":23579,"children":23580},{"style":2079},[23581],{"type":26,"value":798},{"type":21,"tag":2072,"props":23583,"children":23584},{"style":2097},[23585],{"type":26,"value":3555},{"type":21,"tag":2072,"props":23587,"children":23588},{"style":2079},[23589],{"type":26,"value":23573},{"type":21,"tag":2072,"props":23591,"children":23592},{"style":2097},[23593],{"type":26,"value":3555},{"type":21,"tag":2072,"props":23595,"children":23596},{"style":2079},[23597],{"type":26,"value":798},{"type":21,"tag":2072,"props":23599,"children":23600},{"style":2097},[23601],{"type":26,"value":2170},{"type":21,"tag":2072,"props":23603,"children":23604},{"style":2079},[23605],{"type":26,"value":4281},{"type":21,"tag":2072,"props":23607,"children":23608},{"class":2074,"line":16},[23609],{"type":21,"tag":2072,"props":23610,"children":23611},{"emptyLinePlaceholder":3460},[23612],{"type":26,"value":3463},{"type":21,"tag":2072,"props":23614,"children":23615},{"class":2074,"line":366},[23616],{"type":21,"tag":2072,"props":23617,"children":23618},{"style":3985},[23619],{"type":26,"value":23620},"# Wrap and run on any backend\n",{"type":21,"tag":2072,"props":23622,"children":23623},{"class":2074,"line":853},[23624,23628,23632,23637,23641,23645,23649],{"type":21,"tag":2072,"props":23625,"children":23626},{"style":2079},[23627],{"type":26,"value":19471},{"type":21,"tag":2072,"props":23629,"children":23630},{"style":3372},[23631],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23633,"children":23634},{"style":2079},[23635],{"type":26,"value":23636}," hlq.run(hlq.from_qiskit(qc), ",{"type":21,"tag":2072,"props":23638,"children":23639},{"style":3735},[23640],{"type":26,"value":18550},{"type":21,"tag":2072,"props":23642,"children":23643},{"style":3372},[23644],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23646,"children":23647},{"style":2108},[23648],{"type":26,"value":22429},{"type":21,"tag":2072,"props":23650,"children":23651},{"style":2079},[23652],{"type":26,"value":4281},{"type":21,"tag":2072,"props":23654,"children":23655},{"class":2074,"line":3092},[23656,23660,23664,23668,23672,23676,23680],{"type":21,"tag":2072,"props":23657,"children":23658},{"style":2079},[23659],{"type":26,"value":23225},{"type":21,"tag":2072,"props":23661,"children":23662},{"style":3372},[23663],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23665,"children":23666},{"style":2079},[23667],{"type":26,"value":23636},{"type":21,"tag":2072,"props":23669,"children":23670},{"style":3735},[23671],{"type":26,"value":18550},{"type":21,"tag":2072,"props":23673,"children":23674},{"style":3372},[23675],{"type":26,"value":3487},{"type":21,"tag":2072,"props":23677,"children":23678},{"style":2108},[23679],{"type":26,"value":22462},{"type":21,"tag":2072,"props":23681,"children":23682},{"style":2079},[23683],{"type":26,"value":4281},{"type":21,"tag":22,"props":23685,"children":23686},{},[23687],{"type":26,"value":23688},"No rewrite required. You add HLQuantum's multi-backend capabilities to existing Qiskit code incrementally.",{"type":21,"tag":43,"props":23690,"children":23692},{"id":23691},"decision-checklist",[23693],{"type":26,"value":23694},"Decision Checklist",{"type":21,"tag":2062,"props":23696,"children":23698},{"code":23697},"Starting a new project?\n├── Need IBM-specific features (Qiskit Runtime, pulse control)?  → Raw Qiskit\n├── Need to run on multiple backends or compare performance?     → HLQuantum\n├── Learning quantum computing for the first time?               → HLQuantum\n└── Building a research paper targeting IBM hardware?            → Raw Qiskit\n\nMigrating existing Qiskit code?\n├── Want to add GPU acceleration?     → HLQuantum (from_qiskit + cudaq)\n├── Want to try IonQ hardware?        → HLQuantum (from_qiskit + ionq)\n└── Want to stay IBM-only?            → Stay with Qiskit\n",[23699],{"type":21,"tag":1831,"props":23700,"children":23701},{"__ignoreMap":7},[23702],{"type":26,"value":23697},{"type":21,"tag":22,"props":23704,"children":23705},{},[23706],{"type":26,"value":23707},"The two aren't mutually exclusive. Many workflows start with raw Qiskit for circuit design, then wrap with HLQuantum for multi-backend deployment.",{"type":21,"tag":22,"props":23709,"children":23710},{},[23711,23716,23717,23722,23723],{"type":21,"tag":784,"props":23712,"children":23713},{},[23714],{"type":26,"value":23715},"Get started:",{"type":26,"value":790},{"type":21,"tag":29,"props":23718,"children":23719},{"href":1206},[23720],{"type":26,"value":23721},"Compare all SDKs side by side",{"type":26,"value":6244},{"type":21,"tag":29,"props":23724,"children":23725},{"href":10987},[23726],{"type":26,"value":23727},"Getting started with free quantum computing",{"type":21,"tag":2445,"props":23729,"children":23730},{},[23731],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":23733},[23734,23735,23736,23737,23738,23739,23740,23741],{"id":21243,"depth":164,"text":21246},{"id":21312,"depth":164,"text":21315},{"id":21732,"depth":164,"text":21735},{"id":22612,"depth":164,"text":22615},{"id":23280,"depth":164,"text":23283},{"id":23381,"depth":164,"text":23384},{"id":23466,"depth":164,"text":23469},{"id":23691,"depth":164,"text":23694},"content:blog:hlquantum-vs-qiskit.md","blog\u002Fhlquantum-vs-qiskit.md","blog\u002Fhlquantum-vs-qiskit",{"_path":8518,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":23746,"description":23747,"date":23748,"author":11,"tags":23749,"readingTime":3092,"body":23750,"_type":171,"_id":24836,"_source":173,"_file":24837,"_stem":24838,"_extension":176},"Post-Quantum Cryptography: What Developers Need to Do Now","Shor's algorithm threatens RSA and ECC. NIST has finalized its post-quantum standards. Here's what the threat is, what the standards say, and what action developers should take today.","2026-03-05",[8487,8488,8486],{"type":18,"children":23751,"toc":24820},[23752,23770,23781,23787,23807,23815,23838,23846,23875,23886,23892,23897,23915,23932,23940,23968,23976,23994,24000,24005,24011,24054,24215,24221,24260,24383,24389,24435,24447,24453,24459,24469,24492,24502,24512,24518,24536,24561,24571,24581,24587,24597,24607,24617,24623,24767,24773,24781,24786,24816],{"type":21,"tag":22,"props":23753,"children":23754},{},[23755,23757,23761,23763,23768],{"type":26,"value":23756},"Quantum computers don't yet threaten your encryption. A quantum computer capable of breaking RSA-2048 would need millions of error-corrected ",{"type":21,"tag":29,"props":23758,"children":23759},{"href":874},[23760],{"type":26,"value":877},{"type":26,"value":23762},". We have hundreds of noisy physical ones. But here's the problem: adversaries are quite possibly collecting encrypted data ",{"type":21,"tag":784,"props":23764,"children":23765},{},[23766],{"type":26,"value":23767},"right now",{"type":26,"value":23769}," with the intent to decrypt it later, once quantum hardware matures. And migrating cryptographic infrastructure takes years.",{"type":21,"tag":22,"props":23771,"children":23772},{},[23773,23775,23779],{"type":26,"value":23774},"This is why 2024's NIST ",{"type":21,"tag":29,"props":23776,"children":23777},{"href":8498},[23778],{"type":26,"value":8501},{"type":26,"value":23780}," standards matter to developers today, not in 2035.",{"type":21,"tag":43,"props":23782,"children":23784},{"id":23783},"the-actual-threat-shors-algorithm",[23785],{"type":26,"value":23786},"The Actual Threat: Shor's Algorithm",{"type":21,"tag":22,"props":23788,"children":23789},{},[23790,23792,23797,23799,23805],{"type":26,"value":23791},"In 1994, ",{"type":21,"tag":29,"props":23793,"children":23794},{"href":7742},[23795],{"type":26,"value":23796},"Peter Shor proved",{"type":26,"value":23798}," that a quantum computer factors large integers in polynomial time ",{"type":21,"tag":1831,"props":23800,"children":23802},{"className":23801},[],[23803],{"type":26,"value":23804},"O((log N)³)",{"type":26,"value":23806},". This breaks RSA, whose security relies on factoring being hard. The same algorithm, with minor modifications, breaks elliptic curve cryptography (ECC), which underlies ECDSA and ECDH.",{"type":21,"tag":22,"props":23808,"children":23809},{},[23810],{"type":21,"tag":784,"props":23811,"children":23812},{},[23813],{"type":26,"value":23814},"What breaks:",{"type":21,"tag":7925,"props":23816,"children":23817},{},[23818,23823,23828,23833],{"type":21,"tag":6142,"props":23819,"children":23820},{},[23821],{"type":26,"value":23822},"RSA (encryption, signatures)",{"type":21,"tag":6142,"props":23824,"children":23825},{},[23826],{"type":26,"value":23827},"ECDSA (signing: used in TLS, SSH, code signing, Bitcoin)",{"type":21,"tag":6142,"props":23829,"children":23830},{},[23831],{"type":26,"value":23832},"ECDH (key exchange: used in TLS, Signal, WhatsApp, iMessage)",{"type":21,"tag":6142,"props":23834,"children":23835},{},[23836],{"type":26,"value":23837},"Diffie-Hellman (key exchange)",{"type":21,"tag":22,"props":23839,"children":23840},{},[23841],{"type":21,"tag":784,"props":23842,"children":23843},{},[23844],{"type":26,"value":23845},"What doesn't break:",{"type":21,"tag":7925,"props":23847,"children":23848},{},[23849,23860,23865,23870],{"type":21,"tag":6142,"props":23850,"children":23851},{},[23852,23854,23858],{"type":26,"value":23853},"AES-256 (symmetric encryption): ",{"type":21,"tag":29,"props":23855,"children":23856},{"href":6289},[23857],{"type":26,"value":6292},{"type":26,"value":23859}," only provides a quadratic speedup, reducing effective key strength from 256 to 128 bits. This is manageable.",{"type":21,"tag":6142,"props":23861,"children":23862},{},[23863],{"type":26,"value":23864},"SHA-256, SHA-3 (hash functions): same, Grover provides minor speedup, security halves, still strong enough with current key sizes",{"type":21,"tag":6142,"props":23866,"children":23867},{},[23868],{"type":26,"value":23869},"HMAC: safe",{"type":21,"tag":6142,"props":23871,"children":23872},{},[23873],{"type":26,"value":23874},"Argon2, bcrypt (password hashing): safe",{"type":21,"tag":22,"props":23876,"children":23877},{},[23878,23880,23885],{"type":26,"value":23879},"The bottom line: ",{"type":21,"tag":784,"props":23881,"children":23882},{},[23883],{"type":26,"value":23884},"asymmetric cryptography needs replacing. Symmetric cryptography needs a key size bump (AES-128 → AES-256)",{"type":26,"value":237},{"type":21,"tag":43,"props":23887,"children":23889},{"id":23888},"harvest-now-decrypt-later",[23890],{"type":26,"value":23891},"Harvest Now, Decrypt Later",{"type":21,"tag":22,"props":23893,"children":23894},{},[23895],{"type":26,"value":23896},"The threat isn't \"quantum computers will break encryption next year.\" The threat is:",{"type":21,"tag":6138,"props":23898,"children":23899},{},[23900,23905,23910],{"type":21,"tag":6142,"props":23901,"children":23902},{},[23903],{"type":26,"value":23904},"An adversary captures and stores your encrypted TLS traffic today",{"type":21,"tag":6142,"props":23906,"children":23907},{},[23908],{"type":26,"value":23909},"In 2032–2040, they run Shor's algorithm on it",{"type":21,"tag":6142,"props":23911,"children":23912},{},[23913],{"type":26,"value":23914},"They decrypt everything retroactively",{"type":21,"tag":22,"props":23916,"children":23917},{},[23918,23920,23924,23925,23930],{"type":26,"value":23919},"This attack, called ",{"type":21,"tag":784,"props":23921,"children":23922},{},[23923],{"type":26,"value":18841},{"type":26,"value":18910},{"type":21,"tag":784,"props":23926,"children":23927},{},[23928],{"type":26,"value":23929},"HNDL",{"type":26,"value":23931},", is already happening. NSA and other intelligence agencies are widely believed to be storing large volumes of encrypted traffic. The 2022 NSA advisory explicitly warned about this.",{"type":21,"tag":22,"props":23933,"children":23934},{},[23935],{"type":21,"tag":784,"props":23936,"children":23937},{},[23938],{"type":26,"value":23939},"Data that needs protection today against HNDL:",{"type":21,"tag":7925,"props":23941,"children":23942},{},[23943,23948,23953,23958,23963],{"type":21,"tag":6142,"props":23944,"children":23945},{},[23946],{"type":26,"value":23947},"State secrets, classified government data",{"type":21,"tag":6142,"props":23949,"children":23950},{},[23951],{"type":26,"value":23952},"Long-lived personal data (medical records, identity documents)",{"type":21,"tag":6142,"props":23954,"children":23955},{},[23956],{"type":26,"value":23957},"Financial data with long regulatory retention requirements",{"type":21,"tag":6142,"props":23959,"children":23960},{},[23961],{"type":26,"value":23962},"Trade secrets and IP",{"type":21,"tag":6142,"props":23964,"children":23965},{},[23966],{"type":26,"value":23967},"Password databases (though bcrypt\u002FArgon2 are safe)",{"type":21,"tag":22,"props":23969,"children":23970},{},[23971],{"type":21,"tag":784,"props":23972,"children":23973},{},[23974],{"type":26,"value":23975},"Data that doesn't need immediate worry:",{"type":21,"tag":7925,"props":23977,"children":23978},{},[23979,23984,23989],{"type":21,"tag":6142,"props":23980,"children":23981},{},[23982],{"type":26,"value":23983},"Session tokens (short-lived, worthless in 10 years)",{"type":21,"tag":6142,"props":23985,"children":23986},{},[23987],{"type":26,"value":23988},"Ephemeral chat messages (unless you're a high-value target)",{"type":21,"tag":6142,"props":23990,"children":23991},{},[23992],{"type":26,"value":23993},"Public information",{"type":21,"tag":43,"props":23995,"children":23997},{"id":23996},"nists-post-quantum-standards-2024",[23998],{"type":26,"value":23999},"NIST's Post-Quantum Standards (2024)",{"type":21,"tag":22,"props":24001,"children":24002},{},[24003],{"type":26,"value":24004},"After an 8-year competition, NIST finalized three post-quantum cryptography algorithms in August 2024:",{"type":21,"tag":17419,"props":24006,"children":24008},{"id":24007},"ml-kem-crystals-kyber-key-encapsulation",[24009],{"type":26,"value":24010},"ML-KEM (CRYSTALS-Kyber): Key Encapsulation",{"type":21,"tag":7925,"props":24012,"children":24013},{},[24014,24024,24034,24044],{"type":21,"tag":6142,"props":24015,"children":24016},{},[24017,24022],{"type":21,"tag":784,"props":24018,"children":24019},{},[24020],{"type":26,"value":24021},"Replaces:",{"type":26,"value":24023}," RSA key exchange, ECDH",{"type":21,"tag":6142,"props":24025,"children":24026},{},[24027,24032],{"type":21,"tag":784,"props":24028,"children":24029},{},[24030],{"type":26,"value":24031},"Security basis:",{"type":26,"value":24033}," Module Learning With Errors (MLWE) problem, believed hard for both classical and quantum computers",{"type":21,"tag":6142,"props":24035,"children":24036},{},[24037,24042],{"type":21,"tag":784,"props":24038,"children":24039},{},[24040],{"type":26,"value":24041},"Performance:",{"type":26,"value":24043}," Fast, small keys (~800 bytes for KEM-768), fast operations",{"type":21,"tag":6142,"props":24045,"children":24046},{},[24047,24052],{"type":21,"tag":784,"props":24048,"children":24049},{},[24050],{"type":26,"value":24051},"Use for:",{"type":26,"value":24053}," TLS key exchange, encrypted key wrapping, hybrid encryption schemes",{"type":21,"tag":2062,"props":24055,"children":24057},{"code":24056,"language":3361,"meta":7,"className":3362,"style":7},"# Python example using pqcrypto library\nfrom pqcrypto.kem.kyber768 import generate_keypair, encapsulate, decapsulate\n\npublic_key, secret_key = generate_keypair()\n\n# Sender encapsulates a shared secret\nciphertext, shared_secret_sender = encapsulate(public_key)\n\n# Receiver decapsulates\nshared_secret_receiver = decapsulate(secret_key, ciphertext)\n\nassert shared_secret_sender == shared_secret_receiver\n# Now use shared_secret as AES key\n",[24058],{"type":21,"tag":1831,"props":24059,"children":24060},{"__ignoreMap":7},[24061,24069,24090,24097,24114,24121,24129,24146,24153,24161,24178,24185,24207],{"type":21,"tag":2072,"props":24062,"children":24063},{"class":2074,"line":2075},[24064],{"type":21,"tag":2072,"props":24065,"children":24066},{"style":3985},[24067],{"type":26,"value":24068},"# Python example using pqcrypto library\n",{"type":21,"tag":2072,"props":24070,"children":24071},{"class":2074,"line":164},[24072,24076,24081,24085],{"type":21,"tag":2072,"props":24073,"children":24074},{"style":3372},[24075],{"type":26,"value":3398},{"type":21,"tag":2072,"props":24077,"children":24078},{"style":2079},[24079],{"type":26,"value":24080}," pqcrypto.kem.kyber768 ",{"type":21,"tag":2072,"props":24082,"children":24083},{"style":3372},[24084],{"type":26,"value":3375},{"type":21,"tag":2072,"props":24086,"children":24087},{"style":2079},[24088],{"type":26,"value":24089}," generate_keypair, encapsulate, decapsulate\n",{"type":21,"tag":2072,"props":24091,"children":24092},{"class":2074,"line":2093},[24093],{"type":21,"tag":2072,"props":24094,"children":24095},{"emptyLinePlaceholder":3460},[24096],{"type":26,"value":3463},{"type":21,"tag":2072,"props":24098,"children":24099},{"class":2074,"line":2155},[24100,24105,24109],{"type":21,"tag":2072,"props":24101,"children":24102},{"style":2079},[24103],{"type":26,"value":24104},"public_key, secret_key ",{"type":21,"tag":2072,"props":24106,"children":24107},{"style":3372},[24108],{"type":26,"value":3487},{"type":21,"tag":2072,"props":24110,"children":24111},{"style":2079},[24112],{"type":26,"value":24113}," generate_keypair()\n",{"type":21,"tag":2072,"props":24115,"children":24116},{"class":2074,"line":2178},[24117],{"type":21,"tag":2072,"props":24118,"children":24119},{"emptyLinePlaceholder":3460},[24120],{"type":26,"value":3463},{"type":21,"tag":2072,"props":24122,"children":24123},{"class":2074,"line":288},[24124],{"type":21,"tag":2072,"props":24125,"children":24126},{"style":3985},[24127],{"type":26,"value":24128},"# Sender encapsulates a shared secret\n",{"type":21,"tag":2072,"props":24130,"children":24131},{"class":2074,"line":16},[24132,24137,24141],{"type":21,"tag":2072,"props":24133,"children":24134},{"style":2079},[24135],{"type":26,"value":24136},"ciphertext, shared_secret_sender ",{"type":21,"tag":2072,"props":24138,"children":24139},{"style":3372},[24140],{"type":26,"value":3487},{"type":21,"tag":2072,"props":24142,"children":24143},{"style":2079},[24144],{"type":26,"value":24145}," encapsulate(public_key)\n",{"type":21,"tag":2072,"props":24147,"children":24148},{"class":2074,"line":366},[24149],{"type":21,"tag":2072,"props":24150,"children":24151},{"emptyLinePlaceholder":3460},[24152],{"type":26,"value":3463},{"type":21,"tag":2072,"props":24154,"children":24155},{"class":2074,"line":853},[24156],{"type":21,"tag":2072,"props":24157,"children":24158},{"style":3985},[24159],{"type":26,"value":24160},"# Receiver decapsulates\n",{"type":21,"tag":2072,"props":24162,"children":24163},{"class":2074,"line":3092},[24164,24169,24173],{"type":21,"tag":2072,"props":24165,"children":24166},{"style":2079},[24167],{"type":26,"value":24168},"shared_secret_receiver ",{"type":21,"tag":2072,"props":24170,"children":24171},{"style":3372},[24172],{"type":26,"value":3487},{"type":21,"tag":2072,"props":24174,"children":24175},{"style":2079},[24176],{"type":26,"value":24177}," decapsulate(secret_key, ciphertext)\n",{"type":21,"tag":2072,"props":24179,"children":24180},{"class":2074,"line":3651},[24181],{"type":21,"tag":2072,"props":24182,"children":24183},{"emptyLinePlaceholder":3460},[24184],{"type":26,"value":3463},{"type":21,"tag":2072,"props":24186,"children":24187},{"class":2074,"line":2616},[24188,24193,24198,24202],{"type":21,"tag":2072,"props":24189,"children":24190},{"style":3372},[24191],{"type":26,"value":24192},"assert",{"type":21,"tag":2072,"props":24194,"children":24195},{"style":2079},[24196],{"type":26,"value":24197}," shared_secret_sender ",{"type":21,"tag":2072,"props":24199,"children":24200},{"style":3372},[24201],{"type":26,"value":4035},{"type":21,"tag":2072,"props":24203,"children":24204},{"style":2079},[24205],{"type":26,"value":24206}," shared_secret_receiver\n",{"type":21,"tag":2072,"props":24208,"children":24209},{"class":2074,"line":3695},[24210],{"type":21,"tag":2072,"props":24211,"children":24212},{"style":3985},[24213],{"type":26,"value":24214},"# Now use shared_secret as AES key\n",{"type":21,"tag":17419,"props":24216,"children":24218},{"id":24217},"ml-dsa-crystals-dilithium-digital-signatures",[24219],{"type":26,"value":24220},"ML-DSA (CRYSTALS-Dilithium): Digital Signatures",{"type":21,"tag":7925,"props":24222,"children":24223},{},[24224,24233,24242,24251],{"type":21,"tag":6142,"props":24225,"children":24226},{},[24227,24231],{"type":21,"tag":784,"props":24228,"children":24229},{},[24230],{"type":26,"value":24021},{"type":26,"value":24232}," ECDSA, RSA-PSS for signing",{"type":21,"tag":6142,"props":24234,"children":24235},{},[24236,24240],{"type":21,"tag":784,"props":24237,"children":24238},{},[24239],{"type":26,"value":24031},{"type":26,"value":24241}," MLWE + MSIS problems",{"type":21,"tag":6142,"props":24243,"children":24244},{},[24245,24249],{"type":21,"tag":784,"props":24246,"children":24247},{},[24248],{"type":26,"value":24041},{"type":26,"value":24250}," Moderate key sizes (~1,312 bytes public key), fast signing",{"type":21,"tag":6142,"props":24252,"children":24253},{},[24254,24258],{"type":21,"tag":784,"props":24255,"children":24256},{},[24257],{"type":26,"value":24051},{"type":26,"value":24259}," Code signing, TLS certificates, document signing, JWT signatures",{"type":21,"tag":2062,"props":24261,"children":24263},{"code":24262,"language":3361,"meta":7,"className":3362,"style":7},"from pqcrypto.sign.dilithium3 import generate_keypair, sign, verify\n\npublic_key, secret_key = generate_keypair()\n\nmessage = b\"Deploy to production\"\nsignature = sign(message, secret_key)\n\n# Verify\nassert verify(message, signature, public_key)\n",[24264],{"type":21,"tag":1831,"props":24265,"children":24266},{"__ignoreMap":7},[24267,24288,24295,24310,24317,24339,24356,24363,24371],{"type":21,"tag":2072,"props":24268,"children":24269},{"class":2074,"line":2075},[24270,24274,24279,24283],{"type":21,"tag":2072,"props":24271,"children":24272},{"style":3372},[24273],{"type":26,"value":3398},{"type":21,"tag":2072,"props":24275,"children":24276},{"style":2079},[24277],{"type":26,"value":24278}," pqcrypto.sign.dilithium3 ",{"type":21,"tag":2072,"props":24280,"children":24281},{"style":3372},[24282],{"type":26,"value":3375},{"type":21,"tag":2072,"props":24284,"children":24285},{"style":2079},[24286],{"type":26,"value":24287}," generate_keypair, sign, verify\n",{"type":21,"tag":2072,"props":24289,"children":24290},{"class":2074,"line":164},[24291],{"type":21,"tag":2072,"props":24292,"children":24293},{"emptyLinePlaceholder":3460},[24294],{"type":26,"value":3463},{"type":21,"tag":2072,"props":24296,"children":24297},{"class":2074,"line":2093},[24298,24302,24306],{"type":21,"tag":2072,"props":24299,"children":24300},{"style":2079},[24301],{"type":26,"value":24104},{"type":21,"tag":2072,"props":24303,"children":24304},{"style":3372},[24305],{"type":26,"value":3487},{"type":21,"tag":2072,"props":24307,"children":24308},{"style":2079},[24309],{"type":26,"value":24113},{"type":21,"tag":2072,"props":24311,"children":24312},{"class":2074,"line":2155},[24313],{"type":21,"tag":2072,"props":24314,"children":24315},{"emptyLinePlaceholder":3460},[24316],{"type":26,"value":3463},{"type":21,"tag":2072,"props":24318,"children":24319},{"class":2074,"line":2178},[24320,24325,24329,24334],{"type":21,"tag":2072,"props":24321,"children":24322},{"style":2079},[24323],{"type":26,"value":24324},"message ",{"type":21,"tag":2072,"props":24326,"children":24327},{"style":3372},[24328],{"type":26,"value":3487},{"type":21,"tag":2072,"props":24330,"children":24331},{"style":3372},[24332],{"type":26,"value":24333}," b",{"type":21,"tag":2072,"props":24335,"children":24336},{"style":2108},[24337],{"type":26,"value":24338},"\"Deploy to production\"\n",{"type":21,"tag":2072,"props":24340,"children":24341},{"class":2074,"line":288},[24342,24347,24351],{"type":21,"tag":2072,"props":24343,"children":24344},{"style":2079},[24345],{"type":26,"value":24346},"signature ",{"type":21,"tag":2072,"props":24348,"children":24349},{"style":3372},[24350],{"type":26,"value":3487},{"type":21,"tag":2072,"props":24352,"children":24353},{"style":2079},[24354],{"type":26,"value":24355}," sign(message, secret_key)\n",{"type":21,"tag":2072,"props":24357,"children":24358},{"class":2074,"line":16},[24359],{"type":21,"tag":2072,"props":24360,"children":24361},{"emptyLinePlaceholder":3460},[24362],{"type":26,"value":3463},{"type":21,"tag":2072,"props":24364,"children":24365},{"class":2074,"line":366},[24366],{"type":21,"tag":2072,"props":24367,"children":24368},{"style":3985},[24369],{"type":26,"value":24370},"# Verify\n",{"type":21,"tag":2072,"props":24372,"children":24373},{"class":2074,"line":853},[24374,24378],{"type":21,"tag":2072,"props":24375,"children":24376},{"style":3372},[24377],{"type":26,"value":24192},{"type":21,"tag":2072,"props":24379,"children":24380},{"style":2079},[24381],{"type":26,"value":24382}," verify(message, signature, public_key)\n",{"type":21,"tag":17419,"props":24384,"children":24386},{"id":24385},"slh-dsa-sphincs-hash-based-signatures",[24387],{"type":26,"value":24388},"SLH-DSA (SPHINCS+): Hash-Based Signatures",{"type":21,"tag":7925,"props":24390,"children":24391},{},[24392,24401,24417,24426],{"type":21,"tag":6142,"props":24393,"children":24394},{},[24395,24399],{"type":21,"tag":784,"props":24396,"children":24397},{},[24398],{"type":26,"value":24021},{"type":26,"value":24400}," ECDSA as a conservative backup",{"type":21,"tag":6142,"props":24402,"children":24403},{},[24404,24408,24410,24415],{"type":21,"tag":784,"props":24405,"children":24406},{},[24407],{"type":26,"value":24031},{"type":26,"value":24409}," Hash functions only, the most conservative choice. (For a different route entirely, ",{"type":21,"tag":29,"props":24411,"children":24412},{"href":15780},[24413],{"type":26,"value":24414},"quantum key distribution",{"type":26,"value":24416}," secures key exchange with physics rather than computational hardness, but it needs dedicated hardware, so it complements rather than replaces PQC.)",{"type":21,"tag":6142,"props":24418,"children":24419},{},[24420,24424],{"type":21,"tag":784,"props":24421,"children":24422},{},[24423],{"type":26,"value":24041},{"type":26,"value":24425}," Larger signatures (~8–50 KB), slower signing",{"type":21,"tag":6142,"props":24427,"children":24428},{},[24429,24433],{"type":21,"tag":784,"props":24430,"children":24431},{},[24432],{"type":26,"value":24051},{"type":26,"value":24434}," High-assurance signing where key reuse is a concern, long-term document signing",{"type":21,"tag":22,"props":24436,"children":24437},{},[24438,24440,24445],{"type":26,"value":24439},"NIST also standardized ",{"type":21,"tag":784,"props":24441,"children":24442},{},[24443],{"type":26,"value":24444},"FALCON (FN-DSA)",{"type":26,"value":24446},": a lattice signature scheme with compact signatures, suitable for constrained environments like IoT.",{"type":21,"tag":43,"props":24448,"children":24450},{"id":24449},"what-to-do-now-a-tiered-action-plan",[24451],{"type":26,"value":24452},"What to Do Now: A Tiered Action Plan",{"type":21,"tag":17419,"props":24454,"children":24456},{"id":24455},"tier-1-do-this-today-low-effort-high-impact",[24457],{"type":26,"value":24458},"Tier 1: Do This Today (Low Effort, High Impact)",{"type":21,"tag":22,"props":24460,"children":24461},{},[24462,24467],{"type":21,"tag":784,"props":24463,"children":24464},{},[24465],{"type":26,"value":24466},"Audit your cryptographic inventory.",{"type":26,"value":24468}," You cannot migrate what you haven't catalogued. Document:",{"type":21,"tag":7925,"props":24470,"children":24471},{},[24472,24477,24482,24487],{"type":21,"tag":6142,"props":24473,"children":24474},{},[24475],{"type":26,"value":24476},"Where does your application use TLS? (Most frameworks handle this)",{"type":21,"tag":6142,"props":24478,"children":24479},{},[24480],{"type":26,"value":24481},"Where do you generate or verify signatures? (JWTs, code signing, PDF signing)",{"type":21,"tag":6142,"props":24483,"children":24484},{},[24485],{"type":26,"value":24486},"Where do you use asymmetric key exchange? (RSA-wrapped AES keys, SSH)",{"type":21,"tag":6142,"props":24488,"children":24489},{},[24490],{"type":26,"value":24491},"Which libraries are you using? (OpenSSL, BouncyCastle, AWS KMS, etc.)",{"type":21,"tag":22,"props":24493,"children":24494},{},[24495,24500],{"type":21,"tag":784,"props":24496,"children":24497},{},[24498],{"type":26,"value":24499},"Upgrade AES-128 to AES-256.",{"type":26,"value":24501}," This is low-risk and immediate. AES-256 halves to 128-bit security against Grover. Still plenty safe.",{"type":21,"tag":22,"props":24503,"children":24504},{},[24505,24510],{"type":21,"tag":784,"props":24506,"children":24507},{},[24508],{"type":26,"value":24509},"Enable TLS 1.3 everywhere.",{"type":26,"value":24511}," TLS 1.3 uses forward secrecy by default (ECDHE), meaning past sessions can't be decrypted even if the long-term key is compromised. This partially mitigates HNDL for TLS traffic.",{"type":21,"tag":17419,"props":24513,"children":24515},{"id":24514},"tier-2-plan-for-the-next-6-18-months",[24516],{"type":26,"value":24517},"Tier 2: Plan for the Next 6-18 Months",{"type":21,"tag":22,"props":24519,"children":24520},{},[24521,24526,24528,24534],{"type":21,"tag":784,"props":24522,"children":24523},{},[24524],{"type":26,"value":24525},"Adopt hybrid key exchange in TLS.",{"type":26,"value":24527}," The TLS working group has standardized ",{"type":21,"tag":1831,"props":24529,"children":24531},{"className":24530},[],[24532],{"type":26,"value":24533},"X25519Kyber768",{"type":26,"value":24535},", a hybrid scheme that uses both classical ECDH and ML-KEM. Google Chrome, Cloudflare, and AWS already support it. This protects against HNDL while maintaining classical security:",{"type":21,"tag":2062,"props":24537,"children":24541},{"code":24538,"language":24539,"meta":7,"className":24540,"style":7},"# Nginx with OpenSSL 3.x + oqs-provider (Open Quantum Safe)\nssl_ecdh_curve X25519Kyber768;  # hybrid classical + PQC\n","nginx","language-nginx shiki shiki-themes github-dark",[24542],{"type":21,"tag":1831,"props":24543,"children":24544},{"__ignoreMap":7},[24545,24553],{"type":21,"tag":2072,"props":24546,"children":24547},{"class":2074,"line":2075},[24548],{"type":21,"tag":2072,"props":24549,"children":24550},{},[24551],{"type":26,"value":24552},"# Nginx with OpenSSL 3.x + oqs-provider (Open Quantum Safe)\n",{"type":21,"tag":2072,"props":24554,"children":24555},{"class":2074,"line":164},[24556],{"type":21,"tag":2072,"props":24557,"children":24558},{},[24559],{"type":26,"value":24560},"ssl_ecdh_curve X25519Kyber768;  # hybrid classical + PQC\n",{"type":21,"tag":22,"props":24562,"children":24563},{},[24564,24569],{"type":21,"tag":784,"props":24565,"children":24566},{},[24567],{"type":26,"value":24568},"Replace RSA\u002FECDSA in new systems with ML-DSA.",{"type":26,"value":24570}," For anything greenfield (new microservices, new JWT implementations, new SSH deployments), use ML-DSA (Dilithium3 or Dilithium5) instead of ECDSA-256.",{"type":21,"tag":22,"props":24572,"children":24573},{},[24574,24579],{"type":21,"tag":784,"props":24575,"children":24576},{},[24577],{"type":26,"value":24578},"Update your TLS certificate pipeline.",{"type":26,"value":24580}," Most public CAs don't yet issue PQC certificates, but you use ML-DSA for internally-signed certificates and service mesh certificates today.",{"type":21,"tag":17419,"props":24582,"children":24584},{"id":24583},"tier-3-long-term-migration-1-5-years",[24585],{"type":26,"value":24586},"Tier 3: Long-Term Migration (1-5 Years)",{"type":21,"tag":22,"props":24588,"children":24589},{},[24590,24595],{"type":21,"tag":784,"props":24591,"children":24592},{},[24593],{"type":26,"value":24594},"Full PKI migration.",{"type":26,"value":24596}," Replace your RSA\u002FECC certificate hierarchy with PQC-based CA infrastructure. This is the hardest part: hardware security modules (HSMs), automated certificate rotation, and certificate chains all need updating.",{"type":21,"tag":22,"props":24598,"children":24599},{},[24600,24605],{"type":21,"tag":784,"props":24601,"children":24602},{},[24603],{"type":26,"value":24604},"Hardware and embedded devices.",{"type":26,"value":24606}," IoT and embedded devices often can't be patched remotely and have 10+ year lifetimes. Audit any such devices that rely on RSA or ECDSA for authentication.",{"type":21,"tag":22,"props":24608,"children":24609},{},[24610,24615],{"type":21,"tag":784,"props":24611,"children":24612},{},[24613],{"type":26,"value":24614},"Key management systems.",{"type":26,"value":24616}," AWS KMS, Azure Key Vault, HashiCorp Vault: verify their PQC roadmaps and migration timelines.",{"type":21,"tag":43,"props":24618,"children":24620},{"id":24619},"library-and-framework-support",[24621],{"type":26,"value":24622},"Library and Framework Support",{"type":21,"tag":3169,"props":24624,"children":24625},{},[24626,24642],{"type":21,"tag":3173,"props":24627,"children":24628},{},[24629],{"type":21,"tag":3177,"props":24630,"children":24631},{},[24632,24637],{"type":21,"tag":3181,"props":24633,"children":24634},{},[24635],{"type":26,"value":24636},"Platform",{"type":21,"tag":3181,"props":24638,"children":24639},{},[24640],{"type":26,"value":24641},"PQC Status",{"type":21,"tag":3195,"props":24643,"children":24644},{},[24645,24658,24671,24684,24697,24710,24723,24742,24755],{"type":21,"tag":3177,"props":24646,"children":24647},{},[24648,24653],{"type":21,"tag":3202,"props":24649,"children":24650},{},[24651],{"type":26,"value":24652},"OpenSSL 3.x + oqs-provider",{"type":21,"tag":3202,"props":24654,"children":24655},{},[24656],{"type":26,"value":24657},"ML-KEM, ML-DSA, FALCON via plugin",{"type":21,"tag":3177,"props":24659,"children":24660},{},[24661,24666],{"type":21,"tag":3202,"props":24662,"children":24663},{},[24664],{"type":26,"value":24665},"AWS KMS",{"type":21,"tag":3202,"props":24667,"children":24668},{},[24669],{"type":26,"value":24670},"ML-KEM hybrid TLS in preview",{"type":21,"tag":3177,"props":24672,"children":24673},{},[24674,24679],{"type":21,"tag":3202,"props":24675,"children":24676},{},[24677],{"type":26,"value":24678},"Cloudflare",{"type":21,"tag":3202,"props":24680,"children":24681},{},[24682],{"type":26,"value":24683},"X25519Kyber768 TLS (live since 2023)",{"type":21,"tag":3177,"props":24685,"children":24686},{},[24687,24692],{"type":21,"tag":3202,"props":24688,"children":24689},{},[24690],{"type":26,"value":24691},"Chrome 124+",{"type":21,"tag":3202,"props":24693,"children":24694},{},[24695],{"type":26,"value":24696},"X25519Kyber768 TLS",{"type":21,"tag":3177,"props":24698,"children":24699},{},[24700,24705],{"type":21,"tag":3202,"props":24701,"children":24702},{},[24703],{"type":26,"value":24704},"Java (BouncyCastle)",{"type":21,"tag":3202,"props":24706,"children":24707},{},[24708],{"type":26,"value":24709},"CRYSTALS-Kyber, Dilithium",{"type":21,"tag":3177,"props":24711,"children":24712},{},[24713,24718],{"type":21,"tag":3202,"props":24714,"children":24715},{},[24716],{"type":26,"value":24717},"Python (pqcrypto)",{"type":21,"tag":3202,"props":24719,"children":24720},{},[24721],{"type":26,"value":24722},"Full NIST set",{"type":21,"tag":3177,"props":24724,"children":24725},{},[24726,24731],{"type":21,"tag":3202,"props":24727,"children":24728},{},[24729],{"type":26,"value":24730},"Go",{"type":21,"tag":3202,"props":24732,"children":24733},{},[24734,24740],{"type":21,"tag":1831,"props":24735,"children":24737},{"className":24736},[],[24738],{"type":26,"value":24739},"golang.org\u002Fx\u002Fcrypto",{"type":26,"value":24741}," PQC in development",{"type":21,"tag":3177,"props":24743,"children":24744},{},[24745,24750],{"type":21,"tag":3202,"props":24746,"children":24747},{},[24748],{"type":26,"value":24749},"Node.js",{"type":21,"tag":3202,"props":24751,"children":24752},{},[24753],{"type":26,"value":24754},"Via native modules (OpenSSL 3.x bindings)",{"type":21,"tag":3177,"props":24756,"children":24757},{},[24758,24763],{"type":21,"tag":3202,"props":24759,"children":24760},{},[24761],{"type":26,"value":24762},"Rust (pqcrypto crate)",{"type":21,"tag":3202,"props":24764,"children":24765},{},[24766],{"type":26,"value":24722},{"type":21,"tag":43,"props":24768,"children":24770},{"id":24769},"one-page-summary",[24771],{"type":26,"value":24772},"One-Page Summary",{"type":21,"tag":2062,"props":24774,"children":24776},{"code":24775},"What breaks:    RSA, ECDSA, ECDH, classical DH\nWhat's safe:    AES-256, SHA-256, SHA-3, bcrypt, Argon2\nNew standards:  ML-KEM (Kyber) for key exchange\n                ML-DSA (Dilithium) for signatures\n                SLH-DSA (SPHINCS+) for conservative signing\n\nDo today:       Upgrade AES-128 → AES-256\n                Enable TLS 1.3 (forward secrecy)\n                Audit crypto inventory\n\nDo soon:        Hybrid TLS key exchange (X25519Kyber768)\n                ML-DSA for new signature systems\n\nDo in 1-5 yrs:  Full PKI migration to PQC\n                Firmware updates for IoT devices\n",[24777],{"type":21,"tag":1831,"props":24778,"children":24779},{"__ignoreMap":7},[24780],{"type":26,"value":24775},{"type":21,"tag":22,"props":24782,"children":24783},{},[24784],{"type":26,"value":24785},"The quantum threat to cryptography is real and the timeline is uncertain. That is exactly why acting now, before quantum computers are capable, is the right call.",{"type":21,"tag":22,"props":24787,"children":24788},{},[24789,24793,24794,24799,24800,24804,24805,24810,24811],{"type":21,"tag":784,"props":24790,"children":24791},{},[24792],{"type":26,"value":9547},{"type":26,"value":790},{"type":21,"tag":29,"props":24795,"children":24796},{"href":8767},[24797],{"type":26,"value":24798},"Quantum computing glossary: Shor's Algorithm",{"type":26,"value":6244},{"type":21,"tag":29,"props":24801,"children":24802},{"href":1236},[24803],{"type":26,"value":10132},{"type":26,"value":6244},{"type":21,"tag":29,"props":24806,"children":24807},{"href":8798},[24808],{"type":26,"value":24809},"Shor's algorithm formally verified in Lean",{"type":26,"value":6244},{"type":21,"tag":29,"props":24812,"children":24813},{"href":11566},[24814],{"type":26,"value":24815},"What quantum computers do today",{"type":21,"tag":2445,"props":24817,"children":24818},{},[24819],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":24821},[24822,24823,24824,24829,24834,24835],{"id":23783,"depth":164,"text":23786},{"id":23888,"depth":164,"text":23891},{"id":23996,"depth":164,"text":23999,"children":24825},[24826,24827,24828],{"id":24007,"depth":2093,"text":24010},{"id":24217,"depth":2093,"text":24220},{"id":24385,"depth":2093,"text":24388},{"id":24449,"depth":164,"text":24452,"children":24830},[24831,24832,24833],{"id":24455,"depth":2093,"text":24458},{"id":24514,"depth":2093,"text":24517},{"id":24583,"depth":2093,"text":24586},{"id":24619,"depth":164,"text":24622},{"id":24769,"depth":164,"text":24772},"content:blog:post-quantum-cryptography-guide.md","blog\u002Fpost-quantum-cryptography-guide.md","blog\u002Fpost-quantum-cryptography-guide",{"_path":6211,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":24840,"description":24841,"date":24842,"author":11,"tags":24843,"readingTime":366,"body":24844,"_type":171,"_id":27440,"_source":173,"_file":27441,"_stem":27442,"_extension":176},"How to Cut Your Shot Count by 80% in Variational Quantum Algorithms","Practical techniques for reducing the number of circuit executions needed in VQE and QAOA, shot-frugal optimizers, gradient estimation tricks, and measurement grouping.","2026-03-01",[1776,14,1777,8025],{"type":18,"children":24845,"toc":27429},[24846,24862,24873,24879,24891,25013,25025,25031,25043,25343,25353,25359,25371,25694,25706,25712,25732,25925,25952,25958,25970,26119,26129,26135,26140,26473,26485,26491,26496,26669,26675,27237,27243,27371,27376,27395,27425],{"type":21,"tag":22,"props":24847,"children":24848},{},[24849,24851,24855,24856,24860],{"type":26,"value":24850},"Every time you run a quantum circuit on real hardware, it costs QPU time and money. Variational algorithms like ",{"type":21,"tag":29,"props":24852,"children":24853},{"href":62},[24854],{"type":26,"value":14},{"type":26,"value":383},{"type":21,"tag":29,"props":24857,"children":24858},{"href":1896},[24859],{"type":26,"value":1777},{"type":26,"value":24861}," sometimes require hundreds of thousands of circuit executions to converge. At $0.075–$0.90 per task on cloud QPUs, that adds up fast.",{"type":21,"tag":22,"props":24863,"children":24864},{},[24865,24867,24871],{"type":26,"value":24866},"The good news: most default implementations are wildly shot-inefficient. With the right techniques, you cut your ",{"type":21,"tag":29,"props":24868,"children":24869},{"href":6120},[24870],{"type":26,"value":6123},{"type":26,"value":24872}," by 50–90% without sacrificing result quality.",{"type":21,"tag":43,"props":24874,"children":24876},{"id":24875},"why-shot-counts-are-so-high-by-default",[24877],{"type":26,"value":24878},"Why Shot Counts Are So High by Default",{"type":21,"tag":22,"props":24880,"children":24881},{},[24882,24884,24889],{"type":26,"value":24883},"VQE computes expectation values of ",{"type":21,"tag":29,"props":24885,"children":24886},{"href":11146},[24887],{"type":26,"value":24888},"Pauli operators",{"type":26,"value":24890},". A Hamiltonian is decomposed into a sum of Pauli terms, and each term requires a separate circuit execution. For a molecule like H₂ (4 qubits), there are ~15 Pauli terms. For larger molecules the count explodes:",{"type":21,"tag":3169,"props":24892,"children":24893},{},[24894,24920],{"type":21,"tag":3173,"props":24895,"children":24896},{},[24897],{"type":21,"tag":3177,"props":24898,"children":24899},{},[24900,24905,24910,24915],{"type":21,"tag":3181,"props":24901,"children":24902},{},[24903],{"type":26,"value":24904},"Molecule",{"type":21,"tag":3181,"props":24906,"children":24907},{},[24908],{"type":26,"value":24909},"Qubits",{"type":21,"tag":3181,"props":24911,"children":24912},{},[24913],{"type":26,"value":24914},"Pauli terms",{"type":21,"tag":3181,"props":24916,"children":24917},{},[24918],{"type":26,"value":24919},"Naive shots\u002Fiteration",{"type":21,"tag":3195,"props":24921,"children":24922},{},[24923,24945,24968,24991],{"type":21,"tag":3177,"props":24924,"children":24925},{},[24926,24931,24935,24940],{"type":21,"tag":3202,"props":24927,"children":24928},{},[24929],{"type":26,"value":24930},"H₂",{"type":21,"tag":3202,"props":24932,"children":24933},{},[24934],{"type":26,"value":4661},{"type":21,"tag":3202,"props":24936,"children":24937},{},[24938],{"type":26,"value":24939},"15",{"type":21,"tag":3202,"props":24941,"children":24942},{},[24943],{"type":26,"value":24944},"15,000",{"type":21,"tag":3177,"props":24946,"children":24947},{},[24948,24953,24958,24963],{"type":21,"tag":3202,"props":24949,"children":24950},{},[24951],{"type":26,"value":24952},"LiH",{"type":21,"tag":3202,"props":24954,"children":24955},{},[24956],{"type":26,"value":24957},"12",{"type":21,"tag":3202,"props":24959,"children":24960},{},[24961],{"type":26,"value":24962},"631",{"type":21,"tag":3202,"props":24964,"children":24965},{},[24966],{"type":26,"value":24967},"631,000",{"type":21,"tag":3177,"props":24969,"children":24970},{},[24971,24976,24981,24986],{"type":21,"tag":3202,"props":24972,"children":24973},{},[24974],{"type":26,"value":24975},"BeH₂",{"type":21,"tag":3202,"props":24977,"children":24978},{},[24979],{"type":26,"value":24980},"14",{"type":21,"tag":3202,"props":24982,"children":24983},{},[24984],{"type":26,"value":24985},"666",{"type":21,"tag":3202,"props":24987,"children":24988},{},[24989],{"type":26,"value":24990},"666,000",{"type":21,"tag":3177,"props":24992,"children":24993},{},[24994,24999,25003,25008],{"type":21,"tag":3202,"props":24995,"children":24996},{},[24997],{"type":26,"value":24998},"H₂O",{"type":21,"tag":3202,"props":25000,"children":25001},{},[25002],{"type":26,"value":24980},{"type":21,"tag":3202,"props":25004,"children":25005},{},[25006],{"type":26,"value":25007},"1,086",{"type":21,"tag":3202,"props":25009,"children":25010},{},[25011],{"type":26,"value":25012},"1,086,000",{"type":21,"tag":22,"props":25014,"children":25015},{},[25016,25018,25023],{"type":26,"value":25017},"With 200 optimizer iterations, H₂O naively requires ",{"type":21,"tag":784,"props":25019,"children":25020},{},[25021],{"type":26,"value":25022},"217 million shots",{"type":26,"value":25024},". The techniques below reduce this by 80–95%.",{"type":21,"tag":43,"props":25026,"children":25028},{"id":25027},"technique-1-measurement-grouping-biggest-win",[25029],{"type":26,"value":25030},"Technique 1: Measurement Grouping (Biggest Win)",{"type":21,"tag":22,"props":25032,"children":25033},{},[25034,25036,25041],{"type":26,"value":25035},"Many Pauli terms ",{"type":21,"tag":784,"props":25037,"children":25038},{},[25039],{"type":26,"value":25040},"commute",{"type":26,"value":25042},": they are measured simultaneously in a single circuit execution rather than separately. Grouping commuting observables is the single biggest reduction available.",{"type":21,"tag":2062,"props":25044,"children":25046},{"className":3362,"code":25045,"language":3361,"meta":7,"style":7},"from qiskit.primitives import StatevectorEstimator\nfrom qiskit_nature.second_q.mappers import JordanWignerMapper\nfrom qiskit_algorithms import VQE\nfrom qiskit_algorithms.optimizers import COBYLA\n\n# Qiskit automatically groups commuting Paulis in the Estimator primitive\n# This reduces shots from O(n_terms) to O(n_groups): often 5-10x reduction\nestimator = StatevectorEstimator()\n\n# With PennyLane, use grouping explicitly:\nimport pennylane as qml\n\nH = qml.Hamiltonian(coeffs, observables)\n\n# Group commuting terms: usually reduces term count by 5-10x\ngroups = qml.grouping.group_observables(observables, grouping_type='qwc')\nprint(f\"Original terms: {len(observables)}, Groups: {len(groups)}\")\n# Original terms: 631, Groups: 68  (for LiH)\n",[25047],{"type":21,"tag":1831,"props":25048,"children":25049},{"__ignoreMap":7},[25050,25070,25089,25108,25127,25134,25142,25150,25167,25174,25182,25201,25208,25225,25232,25240,25275,25335],{"type":21,"tag":2072,"props":25051,"children":25052},{"class":2074,"line":2075},[25053,25057,25061,25065],{"type":21,"tag":2072,"props":25054,"children":25055},{"style":3372},[25056],{"type":26,"value":3398},{"type":21,"tag":2072,"props":25058,"children":25059},{"style":2079},[25060],{"type":26,"value":22747},{"type":21,"tag":2072,"props":25062,"children":25063},{"style":3372},[25064],{"type":26,"value":3375},{"type":21,"tag":2072,"props":25066,"children":25067},{"style":2079},[25068],{"type":26,"value":25069}," StatevectorEstimator\n",{"type":21,"tag":2072,"props":25071,"children":25072},{"class":2074,"line":164},[25073,25077,25081,25085],{"type":21,"tag":2072,"props":25074,"children":25075},{"style":3372},[25076],{"type":26,"value":3398},{"type":21,"tag":2072,"props":25078,"children":25079},{"style":2079},[25080],{"type":26,"value":22663},{"type":21,"tag":2072,"props":25082,"children":25083},{"style":3372},[25084],{"type":26,"value":3375},{"type":21,"tag":2072,"props":25086,"children":25087},{"style":2079},[25088],{"type":26,"value":22672},{"type":21,"tag":2072,"props":25090,"children":25091},{"class":2074,"line":2093},[25092,25096,25100,25104],{"type":21,"tag":2072,"props":25093,"children":25094},{"style":3372},[25095],{"type":26,"value":3398},{"type":21,"tag":2072,"props":25097,"children":25098},{"style":2079},[25099],{"type":26,"value":22705},{"type":21,"tag":2072,"props":25101,"children":25102},{"style":3372},[25103],{"type":26,"value":3375},{"type":21,"tag":2072,"props":25105,"children":25106},{"style":2097},[25107],{"type":26,"value":22714},{"type":21,"tag":2072,"props":25109,"children":25110},{"class":2074,"line":2155},[25111,25115,25119,25123],{"type":21,"tag":2072,"props":25112,"children":25113},{"style":3372},[25114],{"type":26,"value":3398},{"type":21,"tag":2072,"props":25116,"children":25117},{"style":2079},[25118],{"type":26,"value":22726},{"type":21,"tag":2072,"props":25120,"children":25121},{"style":3372},[25122],{"type":26,"value":3375},{"type":21,"tag":2072,"props":25124,"children":25125},{"style":2097},[25126],{"type":26,"value":22735},{"type":21,"tag":2072,"props":25128,"children":25129},{"class":2074,"line":2178},[25130],{"type":21,"tag":2072,"props":25131,"children":25132},{"emptyLinePlaceholder":3460},[25133],{"type":26,"value":3463},{"type":21,"tag":2072,"props":25135,"children":25136},{"class":2074,"line":288},[25137],{"type":21,"tag":2072,"props":25138,"children":25139},{"style":3985},[25140],{"type":26,"value":25141},"# Qiskit automatically groups commuting Paulis in the Estimator primitive\n",{"type":21,"tag":2072,"props":25143,"children":25144},{"class":2074,"line":16},[25145],{"type":21,"tag":2072,"props":25146,"children":25147},{"style":3985},[25148],{"type":26,"value":25149},"# This reduces shots from O(n_terms) to O(n_groups): often 5-10x reduction\n",{"type":21,"tag":2072,"props":25151,"children":25152},{"class":2074,"line":366},[25153,25158,25162],{"type":21,"tag":2072,"props":25154,"children":25155},{"style":2079},[25156],{"type":26,"value":25157},"estimator ",{"type":21,"tag":2072,"props":25159,"children":25160},{"style":3372},[25161],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25163,"children":25164},{"style":2079},[25165],{"type":26,"value":25166}," StatevectorEstimator()\n",{"type":21,"tag":2072,"props":25168,"children":25169},{"class":2074,"line":853},[25170],{"type":21,"tag":2072,"props":25171,"children":25172},{"emptyLinePlaceholder":3460},[25173],{"type":26,"value":3463},{"type":21,"tag":2072,"props":25175,"children":25176},{"class":2074,"line":3092},[25177],{"type":21,"tag":2072,"props":25178,"children":25179},{"style":3985},[25180],{"type":26,"value":25181},"# With PennyLane, use grouping explicitly:\n",{"type":21,"tag":2072,"props":25183,"children":25184},{"class":2074,"line":3651},[25185,25189,25193,25197],{"type":21,"tag":2072,"props":25186,"children":25187},{"style":3372},[25188],{"type":26,"value":3375},{"type":21,"tag":2072,"props":25190,"children":25191},{"style":2079},[25192],{"type":26,"value":14153},{"type":21,"tag":2072,"props":25194,"children":25195},{"style":3372},[25196],{"type":26,"value":3385},{"type":21,"tag":2072,"props":25198,"children":25199},{"style":2079},[25200],{"type":26,"value":14162},{"type":21,"tag":2072,"props":25202,"children":25203},{"class":2074,"line":2616},[25204],{"type":21,"tag":2072,"props":25205,"children":25206},{"emptyLinePlaceholder":3460},[25207],{"type":26,"value":3463},{"type":21,"tag":2072,"props":25209,"children":25210},{"class":2074,"line":3695},[25211,25216,25220],{"type":21,"tag":2072,"props":25212,"children":25213},{"style":2079},[25214],{"type":26,"value":25215},"H ",{"type":21,"tag":2072,"props":25217,"children":25218},{"style":3372},[25219],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25221,"children":25222},{"style":2079},[25223],{"type":26,"value":25224}," qml.Hamiltonian(coeffs, observables)\n",{"type":21,"tag":2072,"props":25226,"children":25227},{"class":2074,"line":3709},[25228],{"type":21,"tag":2072,"props":25229,"children":25230},{"emptyLinePlaceholder":3460},[25231],{"type":26,"value":3463},{"type":21,"tag":2072,"props":25233,"children":25234},{"class":2074,"line":3717},[25235],{"type":21,"tag":2072,"props":25236,"children":25237},{"style":3985},[25238],{"type":26,"value":25239},"# Group commuting terms: usually reduces term count by 5-10x\n",{"type":21,"tag":2072,"props":25241,"children":25242},{"class":2074,"line":3750},[25243,25248,25252,25257,25262,25266,25271],{"type":21,"tag":2072,"props":25244,"children":25245},{"style":2079},[25246],{"type":26,"value":25247},"groups ",{"type":21,"tag":2072,"props":25249,"children":25250},{"style":3372},[25251],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25253,"children":25254},{"style":2079},[25255],{"type":26,"value":25256}," qml.grouping.group_observables(observables, ",{"type":21,"tag":2072,"props":25258,"children":25259},{"style":3735},[25260],{"type":26,"value":25261},"grouping_type",{"type":21,"tag":2072,"props":25263,"children":25264},{"style":3372},[25265],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25267,"children":25268},{"style":2108},[25269],{"type":26,"value":25270},"'qwc'",{"type":21,"tag":2072,"props":25272,"children":25273},{"style":2079},[25274],{"type":26,"value":4281},{"type":21,"tag":2072,"props":25276,"children":25277},{"class":2074,"line":3769},[25278,25282,25286,25290,25295,25300,25305,25309,25314,25318,25323,25327,25331],{"type":21,"tag":2072,"props":25279,"children":25280},{"style":2097},[25281],{"type":26,"value":4614},{"type":21,"tag":2072,"props":25283,"children":25284},{"style":2079},[25285],{"type":26,"value":3879},{"type":21,"tag":2072,"props":25287,"children":25288},{"style":3372},[25289],{"type":26,"value":3938},{"type":21,"tag":2072,"props":25291,"children":25292},{"style":2108},[25293],{"type":26,"value":25294},"\"Original terms: ",{"type":21,"tag":2072,"props":25296,"children":25297},{"style":2097},[25298],{"type":26,"value":25299},"{len",{"type":21,"tag":2072,"props":25301,"children":25302},{"style":2079},[25303],{"type":26,"value":25304},"(observables)",{"type":21,"tag":2072,"props":25306,"children":25307},{"style":2097},[25308],{"type":26,"value":3958},{"type":21,"tag":2072,"props":25310,"children":25311},{"style":2108},[25312],{"type":26,"value":25313},", Groups: ",{"type":21,"tag":2072,"props":25315,"children":25316},{"style":2097},[25317],{"type":26,"value":25299},{"type":21,"tag":2072,"props":25319,"children":25320},{"style":2079},[25321],{"type":26,"value":25322},"(groups)",{"type":21,"tag":2072,"props":25324,"children":25325},{"style":2097},[25326],{"type":26,"value":3958},{"type":21,"tag":2072,"props":25328,"children":25329},{"style":2108},[25330],{"type":26,"value":7539},{"type":21,"tag":2072,"props":25332,"children":25333},{"style":2079},[25334],{"type":26,"value":4281},{"type":21,"tag":2072,"props":25336,"children":25337},{"class":2074,"line":3777},[25338],{"type":21,"tag":2072,"props":25339,"children":25340},{"style":3985},[25341],{"type":26,"value":25342},"# Original terms: 631, Groups: 68  (for LiH)\n",{"type":21,"tag":22,"props":25344,"children":25345},{},[25346,25351],{"type":21,"tag":784,"props":25347,"children":25348},{},[25349],{"type":26,"value":25350},"Expected savings: 5–15×",{"type":26,"value":25352}," on typical chemistry Hamiltonians.",{"type":21,"tag":43,"props":25354,"children":25356},{"id":25355},"technique-2-shot-frugal-optimizers",[25357],{"type":26,"value":25358},"Technique 2: Shot-Frugal Optimizers",{"type":21,"tag":22,"props":25360,"children":25361},{},[25362,25364,25369],{"type":26,"value":25363},"Classical optimizers like L-BFGS-B or ADAM assume noiseless function evaluations. They request more gradient evaluations than necessary when results are noisy. ",{"type":21,"tag":784,"props":25365,"children":25366},{},[25367],{"type":26,"value":25368},"Shot-frugal optimizers",{"type":26,"value":25370}," allocate shots adaptively based on measurement variance.",{"type":21,"tag":2062,"props":25372,"children":25374},{"className":3362,"code":25373,"language":3361,"meta":7,"style":7},"from pennylane.optimize import AdaptiveOptimizer, ShotAdaptiveOptimizer\n\ndev = qml.device(\"default.qubit\", wires=4)\n\n@qml.qnode(dev)\ndef circuit(params):\n    # ansatz\n    ...\n    return qml.expval(H)\n\n# ShotAdaptiveOptimizer: allocates more shots to high-variance directions\nopt = ShotAdaptiveOptimizer(min_shots=10)\n\nparams = np.random.uniform(-np.pi, np.pi, n_params)\nfor i in range(100):\n    params, _, shots_used = opt.step_and_cost(circuit, params)\n    print(f\"Step {i}: shots used = {shots_used}\")\n",[25375],{"type":21,"tag":1831,"props":25376,"children":25377},{"__ignoreMap":7},[25378,25399,25406,25445,25452,25463,25479,25487,25495,25507,25514,25522,25555,25562,25588,25620,25637],{"type":21,"tag":2072,"props":25379,"children":25380},{"class":2074,"line":2075},[25381,25385,25390,25394],{"type":21,"tag":2072,"props":25382,"children":25383},{"style":3372},[25384],{"type":26,"value":3398},{"type":21,"tag":2072,"props":25386,"children":25387},{"style":2079},[25388],{"type":26,"value":25389}," pennylane.optimize ",{"type":21,"tag":2072,"props":25391,"children":25392},{"style":3372},[25393],{"type":26,"value":3375},{"type":21,"tag":2072,"props":25395,"children":25396},{"style":2079},[25397],{"type":26,"value":25398}," AdaptiveOptimizer, ShotAdaptiveOptimizer\n",{"type":21,"tag":2072,"props":25400,"children":25401},{"class":2074,"line":164},[25402],{"type":21,"tag":2072,"props":25403,"children":25404},{"emptyLinePlaceholder":3460},[25405],{"type":26,"value":3463},{"type":21,"tag":2072,"props":25407,"children":25408},{"class":2074,"line":2093},[25409,25413,25417,25421,25425,25429,25433,25437,25441],{"type":21,"tag":2072,"props":25410,"children":25411},{"style":2079},[25412],{"type":26,"value":14286},{"type":21,"tag":2072,"props":25414,"children":25415},{"style":3372},[25416],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25418,"children":25419},{"style":2079},[25420],{"type":26,"value":14295},{"type":21,"tag":2072,"props":25422,"children":25423},{"style":2108},[25424],{"type":26,"value":14300},{"type":21,"tag":2072,"props":25426,"children":25427},{"style":2079},[25428],{"type":26,"value":798},{"type":21,"tag":2072,"props":25430,"children":25431},{"style":3735},[25432],{"type":26,"value":14309},{"type":21,"tag":2072,"props":25434,"children":25435},{"style":3372},[25436],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25438,"children":25439},{"style":2097},[25440],{"type":26,"value":4661},{"type":21,"tag":2072,"props":25442,"children":25443},{"style":2079},[25444],{"type":26,"value":4281},{"type":21,"tag":2072,"props":25446,"children":25447},{"class":2074,"line":2155},[25448],{"type":21,"tag":2072,"props":25449,"children":25450},{"emptyLinePlaceholder":3460},[25451],{"type":26,"value":3463},{"type":21,"tag":2072,"props":25453,"children":25454},{"class":2074,"line":2178},[25455,25459],{"type":21,"tag":2072,"props":25456,"children":25457},{"style":3474},[25458],{"type":26,"value":14333},{"type":21,"tag":2072,"props":25460,"children":25461},{"style":2079},[25462],{"type":26,"value":14338},{"type":21,"tag":2072,"props":25464,"children":25465},{"class":2074,"line":288},[25466,25470,25474],{"type":21,"tag":2072,"props":25467,"children":25468},{"style":3372},[25469],{"type":26,"value":3471},{"type":21,"tag":2072,"props":25471,"children":25472},{"style":3474},[25473],{"type":26,"value":14350},{"type":21,"tag":2072,"props":25475,"children":25476},{"style":2079},[25477],{"type":26,"value":25478},"(params):\n",{"type":21,"tag":2072,"props":25480,"children":25481},{"class":2074,"line":16},[25482],{"type":21,"tag":2072,"props":25483,"children":25484},{"style":3985},[25485],{"type":26,"value":25486},"    # ansatz\n",{"type":21,"tag":2072,"props":25488,"children":25489},{"class":2074,"line":366},[25490],{"type":21,"tag":2072,"props":25491,"children":25492},{"style":2097},[25493],{"type":26,"value":25494},"    ...\n",{"type":21,"tag":2072,"props":25496,"children":25497},{"class":2074,"line":853},[25498,25502],{"type":21,"tag":2072,"props":25499,"children":25500},{"style":3372},[25501],{"type":26,"value":3701},{"type":21,"tag":2072,"props":25503,"children":25504},{"style":2079},[25505],{"type":26,"value":25506}," qml.expval(H)\n",{"type":21,"tag":2072,"props":25508,"children":25509},{"class":2074,"line":3092},[25510],{"type":21,"tag":2072,"props":25511,"children":25512},{"emptyLinePlaceholder":3460},[25513],{"type":26,"value":3463},{"type":21,"tag":2072,"props":25515,"children":25516},{"class":2074,"line":3651},[25517],{"type":21,"tag":2072,"props":25518,"children":25519},{"style":3985},[25520],{"type":26,"value":25521},"# ShotAdaptiveOptimizer: allocates more shots to high-variance directions\n",{"type":21,"tag":2072,"props":25523,"children":25524},{"class":2074,"line":2616},[25525,25529,25533,25538,25543,25547,25551],{"type":21,"tag":2072,"props":25526,"children":25527},{"style":2079},[25528],{"type":26,"value":15012},{"type":21,"tag":2072,"props":25530,"children":25531},{"style":3372},[25532],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25534,"children":25535},{"style":2079},[25536],{"type":26,"value":25537}," ShotAdaptiveOptimizer(",{"type":21,"tag":2072,"props":25539,"children":25540},{"style":3735},[25541],{"type":26,"value":25542},"min_shots",{"type":21,"tag":2072,"props":25544,"children":25545},{"style":3372},[25546],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25548,"children":25549},{"style":2097},[25550],{"type":26,"value":20697},{"type":21,"tag":2072,"props":25552,"children":25553},{"style":2079},[25554],{"type":26,"value":4281},{"type":21,"tag":2072,"props":25556,"children":25557},{"class":2074,"line":3695},[25558],{"type":21,"tag":2072,"props":25559,"children":25560},{"emptyLinePlaceholder":3460},[25561],{"type":26,"value":3463},{"type":21,"tag":2072,"props":25563,"children":25564},{"class":2074,"line":3709},[25565,25570,25574,25579,25583],{"type":21,"tag":2072,"props":25566,"children":25567},{"style":2079},[25568],{"type":26,"value":25569},"params ",{"type":21,"tag":2072,"props":25571,"children":25572},{"style":3372},[25573],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25575,"children":25576},{"style":2079},[25577],{"type":26,"value":25578}," np.random.uniform(",{"type":21,"tag":2072,"props":25580,"children":25581},{"style":3372},[25582],{"type":26,"value":3973},{"type":21,"tag":2072,"props":25584,"children":25585},{"style":2079},[25586],{"type":26,"value":25587},"np.pi, np.pi, n_params)\n",{"type":21,"tag":2072,"props":25589,"children":25590},{"class":2074,"line":3717},[25591,25595,25599,25603,25607,25611,25616],{"type":21,"tag":2072,"props":25592,"children":25593},{"style":3372},[25594],{"type":26,"value":4479},{"type":21,"tag":2072,"props":25596,"children":25597},{"style":2079},[25598],{"type":26,"value":3864},{"type":21,"tag":2072,"props":25600,"children":25601},{"style":3372},[25602],{"type":26,"value":3869},{"type":21,"tag":2072,"props":25604,"children":25605},{"style":2097},[25606],{"type":26,"value":3874},{"type":21,"tag":2072,"props":25608,"children":25609},{"style":2079},[25610],{"type":26,"value":3879},{"type":21,"tag":2072,"props":25612,"children":25613},{"style":2097},[25614],{"type":26,"value":25615},"100",{"type":21,"tag":2072,"props":25617,"children":25618},{"style":2079},[25619],{"type":26,"value":3525},{"type":21,"tag":2072,"props":25621,"children":25622},{"class":2074,"line":3750},[25623,25628,25632],{"type":21,"tag":2072,"props":25624,"children":25625},{"style":2079},[25626],{"type":26,"value":25627},"    params, _, shots_used ",{"type":21,"tag":2072,"props":25629,"children":25630},{"style":3372},[25631],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25633,"children":25634},{"style":2079},[25635],{"type":26,"value":25636}," opt.step_and_cost(circuit, params)\n",{"type":21,"tag":2072,"props":25638,"children":25639},{"class":2074,"line":3769},[25640,25644,25648,25652,25656,25660,25664,25668,25673,25677,25682,25686,25690],{"type":21,"tag":2072,"props":25641,"children":25642},{"style":2097},[25643],{"type":26,"value":17282},{"type":21,"tag":2072,"props":25645,"children":25646},{"style":2079},[25647],{"type":26,"value":3879},{"type":21,"tag":2072,"props":25649,"children":25650},{"style":3372},[25651],{"type":26,"value":3938},{"type":21,"tag":2072,"props":25653,"children":25654},{"style":2108},[25655],{"type":26,"value":15291},{"type":21,"tag":2072,"props":25657,"children":25658},{"style":2097},[25659],{"type":26,"value":3948},{"type":21,"tag":2072,"props":25661,"children":25662},{"style":2079},[25663],{"type":26,"value":3339},{"type":21,"tag":2072,"props":25665,"children":25666},{"style":2097},[25667],{"type":26,"value":3958},{"type":21,"tag":2072,"props":25669,"children":25670},{"style":2108},[25671],{"type":26,"value":25672},": shots used = ",{"type":21,"tag":2072,"props":25674,"children":25675},{"style":2097},[25676],{"type":26,"value":3948},{"type":21,"tag":2072,"props":25678,"children":25679},{"style":2079},[25680],{"type":26,"value":25681},"shots_used",{"type":21,"tag":2072,"props":25683,"children":25684},{"style":2097},[25685],{"type":26,"value":3958},{"type":21,"tag":2072,"props":25687,"children":25688},{"style":2108},[25689],{"type":26,"value":7539},{"type":21,"tag":2072,"props":25691,"children":25692},{"style":2079},[25693],{"type":26,"value":4281},{"type":21,"tag":22,"props":25695,"children":25696},{},[25697,25699,25704],{"type":26,"value":25698},"The optimizer starts with few shots per evaluation and increases them only when the gradient is uncertain. A typical VQE run uses ",{"type":21,"tag":784,"props":25700,"children":25701},{},[25702],{"type":26,"value":25703},"5–10× fewer shots",{"type":26,"value":25705}," vs. fixed-shot COBYLA.",{"type":21,"tag":43,"props":25707,"children":25709},{"id":25708},"technique-3-parameter-shift-gradients-use-fewer-evaluations",[25710],{"type":26,"value":25711},"Technique 3: Parameter-Shift Gradients (Use Fewer Evaluations)",{"type":21,"tag":22,"props":25713,"children":25714},{},[25715,25717,25723,25725,25730],{"type":26,"value":25716},"The naive finite-difference gradient estimate ",{"type":21,"tag":1831,"props":25718,"children":25720},{"className":25719},[],[25721],{"type":26,"value":25722},"(f(x+ε) - f(x))\u002Fε",{"type":26,"value":25724}," has high variance at small ε and large bias at large ε. The ",{"type":21,"tag":784,"props":25726,"children":25727},{},[25728],{"type":26,"value":25729},"parameter-shift rule",{"type":26,"value":25731}," gives exact gradients with 2 circuit evaluations per parameter:",{"type":21,"tag":2062,"props":25733,"children":25735},{"className":3362,"code":25734,"language":3361,"meta":7,"style":7},"# PennyLane uses parameter-shift by default for gradients\n@qml.qnode(dev, diff_method=\"parameter-shift\")  # 2 evals per param\ndef circuit(params):\n    ...\n\n# Compare to finite-difference (requires 1 eval per param but biased):\n@qml.qnode(dev, diff_method=\"finite-diff\")  # 1 eval but approximate\n\n# For large circuits, use \"best\": PennyLane chooses adjoint on simulator,\n# parameter-shift on hardware\n@qml.qnode(dev, diff_method=\"best\")\ndef circuit(params):\n    ...\n",[25736],{"type":21,"tag":1831,"props":25737,"children":25738},{"__ignoreMap":7},[25739,25747,25782,25797,25804,25811,25819,25852,25859,25867,25875,25903,25918],{"type":21,"tag":2072,"props":25740,"children":25741},{"class":2074,"line":2075},[25742],{"type":21,"tag":2072,"props":25743,"children":25744},{"style":3985},[25745],{"type":26,"value":25746},"# PennyLane uses parameter-shift by default for gradients\n",{"type":21,"tag":2072,"props":25748,"children":25749},{"class":2074,"line":164},[25750,25754,25759,25764,25768,25773,25777],{"type":21,"tag":2072,"props":25751,"children":25752},{"style":3474},[25753],{"type":26,"value":14333},{"type":21,"tag":2072,"props":25755,"children":25756},{"style":2079},[25757],{"type":26,"value":25758},"(dev, ",{"type":21,"tag":2072,"props":25760,"children":25761},{"style":3735},[25762],{"type":26,"value":25763},"diff_method",{"type":21,"tag":2072,"props":25765,"children":25766},{"style":3372},[25767],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25769,"children":25770},{"style":2108},[25771],{"type":26,"value":25772},"\"parameter-shift\"",{"type":21,"tag":2072,"props":25774,"children":25775},{"style":2079},[25776],{"type":26,"value":19580},{"type":21,"tag":2072,"props":25778,"children":25779},{"style":3985},[25780],{"type":26,"value":25781},"# 2 evals per param\n",{"type":21,"tag":2072,"props":25783,"children":25784},{"class":2074,"line":2093},[25785,25789,25793],{"type":21,"tag":2072,"props":25786,"children":25787},{"style":3372},[25788],{"type":26,"value":3471},{"type":21,"tag":2072,"props":25790,"children":25791},{"style":3474},[25792],{"type":26,"value":14350},{"type":21,"tag":2072,"props":25794,"children":25795},{"style":2079},[25796],{"type":26,"value":25478},{"type":21,"tag":2072,"props":25798,"children":25799},{"class":2074,"line":2155},[25800],{"type":21,"tag":2072,"props":25801,"children":25802},{"style":2097},[25803],{"type":26,"value":25494},{"type":21,"tag":2072,"props":25805,"children":25806},{"class":2074,"line":2178},[25807],{"type":21,"tag":2072,"props":25808,"children":25809},{"emptyLinePlaceholder":3460},[25810],{"type":26,"value":3463},{"type":21,"tag":2072,"props":25812,"children":25813},{"class":2074,"line":288},[25814],{"type":21,"tag":2072,"props":25815,"children":25816},{"style":3985},[25817],{"type":26,"value":25818},"# Compare to finite-difference (requires 1 eval per param but biased):\n",{"type":21,"tag":2072,"props":25820,"children":25821},{"class":2074,"line":16},[25822,25826,25830,25834,25838,25843,25847],{"type":21,"tag":2072,"props":25823,"children":25824},{"style":3474},[25825],{"type":26,"value":14333},{"type":21,"tag":2072,"props":25827,"children":25828},{"style":2079},[25829],{"type":26,"value":25758},{"type":21,"tag":2072,"props":25831,"children":25832},{"style":3735},[25833],{"type":26,"value":25763},{"type":21,"tag":2072,"props":25835,"children":25836},{"style":3372},[25837],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25839,"children":25840},{"style":2108},[25841],{"type":26,"value":25842},"\"finite-diff\"",{"type":21,"tag":2072,"props":25844,"children":25845},{"style":2079},[25846],{"type":26,"value":19580},{"type":21,"tag":2072,"props":25848,"children":25849},{"style":3985},[25850],{"type":26,"value":25851},"# 1 eval but approximate\n",{"type":21,"tag":2072,"props":25853,"children":25854},{"class":2074,"line":366},[25855],{"type":21,"tag":2072,"props":25856,"children":25857},{"emptyLinePlaceholder":3460},[25858],{"type":26,"value":3463},{"type":21,"tag":2072,"props":25860,"children":25861},{"class":2074,"line":853},[25862],{"type":21,"tag":2072,"props":25863,"children":25864},{"style":3985},[25865],{"type":26,"value":25866},"# For large circuits, use \"best\": PennyLane chooses adjoint on simulator,\n",{"type":21,"tag":2072,"props":25868,"children":25869},{"class":2074,"line":3092},[25870],{"type":21,"tag":2072,"props":25871,"children":25872},{"style":3985},[25873],{"type":26,"value":25874},"# parameter-shift on hardware\n",{"type":21,"tag":2072,"props":25876,"children":25877},{"class":2074,"line":3651},[25878,25882,25886,25890,25894,25899],{"type":21,"tag":2072,"props":25879,"children":25880},{"style":3474},[25881],{"type":26,"value":14333},{"type":21,"tag":2072,"props":25883,"children":25884},{"style":2079},[25885],{"type":26,"value":25758},{"type":21,"tag":2072,"props":25887,"children":25888},{"style":3735},[25889],{"type":26,"value":25763},{"type":21,"tag":2072,"props":25891,"children":25892},{"style":3372},[25893],{"type":26,"value":3487},{"type":21,"tag":2072,"props":25895,"children":25896},{"style":2108},[25897],{"type":26,"value":25898},"\"best\"",{"type":21,"tag":2072,"props":25900,"children":25901},{"style":2079},[25902],{"type":26,"value":4281},{"type":21,"tag":2072,"props":25904,"children":25905},{"class":2074,"line":2616},[25906,25910,25914],{"type":21,"tag":2072,"props":25907,"children":25908},{"style":3372},[25909],{"type":26,"value":3471},{"type":21,"tag":2072,"props":25911,"children":25912},{"style":3474},[25913],{"type":26,"value":14350},{"type":21,"tag":2072,"props":25915,"children":25916},{"style":2079},[25917],{"type":26,"value":25478},{"type":21,"tag":2072,"props":25919,"children":25920},{"class":2074,"line":3695},[25921],{"type":21,"tag":2072,"props":25922,"children":25923},{"style":2097},[25924],{"type":26,"value":25494},{"type":21,"tag":22,"props":25926,"children":25927},{},[25928,25930,25935,25937,25943,25945,25950],{"type":26,"value":25929},"With ",{"type":21,"tag":1831,"props":25931,"children":25933},{"className":25932},[],[25934],{"type":26,"value":3953},{"type":26,"value":25936}," parameters, parameter-shift costs ",{"type":21,"tag":1831,"props":25938,"children":25940},{"className":25939},[],[25941],{"type":26,"value":25942},"2n",{"type":26,"value":25944}," evaluations per gradient step. Use gradient-free optimizers (COBYLA, SPSA, Nelder-Mead) when ",{"type":21,"tag":1831,"props":25946,"children":25948},{"className":25947},[],[25949],{"type":26,"value":3953},{"type":26,"value":25951}," is large.",{"type":21,"tag":43,"props":25953,"children":25955},{"id":25954},"technique-4-spsa-stochastic-gradient-estimation",[25956],{"type":26,"value":25957},"Technique 4: SPSA (Stochastic Gradient Estimation)",{"type":21,"tag":22,"props":25959,"children":25960},{},[25961,25963,25968],{"type":26,"value":25962},"Simultaneous Perturbation Stochastic Approximation (SPSA) estimates the full gradient with ",{"type":21,"tag":784,"props":25964,"children":25965},{},[25966],{"type":26,"value":25967},"2 circuit evaluations",{"type":26,"value":25969}," regardless of parameter count, by perturbing all parameters simultaneously:",{"type":21,"tag":2062,"props":25971,"children":25973},{"className":3362,"code":25972,"language":3361,"meta":7,"style":7},"from qiskit_algorithms.optimizers import SPSA\n\n# SPSA: 2 evaluations per step regardless of parameter count\n# vs parameter-shift: 2n evaluations per step\noptimizer = SPSA(maxiter=300, learning_rate=0.1, perturbation=0.05)\n\n# For 10 parameters:\n# - Parameter shift: 2×10 = 20 evals\u002Fstep × 300 steps = 6,000 total\n# - SPSA: 2 evals\u002Fstep × 300 steps = 600 total  ← 10x reduction\n",[25974],{"type":21,"tag":1831,"props":25975,"children":25976},{"__ignoreMap":7},[25977,25997,26004,26012,26020,26088,26095,26103,26111],{"type":21,"tag":2072,"props":25978,"children":25979},{"class":2074,"line":2075},[25980,25984,25988,25992],{"type":21,"tag":2072,"props":25981,"children":25982},{"style":3372},[25983],{"type":26,"value":3398},{"type":21,"tag":2072,"props":25985,"children":25986},{"style":2079},[25987],{"type":26,"value":22726},{"type":21,"tag":2072,"props":25989,"children":25990},{"style":3372},[25991],{"type":26,"value":3375},{"type":21,"tag":2072,"props":25993,"children":25994},{"style":2097},[25995],{"type":26,"value":25996}," SPSA\n",{"type":21,"tag":2072,"props":25998,"children":25999},{"class":2074,"line":164},[26000],{"type":21,"tag":2072,"props":26001,"children":26002},{"emptyLinePlaceholder":3460},[26003],{"type":26,"value":3463},{"type":21,"tag":2072,"props":26005,"children":26006},{"class":2074,"line":2093},[26007],{"type":21,"tag":2072,"props":26008,"children":26009},{"style":3985},[26010],{"type":26,"value":26011},"# SPSA: 2 evaluations per step regardless of parameter count\n",{"type":21,"tag":2072,"props":26013,"children":26014},{"class":2074,"line":2155},[26015],{"type":21,"tag":2072,"props":26016,"children":26017},{"style":3985},[26018],{"type":26,"value":26019},"# vs parameter-shift: 2n evaluations per step\n",{"type":21,"tag":2072,"props":26021,"children":26022},{"class":2074,"line":2178},[26023,26028,26032,26037,26041,26045,26050,26054,26059,26063,26067,26071,26076,26080,26084],{"type":21,"tag":2072,"props":26024,"children":26025},{"style":2079},[26026],{"type":26,"value":26027},"optimizer ",{"type":21,"tag":2072,"props":26029,"children":26030},{"style":3372},[26031],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26033,"children":26034},{"style":2079},[26035],{"type":26,"value":26036}," SPSA(",{"type":21,"tag":2072,"props":26038,"children":26039},{"style":3735},[26040],{"type":26,"value":2359},{"type":21,"tag":2072,"props":26042,"children":26043},{"style":3372},[26044],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26046,"children":26047},{"style":2097},[26048],{"type":26,"value":26049},"300",{"type":21,"tag":2072,"props":26051,"children":26052},{"style":2079},[26053],{"type":26,"value":798},{"type":21,"tag":2072,"props":26055,"children":26056},{"style":3735},[26057],{"type":26,"value":26058},"learning_rate",{"type":21,"tag":2072,"props":26060,"children":26061},{"style":3372},[26062],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26064,"children":26065},{"style":2097},[26066],{"type":26,"value":14933},{"type":21,"tag":2072,"props":26068,"children":26069},{"style":2079},[26070],{"type":26,"value":798},{"type":21,"tag":2072,"props":26072,"children":26073},{"style":3735},[26074],{"type":26,"value":26075},"perturbation",{"type":21,"tag":2072,"props":26077,"children":26078},{"style":3372},[26079],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26081,"children":26082},{"style":2097},[26083],{"type":26,"value":3520},{"type":21,"tag":2072,"props":26085,"children":26086},{"style":2079},[26087],{"type":26,"value":4281},{"type":21,"tag":2072,"props":26089,"children":26090},{"class":2074,"line":288},[26091],{"type":21,"tag":2072,"props":26092,"children":26093},{"emptyLinePlaceholder":3460},[26094],{"type":26,"value":3463},{"type":21,"tag":2072,"props":26096,"children":26097},{"class":2074,"line":16},[26098],{"type":21,"tag":2072,"props":26099,"children":26100},{"style":3985},[26101],{"type":26,"value":26102},"# For 10 parameters:\n",{"type":21,"tag":2072,"props":26104,"children":26105},{"class":2074,"line":366},[26106],{"type":21,"tag":2072,"props":26107,"children":26108},{"style":3985},[26109],{"type":26,"value":26110},"# - Parameter shift: 2×10 = 20 evals\u002Fstep × 300 steps = 6,000 total\n",{"type":21,"tag":2072,"props":26112,"children":26113},{"class":2074,"line":853},[26114],{"type":21,"tag":2072,"props":26115,"children":26116},{"style":3985},[26117],{"type":26,"value":26118},"# - SPSA: 2 evals\u002Fstep × 300 steps = 600 total  ← 10x reduction\n",{"type":21,"tag":22,"props":26120,"children":26121},{},[26122,26127],{"type":21,"tag":784,"props":26123,"children":26124},{},[26125],{"type":26,"value":26126},"Best when:",{"type":26,"value":26128}," circuit has many parameters (> 10). The tradeoff is slower convergence per step, but fewer total shots.",{"type":21,"tag":43,"props":26130,"children":26132},{"id":26131},"technique-5-early-termination-variance-thresholding",[26133],{"type":26,"value":26134},"Technique 5: Early Termination + Variance Thresholding",{"type":21,"tag":22,"props":26136,"children":26137},{},[26138],{"type":26,"value":26139},"Don't run circuits to completion when the result is already good enough:",{"type":21,"tag":2062,"props":26141,"children":26143},{"className":3362,"code":26142,"language":3361,"meta":7,"style":7},"from pennylane.optimize import AdamOptimizer\nimport numpy as np\n\nopt = AdamOptimizer(stepsize=0.02)\nparams = init_params.copy()\nprev_energy = float('inf')\n\nfor step in range(max_steps):\n    params, energy = opt.step_and_cost(circuit, params)\n\n    # Stop when change is below shot-noise floor\n    variance = 1.0 \u002F np.sqrt(shots_per_eval)  # shot noise floor\n    if abs(energy - prev_energy) \u003C variance:\n        print(f\"Converged at step {step}\")\n        break\n\n    prev_energy = energy\n",[26144],{"type":21,"tag":1831,"props":26145,"children":26146},{"__ignoreMap":7},[26147,26167,26186,26193,26225,26241,26271,26278,26302,26318,26325,26333,26365,26401,26441,26449,26456],{"type":21,"tag":2072,"props":26148,"children":26149},{"class":2074,"line":2075},[26150,26154,26158,26162],{"type":21,"tag":2072,"props":26151,"children":26152},{"style":3372},[26153],{"type":26,"value":3398},{"type":21,"tag":2072,"props":26155,"children":26156},{"style":2079},[26157],{"type":26,"value":25389},{"type":21,"tag":2072,"props":26159,"children":26160},{"style":3372},[26161],{"type":26,"value":3375},{"type":21,"tag":2072,"props":26163,"children":26164},{"style":2079},[26165],{"type":26,"value":26166}," AdamOptimizer\n",{"type":21,"tag":2072,"props":26168,"children":26169},{"class":2074,"line":164},[26170,26174,26178,26182],{"type":21,"tag":2072,"props":26171,"children":26172},{"style":3372},[26173],{"type":26,"value":3375},{"type":21,"tag":2072,"props":26175,"children":26176},{"style":2079},[26177],{"type":26,"value":3380},{"type":21,"tag":2072,"props":26179,"children":26180},{"style":3372},[26181],{"type":26,"value":3385},{"type":21,"tag":2072,"props":26183,"children":26184},{"style":2079},[26185],{"type":26,"value":3390},{"type":21,"tag":2072,"props":26187,"children":26188},{"class":2074,"line":2093},[26189],{"type":21,"tag":2072,"props":26190,"children":26191},{"emptyLinePlaceholder":3460},[26192],{"type":26,"value":3463},{"type":21,"tag":2072,"props":26194,"children":26195},{"class":2074,"line":2155},[26196,26200,26204,26209,26213,26217,26221],{"type":21,"tag":2072,"props":26197,"children":26198},{"style":2079},[26199],{"type":26,"value":15012},{"type":21,"tag":2072,"props":26201,"children":26202},{"style":3372},[26203],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26205,"children":26206},{"style":2079},[26207],{"type":26,"value":26208}," AdamOptimizer(",{"type":21,"tag":2072,"props":26210,"children":26211},{"style":3735},[26212],{"type":26,"value":15026},{"type":21,"tag":2072,"props":26214,"children":26215},{"style":3372},[26216],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26218,"children":26219},{"style":2097},[26220],{"type":26,"value":3506},{"type":21,"tag":2072,"props":26222,"children":26223},{"style":2079},[26224],{"type":26,"value":4281},{"type":21,"tag":2072,"props":26226,"children":26227},{"class":2074,"line":2178},[26228,26232,26236],{"type":21,"tag":2072,"props":26229,"children":26230},{"style":2079},[26231],{"type":26,"value":25569},{"type":21,"tag":2072,"props":26233,"children":26234},{"style":3372},[26235],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26237,"children":26238},{"style":2079},[26239],{"type":26,"value":26240}," init_params.copy()\n",{"type":21,"tag":2072,"props":26242,"children":26243},{"class":2074,"line":288},[26244,26249,26253,26258,26262,26267],{"type":21,"tag":2072,"props":26245,"children":26246},{"style":2079},[26247],{"type":26,"value":26248},"prev_energy ",{"type":21,"tag":2072,"props":26250,"children":26251},{"style":3372},[26252],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26254,"children":26255},{"style":2097},[26256],{"type":26,"value":26257}," float",{"type":21,"tag":2072,"props":26259,"children":26260},{"style":2079},[26261],{"type":26,"value":3879},{"type":21,"tag":2072,"props":26263,"children":26264},{"style":2108},[26265],{"type":26,"value":26266},"'inf'",{"type":21,"tag":2072,"props":26268,"children":26269},{"style":2079},[26270],{"type":26,"value":4281},{"type":21,"tag":2072,"props":26272,"children":26273},{"class":2074,"line":16},[26274],{"type":21,"tag":2072,"props":26275,"children":26276},{"emptyLinePlaceholder":3460},[26277],{"type":26,"value":3463},{"type":21,"tag":2072,"props":26279,"children":26280},{"class":2074,"line":366},[26281,26285,26289,26293,26297],{"type":21,"tag":2072,"props":26282,"children":26283},{"style":3372},[26284],{"type":26,"value":4479},{"type":21,"tag":2072,"props":26286,"children":26287},{"style":2079},[26288],{"type":26,"value":15074},{"type":21,"tag":2072,"props":26290,"children":26291},{"style":3372},[26292],{"type":26,"value":3869},{"type":21,"tag":2072,"props":26294,"children":26295},{"style":2097},[26296],{"type":26,"value":3874},{"type":21,"tag":2072,"props":26298,"children":26299},{"style":2079},[26300],{"type":26,"value":26301},"(max_steps):\n",{"type":21,"tag":2072,"props":26303,"children":26304},{"class":2074,"line":853},[26305,26310,26314],{"type":21,"tag":2072,"props":26306,"children":26307},{"style":2079},[26308],{"type":26,"value":26309},"    params, energy ",{"type":21,"tag":2072,"props":26311,"children":26312},{"style":3372},[26313],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26315,"children":26316},{"style":2079},[26317],{"type":26,"value":25636},{"type":21,"tag":2072,"props":26319,"children":26320},{"class":2074,"line":3092},[26321],{"type":21,"tag":2072,"props":26322,"children":26323},{"emptyLinePlaceholder":3460},[26324],{"type":26,"value":3463},{"type":21,"tag":2072,"props":26326,"children":26327},{"class":2074,"line":3651},[26328],{"type":21,"tag":2072,"props":26329,"children":26330},{"style":3985},[26331],{"type":26,"value":26332},"    # Stop when change is below shot-noise floor\n",{"type":21,"tag":2072,"props":26334,"children":26335},{"class":2074,"line":2616},[26336,26341,26345,26350,26355,26360],{"type":21,"tag":2072,"props":26337,"children":26338},{"style":2079},[26339],{"type":26,"value":26340},"    variance ",{"type":21,"tag":2072,"props":26342,"children":26343},{"style":3372},[26344],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26346,"children":26347},{"style":2097},[26348],{"type":26,"value":26349}," 1.0",{"type":21,"tag":2072,"props":26351,"children":26352},{"style":3372},[26353],{"type":26,"value":26354}," \u002F",{"type":21,"tag":2072,"props":26356,"children":26357},{"style":2079},[26358],{"type":26,"value":26359}," np.sqrt(shots_per_eval)  ",{"type":21,"tag":2072,"props":26361,"children":26362},{"style":3985},[26363],{"type":26,"value":26364},"# shot noise floor\n",{"type":21,"tag":2072,"props":26366,"children":26367},{"class":2074,"line":3695},[26368,26372,26377,26382,26386,26391,26396],{"type":21,"tag":2072,"props":26369,"children":26370},{"style":3372},[26371],{"type":26,"value":12007},{"type":21,"tag":2072,"props":26373,"children":26374},{"style":2097},[26375],{"type":26,"value":26376}," abs",{"type":21,"tag":2072,"props":26378,"children":26379},{"style":2079},[26380],{"type":26,"value":26381},"(energy ",{"type":21,"tag":2072,"props":26383,"children":26384},{"style":3372},[26385],{"type":26,"value":3973},{"type":21,"tag":2072,"props":26387,"children":26388},{"style":2079},[26389],{"type":26,"value":26390}," prev_energy) ",{"type":21,"tag":2072,"props":26392,"children":26393},{"style":3372},[26394],{"type":26,"value":26395},"\u003C",{"type":21,"tag":2072,"props":26397,"children":26398},{"style":2079},[26399],{"type":26,"value":26400}," variance:\n",{"type":21,"tag":2072,"props":26402,"children":26403},{"class":2074,"line":3709},[26404,26408,26412,26416,26421,26425,26429,26433,26437],{"type":21,"tag":2072,"props":26405,"children":26406},{"style":2097},[26407],{"type":26,"value":12953},{"type":21,"tag":2072,"props":26409,"children":26410},{"style":2079},[26411],{"type":26,"value":3879},{"type":21,"tag":2072,"props":26413,"children":26414},{"style":3372},[26415],{"type":26,"value":3938},{"type":21,"tag":2072,"props":26417,"children":26418},{"style":2108},[26419],{"type":26,"value":26420},"\"Converged at step ",{"type":21,"tag":2072,"props":26422,"children":26423},{"style":2097},[26424],{"type":26,"value":3948},{"type":21,"tag":2072,"props":26426,"children":26427},{"style":2079},[26428],{"type":26,"value":15300},{"type":21,"tag":2072,"props":26430,"children":26431},{"style":2097},[26432],{"type":26,"value":3958},{"type":21,"tag":2072,"props":26434,"children":26435},{"style":2108},[26436],{"type":26,"value":7539},{"type":21,"tag":2072,"props":26438,"children":26439},{"style":2079},[26440],{"type":26,"value":4281},{"type":21,"tag":2072,"props":26442,"children":26443},{"class":2074,"line":3717},[26444],{"type":21,"tag":2072,"props":26445,"children":26446},{"style":3372},[26447],{"type":26,"value":26448},"        break\n",{"type":21,"tag":2072,"props":26450,"children":26451},{"class":2074,"line":3750},[26452],{"type":21,"tag":2072,"props":26453,"children":26454},{"emptyLinePlaceholder":3460},[26455],{"type":26,"value":3463},{"type":21,"tag":2072,"props":26457,"children":26458},{"class":2074,"line":3769},[26459,26464,26468],{"type":21,"tag":2072,"props":26460,"children":26461},{"style":2079},[26462],{"type":26,"value":26463},"    prev_energy ",{"type":21,"tag":2072,"props":26465,"children":26466},{"style":3372},[26467],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26469,"children":26470},{"style":2079},[26471],{"type":26,"value":26472}," energy\n",{"type":21,"tag":22,"props":26474,"children":26475},{},[26476,26478,26483],{"type":26,"value":26477},"Many VQE runs plateau early. Continuing wastes shots on ",{"type":21,"tag":29,"props":26479,"children":26480},{"href":4837},[26481],{"type":26,"value":26482},"shot-noise",{"type":26,"value":26484}," fluctuations.",{"type":21,"tag":43,"props":26486,"children":26488},{"id":26487},"technique-6-warm-starting",[26489],{"type":26,"value":26490},"Technique 6: Warm Starting",{"type":21,"tag":22,"props":26492,"children":26493},{},[26494],{"type":26,"value":26495},"Initialize QAOA or VQE parameters from a related classical solution rather than random:",{"type":21,"tag":2062,"props":26497,"children":26499},{"className":3362,"code":26498,"language":3361,"meta":7,"style":7},"# For QAOA on Max-Cut: warm start from a greedy classical solution\nimport networkx as nx\n\nG = nx.from_edgelist(edges)\nclassical_cut = nx.algorithms.approximation.one_exchange(G)\n\n# Map classical solution to initial QAOA angles\n# γ₀ ≈ π\u002F4 for a good cut, β₀ ≈ π\u002F8\ninit_gamma = [np.pi \u002F 4]\ninit_beta = [np.pi \u002F 8]\n\n# Warm-started QAOA typically converges in 30-50% fewer iterations\n",[26500],{"type":21,"tag":1831,"props":26501,"children":26502},{"__ignoreMap":7},[26503,26511,26532,26539,26556,26573,26580,26588,26596,26625,26654,26661],{"type":21,"tag":2072,"props":26504,"children":26505},{"class":2074,"line":2075},[26506],{"type":21,"tag":2072,"props":26507,"children":26508},{"style":3985},[26509],{"type":26,"value":26510},"# For QAOA on Max-Cut: warm start from a greedy classical solution\n",{"type":21,"tag":2072,"props":26512,"children":26513},{"class":2074,"line":164},[26514,26518,26523,26527],{"type":21,"tag":2072,"props":26515,"children":26516},{"style":3372},[26517],{"type":26,"value":3375},{"type":21,"tag":2072,"props":26519,"children":26520},{"style":2079},[26521],{"type":26,"value":26522}," networkx ",{"type":21,"tag":2072,"props":26524,"children":26525},{"style":3372},[26526],{"type":26,"value":3385},{"type":21,"tag":2072,"props":26528,"children":26529},{"style":2079},[26530],{"type":26,"value":26531}," nx\n",{"type":21,"tag":2072,"props":26533,"children":26534},{"class":2074,"line":2093},[26535],{"type":21,"tag":2072,"props":26536,"children":26537},{"emptyLinePlaceholder":3460},[26538],{"type":26,"value":3463},{"type":21,"tag":2072,"props":26540,"children":26541},{"class":2074,"line":2155},[26542,26547,26551],{"type":21,"tag":2072,"props":26543,"children":26544},{"style":2079},[26545],{"type":26,"value":26546},"G ",{"type":21,"tag":2072,"props":26548,"children":26549},{"style":3372},[26550],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26552,"children":26553},{"style":2079},[26554],{"type":26,"value":26555}," nx.from_edgelist(edges)\n",{"type":21,"tag":2072,"props":26557,"children":26558},{"class":2074,"line":2178},[26559,26564,26568],{"type":21,"tag":2072,"props":26560,"children":26561},{"style":2079},[26562],{"type":26,"value":26563},"classical_cut ",{"type":21,"tag":2072,"props":26565,"children":26566},{"style":3372},[26567],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26569,"children":26570},{"style":2079},[26571],{"type":26,"value":26572}," nx.algorithms.approximation.one_exchange(G)\n",{"type":21,"tag":2072,"props":26574,"children":26575},{"class":2074,"line":288},[26576],{"type":21,"tag":2072,"props":26577,"children":26578},{"emptyLinePlaceholder":3460},[26579],{"type":26,"value":3463},{"type":21,"tag":2072,"props":26581,"children":26582},{"class":2074,"line":16},[26583],{"type":21,"tag":2072,"props":26584,"children":26585},{"style":3985},[26586],{"type":26,"value":26587},"# Map classical solution to initial QAOA angles\n",{"type":21,"tag":2072,"props":26589,"children":26590},{"class":2074,"line":366},[26591],{"type":21,"tag":2072,"props":26592,"children":26593},{"style":3985},[26594],{"type":26,"value":26595},"# γ₀ ≈ π\u002F4 for a good cut, β₀ ≈ π\u002F8\n",{"type":21,"tag":2072,"props":26597,"children":26598},{"class":2074,"line":853},[26599,26604,26608,26613,26617,26621],{"type":21,"tag":2072,"props":26600,"children":26601},{"style":2079},[26602],{"type":26,"value":26603},"init_gamma ",{"type":21,"tag":2072,"props":26605,"children":26606},{"style":3372},[26607],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26609,"children":26610},{"style":2079},[26611],{"type":26,"value":26612}," [np.pi ",{"type":21,"tag":2072,"props":26614,"children":26615},{"style":3372},[26616],{"type":26,"value":1926},{"type":21,"tag":2072,"props":26618,"children":26619},{"style":2097},[26620],{"type":26,"value":7473},{"type":21,"tag":2072,"props":26622,"children":26623},{"style":2079},[26624],{"type":26,"value":5817},{"type":21,"tag":2072,"props":26626,"children":26627},{"class":2074,"line":3092},[26628,26633,26637,26641,26645,26650],{"type":21,"tag":2072,"props":26629,"children":26630},{"style":2079},[26631],{"type":26,"value":26632},"init_beta ",{"type":21,"tag":2072,"props":26634,"children":26635},{"style":3372},[26636],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26638,"children":26639},{"style":2079},[26640],{"type":26,"value":26612},{"type":21,"tag":2072,"props":26642,"children":26643},{"style":3372},[26644],{"type":26,"value":1926},{"type":21,"tag":2072,"props":26646,"children":26647},{"style":2097},[26648],{"type":26,"value":26649}," 8",{"type":21,"tag":2072,"props":26651,"children":26652},{"style":2079},[26653],{"type":26,"value":5817},{"type":21,"tag":2072,"props":26655,"children":26656},{"class":2074,"line":3651},[26657],{"type":21,"tag":2072,"props":26658,"children":26659},{"emptyLinePlaceholder":3460},[26660],{"type":26,"value":3463},{"type":21,"tag":2072,"props":26662,"children":26663},{"class":2074,"line":2616},[26664],{"type":21,"tag":2072,"props":26665,"children":26666},{"style":3985},[26667],{"type":26,"value":26668},"# Warm-started QAOA typically converges in 30-50% fewer iterations\n",{"type":21,"tag":43,"props":26670,"children":26672},{"id":26671},"combining-everything-a-practical-vqe-template",[26673],{"type":26,"value":26674},"Combining Everything: A Practical VQE Template",{"type":21,"tag":2062,"props":26676,"children":26678},{"className":3362,"code":26677,"language":3361,"meta":7,"style":7},"import pennylane as qml\nimport numpy as np\nfrom pennylane.optimize import ShotAdaptiveOptimizer\n\ndev = qml.device(\"default.qubit\", wires=n_qubits, shots=512)\n\n# 1. Group commuting terms (5-10x reduction in circuit count)\ngrouped_H = qml.Hamiltonian(*qml.grouping.group_observables(H))\n\n@qml.qnode(dev, diff_method=\"parameter-shift\")\ndef ansatz(params):\n    # Hardware-efficient ansatz\n    for i in range(n_qubits):\n        qml.RY(params[i], wires=i)\n    for i in range(n_qubits - 1):\n        qml.CNOT(wires=[i, i + 1])\n    return qml.expval(grouped_H)\n\n# 2. Use shot-adaptive optimizer\nopt = ShotAdaptiveOptimizer(min_shots=50)\n\n# 3. Warm start\nparams = warm_start_params(H)\n\n# 4. Run with early stopping\nfor step in range(300):\n    params, energy, shots = opt.step_and_cost(ansatz, params)\n    if check_convergence(energy, shots):\n        break\n\nprint(f\"Ground state energy: {energy:.4f} Ha\")\n",[26679],{"type":21,"tag":1831,"props":26680,"children":26681},{"__ignoreMap":7},[26682,26701,26720,26740,26747,26800,26807,26815,26841,26848,26875,26891,26899,26923,26944,26980,27013,27025,27032,27040,27072,27079,27087,27103,27110,27118,27149,27166,27178,27185,27192],{"type":21,"tag":2072,"props":26683,"children":26684},{"class":2074,"line":2075},[26685,26689,26693,26697],{"type":21,"tag":2072,"props":26686,"children":26687},{"style":3372},[26688],{"type":26,"value":3375},{"type":21,"tag":2072,"props":26690,"children":26691},{"style":2079},[26692],{"type":26,"value":14153},{"type":21,"tag":2072,"props":26694,"children":26695},{"style":3372},[26696],{"type":26,"value":3385},{"type":21,"tag":2072,"props":26698,"children":26699},{"style":2079},[26700],{"type":26,"value":14162},{"type":21,"tag":2072,"props":26702,"children":26703},{"class":2074,"line":164},[26704,26708,26712,26716],{"type":21,"tag":2072,"props":26705,"children":26706},{"style":3372},[26707],{"type":26,"value":3375},{"type":21,"tag":2072,"props":26709,"children":26710},{"style":2079},[26711],{"type":26,"value":3380},{"type":21,"tag":2072,"props":26713,"children":26714},{"style":3372},[26715],{"type":26,"value":3385},{"type":21,"tag":2072,"props":26717,"children":26718},{"style":2079},[26719],{"type":26,"value":3390},{"type":21,"tag":2072,"props":26721,"children":26722},{"class":2074,"line":2093},[26723,26727,26731,26735],{"type":21,"tag":2072,"props":26724,"children":26725},{"style":3372},[26726],{"type":26,"value":3398},{"type":21,"tag":2072,"props":26728,"children":26729},{"style":2079},[26730],{"type":26,"value":25389},{"type":21,"tag":2072,"props":26732,"children":26733},{"style":3372},[26734],{"type":26,"value":3375},{"type":21,"tag":2072,"props":26736,"children":26737},{"style":2079},[26738],{"type":26,"value":26739}," ShotAdaptiveOptimizer\n",{"type":21,"tag":2072,"props":26741,"children":26742},{"class":2074,"line":2155},[26743],{"type":21,"tag":2072,"props":26744,"children":26745},{"emptyLinePlaceholder":3460},[26746],{"type":26,"value":3463},{"type":21,"tag":2072,"props":26748,"children":26749},{"class":2074,"line":2178},[26750,26754,26758,26762,26766,26770,26774,26778,26783,26787,26791,26796],{"type":21,"tag":2072,"props":26751,"children":26752},{"style":2079},[26753],{"type":26,"value":14286},{"type":21,"tag":2072,"props":26755,"children":26756},{"style":3372},[26757],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26759,"children":26760},{"style":2079},[26761],{"type":26,"value":14295},{"type":21,"tag":2072,"props":26763,"children":26764},{"style":2108},[26765],{"type":26,"value":14300},{"type":21,"tag":2072,"props":26767,"children":26768},{"style":2079},[26769],{"type":26,"value":798},{"type":21,"tag":2072,"props":26771,"children":26772},{"style":3735},[26773],{"type":26,"value":14309},{"type":21,"tag":2072,"props":26775,"children":26776},{"style":3372},[26777],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26779,"children":26780},{"style":2079},[26781],{"type":26,"value":26782},"n_qubits, ",{"type":21,"tag":2072,"props":26784,"children":26785},{"style":3735},[26786],{"type":26,"value":3226},{"type":21,"tag":2072,"props":26788,"children":26789},{"style":3372},[26790],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26792,"children":26793},{"style":2097},[26794],{"type":26,"value":26795},"512",{"type":21,"tag":2072,"props":26797,"children":26798},{"style":2079},[26799],{"type":26,"value":4281},{"type":21,"tag":2072,"props":26801,"children":26802},{"class":2074,"line":288},[26803],{"type":21,"tag":2072,"props":26804,"children":26805},{"emptyLinePlaceholder":3460},[26806],{"type":26,"value":3463},{"type":21,"tag":2072,"props":26808,"children":26809},{"class":2074,"line":16},[26810],{"type":21,"tag":2072,"props":26811,"children":26812},{"style":3985},[26813],{"type":26,"value":26814},"# 1. Group commuting terms (5-10x reduction in circuit count)\n",{"type":21,"tag":2072,"props":26816,"children":26817},{"class":2074,"line":366},[26818,26823,26827,26832,26836],{"type":21,"tag":2072,"props":26819,"children":26820},{"style":2079},[26821],{"type":26,"value":26822},"grouped_H ",{"type":21,"tag":2072,"props":26824,"children":26825},{"style":3372},[26826],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26828,"children":26829},{"style":2079},[26830],{"type":26,"value":26831}," qml.Hamiltonian(",{"type":21,"tag":2072,"props":26833,"children":26834},{"style":3372},[26835],{"type":26,"value":5522},{"type":21,"tag":2072,"props":26837,"children":26838},{"style":2079},[26839],{"type":26,"value":26840},"qml.grouping.group_observables(H))\n",{"type":21,"tag":2072,"props":26842,"children":26843},{"class":2074,"line":853},[26844],{"type":21,"tag":2072,"props":26845,"children":26846},{"emptyLinePlaceholder":3460},[26847],{"type":26,"value":3463},{"type":21,"tag":2072,"props":26849,"children":26850},{"class":2074,"line":3092},[26851,26855,26859,26863,26867,26871],{"type":21,"tag":2072,"props":26852,"children":26853},{"style":3474},[26854],{"type":26,"value":14333},{"type":21,"tag":2072,"props":26856,"children":26857},{"style":2079},[26858],{"type":26,"value":25758},{"type":21,"tag":2072,"props":26860,"children":26861},{"style":3735},[26862],{"type":26,"value":25763},{"type":21,"tag":2072,"props":26864,"children":26865},{"style":3372},[26866],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26868,"children":26869},{"style":2108},[26870],{"type":26,"value":25772},{"type":21,"tag":2072,"props":26872,"children":26873},{"style":2079},[26874],{"type":26,"value":4281},{"type":21,"tag":2072,"props":26876,"children":26877},{"class":2074,"line":3651},[26878,26882,26887],{"type":21,"tag":2072,"props":26879,"children":26880},{"style":3372},[26881],{"type":26,"value":3471},{"type":21,"tag":2072,"props":26883,"children":26884},{"style":3474},[26885],{"type":26,"value":26886}," ansatz",{"type":21,"tag":2072,"props":26888,"children":26889},{"style":2079},[26890],{"type":26,"value":25478},{"type":21,"tag":2072,"props":26892,"children":26893},{"class":2074,"line":2616},[26894],{"type":21,"tag":2072,"props":26895,"children":26896},{"style":3985},[26897],{"type":26,"value":26898},"    # Hardware-efficient ansatz\n",{"type":21,"tag":2072,"props":26900,"children":26901},{"class":2074,"line":3695},[26902,26906,26910,26914,26918],{"type":21,"tag":2072,"props":26903,"children":26904},{"style":3372},[26905],{"type":26,"value":3859},{"type":21,"tag":2072,"props":26907,"children":26908},{"style":2079},[26909],{"type":26,"value":3864},{"type":21,"tag":2072,"props":26911,"children":26912},{"style":3372},[26913],{"type":26,"value":3869},{"type":21,"tag":2072,"props":26915,"children":26916},{"style":2097},[26917],{"type":26,"value":3874},{"type":21,"tag":2072,"props":26919,"children":26920},{"style":2079},[26921],{"type":26,"value":26922},"(n_qubits):\n",{"type":21,"tag":2072,"props":26924,"children":26925},{"class":2074,"line":3709},[26926,26931,26935,26939],{"type":21,"tag":2072,"props":26927,"children":26928},{"style":2079},[26929],{"type":26,"value":26930},"        qml.RY(params[i], ",{"type":21,"tag":2072,"props":26932,"children":26933},{"style":3735},[26934],{"type":26,"value":14309},{"type":21,"tag":2072,"props":26936,"children":26937},{"style":3372},[26938],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26940,"children":26941},{"style":2079},[26942],{"type":26,"value":26943},"i)\n",{"type":21,"tag":2072,"props":26945,"children":26946},{"class":2074,"line":3717},[26947,26951,26955,26959,26963,26968,26972,26976],{"type":21,"tag":2072,"props":26948,"children":26949},{"style":3372},[26950],{"type":26,"value":3859},{"type":21,"tag":2072,"props":26952,"children":26953},{"style":2079},[26954],{"type":26,"value":3864},{"type":21,"tag":2072,"props":26956,"children":26957},{"style":3372},[26958],{"type":26,"value":3869},{"type":21,"tag":2072,"props":26960,"children":26961},{"style":2097},[26962],{"type":26,"value":3874},{"type":21,"tag":2072,"props":26964,"children":26965},{"style":2079},[26966],{"type":26,"value":26967},"(n_qubits ",{"type":21,"tag":2072,"props":26969,"children":26970},{"style":3372},[26971],{"type":26,"value":3973},{"type":21,"tag":2072,"props":26973,"children":26974},{"style":2097},[26975],{"type":26,"value":5228},{"type":21,"tag":2072,"props":26977,"children":26978},{"style":2079},[26979],{"type":26,"value":3525},{"type":21,"tag":2072,"props":26981,"children":26982},{"class":2074,"line":3750},[26983,26988,26992,26996,27001,27005,27009],{"type":21,"tag":2072,"props":26984,"children":26985},{"style":2079},[26986],{"type":26,"value":26987},"        qml.CNOT(",{"type":21,"tag":2072,"props":26989,"children":26990},{"style":3735},[26991],{"type":26,"value":14309},{"type":21,"tag":2072,"props":26993,"children":26994},{"style":3372},[26995],{"type":26,"value":3487},{"type":21,"tag":2072,"props":26997,"children":26998},{"style":2079},[26999],{"type":26,"value":27000},"[i, i ",{"type":21,"tag":2072,"props":27002,"children":27003},{"style":3372},[27004],{"type":26,"value":5658},{"type":21,"tag":2072,"props":27006,"children":27007},{"style":2097},[27008],{"type":26,"value":5228},{"type":21,"tag":2072,"props":27010,"children":27011},{"style":2079},[27012],{"type":26,"value":3597},{"type":21,"tag":2072,"props":27014,"children":27015},{"class":2074,"line":3769},[27016,27020],{"type":21,"tag":2072,"props":27017,"children":27018},{"style":3372},[27019],{"type":26,"value":3701},{"type":21,"tag":2072,"props":27021,"children":27022},{"style":2079},[27023],{"type":26,"value":27024}," qml.expval(grouped_H)\n",{"type":21,"tag":2072,"props":27026,"children":27027},{"class":2074,"line":3777},[27028],{"type":21,"tag":2072,"props":27029,"children":27030},{"emptyLinePlaceholder":3460},[27031],{"type":26,"value":3463},{"type":21,"tag":2072,"props":27033,"children":27034},{"class":2074,"line":3808},[27035],{"type":21,"tag":2072,"props":27036,"children":27037},{"style":3985},[27038],{"type":26,"value":27039},"# 2. Use shot-adaptive optimizer\n",{"type":21,"tag":2072,"props":27041,"children":27042},{"class":2074,"line":3853},[27043,27047,27051,27055,27059,27063,27068],{"type":21,"tag":2072,"props":27044,"children":27045},{"style":2079},[27046],{"type":26,"value":15012},{"type":21,"tag":2072,"props":27048,"children":27049},{"style":3372},[27050],{"type":26,"value":3487},{"type":21,"tag":2072,"props":27052,"children":27053},{"style":2079},[27054],{"type":26,"value":25537},{"type":21,"tag":2072,"props":27056,"children":27057},{"style":3735},[27058],{"type":26,"value":25542},{"type":21,"tag":2072,"props":27060,"children":27061},{"style":3372},[27062],{"type":26,"value":3487},{"type":21,"tag":2072,"props":27064,"children":27065},{"style":2097},[27066],{"type":26,"value":27067},"50",{"type":21,"tag":2072,"props":27069,"children":27070},{"style":2079},[27071],{"type":26,"value":4281},{"type":21,"tag":2072,"props":27073,"children":27074},{"class":2074,"line":3895},[27075],{"type":21,"tag":2072,"props":27076,"children":27077},{"emptyLinePlaceholder":3460},[27078],{"type":26,"value":3463},{"type":21,"tag":2072,"props":27080,"children":27081},{"class":2074,"line":3913},[27082],{"type":21,"tag":2072,"props":27083,"children":27084},{"style":3985},[27085],{"type":26,"value":27086},"# 3. Warm start\n",{"type":21,"tag":2072,"props":27088,"children":27089},{"class":2074,"line":3991},[27090,27094,27098],{"type":21,"tag":2072,"props":27091,"children":27092},{"style":2079},[27093],{"type":26,"value":25569},{"type":21,"tag":2072,"props":27095,"children":27096},{"style":3372},[27097],{"type":26,"value":3487},{"type":21,"tag":2072,"props":27099,"children":27100},{"style":2079},[27101],{"type":26,"value":27102}," warm_start_params(H)\n",{"type":21,"tag":2072,"props":27104,"children":27105},{"class":2074,"line":4019},[27106],{"type":21,"tag":2072,"props":27107,"children":27108},{"emptyLinePlaceholder":3460},[27109],{"type":26,"value":3463},{"type":21,"tag":2072,"props":27111,"children":27112},{"class":2074,"line":4048},[27113],{"type":21,"tag":2072,"props":27114,"children":27115},{"style":3985},[27116],{"type":26,"value":27117},"# 4. Run with early stopping\n",{"type":21,"tag":2072,"props":27119,"children":27120},{"class":2074,"line":4057},[27121,27125,27129,27133,27137,27141,27145],{"type":21,"tag":2072,"props":27122,"children":27123},{"style":3372},[27124],{"type":26,"value":4479},{"type":21,"tag":2072,"props":27126,"children":27127},{"style":2079},[27128],{"type":26,"value":15074},{"type":21,"tag":2072,"props":27130,"children":27131},{"style":3372},[27132],{"type":26,"value":3869},{"type":21,"tag":2072,"props":27134,"children":27135},{"style":2097},[27136],{"type":26,"value":3874},{"type":21,"tag":2072,"props":27138,"children":27139},{"style":2079},[27140],{"type":26,"value":3879},{"type":21,"tag":2072,"props":27142,"children":27143},{"style":2097},[27144],{"type":26,"value":26049},{"type":21,"tag":2072,"props":27146,"children":27147},{"style":2079},[27148],{"type":26,"value":3525},{"type":21,"tag":2072,"props":27150,"children":27151},{"class":2074,"line":4085},[27152,27157,27161],{"type":21,"tag":2072,"props":27153,"children":27154},{"style":2079},[27155],{"type":26,"value":27156},"    params, energy, shots ",{"type":21,"tag":2072,"props":27158,"children":27159},{"style":3372},[27160],{"type":26,"value":3487},{"type":21,"tag":2072,"props":27162,"children":27163},{"style":2079},[27164],{"type":26,"value":27165}," opt.step_and_cost(ansatz, params)\n",{"type":21,"tag":2072,"props":27167,"children":27168},{"class":2074,"line":4116},[27169,27173],{"type":21,"tag":2072,"props":27170,"children":27171},{"style":3372},[27172],{"type":26,"value":12007},{"type":21,"tag":2072,"props":27174,"children":27175},{"style":2079},[27176],{"type":26,"value":27177}," check_convergence(energy, shots):\n",{"type":21,"tag":2072,"props":27179,"children":27180},{"class":2074,"line":4138},[27181],{"type":21,"tag":2072,"props":27182,"children":27183},{"style":3372},[27184],{"type":26,"value":26448},{"type":21,"tag":2072,"props":27186,"children":27187},{"class":2074,"line":4184},[27188],{"type":21,"tag":2072,"props":27189,"children":27190},{"emptyLinePlaceholder":3460},[27191],{"type":26,"value":3463},{"type":21,"tag":2072,"props":27193,"children":27194},{"class":2074,"line":4197},[27195,27199,27203,27207,27212,27216,27221,27225,27229,27233],{"type":21,"tag":2072,"props":27196,"children":27197},{"style":2097},[27198],{"type":26,"value":4614},{"type":21,"tag":2072,"props":27200,"children":27201},{"style":2079},[27202],{"type":26,"value":3879},{"type":21,"tag":2072,"props":27204,"children":27205},{"style":3372},[27206],{"type":26,"value":3938},{"type":21,"tag":2072,"props":27208,"children":27209},{"style":2108},[27210],{"type":26,"value":27211},"\"Ground state energy: ",{"type":21,"tag":2072,"props":27213,"children":27214},{"style":2097},[27215],{"type":26,"value":3948},{"type":21,"tag":2072,"props":27217,"children":27218},{"style":2079},[27219],{"type":26,"value":27220},"energy",{"type":21,"tag":2072,"props":27222,"children":27223},{"style":3372},[27224],{"type":26,"value":10733},{"type":21,"tag":2072,"props":27226,"children":27227},{"style":2097},[27228],{"type":26,"value":3958},{"type":21,"tag":2072,"props":27230,"children":27231},{"style":2108},[27232],{"type":26,"value":19575},{"type":21,"tag":2072,"props":27234,"children":27235},{"style":2079},[27236],{"type":26,"value":4281},{"type":21,"tag":43,"props":27238,"children":27240},{"id":27239},"quick-reference-shot-budget-by-method",[27241],{"type":26,"value":27242},"Quick Reference: Shot Budget by Method",{"type":21,"tag":3169,"props":27244,"children":27245},{},[27246,27266],{"type":21,"tag":3173,"props":27247,"children":27248},{},[27249],{"type":21,"tag":3177,"props":27250,"children":27251},{},[27252,27257,27262],{"type":21,"tag":3181,"props":27253,"children":27254},{},[27255],{"type":26,"value":27256},"Method",{"type":21,"tag":3181,"props":27258,"children":27259},{},[27260],{"type":26,"value":27261},"Shots\u002Fstep",{"type":21,"tag":3181,"props":27263,"children":27264},{},[27265],{"type":26,"value":20980},{"type":21,"tag":3195,"props":27267,"children":27268},{},[27269,27291,27313,27335,27353],{"type":21,"tag":3177,"props":27270,"children":27271},{},[27272,27277,27286],{"type":21,"tag":3202,"props":27273,"children":27274},{},[27275],{"type":26,"value":27276},"COBYLA + fixed shots",{"type":21,"tag":3202,"props":27278,"children":27279},{},[27280],{"type":21,"tag":1831,"props":27281,"children":27283},{"className":27282},[],[27284],{"type":26,"value":27285},"n_terms × shots",{"type":21,"tag":3202,"props":27287,"children":27288},{},[27289],{"type":26,"value":27290},"Small parameter count",{"type":21,"tag":3177,"props":27292,"children":27293},{},[27294,27299,27308],{"type":21,"tag":3202,"props":27295,"children":27296},{},[27297],{"type":26,"value":27298},"Parameter-shift + Adam",{"type":21,"tag":3202,"props":27300,"children":27301},{},[27302],{"type":21,"tag":1831,"props":27303,"children":27305},{"className":27304},[],[27306],{"type":26,"value":27307},"2n_params × shots",{"type":21,"tag":3202,"props":27309,"children":27310},{},[27311],{"type":26,"value":27312},"Differentiable circuits",{"type":21,"tag":3177,"props":27314,"children":27315},{},[27316,27321,27330],{"type":21,"tag":3202,"props":27317,"children":27318},{},[27319],{"type":26,"value":27320},"SPSA",{"type":21,"tag":3202,"props":27322,"children":27323},{},[27324],{"type":21,"tag":1831,"props":27325,"children":27327},{"className":27326},[],[27328],{"type":26,"value":27329},"2 × shots",{"type":21,"tag":3202,"props":27331,"children":27332},{},[27333],{"type":26,"value":27334},"Large parameter count",{"type":21,"tag":3177,"props":27336,"children":27337},{},[27338,27343,27348],{"type":21,"tag":3202,"props":27339,"children":27340},{},[27341],{"type":26,"value":27342},"ShotAdaptiveOptimizer",{"type":21,"tag":3202,"props":27344,"children":27345},{},[27346],{"type":26,"value":27347},"Adaptive",{"type":21,"tag":3202,"props":27349,"children":27350},{},[27351],{"type":26,"value":27352},"General VQE",{"type":21,"tag":3177,"props":27354,"children":27355},{},[27356,27361,27366],{"type":21,"tag":3202,"props":27357,"children":27358},{},[27359],{"type":26,"value":27360},"Grouped Paulis",{"type":21,"tag":3202,"props":27362,"children":27363},{},[27364],{"type":26,"value":27365},"÷5–15×",{"type":21,"tag":3202,"props":27367,"children":27368},{},[27369],{"type":26,"value":27370},"Always apply first",{"type":21,"tag":22,"props":27372,"children":27373},{},[27374],{"type":26,"value":27375},"Apply measurement grouping first. It's the biggest single win and requires no changes to your optimizer or circuit.",{"type":21,"tag":22,"props":27377,"children":27378},{},[27379,27381,27386,27388,27393],{"type":26,"value":27380},"One caution when you spend the savings on error mitigation: techniques like zero-noise extrapolation consume shots of their own, and ",{"type":21,"tag":29,"props":27382,"children":27383},{"href":5975},[27384],{"type":26,"value":27385},"recent work on artefactual ZNE improvements",{"type":26,"value":27387}," shows they sometimes flatter results if applied carelessly. Our ",{"type":21,"tag":29,"props":27389,"children":27390},{"href":3086},[27391],{"type":26,"value":27392},"practical error mitigation guide",{"type":26,"value":27394}," covers when the tradeoff is worth it.",{"type":21,"tag":22,"props":27396,"children":27397},{},[27398,27402,27403,27408,27409,27414,27415,27420,27421],{"type":21,"tag":784,"props":27399,"children":27400},{},[27401],{"type":26,"value":6236},{"type":26,"value":790},{"type":21,"tag":29,"props":27404,"children":27405},{"href":31},[27406],{"type":26,"value":27407},"VQE with PennyLane",{"type":26,"value":6244},{"type":21,"tag":29,"props":27410,"children":27411},{"href":1788},[27412],{"type":26,"value":27413},"QAOA on Max-Cut",{"type":26,"value":6244},{"type":21,"tag":29,"props":27416,"children":27417},{"href":590},[27418],{"type":26,"value":27419},"QPU access guide",{"type":26,"value":6244},{"type":21,"tag":29,"props":27422,"children":27423},{"href":19124},[27424],{"type":26,"value":19127},{"type":21,"tag":2445,"props":27426,"children":27427},{},[27428],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":27430},[27431,27432,27433,27434,27435,27436,27437,27438,27439],{"id":24875,"depth":164,"text":24878},{"id":25027,"depth":164,"text":25030},{"id":25355,"depth":164,"text":25358},{"id":25708,"depth":164,"text":25711},{"id":25954,"depth":164,"text":25957},{"id":26131,"depth":164,"text":26134},{"id":26487,"depth":164,"text":26490},{"id":26671,"depth":164,"text":26674},{"id":27239,"depth":164,"text":27242},"content:blog:reduce-shot-count.md","blog\u002Freduce-shot-count.md","blog\u002Freduce-shot-count",{"_path":1636,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":27444,"description":27445,"date":27446,"updatedDate":10,"author":11,"tags":27447,"readingTime":366,"body":27449,"_type":171,"_id":29304,"_source":173,"_file":29305,"_stem":29306,"_extension":176},"IBM Quantum Free Tier: Everything You Access in 2026","A detailed breakdown of what IBM Quantum's free Open Plan includes, how queue times work, and how to make the most of your free QPU access.","2026-02-20",[27448,15,852],"IBM",{"type":18,"children":27450,"toc":29290},[27451,27462,27468,27480,27533,27538,27544,27579,27600,27620,27626,27631,27735,27740,27982,27988,27994,28005,28011,28038,28044,28049,28160,28173,28179,28823,28829,28840,28866,28874,28905,28911,28916,28995,29021,29027,29032,29261,29286],{"type":21,"tag":22,"props":27452,"children":27453},{},[27454,27456,27460],{"type":26,"value":27455},"IBM Quantum has the most accessible free tier in the quantum computing industry. With a free IBM ID, you get access to real quantum processors with up to 127 qubits, no cost, no credit card, no application required. Here's exactly what that means in practice. (For the full reference version, see our ",{"type":21,"tag":29,"props":27457,"children":27458},{"href":20825},[27459],{"type":26,"value":2300},{"type":26,"value":27461},".)",{"type":21,"tag":43,"props":27463,"children":27465},{"id":27464},"what-the-free-tier-includes",[27466],{"type":26,"value":27467},"What the Free Tier Includes",{"type":21,"tag":22,"props":27469,"children":27470},{},[27471,27473,27478],{"type":26,"value":27472},"The IBM Quantum ",{"type":21,"tag":784,"props":27474,"children":27475},{},[27476],{"type":26,"value":27477},"Open Plan",{"type":26,"value":27479}," gives you:",{"type":21,"tag":7925,"props":27481,"children":27482},{},[27483,27493,27503,27513,27523],{"type":21,"tag":6142,"props":27484,"children":27485},{},[27486,27491],{"type":21,"tag":784,"props":27487,"children":27488},{},[27489],{"type":26,"value":27490},"Unlimited access",{"type":26,"value":27492}," to all publicly available quantum systems",{"type":21,"tag":6142,"props":27494,"children":27495},{},[27496,27501],{"type":21,"tag":784,"props":27497,"children":27498},{},[27499],{"type":26,"value":27500},"10 minutes of quantum time",{"type":26,"value":27502}," per month (time your circuits are actively running on QPU)",{"type":21,"tag":6142,"props":27504,"children":27505},{},[27506,27511],{"type":21,"tag":784,"props":27507,"children":27508},{},[27509],{"type":26,"value":27510},"Access to IBM simulators",{"type":26,"value":27512}," with no time limit (statevector, QASM, matrix product state)",{"type":21,"tag":6142,"props":27514,"children":27515},{},[27516,27521],{"type":21,"tag":784,"props":27517,"children":27518},{},[27519],{"type":26,"value":27520},"Qiskit Runtime",{"type":26,"value":27522},": the modern IBM execution environment for circuits",{"type":21,"tag":6142,"props":27524,"children":27525},{},[27526,27531],{"type":21,"tag":784,"props":27527,"children":27528},{},[27529],{"type":26,"value":27530},"IBM Quantum Learning",{"type":26,"value":27532}," platform with tutorials and courses",{"type":21,"tag":22,"props":27534,"children":27535},{},[27536],{"type":26,"value":27537},"The 10-minute monthly limit sounds restrictive, but in practice most research circuits run in milliseconds of actual QPU time. The limit is rarely hit by individual developers experimenting with quantum algorithms.",{"type":21,"tag":43,"props":27539,"children":27541},{"id":27540},"august-2026-update-heron-r2-and-bonus-compute-time",[27542],{"type":26,"value":27543},"August 2026 update: Heron r2 and bonus compute time",{"type":21,"tag":22,"props":27545,"children":27546},{},[27547,27549,27554,27556,27562,27564,27569,27571,27577],{"type":26,"value":27548},"IBM added its higher-performing ",{"type":21,"tag":784,"props":27550,"children":27551},{},[27552],{"type":26,"value":27553},"Heron r2",{"type":26,"value":27555}," processor (",{"type":21,"tag":1831,"props":27557,"children":27559},{"className":27558},[],[27560],{"type":26,"value":27561},"ibm_kingston",{"type":26,"value":27563},") to the Open Plan in March 2026, giving free-tier users access to noticeably better two-qubit gate fidelity than the original Heron r1 systems. If you haven't run anything in a while, it's worth checking whether ",{"type":21,"tag":1831,"props":27565,"children":27567},{"className":27566},[],[27568],{"type":26,"value":27561},{"type":26,"value":27570}," shows up in your ",{"type":21,"tag":1831,"props":27572,"children":27574},{"className":27573},[],[27575],{"type":26,"value":27576},"service.backends()",{"type":26,"value":27578}," list.",{"type":21,"tag":22,"props":27580,"children":27581},{},[27582,27584,27589,27591,27598],{"type":26,"value":27583},"IBM also ran a one-time promotion for active users: anyone who logged at least 20 minutes of QPU time in a 12-month window had the option to opt in to a bonus of ",{"type":21,"tag":784,"props":27585,"children":27586},{},[27587],{"type":26,"value":27588},"180 minutes over the following 12 months",{"type":26,"value":27590},", eighteen times the standard monthly allotment. That offer was tied to a specific enrollment window rather than a permanent change to the Open Plan's 10-minutes-per-month baseline, so don't assume it still applies. Check the ",{"type":21,"tag":29,"props":27592,"children":27595},{"href":27593,"rel":27594},"https:\u002F\u002Fquantum.cloud.ibm.com\u002Fdocs\u002Fen\u002Fguides\u002Fplans-overview",[378],[27596],{"type":26,"value":27597},"Open Plan page",{"type":26,"value":27599}," for what's currently live on your account.",{"type":21,"tag":22,"props":27601,"children":27602},{},[27603,27605,27611,27613,27618],{"type":26,"value":27604},"The lineup also churns in the other direction. IBM retired ",{"type":21,"tag":1831,"props":27606,"children":27608},{"className":27607},[],[27609],{"type":26,"value":27610},"ibm_torino",{"type":26,"value":27612}," in early April 2026, which is a normal part of how the Open Plan works: systems get added as newer hardware ships and older ones get decommissioned once their useful life is over. This is exactly why the ",{"type":21,"tag":1831,"props":27614,"children":27616},{"className":27615},[],[27617],{"type":26,"value":27576},{"type":26,"value":27619}," snippet below matters more than any static table: treat the list in this post as illustrative, not current.",{"type":21,"tag":43,"props":27621,"children":27623},{"id":27622},"available-free-qpus",[27624],{"type":26,"value":27625},"Available Free QPUs",{"type":21,"tag":22,"props":27627,"children":27628},{},[27629],{"type":26,"value":27630},"As of mid-2026, IBM's Open Plan includes access to systems like:",{"type":21,"tag":3169,"props":27632,"children":27633},{},[27634,27659],{"type":21,"tag":3173,"props":27635,"children":27636},{},[27637],{"type":21,"tag":3177,"props":27638,"children":27639},{},[27640,27645,27649,27654],{"type":21,"tag":3181,"props":27641,"children":27642},{},[27643],{"type":26,"value":27644},"System",{"type":21,"tag":3181,"props":27646,"children":27647},{},[27648],{"type":26,"value":24909},{"type":21,"tag":3181,"props":27650,"children":27651},{},[27652],{"type":26,"value":27653},"Technology",{"type":21,"tag":3181,"props":27655,"children":27656},{},[27657],{"type":26,"value":27658},"Typical Queue",{"type":21,"tag":3195,"props":27660,"children":27661},{},[27662,27691,27713],{"type":21,"tag":3177,"props":27663,"children":27664},{},[27665,27676,27681,27686],{"type":21,"tag":3202,"props":27666,"children":27667},{},[27668,27670,27675],{"type":26,"value":27669},"IBM Heron r2 (",{"type":21,"tag":1831,"props":27671,"children":27673},{"className":27672},[],[27674],{"type":26,"value":27561},{"type":26,"value":17330},{"type":21,"tag":3202,"props":27677,"children":27678},{},[27679],{"type":26,"value":27680},"156",{"type":21,"tag":3202,"props":27682,"children":27683},{},[27684],{"type":26,"value":27685},"Heron processor, higher fidelity",{"type":21,"tag":3202,"props":27687,"children":27688},{},[27689],{"type":26,"value":27690},"30–120 min",{"type":21,"tag":3177,"props":27692,"children":27693},{},[27694,27699,27704,27708],{"type":21,"tag":3202,"props":27695,"children":27696},{},[27697],{"type":26,"value":27698},"IBM Eagle",{"type":21,"tag":3202,"props":27700,"children":27701},{},[27702],{"type":26,"value":27703},"127",{"type":21,"tag":3202,"props":27705,"children":27706},{},[27707],{"type":26,"value":8286},{"type":21,"tag":3202,"props":27709,"children":27710},{},[27711],{"type":26,"value":27712},"10–60 min",{"type":21,"tag":3177,"props":27714,"children":27715},{},[27716,27721,27726,27731],{"type":21,"tag":3202,"props":27717,"children":27718},{},[27719],{"type":26,"value":27720},"IBM Heron r1",{"type":21,"tag":3202,"props":27722,"children":27723},{},[27724],{"type":26,"value":27725},"133",{"type":21,"tag":3202,"props":27727,"children":27728},{},[27729],{"type":26,"value":27730},"Heron processor",{"type":21,"tag":3202,"props":27732,"children":27733},{},[27734],{"type":26,"value":27690},{"type":21,"tag":22,"props":27736,"children":27737},{},[27738],{"type":26,"value":27739},"IBM regularly retires and adds systems. Treat this table as a snapshot, not a guarantee. Use the Qiskit Runtime service to see the current list:",{"type":21,"tag":2062,"props":27741,"children":27743},{"className":3362,"code":27742,"language":3361,"meta":7,"style":7},"from qiskit_ibm_runtime import QiskitRuntimeService\n\nservice = QiskitRuntimeService(channel=\"ibm_quantum\")\nbackends = service.backends(\n    operational=True,\n    simulator=False,\n    min_num_qubits=1\n)\nfor b in backends:\n    print(f\"{b.name}: {b.num_qubits} qubits, status: {b.status().status_msg}\")\n",[27744],{"type":21,"tag":1831,"props":27745,"children":27746},{"__ignoreMap":7},[27747,27766,27773,27806,27823,27843,27863,27880,27887,27907],{"type":21,"tag":2072,"props":27748,"children":27749},{"class":2074,"line":2075},[27750,27754,27758,27762],{"type":21,"tag":2072,"props":27751,"children":27752},{"style":3372},[27753],{"type":26,"value":3398},{"type":21,"tag":2072,"props":27755,"children":27756},{"style":2079},[27757],{"type":26,"value":10321},{"type":21,"tag":2072,"props":27759,"children":27760},{"style":3372},[27761],{"type":26,"value":3375},{"type":21,"tag":2072,"props":27763,"children":27764},{"style":2079},[27765],{"type":26,"value":10330},{"type":21,"tag":2072,"props":27767,"children":27768},{"class":2074,"line":164},[27769],{"type":21,"tag":2072,"props":27770,"children":27771},{"emptyLinePlaceholder":3460},[27772],{"type":26,"value":3463},{"type":21,"tag":2072,"props":27774,"children":27775},{"class":2074,"line":2093},[27776,27780,27784,27789,27794,27798,27802],{"type":21,"tag":2072,"props":27777,"children":27778},{"style":2079},[27779],{"type":26,"value":10345},{"type":21,"tag":2072,"props":27781,"children":27782},{"style":3372},[27783],{"type":26,"value":3487},{"type":21,"tag":2072,"props":27785,"children":27786},{"style":2079},[27787],{"type":26,"value":27788}," QiskitRuntimeService(",{"type":21,"tag":2072,"props":27790,"children":27791},{"style":3735},[27792],{"type":26,"value":27793},"channel",{"type":21,"tag":2072,"props":27795,"children":27796},{"style":3372},[27797],{"type":26,"value":3487},{"type":21,"tag":2072,"props":27799,"children":27800},{"style":2108},[27801],{"type":26,"value":20914},{"type":21,"tag":2072,"props":27803,"children":27804},{"style":2079},[27805],{"type":26,"value":4281},{"type":21,"tag":2072,"props":27807,"children":27808},{"class":2074,"line":2155},[27809,27814,27818],{"type":21,"tag":2072,"props":27810,"children":27811},{"style":2079},[27812],{"type":26,"value":27813},"backends ",{"type":21,"tag":2072,"props":27815,"children":27816},{"style":3372},[27817],{"type":26,"value":3487},{"type":21,"tag":2072,"props":27819,"children":27820},{"style":2079},[27821],{"type":26,"value":27822}," service.backends(\n",{"type":21,"tag":2072,"props":27824,"children":27825},{"class":2074,"line":2178},[27826,27831,27835,27839],{"type":21,"tag":2072,"props":27827,"children":27828},{"style":3735},[27829],{"type":26,"value":27830},"    operational",{"type":21,"tag":2072,"props":27832,"children":27833},{"style":3372},[27834],{"type":26,"value":3487},{"type":21,"tag":2072,"props":27836,"children":27837},{"style":2097},[27838],{"type":26,"value":7340},{"type":21,"tag":2072,"props":27840,"children":27841},{"style":2079},[27842],{"type":26,"value":2175},{"type":21,"tag":2072,"props":27844,"children":27845},{"class":2074,"line":288},[27846,27851,27855,27859],{"type":21,"tag":2072,"props":27847,"children":27848},{"style":3735},[27849],{"type":26,"value":27850},"    simulator",{"type":21,"tag":2072,"props":27852,"children":27853},{"style":3372},[27854],{"type":26,"value":3487},{"type":21,"tag":2072,"props":27856,"children":27857},{"style":2097},[27858],{"type":26,"value":10400},{"type":21,"tag":2072,"props":27860,"children":27861},{"style":2079},[27862],{"type":26,"value":2175},{"type":21,"tag":2072,"props":27864,"children":27865},{"class":2074,"line":16},[27866,27871,27875],{"type":21,"tag":2072,"props":27867,"children":27868},{"style":3735},[27869],{"type":26,"value":27870},"    min_num_qubits",{"type":21,"tag":2072,"props":27872,"children":27873},{"style":3372},[27874],{"type":26,"value":3487},{"type":21,"tag":2072,"props":27876,"children":27877},{"style":2097},[27878],{"type":26,"value":27879},"1\n",{"type":21,"tag":2072,"props":27881,"children":27882},{"class":2074,"line":366},[27883],{"type":21,"tag":2072,"props":27884,"children":27885},{"style":2079},[27886],{"type":26,"value":4281},{"type":21,"tag":2072,"props":27888,"children":27889},{"class":2074,"line":853},[27890,27894,27898,27902],{"type":21,"tag":2072,"props":27891,"children":27892},{"style":3372},[27893],{"type":26,"value":4479},{"type":21,"tag":2072,"props":27895,"children":27896},{"style":2079},[27897],{"type":26,"value":4030},{"type":21,"tag":2072,"props":27899,"children":27900},{"style":3372},[27901],{"type":26,"value":3869},{"type":21,"tag":2072,"props":27903,"children":27904},{"style":2079},[27905],{"type":26,"value":27906}," backends:\n",{"type":21,"tag":2072,"props":27908,"children":27909},{"class":2074,"line":3092},[27910,27914,27918,27922,27926,27930,27935,27939,27943,27947,27952,27956,27961,27965,27970,27974,27978],{"type":21,"tag":2072,"props":27911,"children":27912},{"style":2097},[27913],{"type":26,"value":17282},{"type":21,"tag":2072,"props":27915,"children":27916},{"style":2079},[27917],{"type":26,"value":3879},{"type":21,"tag":2072,"props":27919,"children":27920},{"style":3372},[27921],{"type":26,"value":3938},{"type":21,"tag":2072,"props":27923,"children":27924},{"style":2108},[27925],{"type":26,"value":7539},{"type":21,"tag":2072,"props":27927,"children":27928},{"style":2097},[27929],{"type":26,"value":3948},{"type":21,"tag":2072,"props":27931,"children":27932},{"style":2079},[27933],{"type":26,"value":27934},"b.name",{"type":21,"tag":2072,"props":27936,"children":27937},{"style":2097},[27938],{"type":26,"value":3958},{"type":21,"tag":2072,"props":27940,"children":27941},{"style":2108},[27942],{"type":26,"value":66},{"type":21,"tag":2072,"props":27944,"children":27945},{"style":2097},[27946],{"type":26,"value":3948},{"type":21,"tag":2072,"props":27948,"children":27949},{"style":2079},[27950],{"type":26,"value":27951},"b.num_qubits",{"type":21,"tag":2072,"props":27953,"children":27954},{"style":2097},[27955],{"type":26,"value":3958},{"type":21,"tag":2072,"props":27957,"children":27958},{"style":2108},[27959],{"type":26,"value":27960}," qubits, status: ",{"type":21,"tag":2072,"props":27962,"children":27963},{"style":2097},[27964],{"type":26,"value":3948},{"type":21,"tag":2072,"props":27966,"children":27967},{"style":2079},[27968],{"type":26,"value":27969},"b.status().status_msg",{"type":21,"tag":2072,"props":27971,"children":27972},{"style":2097},[27973],{"type":26,"value":3958},{"type":21,"tag":2072,"props":27975,"children":27976},{"style":2108},[27977],{"type":26,"value":7539},{"type":21,"tag":2072,"props":27979,"children":27980},{"style":2079},[27981],{"type":26,"value":4281},{"type":21,"tag":43,"props":27983,"children":27985},{"id":27984},"setting-up-in-10-minutes",[27986],{"type":26,"value":27987},"Setting Up in 10 Minutes",{"type":21,"tag":17419,"props":27989,"children":27991},{"id":27990},"step-1-create-your-free-account",[27992],{"type":26,"value":27993},"Step 1: Create Your Free Account",{"type":21,"tag":22,"props":27995,"children":27996},{},[27997,27998,28003],{"type":26,"value":20837},{"type":21,"tag":29,"props":27999,"children":28001},{"href":20840,"rel":28000},[378],[28002],{"type":26,"value":20844},{"type":26,"value":28004}," and create a free IBM ID. No payment information is required.",{"type":21,"tag":17419,"props":28006,"children":28008},{"id":28007},"step-2-install-the-sdk",[28009],{"type":26,"value":28010},"Step 2: Install the SDK",{"type":21,"tag":2062,"props":28012,"children":28014},{"className":8882,"code":28013,"language":8884,"meta":7,"style":7},"pip install qiskit qiskit-ibm-runtime\n",[28015],{"type":21,"tag":1831,"props":28016,"children":28017},{"__ignoreMap":7},[28018],{"type":21,"tag":2072,"props":28019,"children":28020},{"class":2074,"line":2075},[28021,28025,28029,28033],{"type":21,"tag":2072,"props":28022,"children":28023},{"style":3474},[28024],{"type":26,"value":11855},{"type":21,"tag":2072,"props":28026,"children":28027},{"style":2108},[28028],{"type":26,"value":11860},{"type":21,"tag":2072,"props":28030,"children":28031},{"style":2108},[28032],{"type":26,"value":11865},{"type":21,"tag":2072,"props":28034,"children":28035},{"style":2108},[28036],{"type":26,"value":28037}," qiskit-ibm-runtime\n",{"type":21,"tag":17419,"props":28039,"children":28041},{"id":28040},"step-3-save-your-credentials",[28042],{"type":26,"value":28043},"Step 3: Save Your Credentials",{"type":21,"tag":22,"props":28045,"children":28046},{},[28047],{"type":26,"value":28048},"After logging in to the IBM Quantum dashboard, copy your API token from the Account page.",{"type":21,"tag":2062,"props":28050,"children":28052},{"className":3362,"code":28051,"language":3361,"meta":7,"style":7},"from qiskit_ibm_runtime import QiskitRuntimeService\n\n# Run this once to save your token locally\nQiskitRuntimeService.save_account(\n    channel=\"ibm_quantum\",\n    token=\"YOUR_API_TOKEN_HERE\",\n    overwrite=True\n)\n",[28053],{"type":21,"tag":1831,"props":28054,"children":28055},{"__ignoreMap":7},[28056,28075,28082,28090,28097,28116,28136,28153],{"type":21,"tag":2072,"props":28057,"children":28058},{"class":2074,"line":2075},[28059,28063,28067,28071],{"type":21,"tag":2072,"props":28060,"children":28061},{"style":3372},[28062],{"type":26,"value":3398},{"type":21,"tag":2072,"props":28064,"children":28065},{"style":2079},[28066],{"type":26,"value":10321},{"type":21,"tag":2072,"props":28068,"children":28069},{"style":3372},[28070],{"type":26,"value":3375},{"type":21,"tag":2072,"props":28072,"children":28073},{"style":2079},[28074],{"type":26,"value":10330},{"type":21,"tag":2072,"props":28076,"children":28077},{"class":2074,"line":164},[28078],{"type":21,"tag":2072,"props":28079,"children":28080},{"emptyLinePlaceholder":3460},[28081],{"type":26,"value":3463},{"type":21,"tag":2072,"props":28083,"children":28084},{"class":2074,"line":2093},[28085],{"type":21,"tag":2072,"props":28086,"children":28087},{"style":3985},[28088],{"type":26,"value":28089},"# Run this once to save your token locally\n",{"type":21,"tag":2072,"props":28091,"children":28092},{"class":2074,"line":2155},[28093],{"type":21,"tag":2072,"props":28094,"children":28095},{"style":2079},[28096],{"type":26,"value":20897},{"type":21,"tag":2072,"props":28098,"children":28099},{"class":2074,"line":2178},[28100,28104,28108,28112],{"type":21,"tag":2072,"props":28101,"children":28102},{"style":3735},[28103],{"type":26,"value":20905},{"type":21,"tag":2072,"props":28105,"children":28106},{"style":3372},[28107],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28109,"children":28110},{"style":2108},[28111],{"type":26,"value":20914},{"type":21,"tag":2072,"props":28113,"children":28114},{"style":2079},[28115],{"type":26,"value":2175},{"type":21,"tag":2072,"props":28117,"children":28118},{"class":2074,"line":288},[28119,28123,28127,28132],{"type":21,"tag":2072,"props":28120,"children":28121},{"style":3735},[28122],{"type":26,"value":20926},{"type":21,"tag":2072,"props":28124,"children":28125},{"style":3372},[28126],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28128,"children":28129},{"style":2108},[28130],{"type":26,"value":28131},"\"YOUR_API_TOKEN_HERE\"",{"type":21,"tag":2072,"props":28133,"children":28134},{"style":2079},[28135],{"type":26,"value":2175},{"type":21,"tag":2072,"props":28137,"children":28138},{"class":2074,"line":16},[28139,28144,28148],{"type":21,"tag":2072,"props":28140,"children":28141},{"style":3735},[28142],{"type":26,"value":28143},"    overwrite",{"type":21,"tag":2072,"props":28145,"children":28146},{"style":3372},[28147],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28149,"children":28150},{"style":2097},[28151],{"type":26,"value":28152},"True\n",{"type":21,"tag":2072,"props":28154,"children":28155},{"class":2074,"line":366},[28156],{"type":21,"tag":2072,"props":28157,"children":28158},{"style":2079},[28159],{"type":26,"value":4281},{"type":21,"tag":22,"props":28161,"children":28162},{},[28163,28165,28171],{"type":26,"value":28164},"Your credentials are saved to ",{"type":21,"tag":1831,"props":28166,"children":28168},{"className":28167},[],[28169],{"type":26,"value":28170},"~\u002F.qiskit\u002Fqiskit-ibm.json",{"type":26,"value":28172},". You won't need to do this again.",{"type":21,"tag":17419,"props":28174,"children":28176},{"id":28175},"step-4-submit-your-first-job",[28177],{"type":26,"value":28178},"Step 4: Submit Your First Job",{"type":21,"tag":2062,"props":28180,"children":28182},{"className":3362,"code":28181,"language":3361,"meta":7,"style":7},"from qiskit import QuantumCircuit\nfrom qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager\nfrom qiskit_ibm_runtime import QiskitRuntimeService, SamplerV2 as Sampler\n\n# Build a Bell state\nqc = QuantumCircuit(2, 2)\nqc.h(0)\nqc.cx(0, 1)\nqc.measure([0, 1], [0, 1])\n\n# Connect and pick the least-busy free QPU\nservice = QiskitRuntimeService(channel=\"ibm_quantum\")\nbackend = service.least_busy(\n    operational=True,\n    simulator=False,\n    min_num_qubits=2\n)\nprint(f\"Submitting to: {backend.name}\")\n\n# Transpile for the target device\npm = generate_preset_pass_manager(backend=backend, optimization_level=1)\nisa_qc = pm.run(qc)\n\n# Submit\nsampler = Sampler(mode=backend)\njob = sampler.run([isa_qc], shots=1024)\n\nprint(f\"Job ID: {job.job_id()}\")\nprint(f\"Status: {job.status()}\")\nresult = job.result()\nprint(result[0].data.c.get_counts())\n",[28183],{"type":21,"tag":1831,"props":28184,"children":28185},{"__ignoreMap":7},[28186,28205,28226,28255,28262,28270,28301,28316,28339,28378,28385,28393,28424,28440,28459,28478,28494,28501,28541,28548,28556,28601,28618,28625,28633,28664,28697,28704,28745,28786,28802],{"type":21,"tag":2072,"props":28187,"children":28188},{"class":2074,"line":2075},[28189,28193,28197,28201],{"type":21,"tag":2072,"props":28190,"children":28191},{"style":3372},[28192],{"type":26,"value":3398},{"type":21,"tag":2072,"props":28194,"children":28195},{"style":2079},[28196],{"type":26,"value":3403},{"type":21,"tag":2072,"props":28198,"children":28199},{"style":3372},[28200],{"type":26,"value":3375},{"type":21,"tag":2072,"props":28202,"children":28203},{"style":2079},[28204],{"type":26,"value":20483},{"type":21,"tag":2072,"props":28206,"children":28207},{"class":2074,"line":164},[28208,28212,28217,28221],{"type":21,"tag":2072,"props":28209,"children":28210},{"style":3372},[28211],{"type":26,"value":3398},{"type":21,"tag":2072,"props":28213,"children":28214},{"style":2079},[28215],{"type":26,"value":28216}," qiskit.transpiler.preset_passmanagers ",{"type":21,"tag":2072,"props":28218,"children":28219},{"style":3372},[28220],{"type":26,"value":3375},{"type":21,"tag":2072,"props":28222,"children":28223},{"style":2079},[28224],{"type":26,"value":28225}," generate_preset_pass_manager\n",{"type":21,"tag":2072,"props":28227,"children":28228},{"class":2074,"line":2093},[28229,28233,28237,28241,28246,28250],{"type":21,"tag":2072,"props":28230,"children":28231},{"style":3372},[28232],{"type":26,"value":3398},{"type":21,"tag":2072,"props":28234,"children":28235},{"style":2079},[28236],{"type":26,"value":10321},{"type":21,"tag":2072,"props":28238,"children":28239},{"style":3372},[28240],{"type":26,"value":3375},{"type":21,"tag":2072,"props":28242,"children":28243},{"style":2079},[28244],{"type":26,"value":28245}," QiskitRuntimeService, SamplerV2 ",{"type":21,"tag":2072,"props":28247,"children":28248},{"style":3372},[28249],{"type":26,"value":3385},{"type":21,"tag":2072,"props":28251,"children":28252},{"style":2079},[28253],{"type":26,"value":28254}," Sampler\n",{"type":21,"tag":2072,"props":28256,"children":28257},{"class":2074,"line":2155},[28258],{"type":21,"tag":2072,"props":28259,"children":28260},{"emptyLinePlaceholder":3460},[28261],{"type":26,"value":3463},{"type":21,"tag":2072,"props":28263,"children":28264},{"class":2074,"line":2178},[28265],{"type":21,"tag":2072,"props":28266,"children":28267},{"style":3985},[28268],{"type":26,"value":28269},"# Build a Bell state\n",{"type":21,"tag":2072,"props":28271,"children":28272},{"class":2074,"line":288},[28273,28277,28281,28285,28289,28293,28297],{"type":21,"tag":2072,"props":28274,"children":28275},{"style":2079},[28276],{"type":26,"value":6514},{"type":21,"tag":2072,"props":28278,"children":28279},{"style":3372},[28280],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28282,"children":28283},{"style":2079},[28284],{"type":26,"value":4264},{"type":21,"tag":2072,"props":28286,"children":28287},{"style":2097},[28288],{"type":26,"value":2170},{"type":21,"tag":2072,"props":28290,"children":28291},{"style":2079},[28292],{"type":26,"value":798},{"type":21,"tag":2072,"props":28294,"children":28295},{"style":2097},[28296],{"type":26,"value":2170},{"type":21,"tag":2072,"props":28298,"children":28299},{"style":2079},[28300],{"type":26,"value":4281},{"type":21,"tag":2072,"props":28302,"children":28303},{"class":2074,"line":16},[28304,28308,28312],{"type":21,"tag":2072,"props":28305,"children":28306},{"style":2079},[28307],{"type":26,"value":6530},{"type":21,"tag":2072,"props":28309,"children":28310},{"style":2097},[28311],{"type":26,"value":4295},{"type":21,"tag":2072,"props":28313,"children":28314},{"style":2079},[28315],{"type":26,"value":4281},{"type":21,"tag":2072,"props":28317,"children":28318},{"class":2074,"line":366},[28319,28323,28327,28331,28335],{"type":21,"tag":2072,"props":28320,"children":28321},{"style":2079},[28322],{"type":26,"value":20569},{"type":21,"tag":2072,"props":28324,"children":28325},{"style":2097},[28326],{"type":26,"value":4295},{"type":21,"tag":2072,"props":28328,"children":28329},{"style":2079},[28330],{"type":26,"value":798},{"type":21,"tag":2072,"props":28332,"children":28333},{"style":2097},[28334],{"type":26,"value":3555},{"type":21,"tag":2072,"props":28336,"children":28337},{"style":2079},[28338],{"type":26,"value":4281},{"type":21,"tag":2072,"props":28340,"children":28341},{"class":2074,"line":853},[28342,28346,28350,28354,28358,28362,28366,28370,28374],{"type":21,"tag":2072,"props":28343,"children":28344},{"style":2079},[28345],{"type":26,"value":21452},{"type":21,"tag":2072,"props":28347,"children":28348},{"style":2097},[28349],{"type":26,"value":4295},{"type":21,"tag":2072,"props":28351,"children":28352},{"style":2079},[28353],{"type":26,"value":798},{"type":21,"tag":2072,"props":28355,"children":28356},{"style":2097},[28357],{"type":26,"value":3555},{"type":21,"tag":2072,"props":28359,"children":28360},{"style":2079},[28361],{"type":26,"value":4350},{"type":21,"tag":2072,"props":28363,"children":28364},{"style":2097},[28365],{"type":26,"value":4295},{"type":21,"tag":2072,"props":28367,"children":28368},{"style":2079},[28369],{"type":26,"value":798},{"type":21,"tag":2072,"props":28371,"children":28372},{"style":2097},[28373],{"type":26,"value":3555},{"type":21,"tag":2072,"props":28375,"children":28376},{"style":2079},[28377],{"type":26,"value":3597},{"type":21,"tag":2072,"props":28379,"children":28380},{"class":2074,"line":3092},[28381],{"type":21,"tag":2072,"props":28382,"children":28383},{"emptyLinePlaceholder":3460},[28384],{"type":26,"value":3463},{"type":21,"tag":2072,"props":28386,"children":28387},{"class":2074,"line":3651},[28388],{"type":21,"tag":2072,"props":28389,"children":28390},{"style":3985},[28391],{"type":26,"value":28392},"# Connect and pick the least-busy free QPU\n",{"type":21,"tag":2072,"props":28394,"children":28395},{"class":2074,"line":2616},[28396,28400,28404,28408,28412,28416,28420],{"type":21,"tag":2072,"props":28397,"children":28398},{"style":2079},[28399],{"type":26,"value":10345},{"type":21,"tag":2072,"props":28401,"children":28402},{"style":3372},[28403],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28405,"children":28406},{"style":2079},[28407],{"type":26,"value":27788},{"type":21,"tag":2072,"props":28409,"children":28410},{"style":3735},[28411],{"type":26,"value":27793},{"type":21,"tag":2072,"props":28413,"children":28414},{"style":3372},[28415],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28417,"children":28418},{"style":2108},[28419],{"type":26,"value":20914},{"type":21,"tag":2072,"props":28421,"children":28422},{"style":2079},[28423],{"type":26,"value":4281},{"type":21,"tag":2072,"props":28425,"children":28426},{"class":2074,"line":3695},[28427,28431,28435],{"type":21,"tag":2072,"props":28428,"children":28429},{"style":2079},[28430],{"type":26,"value":3723},{"type":21,"tag":2072,"props":28432,"children":28433},{"style":3372},[28434],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28436,"children":28437},{"style":2079},[28438],{"type":26,"value":28439}," service.least_busy(\n",{"type":21,"tag":2072,"props":28441,"children":28442},{"class":2074,"line":3709},[28443,28447,28451,28455],{"type":21,"tag":2072,"props":28444,"children":28445},{"style":3735},[28446],{"type":26,"value":27830},{"type":21,"tag":2072,"props":28448,"children":28449},{"style":3372},[28450],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28452,"children":28453},{"style":2097},[28454],{"type":26,"value":7340},{"type":21,"tag":2072,"props":28456,"children":28457},{"style":2079},[28458],{"type":26,"value":2175},{"type":21,"tag":2072,"props":28460,"children":28461},{"class":2074,"line":3717},[28462,28466,28470,28474],{"type":21,"tag":2072,"props":28463,"children":28464},{"style":3735},[28465],{"type":26,"value":27850},{"type":21,"tag":2072,"props":28467,"children":28468},{"style":3372},[28469],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28471,"children":28472},{"style":2097},[28473],{"type":26,"value":10400},{"type":21,"tag":2072,"props":28475,"children":28476},{"style":2079},[28477],{"type":26,"value":2175},{"type":21,"tag":2072,"props":28479,"children":28480},{"class":2074,"line":3750},[28481,28485,28489],{"type":21,"tag":2072,"props":28482,"children":28483},{"style":3735},[28484],{"type":26,"value":27870},{"type":21,"tag":2072,"props":28486,"children":28487},{"style":3372},[28488],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28490,"children":28491},{"style":2097},[28492],{"type":26,"value":28493},"2\n",{"type":21,"tag":2072,"props":28495,"children":28496},{"class":2074,"line":3769},[28497],{"type":21,"tag":2072,"props":28498,"children":28499},{"style":2079},[28500],{"type":26,"value":4281},{"type":21,"tag":2072,"props":28502,"children":28503},{"class":2074,"line":3777},[28504,28508,28512,28516,28521,28525,28529,28533,28537],{"type":21,"tag":2072,"props":28505,"children":28506},{"style":2097},[28507],{"type":26,"value":4614},{"type":21,"tag":2072,"props":28509,"children":28510},{"style":2079},[28511],{"type":26,"value":3879},{"type":21,"tag":2072,"props":28513,"children":28514},{"style":3372},[28515],{"type":26,"value":3938},{"type":21,"tag":2072,"props":28517,"children":28518},{"style":2108},[28519],{"type":26,"value":28520},"\"Submitting to: ",{"type":21,"tag":2072,"props":28522,"children":28523},{"style":2097},[28524],{"type":26,"value":3948},{"type":21,"tag":2072,"props":28526,"children":28527},{"style":2079},[28528],{"type":26,"value":10440},{"type":21,"tag":2072,"props":28530,"children":28531},{"style":2097},[28532],{"type":26,"value":3958},{"type":21,"tag":2072,"props":28534,"children":28535},{"style":2108},[28536],{"type":26,"value":7539},{"type":21,"tag":2072,"props":28538,"children":28539},{"style":2079},[28540],{"type":26,"value":4281},{"type":21,"tag":2072,"props":28542,"children":28543},{"class":2074,"line":3808},[28544],{"type":21,"tag":2072,"props":28545,"children":28546},{"emptyLinePlaceholder":3460},[28547],{"type":26,"value":3463},{"type":21,"tag":2072,"props":28549,"children":28550},{"class":2074,"line":3853},[28551],{"type":21,"tag":2072,"props":28552,"children":28553},{"style":3985},[28554],{"type":26,"value":28555},"# Transpile for the target device\n",{"type":21,"tag":2072,"props":28557,"children":28558},{"class":2074,"line":3895},[28559,28563,28567,28572,28576,28580,28585,28589,28593,28597],{"type":21,"tag":2072,"props":28560,"children":28561},{"style":2079},[28562],{"type":26,"value":4974},{"type":21,"tag":2072,"props":28564,"children":28565},{"style":3372},[28566],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28568,"children":28569},{"style":2079},[28570],{"type":26,"value":28571}," generate_preset_pass_manager(",{"type":21,"tag":2072,"props":28573,"children":28574},{"style":3735},[28575],{"type":26,"value":18550},{"type":21,"tag":2072,"props":28577,"children":28578},{"style":3372},[28579],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28581,"children":28582},{"style":2079},[28583],{"type":26,"value":28584},"backend, ",{"type":21,"tag":2072,"props":28586,"children":28587},{"style":3735},[28588],{"type":26,"value":5404},{"type":21,"tag":2072,"props":28590,"children":28591},{"style":3372},[28592],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28594,"children":28595},{"style":2097},[28596],{"type":26,"value":3555},{"type":21,"tag":2072,"props":28598,"children":28599},{"style":2079},[28600],{"type":26,"value":4281},{"type":21,"tag":2072,"props":28602,"children":28603},{"class":2074,"line":3913},[28604,28609,28613],{"type":21,"tag":2072,"props":28605,"children":28606},{"style":2079},[28607],{"type":26,"value":28608},"isa_qc ",{"type":21,"tag":2072,"props":28610,"children":28611},{"style":3372},[28612],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28614,"children":28615},{"style":2079},[28616],{"type":26,"value":28617}," pm.run(qc)\n",{"type":21,"tag":2072,"props":28619,"children":28620},{"class":2074,"line":3991},[28621],{"type":21,"tag":2072,"props":28622,"children":28623},{"emptyLinePlaceholder":3460},[28624],{"type":26,"value":3463},{"type":21,"tag":2072,"props":28626,"children":28627},{"class":2074,"line":4019},[28628],{"type":21,"tag":2072,"props":28629,"children":28630},{"style":3985},[28631],{"type":26,"value":28632},"# Submit\n",{"type":21,"tag":2072,"props":28634,"children":28635},{"class":2074,"line":4048},[28636,28641,28645,28650,28655,28659],{"type":21,"tag":2072,"props":28637,"children":28638},{"style":2079},[28639],{"type":26,"value":28640},"sampler ",{"type":21,"tag":2072,"props":28642,"children":28643},{"style":3372},[28644],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28646,"children":28647},{"style":2079},[28648],{"type":26,"value":28649}," Sampler(",{"type":21,"tag":2072,"props":28651,"children":28652},{"style":3735},[28653],{"type":26,"value":28654},"mode",{"type":21,"tag":2072,"props":28656,"children":28657},{"style":3372},[28658],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28660,"children":28661},{"style":2079},[28662],{"type":26,"value":28663},"backend)\n",{"type":21,"tag":2072,"props":28665,"children":28666},{"class":2074,"line":4057},[28667,28672,28676,28681,28685,28689,28693],{"type":21,"tag":2072,"props":28668,"children":28669},{"style":2079},[28670],{"type":26,"value":28671},"job ",{"type":21,"tag":2072,"props":28673,"children":28674},{"style":3372},[28675],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28677,"children":28678},{"style":2079},[28679],{"type":26,"value":28680}," sampler.run([isa_qc], ",{"type":21,"tag":2072,"props":28682,"children":28683},{"style":3735},[28684],{"type":26,"value":3226},{"type":21,"tag":2072,"props":28686,"children":28687},{"style":3372},[28688],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28690,"children":28691},{"style":2097},[28692],{"type":26,"value":2234},{"type":21,"tag":2072,"props":28694,"children":28695},{"style":2079},[28696],{"type":26,"value":4281},{"type":21,"tag":2072,"props":28698,"children":28699},{"class":2074,"line":4085},[28700],{"type":21,"tag":2072,"props":28701,"children":28702},{"emptyLinePlaceholder":3460},[28703],{"type":26,"value":3463},{"type":21,"tag":2072,"props":28705,"children":28706},{"class":2074,"line":4116},[28707,28711,28715,28719,28724,28728,28733,28737,28741],{"type":21,"tag":2072,"props":28708,"children":28709},{"style":2097},[28710],{"type":26,"value":4614},{"type":21,"tag":2072,"props":28712,"children":28713},{"style":2079},[28714],{"type":26,"value":3879},{"type":21,"tag":2072,"props":28716,"children":28717},{"style":3372},[28718],{"type":26,"value":3938},{"type":21,"tag":2072,"props":28720,"children":28721},{"style":2108},[28722],{"type":26,"value":28723},"\"Job ID: ",{"type":21,"tag":2072,"props":28725,"children":28726},{"style":2097},[28727],{"type":26,"value":3948},{"type":21,"tag":2072,"props":28729,"children":28730},{"style":2079},[28731],{"type":26,"value":28732},"job.job_id()",{"type":21,"tag":2072,"props":28734,"children":28735},{"style":2097},[28736],{"type":26,"value":3958},{"type":21,"tag":2072,"props":28738,"children":28739},{"style":2108},[28740],{"type":26,"value":7539},{"type":21,"tag":2072,"props":28742,"children":28743},{"style":2079},[28744],{"type":26,"value":4281},{"type":21,"tag":2072,"props":28746,"children":28747},{"class":2074,"line":4138},[28748,28752,28756,28760,28765,28769,28774,28778,28782],{"type":21,"tag":2072,"props":28749,"children":28750},{"style":2097},[28751],{"type":26,"value":4614},{"type":21,"tag":2072,"props":28753,"children":28754},{"style":2079},[28755],{"type":26,"value":3879},{"type":21,"tag":2072,"props":28757,"children":28758},{"style":3372},[28759],{"type":26,"value":3938},{"type":21,"tag":2072,"props":28761,"children":28762},{"style":2108},[28763],{"type":26,"value":28764},"\"Status: ",{"type":21,"tag":2072,"props":28766,"children":28767},{"style":2097},[28768],{"type":26,"value":3948},{"type":21,"tag":2072,"props":28770,"children":28771},{"style":2079},[28772],{"type":26,"value":28773},"job.status()",{"type":21,"tag":2072,"props":28775,"children":28776},{"style":2097},[28777],{"type":26,"value":3958},{"type":21,"tag":2072,"props":28779,"children":28780},{"style":2108},[28781],{"type":26,"value":7539},{"type":21,"tag":2072,"props":28783,"children":28784},{"style":2079},[28785],{"type":26,"value":4281},{"type":21,"tag":2072,"props":28787,"children":28788},{"class":2074,"line":4184},[28789,28793,28797],{"type":21,"tag":2072,"props":28790,"children":28791},{"style":2079},[28792],{"type":26,"value":19471},{"type":21,"tag":2072,"props":28794,"children":28795},{"style":3372},[28796],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28798,"children":28799},{"style":2079},[28800],{"type":26,"value":28801}," job.result()\n",{"type":21,"tag":2072,"props":28803,"children":28804},{"class":2074,"line":4197},[28805,28809,28814,28818],{"type":21,"tag":2072,"props":28806,"children":28807},{"style":2097},[28808],{"type":26,"value":4614},{"type":21,"tag":2072,"props":28810,"children":28811},{"style":2079},[28812],{"type":26,"value":28813},"(result[",{"type":21,"tag":2072,"props":28815,"children":28816},{"style":2097},[28817],{"type":26,"value":4295},{"type":21,"tag":2072,"props":28819,"children":28820},{"style":2079},[28821],{"type":26,"value":28822},"].data.c.get_counts())\n",{"type":21,"tag":43,"props":28824,"children":28826},{"id":28825},"understanding-queue-times",[28827],{"type":26,"value":28828},"Understanding Queue Times",{"type":21,"tag":22,"props":28830,"children":28831},{},[28832,28834,28838],{"type":26,"value":28833},"Queue time is the most common frustration with the free tier. Every submission becomes a ",{"type":21,"tag":29,"props":28835,"children":28836},{"href":18984},[28837],{"type":26,"value":18987},{"type":26,"value":28839}," waiting behind everyone else's. Here's what's happening:",{"type":21,"tag":7925,"props":28841,"children":28842},{},[28843,28848,28861],{"type":21,"tag":6142,"props":28844,"children":28845},{},[28846],{"type":26,"value":28847},"You're sharing the QPU with all other Open Plan users globally",{"type":21,"tag":6142,"props":28849,"children":28850},{},[28851,28853,28859],{"type":26,"value":28852},"Jobs are queued per system: ",{"type":21,"tag":1831,"props":28854,"children":28856},{"className":28855},[],[28857],{"type":26,"value":28858},"least_busy()",{"type":26,"value":28860}," helps find the shortest wait",{"type":21,"tag":6142,"props":28862,"children":28863},{},[28864],{"type":26,"value":28865},"Typical wait: 5 minutes to 2 hours depending on system load",{"type":21,"tag":22,"props":28867,"children":28868},{},[28869],{"type":21,"tag":784,"props":28870,"children":28871},{},[28872],{"type":26,"value":28873},"Tips to minimize queue time:",{"type":21,"tag":7925,"props":28875,"children":28876},{},[28877,28882,28895,28900],{"type":21,"tag":6142,"props":28878,"children":28879},{},[28880],{"type":26,"value":28881},"Run during off-peak hours (European morning = American night)",{"type":21,"tag":6142,"props":28883,"children":28884},{},[28885,28887,28893],{"type":26,"value":28886},"Use ",{"type":21,"tag":1831,"props":28888,"children":28890},{"className":28889},[],[28891],{"type":26,"value":28892},"service.least_busy()",{"type":26,"value":28894}," rather than targeting a specific system",{"type":21,"tag":6142,"props":28896,"children":28897},{},[28898],{"type":26,"value":28899},"For development, use the Aer simulator locally, and submit to real hardware only for final validation",{"type":21,"tag":6142,"props":28901,"children":28902},{},[28903],{"type":26,"value":28904},"Batch multiple circuits into a single job using SamplerV2's list input",{"type":21,"tag":43,"props":28906,"children":28908},{"id":28907},"using-free-cloud-simulators-instead",[28909],{"type":26,"value":28910},"Using Free Cloud Simulators Instead",{"type":21,"tag":22,"props":28912,"children":28913},{},[28914],{"type":26,"value":28915},"For most development work, IBM's cloud-hosted simulators are faster than queuing for real hardware:",{"type":21,"tag":2062,"props":28917,"children":28919},{"className":3362,"code":28918,"language":3361,"meta":7,"style":7},"# IBM cloud QASM simulator (up to 32 qubits, no queue)\nbackend = service.backend(\"ibmq_qasm_simulator\")\n\n# Or use the Statevector simulator (exact simulation)\nbackend = service.backend(\"simulator_statevector\")\n",[28920],{"type":21,"tag":1831,"props":28921,"children":28922},{"__ignoreMap":7},[28923,28931,28956,28963,28971],{"type":21,"tag":2072,"props":28924,"children":28925},{"class":2074,"line":2075},[28926],{"type":21,"tag":2072,"props":28927,"children":28928},{"style":3985},[28929],{"type":26,"value":28930},"# IBM cloud QASM simulator (up to 32 qubits, no queue)\n",{"type":21,"tag":2072,"props":28932,"children":28933},{"class":2074,"line":164},[28934,28938,28942,28947,28952],{"type":21,"tag":2072,"props":28935,"children":28936},{"style":2079},[28937],{"type":26,"value":3723},{"type":21,"tag":2072,"props":28939,"children":28940},{"style":3372},[28941],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28943,"children":28944},{"style":2079},[28945],{"type":26,"value":28946}," service.backend(",{"type":21,"tag":2072,"props":28948,"children":28949},{"style":2108},[28950],{"type":26,"value":28951},"\"ibmq_qasm_simulator\"",{"type":21,"tag":2072,"props":28953,"children":28954},{"style":2079},[28955],{"type":26,"value":4281},{"type":21,"tag":2072,"props":28957,"children":28958},{"class":2074,"line":2093},[28959],{"type":21,"tag":2072,"props":28960,"children":28961},{"emptyLinePlaceholder":3460},[28962],{"type":26,"value":3463},{"type":21,"tag":2072,"props":28964,"children":28965},{"class":2074,"line":2155},[28966],{"type":21,"tag":2072,"props":28967,"children":28968},{"style":3985},[28969],{"type":26,"value":28970},"# Or use the Statevector simulator (exact simulation)\n",{"type":21,"tag":2072,"props":28972,"children":28973},{"class":2074,"line":2178},[28974,28978,28982,28986,28991],{"type":21,"tag":2072,"props":28975,"children":28976},{"style":2079},[28977],{"type":26,"value":3723},{"type":21,"tag":2072,"props":28979,"children":28980},{"style":3372},[28981],{"type":26,"value":3487},{"type":21,"tag":2072,"props":28983,"children":28984},{"style":2079},[28985],{"type":26,"value":28946},{"type":21,"tag":2072,"props":28987,"children":28988},{"style":2108},[28989],{"type":26,"value":28990},"\"simulator_statevector\"",{"type":21,"tag":2072,"props":28992,"children":28993},{"style":2079},[28994],{"type":26,"value":4281},{"type":21,"tag":22,"props":28996,"children":28997},{},[28998,29000,29005,29007,29011,29013,29019],{"type":26,"value":28999},"These simulators have no queue time and run instantly. Use real ",{"type":21,"tag":29,"props":29001,"children":29002},{"href":11470},[29003],{"type":26,"value":29004},"QPUs",{"type":26,"value":29006}," when you need actual noise characteristics or want to benchmark on real hardware. Our ",{"type":21,"tag":29,"props":29008,"children":29009},{"href":21160},[29010],{"type":26,"value":21163},{"type":26,"value":29012}," covers the local options, and the ",{"type":21,"tag":29,"props":29014,"children":29016},{"href":29015},"\u002Fguides\u002Frun-quantum-circuit-real-hardware-free-2026",[29017],{"type":26,"value":29018},"run a circuit on real hardware guide",{"type":26,"value":29020}," walks through the handoff.",{"type":21,"tag":43,"props":29022,"children":29024},{"id":29023},"using-hlquantum-with-ibm-quantum",[29025],{"type":26,"value":29026},"Using HLQuantum with IBM Quantum",{"type":21,"tag":22,"props":29028,"children":29029},{},[29030],{"type":26,"value":29031},"If you're using multiple SDKs, HLQuantum provides a cleaner interface to IBM hardware:",{"type":21,"tag":2062,"props":29033,"children":29035},{"className":3362,"code":29034,"language":3361,"meta":7,"style":7},"import hlquantum as hlq\n\nqc = hlq.Circuit(2)\nqc.h(0).cx(0, 1).measure_all()\n\n# Run on IBM's free QPU\nresult = hlq.run(\n    qc,\n    backend=\"qiskit\",\n    device=\"ibm_sherbrooke\",  # or use \"auto\" for least busy\n    shots=1024,\n    error_mitigation=\"zne\"\n)\nprint(result)\n",[29036],{"type":21,"tag":1831,"props":29037,"children":29038},{"__ignoreMap":7},[29039,29058,29065,29088,29119,29126,29134,29150,29158,29178,29205,29225,29242,29249],{"type":21,"tag":2072,"props":29040,"children":29041},{"class":2074,"line":2075},[29042,29046,29050,29054],{"type":21,"tag":2072,"props":29043,"children":29044},{"style":3372},[29045],{"type":26,"value":3375},{"type":21,"tag":2072,"props":29047,"children":29048},{"style":2079},[29049],{"type":26,"value":19439},{"type":21,"tag":2072,"props":29051,"children":29052},{"style":3372},[29053],{"type":26,"value":3385},{"type":21,"tag":2072,"props":29055,"children":29056},{"style":2079},[29057],{"type":26,"value":19448},{"type":21,"tag":2072,"props":29059,"children":29060},{"class":2074,"line":164},[29061],{"type":21,"tag":2072,"props":29062,"children":29063},{"emptyLinePlaceholder":3460},[29064],{"type":26,"value":3463},{"type":21,"tag":2072,"props":29066,"children":29067},{"class":2074,"line":2093},[29068,29072,29076,29080,29084],{"type":21,"tag":2072,"props":29069,"children":29070},{"style":2079},[29071],{"type":26,"value":6514},{"type":21,"tag":2072,"props":29073,"children":29074},{"style":3372},[29075],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29077,"children":29078},{"style":2079},[29079],{"type":26,"value":21612},{"type":21,"tag":2072,"props":29081,"children":29082},{"style":2097},[29083],{"type":26,"value":2170},{"type":21,"tag":2072,"props":29085,"children":29086},{"style":2079},[29087],{"type":26,"value":4281},{"type":21,"tag":2072,"props":29089,"children":29090},{"class":2074,"line":2155},[29091,29095,29099,29103,29107,29111,29115],{"type":21,"tag":2072,"props":29092,"children":29093},{"style":2079},[29094],{"type":26,"value":6530},{"type":21,"tag":2072,"props":29096,"children":29097},{"style":2097},[29098],{"type":26,"value":4295},{"type":21,"tag":2072,"props":29100,"children":29101},{"style":2079},[29102],{"type":26,"value":21636},{"type":21,"tag":2072,"props":29104,"children":29105},{"style":2097},[29106],{"type":26,"value":4295},{"type":21,"tag":2072,"props":29108,"children":29109},{"style":2079},[29110],{"type":26,"value":798},{"type":21,"tag":2072,"props":29112,"children":29113},{"style":2097},[29114],{"type":26,"value":3555},{"type":21,"tag":2072,"props":29116,"children":29117},{"style":2079},[29118],{"type":26,"value":21653},{"type":21,"tag":2072,"props":29120,"children":29121},{"class":2074,"line":2178},[29122],{"type":21,"tag":2072,"props":29123,"children":29124},{"emptyLinePlaceholder":3460},[29125],{"type":26,"value":3463},{"type":21,"tag":2072,"props":29127,"children":29128},{"class":2074,"line":288},[29129],{"type":21,"tag":2072,"props":29130,"children":29131},{"style":3985},[29132],{"type":26,"value":29133},"# Run on IBM's free QPU\n",{"type":21,"tag":2072,"props":29135,"children":29136},{"class":2074,"line":16},[29137,29141,29145],{"type":21,"tag":2072,"props":29138,"children":29139},{"style":2079},[29140],{"type":26,"value":19471},{"type":21,"tag":2072,"props":29142,"children":29143},{"style":3372},[29144],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29146,"children":29147},{"style":2079},[29148],{"type":26,"value":29149}," hlq.run(\n",{"type":21,"tag":2072,"props":29151,"children":29152},{"class":2074,"line":366},[29153],{"type":21,"tag":2072,"props":29154,"children":29155},{"style":2079},[29156],{"type":26,"value":29157},"    qc,\n",{"type":21,"tag":2072,"props":29159,"children":29160},{"class":2074,"line":853},[29161,29165,29169,29174],{"type":21,"tag":2072,"props":29162,"children":29163},{"style":3735},[29164],{"type":26,"value":23119},{"type":21,"tag":2072,"props":29166,"children":29167},{"style":3372},[29168],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29170,"children":29171},{"style":2108},[29172],{"type":26,"value":29173},"\"qiskit\"",{"type":21,"tag":2072,"props":29175,"children":29176},{"style":2079},[29177],{"type":26,"value":2175},{"type":21,"tag":2072,"props":29179,"children":29180},{"class":2074,"line":3092},[29181,29186,29190,29195,29200],{"type":21,"tag":2072,"props":29182,"children":29183},{"style":3735},[29184],{"type":26,"value":29185},"    device",{"type":21,"tag":2072,"props":29187,"children":29188},{"style":3372},[29189],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29191,"children":29192},{"style":2108},[29193],{"type":26,"value":29194},"\"ibm_sherbrooke\"",{"type":21,"tag":2072,"props":29196,"children":29197},{"style":2079},[29198],{"type":26,"value":29199},",  ",{"type":21,"tag":2072,"props":29201,"children":29202},{"style":3985},[29203],{"type":26,"value":29204},"# or use \"auto\" for least busy\n",{"type":21,"tag":2072,"props":29206,"children":29207},{"class":2074,"line":3651},[29208,29213,29217,29221],{"type":21,"tag":2072,"props":29209,"children":29210},{"style":3735},[29211],{"type":26,"value":29212},"    shots",{"type":21,"tag":2072,"props":29214,"children":29215},{"style":3372},[29216],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29218,"children":29219},{"style":2097},[29220],{"type":26,"value":2234},{"type":21,"tag":2072,"props":29222,"children":29223},{"style":2079},[29224],{"type":26,"value":2175},{"type":21,"tag":2072,"props":29226,"children":29227},{"class":2074,"line":2616},[29228,29233,29237],{"type":21,"tag":2072,"props":29229,"children":29230},{"style":3735},[29231],{"type":26,"value":29232},"    error_mitigation",{"type":21,"tag":2072,"props":29234,"children":29235},{"style":3372},[29236],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29238,"children":29239},{"style":2108},[29240],{"type":26,"value":29241},"\"zne\"\n",{"type":21,"tag":2072,"props":29243,"children":29244},{"class":2074,"line":3695},[29245],{"type":21,"tag":2072,"props":29246,"children":29247},{"style":2079},[29248],{"type":26,"value":4281},{"type":21,"tag":2072,"props":29250,"children":29251},{"class":2074,"line":3709},[29252,29256],{"type":21,"tag":2072,"props":29253,"children":29254},{"style":2097},[29255],{"type":26,"value":4614},{"type":21,"tag":2072,"props":29257,"children":29258},{"style":2079},[29259],{"type":26,"value":29260},"(result)\n",{"type":21,"tag":22,"props":29262,"children":29263},{},[29264,29266,29270,29272,29276,29278,29284],{"type":26,"value":29265},"HLQuantum handles ",{"type":21,"tag":29,"props":29267,"children":29268},{"href":4884},[29269],{"type":26,"value":4887},{"type":26,"value":29271},", job submission, and result parsing automatically. See the full ",{"type":21,"tag":29,"props":29273,"children":29274},{"href":6223},[29275],{"type":26,"value":7938},{"type":26,"value":29277}," for advanced configuration, or ",{"type":21,"tag":29,"props":29279,"children":29281},{"href":29280},"\u002Fguides\u002Fibm-quantum-vs-aws-braket-2026",[29282],{"type":26,"value":29283},"IBM Quantum vs AWS Braket",{"type":26,"value":29285}," if you're deciding between free tiers.",{"type":21,"tag":2445,"props":29287,"children":29288},{},[29289],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":29291},[29292,29293,29294,29295,29301,29302,29303],{"id":27464,"depth":164,"text":27467},{"id":27540,"depth":164,"text":27543},{"id":27622,"depth":164,"text":27625},{"id":27984,"depth":164,"text":27987,"children":29296},[29297,29298,29299,29300],{"id":27990,"depth":2093,"text":27993},{"id":28007,"depth":2093,"text":28010},{"id":28040,"depth":2093,"text":28043},{"id":28175,"depth":2093,"text":28178},{"id":28825,"depth":164,"text":28828},{"id":28907,"depth":164,"text":28910},{"id":29023,"depth":164,"text":29026},"content:blog:ibm-quantum-free-tier-2026.md","blog\u002Fibm-quantum-free-tier-2026.md","blog\u002Fibm-quantum-free-tier-2026",{"_path":1788,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":29308,"description":29309,"date":27446,"author":11,"tags":29310,"readingTime":3651,"body":29311,"_type":171,"_id":32116,"_source":173,"_file":32117,"_stem":32118,"_extension":176},"QAOA Explained: Solving Max-Cut Step by Step","A hands-on walkthrough of the Quantum Approximate Optimization Algorithm applied to the Max-Cut graph problem, with full Python code using Qiskit, PennyLane, and HLQuantum.",[6280,1777,852,13846],{"type":18,"children":29312,"toc":32106},[29313,29335,29340,29346,29351,29356,29364,29383,29389,29414,29451,29478,29484,30623,30642,30648,30653,31251,31256,31264,31282,31288,31293,31591,31596,31801,31807,31827,31921,31962,31968,31976,31994,32002,32015,32032,32036,32102],{"type":21,"tag":22,"props":29314,"children":29315},{},[29316,29321,29323,29327,29329,29333],{"type":21,"tag":29,"props":29317,"children":29318},{"href":1896},[29319],{"type":26,"value":29320},"QAOA (Quantum Approximate Optimization Algorithm)",{"type":26,"value":29322}," is one of the most hyped near-term quantum algorithms, and for good reason. It's a genuine candidate for ",{"type":21,"tag":29,"props":29324,"children":29325},{"href":7996},[29326],{"type":26,"value":7999},{"type":26,"value":29328}," on combinatorial optimization problems, it runs on today's ",{"type":21,"tag":29,"props":29330,"children":29331},{"href":120},[29332],{"type":26,"value":2016},{"type":26,"value":29334}," hardware, and it's approachable enough to implement in an afternoon.",{"type":21,"tag":22,"props":29336,"children":29337},{},[29338],{"type":26,"value":29339},"This guide builds the full QAOA pipeline from scratch, using Max-Cut as the example problem. By the end you'll understand what QAOA does, how to implement it, and when it's worth using.",{"type":21,"tag":43,"props":29341,"children":29343},{"id":29342},"what-is-max-cut",[29344],{"type":26,"value":29345},"What is Max-Cut?",{"type":21,"tag":22,"props":29347,"children":29348},{},[29349],{"type":26,"value":29350},"Max-Cut is a graph partitioning problem: given a graph, divide the nodes into two groups (0 and 1) to maximize the number of edges that cross between groups. It's NP-hard in general, appears in VLSI chip design, clustering, and network analysis, and maps cleanly onto quantum hardware.",{"type":21,"tag":22,"props":29352,"children":29353},{},[29354],{"type":26,"value":29355},"Here's a simple 4-node graph:",{"type":21,"tag":2062,"props":29357,"children":29359},{"code":29358},"0 --- 1\n|   \\ |\n3 --- 2\n",[29360],{"type":21,"tag":1831,"props":29361,"children":29362},{"__ignoreMap":7},[29363],{"type":26,"value":29358},{"type":21,"tag":22,"props":29365,"children":29366},{},[29367,29369,29375,29376,29381],{"type":26,"value":29368},"The maximum cut of this graph is 4 (edges 0-1, 1-2, 2-3, 3-0 all cross). Our goal: find the bit string ",{"type":21,"tag":1831,"props":29370,"children":29372},{"className":29371},[],[29373],{"type":26,"value":29374},"0101",{"type":26,"value":18910},{"type":21,"tag":1831,"props":29377,"children":29379},{"className":29378},[],[29380],{"type":26,"value":17488},{"type":26,"value":29382}," that achieves this.",{"type":21,"tag":43,"props":29384,"children":29386},{"id":29385},"the-qaoa-idea",[29387],{"type":26,"value":29388},"The QAOA Idea",{"type":21,"tag":22,"props":29390,"children":29391},{},[29392,29394,29399,29400,29404,29406,29412],{"type":26,"value":29393},"QAOA is a ",{"type":21,"tag":29,"props":29395,"children":29396},{"href":13894},[29397],{"type":26,"value":29398},"variational",{"type":26,"value":790},{"type":21,"tag":29,"props":29401,"children":29402},{"href":112},[29403],{"type":26,"value":13904},{"type":26,"value":29405},", introduced by ",{"type":21,"tag":29,"props":29407,"children":29409},{"href":29408},"\u002Fresearch\u002Ffarhi-qaoa-2014",[29410],{"type":26,"value":29411},"Farhi, Goldstone and Gutmann in 2014",{"type":26,"value":29413},". It alternates two parameterized operations:",{"type":21,"tag":6138,"props":29415,"children":29416},{},[29417,29434],{"type":21,"tag":6142,"props":29418,"children":29419},{},[29420,29425,29426,29432],{"type":21,"tag":784,"props":29421,"children":29422},{},[29423],{"type":26,"value":29424},"Problem unitary",{"type":26,"value":790},{"type":21,"tag":1831,"props":29427,"children":29429},{"className":29428},[],[29430],{"type":26,"value":29431},"U_C(γ)",{"type":26,"value":29433},": encodes the cost function (edge crossings) as phase kickback",{"type":21,"tag":6142,"props":29435,"children":29436},{},[29437,29442,29443,29449],{"type":21,"tag":784,"props":29438,"children":29439},{},[29440],{"type":26,"value":29441},"Mixer unitary",{"type":26,"value":790},{"type":21,"tag":1831,"props":29444,"children":29446},{"className":29445},[],[29447],{"type":26,"value":29448},"U_B(β)",{"type":26,"value":29450},": mixes between solutions (X rotations)",{"type":21,"tag":22,"props":29452,"children":29453},{},[29454,29455,29460,29462,29468,29470,29476],{"type":26,"value":25929},{"type":21,"tag":1831,"props":29456,"children":29458},{"className":29457},[],[29459],{"type":26,"value":22},{"type":26,"value":29461}," layers of these alternating unitaries, QAOA prepares a quantum state whose measurement is likely a good solution. A classical optimizer tunes the ",{"type":21,"tag":1831,"props":29463,"children":29465},{"className":29464},[],[29466],{"type":26,"value":29467},"2p",{"type":26,"value":29469}," angles ",{"type":21,"tag":1831,"props":29471,"children":29473},{"className":29472},[],[29474],{"type":26,"value":29475},"(γ, β)",{"type":26,"value":29477}," to maximize expected cut value.",{"type":21,"tag":43,"props":29479,"children":29481},{"id":29480},"building-qaoa-with-pennylane",[29482],{"type":26,"value":29483},"Building QAOA with PennyLane",{"type":21,"tag":2062,"props":29485,"children":29487},{"code":29486,"language":3361,"meta":7,"className":3362,"style":7},"import pennylane as qml\nimport numpy as np\nfrom scipy.optimize import minimize\n\n# Graph edges\nedges = [(0, 1), (1, 2), (2, 3), (3, 0)]\nn_qubits = 4\n\ndev = qml.device(\"default.qubit\", wires=n_qubits)\n\ndef cost_unitary(gamma):\n    \"\"\"Encode the Max-Cut cost into phases.\"\"\"\n    for u, v in edges:\n        qml.CNOT(wires=[u, v])\n        qml.RZ(2 * gamma, wires=v)\n        qml.CNOT(wires=[u, v])\n\ndef mixer_unitary(beta):\n    \"\"\"Apply X-rotation mixer to all qubits.\"\"\"\n    for i in range(n_qubits):\n        qml.RX(2 * beta, wires=i)\n\n@qml.qnode(dev)\ndef qaoa_circuit(params, p=1):\n    gammas = params[:p]\n    betas = params[p:]\n    # Start in uniform superposition\n    for i in range(n_qubits):\n        qml.Hadamard(wires=i)\n    # Alternate p layers\n    for layer in range(p):\n        cost_unitary(gammas[layer])\n        mixer_unitary(betas[layer])\n    return qml.probs(wires=range(n_qubits))\n\ndef expected_cut(params, p=1):\n    \"\"\"Classical cost function: expected number of cut edges.\"\"\"\n    probs = qaoa_circuit(params, p)\n    total = 0.0\n    for bitstring_idx, prob in enumerate(probs):\n        bits = format(bitstring_idx, f'0{n_qubits}b')\n        cut = sum(1 for u, v in edges if bits[u] != bits[v])\n        total += prob * cut\n    return -total  # Minimize negative cut\n\n# Optimize p=1 QAOA\np = 1\ninit_params = np.random.uniform(0, np.pi, 2 * p)\nresult = minimize(expected_cut, init_params, method='COBYLA',\n                  options={'maxiter': 200})\n\nprint(f\"Optimized params: {result.x}\")\nprint(f\"Expected cut: {-result.fun:.3f} \u002F 4.0 maximum\")\n",[29488],{"type":21,"tag":1831,"props":29489,"children":29490},{"__ignoreMap":7},[29491,29510,29529,29550,29557,29565,29648,29663,29670,29705,29712,29729,29737,29758,29778,29812,29831,29838,29855,29863,29886,29919,29926,29937,29966,29983,30000,30008,30031,30051,30059,30084,30092,30100,30127,30134,30162,30170,30187,30204,30229,30279,30341,30368,30389,30396,30404,30420,30458,30491,30525,30532,30573],{"type":21,"tag":2072,"props":29492,"children":29493},{"class":2074,"line":2075},[29494,29498,29502,29506],{"type":21,"tag":2072,"props":29495,"children":29496},{"style":3372},[29497],{"type":26,"value":3375},{"type":21,"tag":2072,"props":29499,"children":29500},{"style":2079},[29501],{"type":26,"value":14153},{"type":21,"tag":2072,"props":29503,"children":29504},{"style":3372},[29505],{"type":26,"value":3385},{"type":21,"tag":2072,"props":29507,"children":29508},{"style":2079},[29509],{"type":26,"value":14162},{"type":21,"tag":2072,"props":29511,"children":29512},{"class":2074,"line":164},[29513,29517,29521,29525],{"type":21,"tag":2072,"props":29514,"children":29515},{"style":3372},[29516],{"type":26,"value":3375},{"type":21,"tag":2072,"props":29518,"children":29519},{"style":2079},[29520],{"type":26,"value":3380},{"type":21,"tag":2072,"props":29522,"children":29523},{"style":3372},[29524],{"type":26,"value":3385},{"type":21,"tag":2072,"props":29526,"children":29527},{"style":2079},[29528],{"type":26,"value":3390},{"type":21,"tag":2072,"props":29530,"children":29531},{"class":2074,"line":2093},[29532,29536,29541,29545],{"type":21,"tag":2072,"props":29533,"children":29534},{"style":3372},[29535],{"type":26,"value":3398},{"type":21,"tag":2072,"props":29537,"children":29538},{"style":2079},[29539],{"type":26,"value":29540}," scipy.optimize ",{"type":21,"tag":2072,"props":29542,"children":29543},{"style":3372},[29544],{"type":26,"value":3375},{"type":21,"tag":2072,"props":29546,"children":29547},{"style":2079},[29548],{"type":26,"value":29549}," minimize\n",{"type":21,"tag":2072,"props":29551,"children":29552},{"class":2074,"line":2155},[29553],{"type":21,"tag":2072,"props":29554,"children":29555},{"emptyLinePlaceholder":3460},[29556],{"type":26,"value":3463},{"type":21,"tag":2072,"props":29558,"children":29559},{"class":2074,"line":2178},[29560],{"type":21,"tag":2072,"props":29561,"children":29562},{"style":3985},[29563],{"type":26,"value":29564},"# Graph edges\n",{"type":21,"tag":2072,"props":29566,"children":29567},{"class":2074,"line":288},[29568,29573,29577,29582,29586,29590,29594,29599,29603,29607,29611,29615,29619,29623,29627,29631,29635,29639,29643],{"type":21,"tag":2072,"props":29569,"children":29570},{"style":2079},[29571],{"type":26,"value":29572},"edges ",{"type":21,"tag":2072,"props":29574,"children":29575},{"style":3372},[29576],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29578,"children":29579},{"style":2079},[29580],{"type":26,"value":29581}," [(",{"type":21,"tag":2072,"props":29583,"children":29584},{"style":2097},[29585],{"type":26,"value":4295},{"type":21,"tag":2072,"props":29587,"children":29588},{"style":2079},[29589],{"type":26,"value":798},{"type":21,"tag":2072,"props":29591,"children":29592},{"style":2097},[29593],{"type":26,"value":3555},{"type":21,"tag":2072,"props":29595,"children":29596},{"style":2079},[29597],{"type":26,"value":29598},"), (",{"type":21,"tag":2072,"props":29600,"children":29601},{"style":2097},[29602],{"type":26,"value":3555},{"type":21,"tag":2072,"props":29604,"children":29605},{"style":2079},[29606],{"type":26,"value":798},{"type":21,"tag":2072,"props":29608,"children":29609},{"style":2097},[29610],{"type":26,"value":2170},{"type":21,"tag":2072,"props":29612,"children":29613},{"style":2079},[29614],{"type":26,"value":29598},{"type":21,"tag":2072,"props":29616,"children":29617},{"style":2097},[29618],{"type":26,"value":2170},{"type":21,"tag":2072,"props":29620,"children":29621},{"style":2079},[29622],{"type":26,"value":798},{"type":21,"tag":2072,"props":29624,"children":29625},{"style":2097},[29626],{"type":26,"value":5641},{"type":21,"tag":2072,"props":29628,"children":29629},{"style":2079},[29630],{"type":26,"value":29598},{"type":21,"tag":2072,"props":29632,"children":29633},{"style":2097},[29634],{"type":26,"value":5641},{"type":21,"tag":2072,"props":29636,"children":29637},{"style":2079},[29638],{"type":26,"value":798},{"type":21,"tag":2072,"props":29640,"children":29641},{"style":2097},[29642],{"type":26,"value":4295},{"type":21,"tag":2072,"props":29644,"children":29645},{"style":2079},[29646],{"type":26,"value":29647},")]\n",{"type":21,"tag":2072,"props":29649,"children":29650},{"class":2074,"line":16},[29651,29655,29659],{"type":21,"tag":2072,"props":29652,"children":29653},{"style":2079},[29654],{"type":26,"value":14246},{"type":21,"tag":2072,"props":29656,"children":29657},{"style":3372},[29658],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29660,"children":29661},{"style":2097},[29662],{"type":26,"value":12528},{"type":21,"tag":2072,"props":29664,"children":29665},{"class":2074,"line":366},[29666],{"type":21,"tag":2072,"props":29667,"children":29668},{"emptyLinePlaceholder":3460},[29669],{"type":26,"value":3463},{"type":21,"tag":2072,"props":29671,"children":29672},{"class":2074,"line":853},[29673,29677,29681,29685,29689,29693,29697,29701],{"type":21,"tag":2072,"props":29674,"children":29675},{"style":2079},[29676],{"type":26,"value":14286},{"type":21,"tag":2072,"props":29678,"children":29679},{"style":3372},[29680],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29682,"children":29683},{"style":2079},[29684],{"type":26,"value":14295},{"type":21,"tag":2072,"props":29686,"children":29687},{"style":2108},[29688],{"type":26,"value":14300},{"type":21,"tag":2072,"props":29690,"children":29691},{"style":2079},[29692],{"type":26,"value":798},{"type":21,"tag":2072,"props":29694,"children":29695},{"style":3735},[29696],{"type":26,"value":14309},{"type":21,"tag":2072,"props":29698,"children":29699},{"style":3372},[29700],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29702,"children":29703},{"style":2079},[29704],{"type":26,"value":14318},{"type":21,"tag":2072,"props":29706,"children":29707},{"class":2074,"line":3092},[29708],{"type":21,"tag":2072,"props":29709,"children":29710},{"emptyLinePlaceholder":3460},[29711],{"type":26,"value":3463},{"type":21,"tag":2072,"props":29713,"children":29714},{"class":2074,"line":3651},[29715,29719,29724],{"type":21,"tag":2072,"props":29716,"children":29717},{"style":3372},[29718],{"type":26,"value":3471},{"type":21,"tag":2072,"props":29720,"children":29721},{"style":3474},[29722],{"type":26,"value":29723}," cost_unitary",{"type":21,"tag":2072,"props":29725,"children":29726},{"style":2079},[29727],{"type":26,"value":29728},"(gamma):\n",{"type":21,"tag":2072,"props":29730,"children":29731},{"class":2074,"line":2616},[29732],{"type":21,"tag":2072,"props":29733,"children":29734},{"style":2108},[29735],{"type":26,"value":29736},"    \"\"\"Encode the Max-Cut cost into phases.\"\"\"\n",{"type":21,"tag":2072,"props":29738,"children":29739},{"class":2074,"line":3695},[29740,29744,29749,29753],{"type":21,"tag":2072,"props":29741,"children":29742},{"style":3372},[29743],{"type":26,"value":3859},{"type":21,"tag":2072,"props":29745,"children":29746},{"style":2079},[29747],{"type":26,"value":29748}," u, v ",{"type":21,"tag":2072,"props":29750,"children":29751},{"style":3372},[29752],{"type":26,"value":3869},{"type":21,"tag":2072,"props":29754,"children":29755},{"style":2079},[29756],{"type":26,"value":29757}," edges:\n",{"type":21,"tag":2072,"props":29759,"children":29760},{"class":2074,"line":3709},[29761,29765,29769,29773],{"type":21,"tag":2072,"props":29762,"children":29763},{"style":2079},[29764],{"type":26,"value":26987},{"type":21,"tag":2072,"props":29766,"children":29767},{"style":3735},[29768],{"type":26,"value":14309},{"type":21,"tag":2072,"props":29770,"children":29771},{"style":3372},[29772],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29774,"children":29775},{"style":2079},[29776],{"type":26,"value":29777},"[u, v])\n",{"type":21,"tag":2072,"props":29779,"children":29780},{"class":2074,"line":3717},[29781,29786,29790,29794,29799,29803,29807],{"type":21,"tag":2072,"props":29782,"children":29783},{"style":2079},[29784],{"type":26,"value":29785},"        qml.RZ(",{"type":21,"tag":2072,"props":29787,"children":29788},{"style":2097},[29789],{"type":26,"value":2170},{"type":21,"tag":2072,"props":29791,"children":29792},{"style":3372},[29793],{"type":26,"value":7478},{"type":21,"tag":2072,"props":29795,"children":29796},{"style":2079},[29797],{"type":26,"value":29798}," gamma, ",{"type":21,"tag":2072,"props":29800,"children":29801},{"style":3735},[29802],{"type":26,"value":14309},{"type":21,"tag":2072,"props":29804,"children":29805},{"style":3372},[29806],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29808,"children":29809},{"style":2079},[29810],{"type":26,"value":29811},"v)\n",{"type":21,"tag":2072,"props":29813,"children":29814},{"class":2074,"line":3750},[29815,29819,29823,29827],{"type":21,"tag":2072,"props":29816,"children":29817},{"style":2079},[29818],{"type":26,"value":26987},{"type":21,"tag":2072,"props":29820,"children":29821},{"style":3735},[29822],{"type":26,"value":14309},{"type":21,"tag":2072,"props":29824,"children":29825},{"style":3372},[29826],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29828,"children":29829},{"style":2079},[29830],{"type":26,"value":29777},{"type":21,"tag":2072,"props":29832,"children":29833},{"class":2074,"line":3769},[29834],{"type":21,"tag":2072,"props":29835,"children":29836},{"emptyLinePlaceholder":3460},[29837],{"type":26,"value":3463},{"type":21,"tag":2072,"props":29839,"children":29840},{"class":2074,"line":3777},[29841,29845,29850],{"type":21,"tag":2072,"props":29842,"children":29843},{"style":3372},[29844],{"type":26,"value":3471},{"type":21,"tag":2072,"props":29846,"children":29847},{"style":3474},[29848],{"type":26,"value":29849}," mixer_unitary",{"type":21,"tag":2072,"props":29851,"children":29852},{"style":2079},[29853],{"type":26,"value":29854},"(beta):\n",{"type":21,"tag":2072,"props":29856,"children":29857},{"class":2074,"line":3808},[29858],{"type":21,"tag":2072,"props":29859,"children":29860},{"style":2108},[29861],{"type":26,"value":29862},"    \"\"\"Apply X-rotation mixer to all qubits.\"\"\"\n",{"type":21,"tag":2072,"props":29864,"children":29865},{"class":2074,"line":3853},[29866,29870,29874,29878,29882],{"type":21,"tag":2072,"props":29867,"children":29868},{"style":3372},[29869],{"type":26,"value":3859},{"type":21,"tag":2072,"props":29871,"children":29872},{"style":2079},[29873],{"type":26,"value":3864},{"type":21,"tag":2072,"props":29875,"children":29876},{"style":3372},[29877],{"type":26,"value":3869},{"type":21,"tag":2072,"props":29879,"children":29880},{"style":2097},[29881],{"type":26,"value":3874},{"type":21,"tag":2072,"props":29883,"children":29884},{"style":2079},[29885],{"type":26,"value":26922},{"type":21,"tag":2072,"props":29887,"children":29888},{"class":2074,"line":3895},[29889,29894,29898,29902,29907,29911,29915],{"type":21,"tag":2072,"props":29890,"children":29891},{"style":2079},[29892],{"type":26,"value":29893},"        qml.RX(",{"type":21,"tag":2072,"props":29895,"children":29896},{"style":2097},[29897],{"type":26,"value":2170},{"type":21,"tag":2072,"props":29899,"children":29900},{"style":3372},[29901],{"type":26,"value":7478},{"type":21,"tag":2072,"props":29903,"children":29904},{"style":2079},[29905],{"type":26,"value":29906}," beta, ",{"type":21,"tag":2072,"props":29908,"children":29909},{"style":3735},[29910],{"type":26,"value":14309},{"type":21,"tag":2072,"props":29912,"children":29913},{"style":3372},[29914],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29916,"children":29917},{"style":2079},[29918],{"type":26,"value":26943},{"type":21,"tag":2072,"props":29920,"children":29921},{"class":2074,"line":3913},[29922],{"type":21,"tag":2072,"props":29923,"children":29924},{"emptyLinePlaceholder":3460},[29925],{"type":26,"value":3463},{"type":21,"tag":2072,"props":29927,"children":29928},{"class":2074,"line":3991},[29929,29933],{"type":21,"tag":2072,"props":29930,"children":29931},{"style":3474},[29932],{"type":26,"value":14333},{"type":21,"tag":2072,"props":29934,"children":29935},{"style":2079},[29936],{"type":26,"value":14338},{"type":21,"tag":2072,"props":29938,"children":29939},{"class":2074,"line":4019},[29940,29944,29949,29954,29958,29962],{"type":21,"tag":2072,"props":29941,"children":29942},{"style":3372},[29943],{"type":26,"value":3471},{"type":21,"tag":2072,"props":29945,"children":29946},{"style":3474},[29947],{"type":26,"value":29948}," qaoa_circuit",{"type":21,"tag":2072,"props":29950,"children":29951},{"style":2079},[29952],{"type":26,"value":29953},"(params, p",{"type":21,"tag":2072,"props":29955,"children":29956},{"style":3372},[29957],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29959,"children":29960},{"style":2097},[29961],{"type":26,"value":3555},{"type":21,"tag":2072,"props":29963,"children":29964},{"style":2079},[29965],{"type":26,"value":3525},{"type":21,"tag":2072,"props":29967,"children":29968},{"class":2074,"line":4048},[29969,29974,29978],{"type":21,"tag":2072,"props":29970,"children":29971},{"style":2079},[29972],{"type":26,"value":29973},"    gammas ",{"type":21,"tag":2072,"props":29975,"children":29976},{"style":3372},[29977],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29979,"children":29980},{"style":2079},[29981],{"type":26,"value":29982}," params[:p]\n",{"type":21,"tag":2072,"props":29984,"children":29985},{"class":2074,"line":4057},[29986,29991,29995],{"type":21,"tag":2072,"props":29987,"children":29988},{"style":2079},[29989],{"type":26,"value":29990},"    betas ",{"type":21,"tag":2072,"props":29992,"children":29993},{"style":3372},[29994],{"type":26,"value":3487},{"type":21,"tag":2072,"props":29996,"children":29997},{"style":2079},[29998],{"type":26,"value":29999}," params[p:]\n",{"type":21,"tag":2072,"props":30001,"children":30002},{"class":2074,"line":4085},[30003],{"type":21,"tag":2072,"props":30004,"children":30005},{"style":3985},[30006],{"type":26,"value":30007},"    # Start in uniform superposition\n",{"type":21,"tag":2072,"props":30009,"children":30010},{"class":2074,"line":4116},[30011,30015,30019,30023,30027],{"type":21,"tag":2072,"props":30012,"children":30013},{"style":3372},[30014],{"type":26,"value":3859},{"type":21,"tag":2072,"props":30016,"children":30017},{"style":2079},[30018],{"type":26,"value":3864},{"type":21,"tag":2072,"props":30020,"children":30021},{"style":3372},[30022],{"type":26,"value":3869},{"type":21,"tag":2072,"props":30024,"children":30025},{"style":2097},[30026],{"type":26,"value":3874},{"type":21,"tag":2072,"props":30028,"children":30029},{"style":2079},[30030],{"type":26,"value":26922},{"type":21,"tag":2072,"props":30032,"children":30033},{"class":2074,"line":4138},[30034,30039,30043,30047],{"type":21,"tag":2072,"props":30035,"children":30036},{"style":2079},[30037],{"type":26,"value":30038},"        qml.Hadamard(",{"type":21,"tag":2072,"props":30040,"children":30041},{"style":3735},[30042],{"type":26,"value":14309},{"type":21,"tag":2072,"props":30044,"children":30045},{"style":3372},[30046],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30048,"children":30049},{"style":2079},[30050],{"type":26,"value":26943},{"type":21,"tag":2072,"props":30052,"children":30053},{"class":2074,"line":4184},[30054],{"type":21,"tag":2072,"props":30055,"children":30056},{"style":3985},[30057],{"type":26,"value":30058},"    # Alternate p layers\n",{"type":21,"tag":2072,"props":30060,"children":30061},{"class":2074,"line":4197},[30062,30066,30071,30075,30079],{"type":21,"tag":2072,"props":30063,"children":30064},{"style":3372},[30065],{"type":26,"value":3859},{"type":21,"tag":2072,"props":30067,"children":30068},{"style":2079},[30069],{"type":26,"value":30070}," layer ",{"type":21,"tag":2072,"props":30072,"children":30073},{"style":3372},[30074],{"type":26,"value":3869},{"type":21,"tag":2072,"props":30076,"children":30077},{"style":2097},[30078],{"type":26,"value":3874},{"type":21,"tag":2072,"props":30080,"children":30081},{"style":2079},[30082],{"type":26,"value":30083},"(p):\n",{"type":21,"tag":2072,"props":30085,"children":30086},{"class":2074,"line":4205},[30087],{"type":21,"tag":2072,"props":30088,"children":30089},{"style":2079},[30090],{"type":26,"value":30091},"        cost_unitary(gammas[layer])\n",{"type":21,"tag":2072,"props":30093,"children":30094},{"class":2074,"line":4223},[30095],{"type":21,"tag":2072,"props":30096,"children":30097},{"style":2079},[30098],{"type":26,"value":30099},"        mixer_unitary(betas[layer])\n",{"type":21,"tag":2072,"props":30101,"children":30102},{"class":2074,"line":4241},[30103,30107,30111,30115,30119,30123],{"type":21,"tag":2072,"props":30104,"children":30105},{"style":3372},[30106],{"type":26,"value":3701},{"type":21,"tag":2072,"props":30108,"children":30109},{"style":2079},[30110],{"type":26,"value":22070},{"type":21,"tag":2072,"props":30112,"children":30113},{"style":3735},[30114],{"type":26,"value":14309},{"type":21,"tag":2072,"props":30116,"children":30117},{"style":3372},[30118],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30120,"children":30121},{"style":2097},[30122],{"type":26,"value":4068},{"type":21,"tag":2072,"props":30124,"children":30125},{"style":2079},[30126],{"type":26,"value":14446},{"type":21,"tag":2072,"props":30128,"children":30129},{"class":2074,"line":4249},[30130],{"type":21,"tag":2072,"props":30131,"children":30132},{"emptyLinePlaceholder":3460},[30133],{"type":26,"value":3463},{"type":21,"tag":2072,"props":30135,"children":30136},{"class":2074,"line":4284},[30137,30141,30146,30150,30154,30158],{"type":21,"tag":2072,"props":30138,"children":30139},{"style":3372},[30140],{"type":26,"value":3471},{"type":21,"tag":2072,"props":30142,"children":30143},{"style":3474},[30144],{"type":26,"value":30145}," expected_cut",{"type":21,"tag":2072,"props":30147,"children":30148},{"style":2079},[30149],{"type":26,"value":29953},{"type":21,"tag":2072,"props":30151,"children":30152},{"style":3372},[30153],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30155,"children":30156},{"style":2097},[30157],{"type":26,"value":3555},{"type":21,"tag":2072,"props":30159,"children":30160},{"style":2079},[30161],{"type":26,"value":3525},{"type":21,"tag":2072,"props":30163,"children":30164},{"class":2074,"line":4302},[30165],{"type":21,"tag":2072,"props":30166,"children":30167},{"style":2108},[30168],{"type":26,"value":30169},"    \"\"\"Classical cost function: expected number of cut edges.\"\"\"\n",{"type":21,"tag":2072,"props":30171,"children":30172},{"class":2074,"line":4327},[30173,30178,30182],{"type":21,"tag":2072,"props":30174,"children":30175},{"style":2079},[30176],{"type":26,"value":30177},"    probs ",{"type":21,"tag":2072,"props":30179,"children":30180},{"style":3372},[30181],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30183,"children":30184},{"style":2079},[30185],{"type":26,"value":30186}," qaoa_circuit(params, p)\n",{"type":21,"tag":2072,"props":30188,"children":30189},{"class":2074,"line":4369},[30190,30195,30199],{"type":21,"tag":2072,"props":30191,"children":30192},{"style":2079},[30193],{"type":26,"value":30194},"    total ",{"type":21,"tag":2072,"props":30196,"children":30197},{"style":3372},[30198],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30200,"children":30201},{"style":2097},[30202],{"type":26,"value":30203}," 0.0\n",{"type":21,"tag":2072,"props":30205,"children":30206},{"class":2074,"line":4377},[30207,30211,30216,30220,30224],{"type":21,"tag":2072,"props":30208,"children":30209},{"style":3372},[30210],{"type":26,"value":3859},{"type":21,"tag":2072,"props":30212,"children":30213},{"style":2079},[30214],{"type":26,"value":30215}," bitstring_idx, prob ",{"type":21,"tag":2072,"props":30217,"children":30218},{"style":3372},[30219],{"type":26,"value":3869},{"type":21,"tag":2072,"props":30221,"children":30222},{"style":2097},[30223],{"type":26,"value":4011},{"type":21,"tag":2072,"props":30225,"children":30226},{"style":2079},[30227],{"type":26,"value":30228},"(probs):\n",{"type":21,"tag":2072,"props":30230,"children":30231},{"class":2074,"line":4412},[30232,30236,30240,30244,30249,30253,30258,30262,30266,30270,30275],{"type":21,"tag":2072,"props":30233,"children":30234},{"style":2079},[30235],{"type":26,"value":3919},{"type":21,"tag":2072,"props":30237,"children":30238},{"style":3372},[30239],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30241,"children":30242},{"style":2097},[30243],{"type":26,"value":3928},{"type":21,"tag":2072,"props":30245,"children":30246},{"style":2079},[30247],{"type":26,"value":30248},"(bitstring_idx, ",{"type":21,"tag":2072,"props":30250,"children":30251},{"style":3372},[30252],{"type":26,"value":3938},{"type":21,"tag":2072,"props":30254,"children":30255},{"style":2108},[30256],{"type":26,"value":30257},"'0",{"type":21,"tag":2072,"props":30259,"children":30260},{"style":2097},[30261],{"type":26,"value":3948},{"type":21,"tag":2072,"props":30263,"children":30264},{"style":2079},[30265],{"type":26,"value":15558},{"type":21,"tag":2072,"props":30267,"children":30268},{"style":2097},[30269],{"type":26,"value":3958},{"type":21,"tag":2072,"props":30271,"children":30272},{"style":2108},[30273],{"type":26,"value":30274},"b'",{"type":21,"tag":2072,"props":30276,"children":30277},{"style":2079},[30278],{"type":26,"value":4281},{"type":21,"tag":2072,"props":30280,"children":30281},{"class":2074,"line":4529},[30282,30287,30291,30295,30299,30303,30308,30312,30316,30321,30326,30331,30336],{"type":21,"tag":2072,"props":30283,"children":30284},{"style":2079},[30285],{"type":26,"value":30286},"        cut ",{"type":21,"tag":2072,"props":30288,"children":30289},{"style":3372},[30290],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30292,"children":30293},{"style":2097},[30294],{"type":26,"value":5449},{"type":21,"tag":2072,"props":30296,"children":30297},{"style":2079},[30298],{"type":26,"value":3879},{"type":21,"tag":2072,"props":30300,"children":30301},{"style":2097},[30302],{"type":26,"value":3555},{"type":21,"tag":2072,"props":30304,"children":30305},{"style":3372},[30306],{"type":26,"value":30307}," for",{"type":21,"tag":2072,"props":30309,"children":30310},{"style":2079},[30311],{"type":26,"value":29748},{"type":21,"tag":2072,"props":30313,"children":30314},{"style":3372},[30315],{"type":26,"value":3869},{"type":21,"tag":2072,"props":30317,"children":30318},{"style":2079},[30319],{"type":26,"value":30320}," edges ",{"type":21,"tag":2072,"props":30322,"children":30323},{"style":3372},[30324],{"type":26,"value":30325},"if",{"type":21,"tag":2072,"props":30327,"children":30328},{"style":2079},[30329],{"type":26,"value":30330}," bits[u] ",{"type":21,"tag":2072,"props":30332,"children":30333},{"style":3372},[30334],{"type":26,"value":30335},"!=",{"type":21,"tag":2072,"props":30337,"children":30338},{"style":2079},[30339],{"type":26,"value":30340}," bits[v])\n",{"type":21,"tag":2072,"props":30342,"children":30343},{"class":2074,"line":4537},[30344,30349,30354,30359,30363],{"type":21,"tag":2072,"props":30345,"children":30346},{"style":2079},[30347],{"type":26,"value":30348},"        total ",{"type":21,"tag":2072,"props":30350,"children":30351},{"style":3372},[30352],{"type":26,"value":30353},"+=",{"type":21,"tag":2072,"props":30355,"children":30356},{"style":2079},[30357],{"type":26,"value":30358}," prob ",{"type":21,"tag":2072,"props":30360,"children":30361},{"style":3372},[30362],{"type":26,"value":5522},{"type":21,"tag":2072,"props":30364,"children":30365},{"style":2079},[30366],{"type":26,"value":30367}," cut\n",{"type":21,"tag":2072,"props":30369,"children":30370},{"class":2074,"line":4582},[30371,30375,30379,30384],{"type":21,"tag":2072,"props":30372,"children":30373},{"style":3372},[30374],{"type":26,"value":3701},{"type":21,"tag":2072,"props":30376,"children":30377},{"style":3372},[30378],{"type":26,"value":3666},{"type":21,"tag":2072,"props":30380,"children":30381},{"style":2079},[30382],{"type":26,"value":30383},"total  ",{"type":21,"tag":2072,"props":30385,"children":30386},{"style":3985},[30387],{"type":26,"value":30388},"# Minimize negative cut\n",{"type":21,"tag":2072,"props":30390,"children":30391},{"class":2074,"line":4600},[30392],{"type":21,"tag":2072,"props":30393,"children":30394},{"emptyLinePlaceholder":3460},[30395],{"type":26,"value":3463},{"type":21,"tag":2072,"props":30397,"children":30398},{"class":2074,"line":4608},[30399],{"type":21,"tag":2072,"props":30400,"children":30401},{"style":3985},[30402],{"type":26,"value":30403},"# Optimize p=1 QAOA\n",{"type":21,"tag":2072,"props":30405,"children":30406},{"class":2074,"line":4697},[30407,30412,30416],{"type":21,"tag":2072,"props":30408,"children":30409},{"style":2079},[30410],{"type":26,"value":30411},"p ",{"type":21,"tag":2072,"props":30413,"children":30414},{"style":3372},[30415],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30417,"children":30418},{"style":2097},[30419],{"type":26,"value":12854},{"type":21,"tag":2072,"props":30421,"children":30422},{"class":2074,"line":15133},[30423,30428,30432,30436,30440,30445,30449,30453],{"type":21,"tag":2072,"props":30424,"children":30425},{"style":2079},[30426],{"type":26,"value":30427},"init_params ",{"type":21,"tag":2072,"props":30429,"children":30430},{"style":3372},[30431],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30433,"children":30434},{"style":2079},[30435],{"type":26,"value":25578},{"type":21,"tag":2072,"props":30437,"children":30438},{"style":2097},[30439],{"type":26,"value":4295},{"type":21,"tag":2072,"props":30441,"children":30442},{"style":2079},[30443],{"type":26,"value":30444},", np.pi, ",{"type":21,"tag":2072,"props":30446,"children":30447},{"style":2097},[30448],{"type":26,"value":2170},{"type":21,"tag":2072,"props":30450,"children":30451},{"style":3372},[30452],{"type":26,"value":7478},{"type":21,"tag":2072,"props":30454,"children":30455},{"style":2079},[30456],{"type":26,"value":30457}," p)\n",{"type":21,"tag":2072,"props":30459,"children":30460},{"class":2074,"line":15151},[30461,30465,30469,30474,30479,30483,30487],{"type":21,"tag":2072,"props":30462,"children":30463},{"style":2079},[30464],{"type":26,"value":19471},{"type":21,"tag":2072,"props":30466,"children":30467},{"style":3372},[30468],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30470,"children":30471},{"style":2079},[30472],{"type":26,"value":30473}," minimize(expected_cut, init_params, ",{"type":21,"tag":2072,"props":30475,"children":30476},{"style":3735},[30477],{"type":26,"value":30478},"method",{"type":21,"tag":2072,"props":30480,"children":30481},{"style":3372},[30482],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30484,"children":30485},{"style":2108},[30486],{"type":26,"value":23148},{"type":21,"tag":2072,"props":30488,"children":30489},{"style":2079},[30490],{"type":26,"value":2175},{"type":21,"tag":2072,"props":30492,"children":30493},{"class":2074,"line":15169},[30494,30499,30503,30507,30512,30516,30520],{"type":21,"tag":2072,"props":30495,"children":30496},{"style":3735},[30497],{"type":26,"value":30498},"                  options",{"type":21,"tag":2072,"props":30500,"children":30501},{"style":3372},[30502],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30504,"children":30505},{"style":2079},[30506],{"type":26,"value":3948},{"type":21,"tag":2072,"props":30508,"children":30509},{"style":2108},[30510],{"type":26,"value":30511},"'maxiter'",{"type":21,"tag":2072,"props":30513,"children":30514},{"style":2079},[30515],{"type":26,"value":66},{"type":21,"tag":2072,"props":30517,"children":30518},{"style":2097},[30519],{"type":26,"value":14691},{"type":21,"tag":2072,"props":30521,"children":30522},{"style":2079},[30523],{"type":26,"value":30524},"})\n",{"type":21,"tag":2072,"props":30526,"children":30527},{"class":2074,"line":15177},[30528],{"type":21,"tag":2072,"props":30529,"children":30530},{"emptyLinePlaceholder":3460},[30531],{"type":26,"value":3463},{"type":21,"tag":2072,"props":30533,"children":30534},{"class":2074,"line":15211},[30535,30539,30543,30547,30552,30556,30561,30565,30569],{"type":21,"tag":2072,"props":30536,"children":30537},{"style":2097},[30538],{"type":26,"value":4614},{"type":21,"tag":2072,"props":30540,"children":30541},{"style":2079},[30542],{"type":26,"value":3879},{"type":21,"tag":2072,"props":30544,"children":30545},{"style":3372},[30546],{"type":26,"value":3938},{"type":21,"tag":2072,"props":30548,"children":30549},{"style":2108},[30550],{"type":26,"value":30551},"\"Optimized params: ",{"type":21,"tag":2072,"props":30553,"children":30554},{"style":2097},[30555],{"type":26,"value":3948},{"type":21,"tag":2072,"props":30557,"children":30558},{"style":2079},[30559],{"type":26,"value":30560},"result.x",{"type":21,"tag":2072,"props":30562,"children":30563},{"style":2097},[30564],{"type":26,"value":3958},{"type":21,"tag":2072,"props":30566,"children":30567},{"style":2108},[30568],{"type":26,"value":7539},{"type":21,"tag":2072,"props":30570,"children":30571},{"style":2079},[30572],{"type":26,"value":4281},{"type":21,"tag":2072,"props":30574,"children":30575},{"class":2074,"line":15246},[30576,30580,30584,30588,30593,30597,30601,30606,30610,30614,30619],{"type":21,"tag":2072,"props":30577,"children":30578},{"style":2097},[30579],{"type":26,"value":4614},{"type":21,"tag":2072,"props":30581,"children":30582},{"style":2079},[30583],{"type":26,"value":3879},{"type":21,"tag":2072,"props":30585,"children":30586},{"style":3372},[30587],{"type":26,"value":3938},{"type":21,"tag":2072,"props":30589,"children":30590},{"style":2108},[30591],{"type":26,"value":30592},"\"Expected cut: ",{"type":21,"tag":2072,"props":30594,"children":30595},{"style":2097},[30596],{"type":26,"value":3948},{"type":21,"tag":2072,"props":30598,"children":30599},{"style":3372},[30600],{"type":26,"value":3973},{"type":21,"tag":2072,"props":30602,"children":30603},{"style":2079},[30604],{"type":26,"value":30605},"result.fun",{"type":21,"tag":2072,"props":30607,"children":30608},{"style":3372},[30609],{"type":26,"value":15349},{"type":21,"tag":2072,"props":30611,"children":30612},{"style":2097},[30613],{"type":26,"value":3958},{"type":21,"tag":2072,"props":30615,"children":30616},{"style":2108},[30617],{"type":26,"value":30618}," \u002F 4.0 maximum\"",{"type":21,"tag":2072,"props":30620,"children":30621},{"style":2079},[30622],{"type":26,"value":4281},{"type":21,"tag":22,"props":30624,"children":30625},{},[30626,30628,30634,30635,30640],{"type":26,"value":30627},"Running this typically achieves ",{"type":21,"tag":1831,"props":30629,"children":30631},{"className":30630},[],[30632],{"type":26,"value":30633},"expected_cut ≈ 3.5",{"type":26,"value":5162},{"type":21,"tag":1831,"props":30636,"children":30638},{"className":30637},[],[30639],{"type":26,"value":19680},{"type":26,"value":30641},", 87.5% of the maximum cut.",{"type":21,"tag":43,"props":30643,"children":30645},{"id":30644},"sampling-the-best-solution",[30646],{"type":26,"value":30647},"Sampling the Best Solution",{"type":21,"tag":22,"props":30649,"children":30650},{},[30651],{"type":26,"value":30652},"After optimization, sample the circuit to find the most likely good solutions:",{"type":21,"tag":2062,"props":30654,"children":30656},{"code":30655,"language":3361,"meta":7,"className":3362,"style":7},"@qml.qnode(dev)\ndef sample_circuit(params, p=1, shots=1000):\n    gammas = params[:p]\n    betas = params[p:]\n    for i in range(n_qubits):\n        qml.Hadamard(wires=i)\n    for layer in range(p):\n        cost_unitary(gammas[layer])\n        mixer_unitary(betas[layer])\n    return qml.sample(wires=range(n_qubits))\n\nsamples = sample_circuit(result.x, shots=1000)\n\n# Count cut values for each bitstring\nfrom collections import Counter\ncut_counts = Counter()\nfor bits in samples:\n    key = ''.join(str(b) for b in bits)\n    cut = sum(1 for u, v in edges if bits[u] != bits[v])\n    cut_counts[(key, cut)] += 1\n\n# Show top 5 most frequent bitstrings\nfor (bits, cut), count in sorted(cut_counts.items(), key=lambda x: -x[1])[:5]:\n    print(f\"{bits}  cut={cut}  frequency={count\u002F10:.1f}%\")\n",[30657],{"type":21,"tag":1831,"props":30658,"children":30659},{"__ignoreMap":7},[30660,30671,30712,30727,30742,30765,30784,30807,30814,30821,30849,30856,30889,30896,30904,30925,30942,30963,31012,31068,31084,31091,31099,31162],{"type":21,"tag":2072,"props":30661,"children":30662},{"class":2074,"line":2075},[30663,30667],{"type":21,"tag":2072,"props":30664,"children":30665},{"style":3474},[30666],{"type":26,"value":14333},{"type":21,"tag":2072,"props":30668,"children":30669},{"style":2079},[30670],{"type":26,"value":14338},{"type":21,"tag":2072,"props":30672,"children":30673},{"class":2074,"line":164},[30674,30678,30683,30687,30691,30695,30700,30704,30708],{"type":21,"tag":2072,"props":30675,"children":30676},{"style":3372},[30677],{"type":26,"value":3471},{"type":21,"tag":2072,"props":30679,"children":30680},{"style":3474},[30681],{"type":26,"value":30682}," sample_circuit",{"type":21,"tag":2072,"props":30684,"children":30685},{"style":2079},[30686],{"type":26,"value":29953},{"type":21,"tag":2072,"props":30688,"children":30689},{"style":3372},[30690],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30692,"children":30693},{"style":2097},[30694],{"type":26,"value":3555},{"type":21,"tag":2072,"props":30696,"children":30697},{"style":2079},[30698],{"type":26,"value":30699},", shots",{"type":21,"tag":2072,"props":30701,"children":30702},{"style":3372},[30703],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30705,"children":30706},{"style":2097},[30707],{"type":26,"value":20641},{"type":21,"tag":2072,"props":30709,"children":30710},{"style":2079},[30711],{"type":26,"value":3525},{"type":21,"tag":2072,"props":30713,"children":30714},{"class":2074,"line":2093},[30715,30719,30723],{"type":21,"tag":2072,"props":30716,"children":30717},{"style":2079},[30718],{"type":26,"value":29973},{"type":21,"tag":2072,"props":30720,"children":30721},{"style":3372},[30722],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30724,"children":30725},{"style":2079},[30726],{"type":26,"value":29982},{"type":21,"tag":2072,"props":30728,"children":30729},{"class":2074,"line":2155},[30730,30734,30738],{"type":21,"tag":2072,"props":30731,"children":30732},{"style":2079},[30733],{"type":26,"value":29990},{"type":21,"tag":2072,"props":30735,"children":30736},{"style":3372},[30737],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30739,"children":30740},{"style":2079},[30741],{"type":26,"value":29999},{"type":21,"tag":2072,"props":30743,"children":30744},{"class":2074,"line":2178},[30745,30749,30753,30757,30761],{"type":21,"tag":2072,"props":30746,"children":30747},{"style":3372},[30748],{"type":26,"value":3859},{"type":21,"tag":2072,"props":30750,"children":30751},{"style":2079},[30752],{"type":26,"value":3864},{"type":21,"tag":2072,"props":30754,"children":30755},{"style":3372},[30756],{"type":26,"value":3869},{"type":21,"tag":2072,"props":30758,"children":30759},{"style":2097},[30760],{"type":26,"value":3874},{"type":21,"tag":2072,"props":30762,"children":30763},{"style":2079},[30764],{"type":26,"value":26922},{"type":21,"tag":2072,"props":30766,"children":30767},{"class":2074,"line":288},[30768,30772,30776,30780],{"type":21,"tag":2072,"props":30769,"children":30770},{"style":2079},[30771],{"type":26,"value":30038},{"type":21,"tag":2072,"props":30773,"children":30774},{"style":3735},[30775],{"type":26,"value":14309},{"type":21,"tag":2072,"props":30777,"children":30778},{"style":3372},[30779],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30781,"children":30782},{"style":2079},[30783],{"type":26,"value":26943},{"type":21,"tag":2072,"props":30785,"children":30786},{"class":2074,"line":16},[30787,30791,30795,30799,30803],{"type":21,"tag":2072,"props":30788,"children":30789},{"style":3372},[30790],{"type":26,"value":3859},{"type":21,"tag":2072,"props":30792,"children":30793},{"style":2079},[30794],{"type":26,"value":30070},{"type":21,"tag":2072,"props":30796,"children":30797},{"style":3372},[30798],{"type":26,"value":3869},{"type":21,"tag":2072,"props":30800,"children":30801},{"style":2097},[30802],{"type":26,"value":3874},{"type":21,"tag":2072,"props":30804,"children":30805},{"style":2079},[30806],{"type":26,"value":30083},{"type":21,"tag":2072,"props":30808,"children":30809},{"class":2074,"line":366},[30810],{"type":21,"tag":2072,"props":30811,"children":30812},{"style":2079},[30813],{"type":26,"value":30091},{"type":21,"tag":2072,"props":30815,"children":30816},{"class":2074,"line":853},[30817],{"type":21,"tag":2072,"props":30818,"children":30819},{"style":2079},[30820],{"type":26,"value":30099},{"type":21,"tag":2072,"props":30822,"children":30823},{"class":2074,"line":3092},[30824,30828,30833,30837,30841,30845],{"type":21,"tag":2072,"props":30825,"children":30826},{"style":3372},[30827],{"type":26,"value":3701},{"type":21,"tag":2072,"props":30829,"children":30830},{"style":2079},[30831],{"type":26,"value":30832}," qml.sample(",{"type":21,"tag":2072,"props":30834,"children":30835},{"style":3735},[30836],{"type":26,"value":14309},{"type":21,"tag":2072,"props":30838,"children":30839},{"style":3372},[30840],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30842,"children":30843},{"style":2097},[30844],{"type":26,"value":4068},{"type":21,"tag":2072,"props":30846,"children":30847},{"style":2079},[30848],{"type":26,"value":14446},{"type":21,"tag":2072,"props":30850,"children":30851},{"class":2074,"line":3651},[30852],{"type":21,"tag":2072,"props":30853,"children":30854},{"emptyLinePlaceholder":3460},[30855],{"type":26,"value":3463},{"type":21,"tag":2072,"props":30857,"children":30858},{"class":2074,"line":2616},[30859,30864,30868,30873,30877,30881,30885],{"type":21,"tag":2072,"props":30860,"children":30861},{"style":2079},[30862],{"type":26,"value":30863},"samples ",{"type":21,"tag":2072,"props":30865,"children":30866},{"style":3372},[30867],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30869,"children":30870},{"style":2079},[30871],{"type":26,"value":30872}," sample_circuit(result.x, ",{"type":21,"tag":2072,"props":30874,"children":30875},{"style":3735},[30876],{"type":26,"value":3226},{"type":21,"tag":2072,"props":30878,"children":30879},{"style":3372},[30880],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30882,"children":30883},{"style":2097},[30884],{"type":26,"value":20641},{"type":21,"tag":2072,"props":30886,"children":30887},{"style":2079},[30888],{"type":26,"value":4281},{"type":21,"tag":2072,"props":30890,"children":30891},{"class":2074,"line":3695},[30892],{"type":21,"tag":2072,"props":30893,"children":30894},{"emptyLinePlaceholder":3460},[30895],{"type":26,"value":3463},{"type":21,"tag":2072,"props":30897,"children":30898},{"class":2074,"line":3709},[30899],{"type":21,"tag":2072,"props":30900,"children":30901},{"style":3985},[30902],{"type":26,"value":30903},"# Count cut values for each bitstring\n",{"type":21,"tag":2072,"props":30905,"children":30906},{"class":2074,"line":3717},[30907,30911,30916,30920],{"type":21,"tag":2072,"props":30908,"children":30909},{"style":3372},[30910],{"type":26,"value":3398},{"type":21,"tag":2072,"props":30912,"children":30913},{"style":2079},[30914],{"type":26,"value":30915}," collections ",{"type":21,"tag":2072,"props":30917,"children":30918},{"style":3372},[30919],{"type":26,"value":3375},{"type":21,"tag":2072,"props":30921,"children":30922},{"style":2079},[30923],{"type":26,"value":30924}," Counter\n",{"type":21,"tag":2072,"props":30926,"children":30927},{"class":2074,"line":3750},[30928,30933,30937],{"type":21,"tag":2072,"props":30929,"children":30930},{"style":2079},[30931],{"type":26,"value":30932},"cut_counts ",{"type":21,"tag":2072,"props":30934,"children":30935},{"style":3372},[30936],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30938,"children":30939},{"style":2079},[30940],{"type":26,"value":30941}," Counter()\n",{"type":21,"tag":2072,"props":30943,"children":30944},{"class":2074,"line":3769},[30945,30949,30954,30958],{"type":21,"tag":2072,"props":30946,"children":30947},{"style":3372},[30948],{"type":26,"value":4479},{"type":21,"tag":2072,"props":30950,"children":30951},{"style":2079},[30952],{"type":26,"value":30953}," bits ",{"type":21,"tag":2072,"props":30955,"children":30956},{"style":3372},[30957],{"type":26,"value":3869},{"type":21,"tag":2072,"props":30959,"children":30960},{"style":2079},[30961],{"type":26,"value":30962}," samples:\n",{"type":21,"tag":2072,"props":30964,"children":30965},{"class":2074,"line":3777},[30966,30971,30975,30980,30985,30990,30995,30999,31003,31007],{"type":21,"tag":2072,"props":30967,"children":30968},{"style":2079},[30969],{"type":26,"value":30970},"    key ",{"type":21,"tag":2072,"props":30972,"children":30973},{"style":3372},[30974],{"type":26,"value":3487},{"type":21,"tag":2072,"props":30976,"children":30977},{"style":2108},[30978],{"type":26,"value":30979}," ''",{"type":21,"tag":2072,"props":30981,"children":30982},{"style":2079},[30983],{"type":26,"value":30984},".join(",{"type":21,"tag":2072,"props":30986,"children":30987},{"style":2097},[30988],{"type":26,"value":30989},"str",{"type":21,"tag":2072,"props":30991,"children":30992},{"style":2079},[30993],{"type":26,"value":30994},"(b) ",{"type":21,"tag":2072,"props":30996,"children":30997},{"style":3372},[30998],{"type":26,"value":4479},{"type":21,"tag":2072,"props":31000,"children":31001},{"style":2079},[31002],{"type":26,"value":4030},{"type":21,"tag":2072,"props":31004,"children":31005},{"style":3372},[31006],{"type":26,"value":3869},{"type":21,"tag":2072,"props":31008,"children":31009},{"style":2079},[31010],{"type":26,"value":31011}," bits)\n",{"type":21,"tag":2072,"props":31013,"children":31014},{"class":2074,"line":3808},[31015,31020,31024,31028,31032,31036,31040,31044,31048,31052,31056,31060,31064],{"type":21,"tag":2072,"props":31016,"children":31017},{"style":2079},[31018],{"type":26,"value":31019},"    cut ",{"type":21,"tag":2072,"props":31021,"children":31022},{"style":3372},[31023],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31025,"children":31026},{"style":2097},[31027],{"type":26,"value":5449},{"type":21,"tag":2072,"props":31029,"children":31030},{"style":2079},[31031],{"type":26,"value":3879},{"type":21,"tag":2072,"props":31033,"children":31034},{"style":2097},[31035],{"type":26,"value":3555},{"type":21,"tag":2072,"props":31037,"children":31038},{"style":3372},[31039],{"type":26,"value":30307},{"type":21,"tag":2072,"props":31041,"children":31042},{"style":2079},[31043],{"type":26,"value":29748},{"type":21,"tag":2072,"props":31045,"children":31046},{"style":3372},[31047],{"type":26,"value":3869},{"type":21,"tag":2072,"props":31049,"children":31050},{"style":2079},[31051],{"type":26,"value":30320},{"type":21,"tag":2072,"props":31053,"children":31054},{"style":3372},[31055],{"type":26,"value":30325},{"type":21,"tag":2072,"props":31057,"children":31058},{"style":2079},[31059],{"type":26,"value":30330},{"type":21,"tag":2072,"props":31061,"children":31062},{"style":3372},[31063],{"type":26,"value":30335},{"type":21,"tag":2072,"props":31065,"children":31066},{"style":2079},[31067],{"type":26,"value":30340},{"type":21,"tag":2072,"props":31069,"children":31070},{"class":2074,"line":3853},[31071,31076,31080],{"type":21,"tag":2072,"props":31072,"children":31073},{"style":2079},[31074],{"type":26,"value":31075},"    cut_counts[(key, cut)] ",{"type":21,"tag":2072,"props":31077,"children":31078},{"style":3372},[31079],{"type":26,"value":30353},{"type":21,"tag":2072,"props":31081,"children":31082},{"style":2097},[31083],{"type":26,"value":12854},{"type":21,"tag":2072,"props":31085,"children":31086},{"class":2074,"line":3895},[31087],{"type":21,"tag":2072,"props":31088,"children":31089},{"emptyLinePlaceholder":3460},[31090],{"type":26,"value":3463},{"type":21,"tag":2072,"props":31092,"children":31093},{"class":2074,"line":3913},[31094],{"type":21,"tag":2072,"props":31095,"children":31096},{"style":3985},[31097],{"type":26,"value":31098},"# Show top 5 most frequent bitstrings\n",{"type":21,"tag":2072,"props":31100,"children":31101},{"class":2074,"line":3991},[31102,31106,31111,31115,31119,31124,31128,31132,31137,31141,31146,31150,31154,31158],{"type":21,"tag":2072,"props":31103,"children":31104},{"style":3372},[31105],{"type":26,"value":4479},{"type":21,"tag":2072,"props":31107,"children":31108},{"style":2079},[31109],{"type":26,"value":31110}," (bits, cut), count ",{"type":21,"tag":2072,"props":31112,"children":31113},{"style":3372},[31114],{"type":26,"value":3869},{"type":21,"tag":2072,"props":31116,"children":31117},{"style":2097},[31118],{"type":26,"value":17195},{"type":21,"tag":2072,"props":31120,"children":31121},{"style":2079},[31122],{"type":26,"value":31123},"(cut_counts.items(), ",{"type":21,"tag":2072,"props":31125,"children":31126},{"style":3735},[31127],{"type":26,"value":10631},{"type":21,"tag":2072,"props":31129,"children":31130},{"style":3372},[31131],{"type":26,"value":10636},{"type":21,"tag":2072,"props":31133,"children":31134},{"style":2079},[31135],{"type":26,"value":31136}," x: ",{"type":21,"tag":2072,"props":31138,"children":31139},{"style":3372},[31140],{"type":26,"value":3973},{"type":21,"tag":2072,"props":31142,"children":31143},{"style":2079},[31144],{"type":26,"value":31145},"x[",{"type":21,"tag":2072,"props":31147,"children":31148},{"style":2097},[31149],{"type":26,"value":3555},{"type":21,"tag":2072,"props":31151,"children":31152},{"style":2079},[31153],{"type":26,"value":17634},{"type":21,"tag":2072,"props":31155,"children":31156},{"style":2097},[31157],{"type":26,"value":5812},{"type":21,"tag":2072,"props":31159,"children":31160},{"style":2079},[31161],{"type":26,"value":17643},{"type":21,"tag":2072,"props":31163,"children":31164},{"class":2074,"line":4019},[31165,31169,31173,31177,31181,31185,31189,31193,31198,31202,31207,31211,31216,31220,31225,31229,31233,31238,31242,31247],{"type":21,"tag":2072,"props":31166,"children":31167},{"style":2097},[31168],{"type":26,"value":17282},{"type":21,"tag":2072,"props":31170,"children":31171},{"style":2079},[31172],{"type":26,"value":3879},{"type":21,"tag":2072,"props":31174,"children":31175},{"style":3372},[31176],{"type":26,"value":3938},{"type":21,"tag":2072,"props":31178,"children":31179},{"style":2108},[31180],{"type":26,"value":7539},{"type":21,"tag":2072,"props":31182,"children":31183},{"style":2097},[31184],{"type":26,"value":3948},{"type":21,"tag":2072,"props":31186,"children":31187},{"style":2079},[31188],{"type":26,"value":17303},{"type":21,"tag":2072,"props":31190,"children":31191},{"style":2097},[31192],{"type":26,"value":3958},{"type":21,"tag":2072,"props":31194,"children":31195},{"style":2108},[31196],{"type":26,"value":31197},"  cut=",{"type":21,"tag":2072,"props":31199,"children":31200},{"style":2097},[31201],{"type":26,"value":3948},{"type":21,"tag":2072,"props":31203,"children":31204},{"style":2079},[31205],{"type":26,"value":31206},"cut",{"type":21,"tag":2072,"props":31208,"children":31209},{"style":2097},[31210],{"type":26,"value":3958},{"type":21,"tag":2072,"props":31212,"children":31213},{"style":2108},[31214],{"type":26,"value":31215},"  frequency=",{"type":21,"tag":2072,"props":31217,"children":31218},{"style":2097},[31219],{"type":26,"value":3948},{"type":21,"tag":2072,"props":31221,"children":31222},{"style":2079},[31223],{"type":26,"value":31224},"count",{"type":21,"tag":2072,"props":31226,"children":31227},{"style":3372},[31228],{"type":26,"value":1926},{"type":21,"tag":2072,"props":31230,"children":31231},{"style":2097},[31232],{"type":26,"value":20697},{"type":21,"tag":2072,"props":31234,"children":31235},{"style":3372},[31236],{"type":26,"value":31237},":.1f",{"type":21,"tag":2072,"props":31239,"children":31240},{"style":2097},[31241],{"type":26,"value":3958},{"type":21,"tag":2072,"props":31243,"children":31244},{"style":2108},[31245],{"type":26,"value":31246},"%\"",{"type":21,"tag":2072,"props":31248,"children":31249},{"style":2079},[31250],{"type":26,"value":4281},{"type":21,"tag":22,"props":31252,"children":31253},{},[31254],{"type":26,"value":31255},"Expected output:",{"type":21,"tag":2062,"props":31257,"children":31259},{"code":31258},"0101  cut=4  frequency=28.3%\n1010  cut=4  frequency=27.1%\n0110  cut=3  frequency=8.4%\n...\n",[31260],{"type":21,"tag":1831,"props":31261,"children":31262},{"__ignoreMap":7},[31263],{"type":26,"value":31258},{"type":21,"tag":22,"props":31265,"children":31266},{},[31267,31269,31274,31275,31280],{"type":26,"value":31268},"The optimal solutions (",{"type":21,"tag":1831,"props":31270,"children":31272},{"className":31271},[],[31273],{"type":26,"value":29374},{"type":26,"value":383},{"type":21,"tag":1831,"props":31276,"children":31278},{"className":31277},[],[31279],{"type":26,"value":17488},{"type":26,"value":31281},") dominate. QAOA amplified their probability.",{"type":21,"tag":43,"props":31283,"children":31285},{"id":31284},"the-same-problem-with-hlquantum",[31286],{"type":26,"value":31287},"The Same Problem with HLQuantum",{"type":21,"tag":22,"props":31289,"children":31290},{},[31291],{"type":26,"value":31292},"HLQuantum's built-in QAOA lets you skip the circuit construction entirely:",{"type":21,"tag":2062,"props":31294,"children":31296},{"code":31295,"language":3361,"meta":7,"className":3362,"style":7},"import hlquantum as hlq\n\ngraph = [(0, 1), (1, 2), (2, 3), (3, 0)]\n\nresult = hlq.algorithms.qaoa(\n    graph=graph,\n    problem='max_cut',\n    p=2,\n    backend='pennylane',\n    shots=2000,\n)\n\nprint(result.best_solution)   # '0101' or '1010'\nprint(result.cut_value)       # 4\nprint(result.approximation_ratio)  # ~0.96 for p=2\n",[31297],{"type":21,"tag":1831,"props":31298,"children":31299},{"__ignoreMap":7},[31300,31319,31326,31406,31413,31429,31446,31467,31487,31506,31526,31533,31540,31557,31574],{"type":21,"tag":2072,"props":31301,"children":31302},{"class":2074,"line":2075},[31303,31307,31311,31315],{"type":21,"tag":2072,"props":31304,"children":31305},{"style":3372},[31306],{"type":26,"value":3375},{"type":21,"tag":2072,"props":31308,"children":31309},{"style":2079},[31310],{"type":26,"value":19439},{"type":21,"tag":2072,"props":31312,"children":31313},{"style":3372},[31314],{"type":26,"value":3385},{"type":21,"tag":2072,"props":31316,"children":31317},{"style":2079},[31318],{"type":26,"value":19448},{"type":21,"tag":2072,"props":31320,"children":31321},{"class":2074,"line":164},[31322],{"type":21,"tag":2072,"props":31323,"children":31324},{"emptyLinePlaceholder":3460},[31325],{"type":26,"value":3463},{"type":21,"tag":2072,"props":31327,"children":31328},{"class":2074,"line":2093},[31329,31334,31338,31342,31346,31350,31354,31358,31362,31366,31370,31374,31378,31382,31386,31390,31394,31398,31402],{"type":21,"tag":2072,"props":31330,"children":31331},{"style":2079},[31332],{"type":26,"value":31333},"graph ",{"type":21,"tag":2072,"props":31335,"children":31336},{"style":3372},[31337],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31339,"children":31340},{"style":2079},[31341],{"type":26,"value":29581},{"type":21,"tag":2072,"props":31343,"children":31344},{"style":2097},[31345],{"type":26,"value":4295},{"type":21,"tag":2072,"props":31347,"children":31348},{"style":2079},[31349],{"type":26,"value":798},{"type":21,"tag":2072,"props":31351,"children":31352},{"style":2097},[31353],{"type":26,"value":3555},{"type":21,"tag":2072,"props":31355,"children":31356},{"style":2079},[31357],{"type":26,"value":29598},{"type":21,"tag":2072,"props":31359,"children":31360},{"style":2097},[31361],{"type":26,"value":3555},{"type":21,"tag":2072,"props":31363,"children":31364},{"style":2079},[31365],{"type":26,"value":798},{"type":21,"tag":2072,"props":31367,"children":31368},{"style":2097},[31369],{"type":26,"value":2170},{"type":21,"tag":2072,"props":31371,"children":31372},{"style":2079},[31373],{"type":26,"value":29598},{"type":21,"tag":2072,"props":31375,"children":31376},{"style":2097},[31377],{"type":26,"value":2170},{"type":21,"tag":2072,"props":31379,"children":31380},{"style":2079},[31381],{"type":26,"value":798},{"type":21,"tag":2072,"props":31383,"children":31384},{"style":2097},[31385],{"type":26,"value":5641},{"type":21,"tag":2072,"props":31387,"children":31388},{"style":2079},[31389],{"type":26,"value":29598},{"type":21,"tag":2072,"props":31391,"children":31392},{"style":2097},[31393],{"type":26,"value":5641},{"type":21,"tag":2072,"props":31395,"children":31396},{"style":2079},[31397],{"type":26,"value":798},{"type":21,"tag":2072,"props":31399,"children":31400},{"style":2097},[31401],{"type":26,"value":4295},{"type":21,"tag":2072,"props":31403,"children":31404},{"style":2079},[31405],{"type":26,"value":29647},{"type":21,"tag":2072,"props":31407,"children":31408},{"class":2074,"line":2155},[31409],{"type":21,"tag":2072,"props":31410,"children":31411},{"emptyLinePlaceholder":3460},[31412],{"type":26,"value":3463},{"type":21,"tag":2072,"props":31414,"children":31415},{"class":2074,"line":2178},[31416,31420,31424],{"type":21,"tag":2072,"props":31417,"children":31418},{"style":2079},[31419],{"type":26,"value":19471},{"type":21,"tag":2072,"props":31421,"children":31422},{"style":3372},[31423],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31425,"children":31426},{"style":2079},[31427],{"type":26,"value":31428}," hlq.algorithms.qaoa(\n",{"type":21,"tag":2072,"props":31430,"children":31431},{"class":2074,"line":288},[31432,31437,31441],{"type":21,"tag":2072,"props":31433,"children":31434},{"style":3735},[31435],{"type":26,"value":31436},"    graph",{"type":21,"tag":2072,"props":31438,"children":31439},{"style":3372},[31440],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31442,"children":31443},{"style":2079},[31444],{"type":26,"value":31445},"graph,\n",{"type":21,"tag":2072,"props":31447,"children":31448},{"class":2074,"line":16},[31449,31454,31458,31463],{"type":21,"tag":2072,"props":31450,"children":31451},{"style":3735},[31452],{"type":26,"value":31453},"    problem",{"type":21,"tag":2072,"props":31455,"children":31456},{"style":3372},[31457],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31459,"children":31460},{"style":2108},[31461],{"type":26,"value":31462},"'max_cut'",{"type":21,"tag":2072,"props":31464,"children":31465},{"style":2079},[31466],{"type":26,"value":2175},{"type":21,"tag":2072,"props":31468,"children":31469},{"class":2074,"line":366},[31470,31475,31479,31483],{"type":21,"tag":2072,"props":31471,"children":31472},{"style":3735},[31473],{"type":26,"value":31474},"    p",{"type":21,"tag":2072,"props":31476,"children":31477},{"style":3372},[31478],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31480,"children":31481},{"style":2097},[31482],{"type":26,"value":2170},{"type":21,"tag":2072,"props":31484,"children":31485},{"style":2079},[31486],{"type":26,"value":2175},{"type":21,"tag":2072,"props":31488,"children":31489},{"class":2074,"line":853},[31490,31494,31498,31502],{"type":21,"tag":2072,"props":31491,"children":31492},{"style":3735},[31493],{"type":26,"value":23119},{"type":21,"tag":2072,"props":31495,"children":31496},{"style":3372},[31497],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31499,"children":31500},{"style":2108},[31501],{"type":26,"value":22429},{"type":21,"tag":2072,"props":31503,"children":31504},{"style":2079},[31505],{"type":26,"value":2175},{"type":21,"tag":2072,"props":31507,"children":31508},{"class":2074,"line":3092},[31509,31513,31517,31522],{"type":21,"tag":2072,"props":31510,"children":31511},{"style":3735},[31512],{"type":26,"value":29212},{"type":21,"tag":2072,"props":31514,"children":31515},{"style":3372},[31516],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31518,"children":31519},{"style":2097},[31520],{"type":26,"value":31521},"2000",{"type":21,"tag":2072,"props":31523,"children":31524},{"style":2079},[31525],{"type":26,"value":2175},{"type":21,"tag":2072,"props":31527,"children":31528},{"class":2074,"line":3651},[31529],{"type":21,"tag":2072,"props":31530,"children":31531},{"style":2079},[31532],{"type":26,"value":4281},{"type":21,"tag":2072,"props":31534,"children":31535},{"class":2074,"line":2616},[31536],{"type":21,"tag":2072,"props":31537,"children":31538},{"emptyLinePlaceholder":3460},[31539],{"type":26,"value":3463},{"type":21,"tag":2072,"props":31541,"children":31542},{"class":2074,"line":3695},[31543,31547,31552],{"type":21,"tag":2072,"props":31544,"children":31545},{"style":2097},[31546],{"type":26,"value":4614},{"type":21,"tag":2072,"props":31548,"children":31549},{"style":2079},[31550],{"type":26,"value":31551},"(result.best_solution)   ",{"type":21,"tag":2072,"props":31553,"children":31554},{"style":3985},[31555],{"type":26,"value":31556},"# '0101' or '1010'\n",{"type":21,"tag":2072,"props":31558,"children":31559},{"class":2074,"line":3709},[31560,31564,31569],{"type":21,"tag":2072,"props":31561,"children":31562},{"style":2097},[31563],{"type":26,"value":4614},{"type":21,"tag":2072,"props":31565,"children":31566},{"style":2079},[31567],{"type":26,"value":31568},"(result.cut_value)       ",{"type":21,"tag":2072,"props":31570,"children":31571},{"style":3985},[31572],{"type":26,"value":31573},"# 4\n",{"type":21,"tag":2072,"props":31575,"children":31576},{"class":2074,"line":3717},[31577,31581,31586],{"type":21,"tag":2072,"props":31578,"children":31579},{"style":2097},[31580],{"type":26,"value":4614},{"type":21,"tag":2072,"props":31582,"children":31583},{"style":2079},[31584],{"type":26,"value":31585},"(result.approximation_ratio)  ",{"type":21,"tag":2072,"props":31587,"children":31588},{"style":3985},[31589],{"type":26,"value":31590},"# ~0.96 for p=2\n",{"type":21,"tag":22,"props":31592,"children":31593},{},[31594],{"type":26,"value":31595},"Switch backends with a single flag:",{"type":21,"tag":2062,"props":31597,"children":31599},{"code":31598,"language":3361,"meta":7,"className":3362,"style":7},"# Run on Qiskit Aer\nresult_qiskit = hlq.algorithms.qaoa(graph=graph, problem='max_cut', p=2, backend='qiskit')\n\n# Run on real IonQ hardware (if you have credits)\nresult_ionq = hlq.algorithms.qaoa(graph=graph, problem='max_cut', p=2,\n                                   backend='ionq', device='aria-1')\n",[31600],{"type":21,"tag":1831,"props":31601,"children":31602},{"__ignoreMap":7},[31603,31611,31690,31697,31705,31765],{"type":21,"tag":2072,"props":31604,"children":31605},{"class":2074,"line":2075},[31606],{"type":21,"tag":2072,"props":31607,"children":31608},{"style":3985},[31609],{"type":26,"value":31610},"# Run on Qiskit Aer\n",{"type":21,"tag":2072,"props":31612,"children":31613},{"class":2074,"line":164},[31614,31618,31622,31627,31632,31636,31641,31646,31650,31654,31658,31662,31666,31670,31674,31678,31682,31686],{"type":21,"tag":2072,"props":31615,"children":31616},{"style":2079},[31617],{"type":26,"value":21870},{"type":21,"tag":2072,"props":31619,"children":31620},{"style":3372},[31621],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31623,"children":31624},{"style":2079},[31625],{"type":26,"value":31626}," hlq.algorithms.qaoa(",{"type":21,"tag":2072,"props":31628,"children":31629},{"style":3735},[31630],{"type":26,"value":31631},"graph",{"type":21,"tag":2072,"props":31633,"children":31634},{"style":3372},[31635],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31637,"children":31638},{"style":2079},[31639],{"type":26,"value":31640},"graph, ",{"type":21,"tag":2072,"props":31642,"children":31643},{"style":3735},[31644],{"type":26,"value":31645},"problem",{"type":21,"tag":2072,"props":31647,"children":31648},{"style":3372},[31649],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31651,"children":31652},{"style":2108},[31653],{"type":26,"value":31462},{"type":21,"tag":2072,"props":31655,"children":31656},{"style":2079},[31657],{"type":26,"value":798},{"type":21,"tag":2072,"props":31659,"children":31660},{"style":3735},[31661],{"type":26,"value":22},{"type":21,"tag":2072,"props":31663,"children":31664},{"style":3372},[31665],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31667,"children":31668},{"style":2097},[31669],{"type":26,"value":2170},{"type":21,"tag":2072,"props":31671,"children":31672},{"style":2079},[31673],{"type":26,"value":798},{"type":21,"tag":2072,"props":31675,"children":31676},{"style":3735},[31677],{"type":26,"value":18550},{"type":21,"tag":2072,"props":31679,"children":31680},{"style":3372},[31681],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31683,"children":31684},{"style":2108},[31685],{"type":26,"value":19529},{"type":21,"tag":2072,"props":31687,"children":31688},{"style":2079},[31689],{"type":26,"value":4281},{"type":21,"tag":2072,"props":31691,"children":31692},{"class":2074,"line":2093},[31693],{"type":21,"tag":2072,"props":31694,"children":31695},{"emptyLinePlaceholder":3460},[31696],{"type":26,"value":3463},{"type":21,"tag":2072,"props":31698,"children":31699},{"class":2074,"line":2155},[31700],{"type":21,"tag":2072,"props":31701,"children":31702},{"style":3985},[31703],{"type":26,"value":31704},"# Run on real IonQ hardware (if you have credits)\n",{"type":21,"tag":2072,"props":31706,"children":31707},{"class":2074,"line":2178},[31708,31713,31717,31721,31725,31729,31733,31737,31741,31745,31749,31753,31757,31761],{"type":21,"tag":2072,"props":31709,"children":31710},{"style":2079},[31711],{"type":26,"value":31712},"result_ionq ",{"type":21,"tag":2072,"props":31714,"children":31715},{"style":3372},[31716],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31718,"children":31719},{"style":2079},[31720],{"type":26,"value":31626},{"type":21,"tag":2072,"props":31722,"children":31723},{"style":3735},[31724],{"type":26,"value":31631},{"type":21,"tag":2072,"props":31726,"children":31727},{"style":3372},[31728],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31730,"children":31731},{"style":2079},[31732],{"type":26,"value":31640},{"type":21,"tag":2072,"props":31734,"children":31735},{"style":3735},[31736],{"type":26,"value":31645},{"type":21,"tag":2072,"props":31738,"children":31739},{"style":3372},[31740],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31742,"children":31743},{"style":2108},[31744],{"type":26,"value":31462},{"type":21,"tag":2072,"props":31746,"children":31747},{"style":2079},[31748],{"type":26,"value":798},{"type":21,"tag":2072,"props":31750,"children":31751},{"style":3735},[31752],{"type":26,"value":22},{"type":21,"tag":2072,"props":31754,"children":31755},{"style":3372},[31756],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31758,"children":31759},{"style":2097},[31760],{"type":26,"value":2170},{"type":21,"tag":2072,"props":31762,"children":31763},{"style":2079},[31764],{"type":26,"value":2175},{"type":21,"tag":2072,"props":31766,"children":31767},{"class":2074,"line":288},[31768,31773,31777,31781,31785,31789,31793,31797],{"type":21,"tag":2072,"props":31769,"children":31770},{"style":3735},[31771],{"type":26,"value":31772},"                                   backend",{"type":21,"tag":2072,"props":31774,"children":31775},{"style":3372},[31776],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31778,"children":31779},{"style":2108},[31780],{"type":26,"value":22533},{"type":21,"tag":2072,"props":31782,"children":31783},{"style":2079},[31784],{"type":26,"value":798},{"type":21,"tag":2072,"props":31786,"children":31787},{"style":3735},[31788],{"type":26,"value":22542},{"type":21,"tag":2072,"props":31790,"children":31791},{"style":3372},[31792],{"type":26,"value":3487},{"type":21,"tag":2072,"props":31794,"children":31795},{"style":2108},[31796],{"type":26,"value":22551},{"type":21,"tag":2072,"props":31798,"children":31799},{"style":2079},[31800],{"type":26,"value":4281},{"type":21,"tag":43,"props":31802,"children":31804},{"id":31803},"increasing-p-for-better-results",[31805],{"type":26,"value":31806},"Increasing p for Better Results",{"type":21,"tag":22,"props":31808,"children":31809},{},[31810,31812,31817,31819,31825],{"type":26,"value":31811},"The QAOA approximation ratio improves with depth ",{"type":21,"tag":1831,"props":31813,"children":31815},{"className":31814},[],[31816],{"type":26,"value":22},{"type":26,"value":31818},". At ",{"type":21,"tag":1831,"props":31820,"children":31822},{"className":31821},[],[31823],{"type":26,"value":31824},"p→∞",{"type":26,"value":31826},", QAOA solves the problem exactly. In practice:",{"type":21,"tag":3169,"props":31828,"children":31829},{},[31830,31850],{"type":21,"tag":3173,"props":31831,"children":31832},{},[31833],{"type":21,"tag":3177,"props":31834,"children":31835},{},[31836,31840,31845],{"type":21,"tag":3181,"props":31837,"children":31838},{},[31839],{"type":26,"value":22},{"type":21,"tag":3181,"props":31841,"children":31842},{},[31843],{"type":26,"value":31844},"Typical approx. ratio (Max-Cut)",{"type":21,"tag":3181,"props":31846,"children":31847},{},[31848],{"type":26,"value":31849},"Gates required",{"type":21,"tag":3195,"props":31851,"children":31852},{},[31853,31870,31887,31904],{"type":21,"tag":3177,"props":31854,"children":31855},{},[31856,31860,31865],{"type":21,"tag":3202,"props":31857,"children":31858},{},[31859],{"type":26,"value":3555},{"type":21,"tag":3202,"props":31861,"children":31862},{},[31863],{"type":26,"value":31864},"~0.75",{"type":21,"tag":3202,"props":31866,"children":31867},{},[31868],{"type":26,"value":31869},"2×edges + 4n",{"type":21,"tag":3177,"props":31871,"children":31872},{},[31873,31877,31882],{"type":21,"tag":3202,"props":31874,"children":31875},{},[31876],{"type":26,"value":2170},{"type":21,"tag":3202,"props":31878,"children":31879},{},[31880],{"type":26,"value":31881},"~0.86",{"type":21,"tag":3202,"props":31883,"children":31884},{},[31885],{"type":26,"value":31886},"4×edges + 8n",{"type":21,"tag":3177,"props":31888,"children":31889},{},[31890,31894,31899],{"type":21,"tag":3202,"props":31891,"children":31892},{},[31893],{"type":26,"value":5641},{"type":21,"tag":3202,"props":31895,"children":31896},{},[31897],{"type":26,"value":31898},"~0.91",{"type":21,"tag":3202,"props":31900,"children":31901},{},[31902],{"type":26,"value":31903},"6×edges + 12n",{"type":21,"tag":3177,"props":31905,"children":31906},{},[31907,31911,31916],{"type":21,"tag":3202,"props":31908,"children":31909},{},[31910],{"type":26,"value":5812},{"type":21,"tag":3202,"props":31912,"children":31913},{},[31914],{"type":26,"value":31915},"~0.95",{"type":21,"tag":3202,"props":31917,"children":31918},{},[31919],{"type":26,"value":31920},"10×edges + 20n",{"type":21,"tag":22,"props":31922,"children":31923},{},[31924,31926,31932,31934,31939,31940,31946,31948,31953,31955,31960],{"type":26,"value":31925},"The tradeoff: deeper circuits accumulate more noise on real hardware. On simulators, use ",{"type":21,"tag":1831,"props":31927,"children":31929},{"className":31928},[],[31930],{"type":26,"value":31931},"p=3",{"type":26,"value":31933}," or higher. On NISQ QPUs, ",{"type":21,"tag":1831,"props":31935,"children":31937},{"className":31936},[],[31938],{"type":26,"value":19680},{"type":26,"value":18910},{"type":21,"tag":1831,"props":31941,"children":31943},{"className":31942},[],[31944],{"type":26,"value":31945},"p=2",{"type":26,"value":31947}," is usually the practical limit. Depth also makes optimization harder: at large ",{"type":21,"tag":1831,"props":31949,"children":31951},{"className":31950},[],[31952],{"type":26,"value":22},{"type":26,"value":31954}," with random initialization, QAOA sometimes hits ",{"type":21,"tag":29,"props":31956,"children":31957},{"href":14007},[31958],{"type":26,"value":31959},"barren plateaus",{"type":26,"value":31961}," where the cost landscape flattens out.",{"type":21,"tag":43,"props":31963,"children":31965},{"id":31964},"when-is-qaoa-worth-using",[31966],{"type":26,"value":31967},"When is QAOA Worth Using?",{"type":21,"tag":22,"props":31969,"children":31970},{},[31971],{"type":21,"tag":784,"props":31972,"children":31973},{},[31974],{"type":26,"value":31975},"Currently useful for:",{"type":21,"tag":7925,"props":31977,"children":31978},{},[31979,31984,31989],{"type":21,"tag":6142,"props":31980,"children":31981},{},[31982],{"type":26,"value":31983},"Benchmarking NISQ devices (QAOA is a standard benchmark circuit)",{"type":21,"tag":6142,"props":31985,"children":31986},{},[31987],{"type":26,"value":31988},"Academic research on variational quantum algorithms",{"type":21,"tag":6142,"props":31990,"children":31991},{},[31992],{"type":26,"value":31993},"Small graphs (under 20 nodes) on simulators",{"type":21,"tag":22,"props":31995,"children":31996},{},[31997],{"type":21,"tag":784,"props":31998,"children":31999},{},[32000],{"type":26,"value":32001},"Not yet useful for:",{"type":21,"tag":7925,"props":32003,"children":32004},{},[32005,32010],{"type":21,"tag":6142,"props":32006,"children":32007},{},[32008],{"type":26,"value":32009},"Production optimization on real hardware at scale: classical heuristics (simulated annealing, tabu search) still outperform QAOA on practical problems",{"type":21,"tag":6142,"props":32011,"children":32012},{},[32013],{"type":26,"value":32014},"Large graphs: circuit depth scales with graph density",{"type":21,"tag":22,"props":32016,"children":32017},{},[32018,32023,32025,32030],{"type":21,"tag":784,"props":32019,"children":32020},{},[32021],{"type":26,"value":32022},"The promise:",{"type":26,"value":32024}," On future fault-tolerant hardware with high-depth circuits, QAOA at large ",{"type":21,"tag":1831,"props":32026,"children":32028},{"className":32027},[],[32029],{"type":26,"value":22},{"type":26,"value":32031}," is expected to provide genuine speedups for dense NP-hard optimization. The theoretical foundations are solid. The hardware isn't there yet.",{"type":21,"tag":43,"props":32033,"children":32034},{"id":7920},[32035],{"type":26,"value":7923},{"type":21,"tag":7925,"props":32037,"children":32038},{},[32039,32051,32064,32077,32090],{"type":21,"tag":6142,"props":32040,"children":32041},{},[32042,32049],{"type":21,"tag":784,"props":32043,"children":32044},{},[32045],{"type":21,"tag":29,"props":32046,"children":32047},{"href":14130},[32048],{"type":26,"value":15674},{"type":26,"value":32050},": set up PennyLane for more variational algorithms",{"type":21,"tag":6142,"props":32052,"children":32053},{},[32054,32062],{"type":21,"tag":784,"props":32055,"children":32056},{},[32057],{"type":21,"tag":29,"props":32058,"children":32059},{"href":31},[32060],{"type":26,"value":32061},"VQE guide",{"type":26,"value":32063},": the sister algorithm for quantum chemistry",{"type":21,"tag":6142,"props":32065,"children":32066},{},[32067,32075],{"type":21,"tag":784,"props":32068,"children":32069},{},[32070],{"type":21,"tag":29,"props":32071,"children":32072},{"href":6276},[32073],{"type":26,"value":32074},"Grover's algorithm tutorial",{"type":26,"value":32076},": the other classic approach to search and optimization problems",{"type":21,"tag":6142,"props":32078,"children":32079},{},[32080,32088],{"type":21,"tag":784,"props":32081,"children":32082},{},[32083],{"type":21,"tag":29,"props":32084,"children":32085},{"href":6211},[32086],{"type":26,"value":32087},"Cutting your shot count",{"type":26,"value":32089},": make the optimization loop cheaper on real QPUs",{"type":21,"tag":6142,"props":32091,"children":32092},{},[32093,32100],{"type":21,"tag":784,"props":32094,"children":32095},{},[32096],{"type":21,"tag":29,"props":32097,"children":32098},{"href":19124},[32099],{"type":26,"value":19127},{"type":26,"value":32101},": run QAOA on any backend with one API",{"type":21,"tag":2445,"props":32103,"children":32104},{},[32105],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":32107},[32108,32109,32110,32111,32112,32113,32114,32115],{"id":29342,"depth":164,"text":29345},{"id":29385,"depth":164,"text":29388},{"id":29480,"depth":164,"text":29483},{"id":30644,"depth":164,"text":30647},{"id":31284,"depth":164,"text":31287},{"id":31803,"depth":164,"text":31806},{"id":31964,"depth":164,"text":31967},{"id":7920,"depth":164,"text":7923},"content:blog:qaoa-max-cut-tutorial.md","blog\u002Fqaoa-max-cut-tutorial.md","blog\u002Fqaoa-max-cut-tutorial",{"_path":21160,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":32120,"description":32121,"date":32122,"author":11,"tags":32123,"readingTime":16,"body":32125,"_type":171,"_id":34165,"_source":173,"_file":34166,"_stem":34167,"_extension":176},"Free Quantum Simulators Compared: Qiskit Aer vs Cirq vs PennyLane vs CUDA-Q","A practical comparison of the major free quantum simulators: performance, qubit limits, GPU support, and when to use each one.","2026-02-10",[20339,3091,32124],"GPU",{"type":18,"children":32126,"toc":34156},[32127,32139,32145,32328,32334,32343,32396,32566,32576,32582,32598,32925,32945,32968,33016,33037,33043,33052,33289,33299,33317,33327,33333,33342,33518,33533,33551,33557,33568,33781,33791,33797,33808,34136,34141,34152],{"type":21,"tag":22,"props":32128,"children":32129},{},[32130,32132,32138],{"type":26,"value":32131},"Quantum simulators let you test circuits without waiting in hardware queues or paying per shot. But with six major simulators available for free, which should you use? Here's a practical breakdown. (For a broader roundup, see our ",{"type":21,"tag":29,"props":32133,"children":32135},{"href":32134},"\u002Fguides\u002Fbest-free-quantum-simulators-2026",[32136],{"type":26,"value":32137},"best free quantum simulators guide",{"type":26,"value":27461},{"type":21,"tag":43,"props":32140,"children":32142},{"id":32141},"the-quick-answer",[32143],{"type":26,"value":32144},"The Quick Answer",{"type":21,"tag":3169,"props":32146,"children":32147},{},[32148,32173],{"type":21,"tag":3173,"props":32149,"children":32150},{},[32151],{"type":21,"tag":3177,"props":32152,"children":32153},{},[32154,32159,32163,32168],{"type":21,"tag":3181,"props":32155,"children":32156},{},[32157],{"type":26,"value":32158},"Simulator",{"type":21,"tag":3181,"props":32160,"children":32161},{},[32162],{"type":26,"value":20980},{"type":21,"tag":3181,"props":32164,"children":32165},{},[32166],{"type":26,"value":32167},"Max qubits (CPU)",{"type":21,"tag":3181,"props":32169,"children":32170},{},[32171],{"type":26,"value":32172},"GPU?",{"type":21,"tag":3195,"props":32174,"children":32175},{},[32176,32202,32228,32254,32279,32304],{"type":21,"tag":3177,"props":32177,"children":32178},{},[32179,32187,32192,32197],{"type":21,"tag":3202,"props":32180,"children":32181},{},[32182],{"type":21,"tag":784,"props":32183,"children":32184},{},[32185],{"type":26,"value":32186},"Qiskit Aer",{"type":21,"tag":3202,"props":32188,"children":32189},{},[32190],{"type":26,"value":32191},"General purpose",{"type":21,"tag":3202,"props":32193,"children":32194},{},[32195],{"type":26,"value":32196},"~30 (statevector)",{"type":21,"tag":3202,"props":32198,"children":32199},{},[32200],{"type":26,"value":32201},"✅ AerCuda",{"type":21,"tag":3177,"props":32203,"children":32204},{},[32205,32213,32218,32223],{"type":21,"tag":3202,"props":32206,"children":32207},{},[32208],{"type":21,"tag":784,"props":32209,"children":32210},{},[32211],{"type":26,"value":32212},"Cirq Simulator",{"type":21,"tag":3202,"props":32214,"children":32215},{},[32216],{"type":26,"value":32217},"Cirq circuits, density matrix",{"type":21,"tag":3202,"props":32219,"children":32220},{},[32221],{"type":26,"value":32222},"~25",{"type":21,"tag":3202,"props":32224,"children":32225},{},[32226],{"type":26,"value":32227},"❌",{"type":21,"tag":3177,"props":32229,"children":32230},{},[32231,32239,32244,32249],{"type":21,"tag":3202,"props":32232,"children":32233},{},[32234],{"type":21,"tag":784,"props":32235,"children":32236},{},[32237],{"type":26,"value":32238},"PennyLane default.qubit",{"type":21,"tag":3202,"props":32240,"children":32241},{},[32242],{"type":26,"value":32243},"QML, gradients",{"type":21,"tag":3202,"props":32245,"children":32246},{},[32247],{"type":26,"value":32248},"~20",{"type":21,"tag":3202,"props":32250,"children":32251},{},[32252],{"type":26,"value":32253},"✅ lightning.gpu",{"type":21,"tag":3177,"props":32255,"children":32256},{},[32257,32265,32270,32275],{"type":21,"tag":3202,"props":32258,"children":32259},{},[32260],{"type":21,"tag":784,"props":32261,"children":32262},{},[32263],{"type":26,"value":32264},"PennyLane lightning.qubit",{"type":21,"tag":3202,"props":32266,"children":32267},{},[32268],{"type":26,"value":32269},"Fast CPU simulation",{"type":21,"tag":3202,"props":32271,"children":32272},{},[32273],{"type":26,"value":32274},"~30",{"type":21,"tag":3202,"props":32276,"children":32277},{},[32278],{"type":26,"value":32253},{"type":21,"tag":3177,"props":32280,"children":32281},{},[32282,32289,32294,32299],{"type":21,"tag":3202,"props":32283,"children":32284},{},[32285],{"type":21,"tag":784,"props":32286,"children":32287},{},[32288],{"type":26,"value":20795},{"type":21,"tag":3202,"props":32290,"children":32291},{},[32292],{"type":26,"value":32293},"Large circuits, speed",{"type":21,"tag":3202,"props":32295,"children":32296},{},[32297],{"type":26,"value":32298},"~34 single GPU",{"type":21,"tag":3202,"props":32300,"children":32301},{},[32302],{"type":26,"value":32303},"✅ native",{"type":21,"tag":3177,"props":32305,"children":32306},{},[32307,32315,32320,32324],{"type":21,"tag":3202,"props":32308,"children":32309},{},[32310],{"type":21,"tag":784,"props":32311,"children":32312},{},[32313],{"type":26,"value":32314},"Braket LocalSimulator",{"type":21,"tag":3202,"props":32316,"children":32317},{},[32318],{"type":26,"value":32319},"Braket circuits, free",{"type":21,"tag":3202,"props":32321,"children":32322},{},[32323],{"type":26,"value":32222},{"type":21,"tag":3202,"props":32325,"children":32326},{},[32327],{"type":26,"value":32227},{"type":21,"tag":43,"props":32329,"children":32331},{"id":32330},"qiskit-aer-the-workhorse",[32332],{"type":26,"value":32333},"Qiskit Aer: The Workhorse",{"type":21,"tag":22,"props":32335,"children":32336},{},[32337,32341],{"type":21,"tag":29,"props":32338,"children":32339},{"href":6223},[32340],{"type":26,"value":32186},{"type":26,"value":32342}," is the most feature-complete free simulator. It supports multiple simulation methods:",{"type":21,"tag":7925,"props":32344,"children":32345},{},[32346,32356,32366,32376,32386],{"type":21,"tag":6142,"props":32347,"children":32348},{},[32349,32354],{"type":21,"tag":784,"props":32350,"children":32351},{},[32352],{"type":26,"value":32353},"statevector_simulator",{"type":26,"value":32355},": Exact simulation up to ~30 qubits. Memory scales as 2ⁿ complex numbers (16 GB RAM needed for 30 qubits).",{"type":21,"tag":6142,"props":32357,"children":32358},{},[32359,32364],{"type":21,"tag":784,"props":32360,"children":32361},{},[32362],{"type":26,"value":32363},"qasm_simulator",{"type":26,"value":32365},": Shot-based sampling with noise model support",{"type":21,"tag":6142,"props":32367,"children":32368},{},[32369,32374],{"type":21,"tag":784,"props":32370,"children":32371},{},[32372],{"type":26,"value":32373},"density_matrix",{"type":26,"value":32375},": Simulates mixed states and open quantum systems",{"type":21,"tag":6142,"props":32377,"children":32378},{},[32379,32384],{"type":21,"tag":784,"props":32380,"children":32381},{},[32382],{"type":26,"value":32383},"mps",{"type":26,"value":32385},": Matrix Product State, simulates circuits with limited entanglement up to hundreds of qubits",{"type":21,"tag":6142,"props":32387,"children":32388},{},[32389,32394],{"type":21,"tag":784,"props":32390,"children":32391},{},[32392],{"type":26,"value":32393},"stabilizer",{"type":26,"value":32395},": Clifford circuits only, but scales to thousands of qubits in polynomial time",{"type":21,"tag":2062,"props":32397,"children":32399},{"className":3362,"code":32398,"language":3361,"meta":7,"style":7},"from qiskit_aer import AerSimulator\n\n# Default: automatic method selection\nsim = AerSimulator()\n\n# Force a specific method\nsim_sv = AerSimulator(method='statevector')\nsim_dm = AerSimulator(method='density_matrix')\nsim_mps = AerSimulator(method='matrix_product_state')\n",[32400],{"type":21,"tag":1831,"props":32401,"children":32402},{"__ignoreMap":7},[32403,32422,32429,32437,32452,32459,32467,32500,32533],{"type":21,"tag":2072,"props":32404,"children":32405},{"class":2074,"line":2075},[32406,32410,32414,32418],{"type":21,"tag":2072,"props":32407,"children":32408},{"style":3372},[32409],{"type":26,"value":3398},{"type":21,"tag":2072,"props":32411,"children":32412},{"style":2079},[32413],{"type":26,"value":3424},{"type":21,"tag":2072,"props":32415,"children":32416},{"style":3372},[32417],{"type":26,"value":3375},{"type":21,"tag":2072,"props":32419,"children":32420},{"style":2079},[32421],{"type":26,"value":3433},{"type":21,"tag":2072,"props":32423,"children":32424},{"class":2074,"line":164},[32425],{"type":21,"tag":2072,"props":32426,"children":32427},{"emptyLinePlaceholder":3460},[32428],{"type":26,"value":3463},{"type":21,"tag":2072,"props":32430,"children":32431},{"class":2074,"line":2093},[32432],{"type":21,"tag":2072,"props":32433,"children":32434},{"style":3985},[32435],{"type":26,"value":32436},"# Default: automatic method selection\n",{"type":21,"tag":2072,"props":32438,"children":32439},{"class":2074,"line":2155},[32440,32444,32448],{"type":21,"tag":2072,"props":32441,"children":32442},{"style":2079},[32443],{"type":26,"value":7558},{"type":21,"tag":2072,"props":32445,"children":32446},{"style":3372},[32447],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32449,"children":32450},{"style":2079},[32451],{"type":26,"value":7567},{"type":21,"tag":2072,"props":32453,"children":32454},{"class":2074,"line":2178},[32455],{"type":21,"tag":2072,"props":32456,"children":32457},{"emptyLinePlaceholder":3460},[32458],{"type":26,"value":3463},{"type":21,"tag":2072,"props":32460,"children":32461},{"class":2074,"line":288},[32462],{"type":21,"tag":2072,"props":32463,"children":32464},{"style":3985},[32465],{"type":26,"value":32466},"# Force a specific method\n",{"type":21,"tag":2072,"props":32468,"children":32469},{"class":2074,"line":16},[32470,32475,32479,32483,32487,32491,32496],{"type":21,"tag":2072,"props":32471,"children":32472},{"style":2079},[32473],{"type":26,"value":32474},"sim_sv ",{"type":21,"tag":2072,"props":32476,"children":32477},{"style":3372},[32478],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32480,"children":32481},{"style":2079},[32482],{"type":26,"value":3732},{"type":21,"tag":2072,"props":32484,"children":32485},{"style":3735},[32486],{"type":26,"value":30478},{"type":21,"tag":2072,"props":32488,"children":32489},{"style":3372},[32490],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32492,"children":32493},{"style":2108},[32494],{"type":26,"value":32495},"'statevector'",{"type":21,"tag":2072,"props":32497,"children":32498},{"style":2079},[32499],{"type":26,"value":4281},{"type":21,"tag":2072,"props":32501,"children":32502},{"class":2074,"line":366},[32503,32508,32512,32516,32520,32524,32529],{"type":21,"tag":2072,"props":32504,"children":32505},{"style":2079},[32506],{"type":26,"value":32507},"sim_dm ",{"type":21,"tag":2072,"props":32509,"children":32510},{"style":3372},[32511],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32513,"children":32514},{"style":2079},[32515],{"type":26,"value":3732},{"type":21,"tag":2072,"props":32517,"children":32518},{"style":3735},[32519],{"type":26,"value":30478},{"type":21,"tag":2072,"props":32521,"children":32522},{"style":3372},[32523],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32525,"children":32526},{"style":2108},[32527],{"type":26,"value":32528},"'density_matrix'",{"type":21,"tag":2072,"props":32530,"children":32531},{"style":2079},[32532],{"type":26,"value":4281},{"type":21,"tag":2072,"props":32534,"children":32535},{"class":2074,"line":853},[32536,32541,32545,32549,32553,32557,32562],{"type":21,"tag":2072,"props":32537,"children":32538},{"style":2079},[32539],{"type":26,"value":32540},"sim_mps ",{"type":21,"tag":2072,"props":32542,"children":32543},{"style":3372},[32544],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32546,"children":32547},{"style":2079},[32548],{"type":26,"value":3732},{"type":21,"tag":2072,"props":32550,"children":32551},{"style":3735},[32552],{"type":26,"value":30478},{"type":21,"tag":2072,"props":32554,"children":32555},{"style":3372},[32556],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32558,"children":32559},{"style":2108},[32560],{"type":26,"value":32561},"'matrix_product_state'",{"type":21,"tag":2072,"props":32563,"children":32564},{"style":2079},[32565],{"type":26,"value":4281},{"type":21,"tag":22,"props":32567,"children":32568},{},[32569,32574],{"type":21,"tag":784,"props":32570,"children":32571},{},[32572],{"type":26,"value":32573},"When to use Aer:",{"type":26,"value":32575}," For any Qiskit workflow, noise modeling, or when you want to match IBM hardware behavior closely.",{"type":21,"tag":43,"props":32577,"children":32579},{"id":32578},"pennylane-best-for-quantum-ml",[32580],{"type":26,"value":32581},"PennyLane: Best for Quantum ML",{"type":21,"tag":22,"props":32583,"children":32584},{},[32585,32589,32591,32596],{"type":21,"tag":29,"props":32586,"children":32587},{"href":14130},[32588],{"type":26,"value":13846},{"type":26,"value":32590}," shines when you need differentiable circuits. Its ",{"type":21,"tag":1831,"props":32592,"children":32594},{"className":32593},[],[32595],{"type":26,"value":15478},{"type":26,"value":32597}," simulator computes exact gradients via the parameter-shift rule, enabling gradient-based optimization of quantum circuits:",{"type":21,"tag":2062,"props":32599,"children":32601},{"className":3362,"code":32600,"language":3361,"meta":7,"style":7},"import pennylane as qml\nimport numpy as np\n\ndev = qml.device(\"default.qubit\", wires=2)\n\n@qml.qnode(dev)\ndef circuit(theta):\n    qml.RX(theta[0], wires=0)\n    qml.RY(theta[1], wires=1)\n    qml.CNOT(wires=[0, 1])\n    return qml.expval(qml.PauliZ(0))\n\n# Automatic gradient computation\ngrad_fn = qml.grad(circuit)\ntheta = np.array([0.5, 1.2])\nprint(grad_fn(theta))  # exact gradient\n",[32602],{"type":21,"tag":1831,"props":32603,"children":32604},{"__ignoreMap":7},[32605,32624,32643,32650,32689,32696,32707,32723,32756,32788,32823,32842,32849,32857,32874,32908],{"type":21,"tag":2072,"props":32606,"children":32607},{"class":2074,"line":2075},[32608,32612,32616,32620],{"type":21,"tag":2072,"props":32609,"children":32610},{"style":3372},[32611],{"type":26,"value":3375},{"type":21,"tag":2072,"props":32613,"children":32614},{"style":2079},[32615],{"type":26,"value":14153},{"type":21,"tag":2072,"props":32617,"children":32618},{"style":3372},[32619],{"type":26,"value":3385},{"type":21,"tag":2072,"props":32621,"children":32622},{"style":2079},[32623],{"type":26,"value":14162},{"type":21,"tag":2072,"props":32625,"children":32626},{"class":2074,"line":164},[32627,32631,32635,32639],{"type":21,"tag":2072,"props":32628,"children":32629},{"style":3372},[32630],{"type":26,"value":3375},{"type":21,"tag":2072,"props":32632,"children":32633},{"style":2079},[32634],{"type":26,"value":3380},{"type":21,"tag":2072,"props":32636,"children":32637},{"style":3372},[32638],{"type":26,"value":3385},{"type":21,"tag":2072,"props":32640,"children":32641},{"style":2079},[32642],{"type":26,"value":3390},{"type":21,"tag":2072,"props":32644,"children":32645},{"class":2074,"line":2093},[32646],{"type":21,"tag":2072,"props":32647,"children":32648},{"emptyLinePlaceholder":3460},[32649],{"type":26,"value":3463},{"type":21,"tag":2072,"props":32651,"children":32652},{"class":2074,"line":2155},[32653,32657,32661,32665,32669,32673,32677,32681,32685],{"type":21,"tag":2072,"props":32654,"children":32655},{"style":2079},[32656],{"type":26,"value":14286},{"type":21,"tag":2072,"props":32658,"children":32659},{"style":3372},[32660],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32662,"children":32663},{"style":2079},[32664],{"type":26,"value":14295},{"type":21,"tag":2072,"props":32666,"children":32667},{"style":2108},[32668],{"type":26,"value":14300},{"type":21,"tag":2072,"props":32670,"children":32671},{"style":2079},[32672],{"type":26,"value":798},{"type":21,"tag":2072,"props":32674,"children":32675},{"style":3735},[32676],{"type":26,"value":14309},{"type":21,"tag":2072,"props":32678,"children":32679},{"style":3372},[32680],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32682,"children":32683},{"style":2097},[32684],{"type":26,"value":2170},{"type":21,"tag":2072,"props":32686,"children":32687},{"style":2079},[32688],{"type":26,"value":4281},{"type":21,"tag":2072,"props":32690,"children":32691},{"class":2074,"line":2178},[32692],{"type":21,"tag":2072,"props":32693,"children":32694},{"emptyLinePlaceholder":3460},[32695],{"type":26,"value":3463},{"type":21,"tag":2072,"props":32697,"children":32698},{"class":2074,"line":288},[32699,32703],{"type":21,"tag":2072,"props":32700,"children":32701},{"style":3474},[32702],{"type":26,"value":14333},{"type":21,"tag":2072,"props":32704,"children":32705},{"style":2079},[32706],{"type":26,"value":14338},{"type":21,"tag":2072,"props":32708,"children":32709},{"class":2074,"line":16},[32710,32714,32718],{"type":21,"tag":2072,"props":32711,"children":32712},{"style":3372},[32713],{"type":26,"value":3471},{"type":21,"tag":2072,"props":32715,"children":32716},{"style":3474},[32717],{"type":26,"value":14350},{"type":21,"tag":2072,"props":32719,"children":32720},{"style":2079},[32721],{"type":26,"value":32722},"(theta):\n",{"type":21,"tag":2072,"props":32724,"children":32725},{"class":2074,"line":366},[32726,32731,32735,32740,32744,32748,32752],{"type":21,"tag":2072,"props":32727,"children":32728},{"style":2079},[32729],{"type":26,"value":32730},"    qml.RX(theta[",{"type":21,"tag":2072,"props":32732,"children":32733},{"style":2097},[32734],{"type":26,"value":4295},{"type":21,"tag":2072,"props":32736,"children":32737},{"style":2079},[32738],{"type":26,"value":32739},"], ",{"type":21,"tag":2072,"props":32741,"children":32742},{"style":3735},[32743],{"type":26,"value":14309},{"type":21,"tag":2072,"props":32745,"children":32746},{"style":3372},[32747],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32749,"children":32750},{"style":2097},[32751],{"type":26,"value":4295},{"type":21,"tag":2072,"props":32753,"children":32754},{"style":2079},[32755],{"type":26,"value":4281},{"type":21,"tag":2072,"props":32757,"children":32758},{"class":2074,"line":853},[32759,32764,32768,32772,32776,32780,32784],{"type":21,"tag":2072,"props":32760,"children":32761},{"style":2079},[32762],{"type":26,"value":32763},"    qml.RY(theta[",{"type":21,"tag":2072,"props":32765,"children":32766},{"style":2097},[32767],{"type":26,"value":3555},{"type":21,"tag":2072,"props":32769,"children":32770},{"style":2079},[32771],{"type":26,"value":32739},{"type":21,"tag":2072,"props":32773,"children":32774},{"style":3735},[32775],{"type":26,"value":14309},{"type":21,"tag":2072,"props":32777,"children":32778},{"style":3372},[32779],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32781,"children":32782},{"style":2097},[32783],{"type":26,"value":3555},{"type":21,"tag":2072,"props":32785,"children":32786},{"style":2079},[32787],{"type":26,"value":4281},{"type":21,"tag":2072,"props":32789,"children":32790},{"class":2074,"line":3092},[32791,32795,32799,32803,32807,32811,32815,32819],{"type":21,"tag":2072,"props":32792,"children":32793},{"style":2079},[32794],{"type":26,"value":22029},{"type":21,"tag":2072,"props":32796,"children":32797},{"style":3735},[32798],{"type":26,"value":14309},{"type":21,"tag":2072,"props":32800,"children":32801},{"style":3372},[32802],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32804,"children":32805},{"style":2079},[32806],{"type":26,"value":22042},{"type":21,"tag":2072,"props":32808,"children":32809},{"style":2097},[32810],{"type":26,"value":4295},{"type":21,"tag":2072,"props":32812,"children":32813},{"style":2079},[32814],{"type":26,"value":798},{"type":21,"tag":2072,"props":32816,"children":32817},{"style":2097},[32818],{"type":26,"value":3555},{"type":21,"tag":2072,"props":32820,"children":32821},{"style":2079},[32822],{"type":26,"value":3597},{"type":21,"tag":2072,"props":32824,"children":32825},{"class":2074,"line":3651},[32826,32830,32834,32838],{"type":21,"tag":2072,"props":32827,"children":32828},{"style":3372},[32829],{"type":26,"value":3701},{"type":21,"tag":2072,"props":32831,"children":32832},{"style":2079},[32833],{"type":26,"value":14465},{"type":21,"tag":2072,"props":32835,"children":32836},{"style":2097},[32837],{"type":26,"value":4295},{"type":21,"tag":2072,"props":32839,"children":32840},{"style":2079},[32841],{"type":26,"value":12429},{"type":21,"tag":2072,"props":32843,"children":32844},{"class":2074,"line":2616},[32845],{"type":21,"tag":2072,"props":32846,"children":32847},{"emptyLinePlaceholder":3460},[32848],{"type":26,"value":3463},{"type":21,"tag":2072,"props":32850,"children":32851},{"class":2074,"line":3695},[32852],{"type":21,"tag":2072,"props":32853,"children":32854},{"style":3985},[32855],{"type":26,"value":32856},"# Automatic gradient computation\n",{"type":21,"tag":2072,"props":32858,"children":32859},{"class":2074,"line":3709},[32860,32865,32869],{"type":21,"tag":2072,"props":32861,"children":32862},{"style":2079},[32863],{"type":26,"value":32864},"grad_fn ",{"type":21,"tag":2072,"props":32866,"children":32867},{"style":3372},[32868],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32870,"children":32871},{"style":2079},[32872],{"type":26,"value":32873}," qml.grad(circuit)\n",{"type":21,"tag":2072,"props":32875,"children":32876},{"class":2074,"line":3717},[32877,32882,32886,32891,32895,32899,32904],{"type":21,"tag":2072,"props":32878,"children":32879},{"style":2079},[32880],{"type":26,"value":32881},"theta ",{"type":21,"tag":2072,"props":32883,"children":32884},{"style":3372},[32885],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32887,"children":32888},{"style":2079},[32889],{"type":26,"value":32890}," np.array([",{"type":21,"tag":2072,"props":32892,"children":32893},{"style":2097},[32894],{"type":26,"value":2193},{"type":21,"tag":2072,"props":32896,"children":32897},{"style":2079},[32898],{"type":26,"value":798},{"type":21,"tag":2072,"props":32900,"children":32901},{"style":2097},[32902],{"type":26,"value":32903},"1.2",{"type":21,"tag":2072,"props":32905,"children":32906},{"style":2079},[32907],{"type":26,"value":3597},{"type":21,"tag":2072,"props":32909,"children":32910},{"class":2074,"line":3750},[32911,32915,32920],{"type":21,"tag":2072,"props":32912,"children":32913},{"style":2097},[32914],{"type":26,"value":4614},{"type":21,"tag":2072,"props":32916,"children":32917},{"style":2079},[32918],{"type":26,"value":32919},"(grad_fn(theta))  ",{"type":21,"tag":2072,"props":32921,"children":32922},{"style":3985},[32923],{"type":26,"value":32924},"# exact gradient\n",{"type":21,"tag":22,"props":32926,"children":32927},{},[32928,32930,32936,32938,32943],{"type":26,"value":32929},"For faster simulation without gradients, use ",{"type":21,"tag":1831,"props":32931,"children":32933},{"className":32932},[],[32934],{"type":26,"value":32935},"lightning.qubit",{"type":26,"value":32937}," (C++ backend, ~10× faster than ",{"type":21,"tag":1831,"props":32939,"children":32941},{"className":32940},[],[32942],{"type":26,"value":15478},{"type":26,"value":32944},"):",{"type":21,"tag":2062,"props":32946,"children":32948},{"className":8882,"code":32947,"language":8884,"meta":7,"style":7},"pip install pennylane-lightning\n",[32949],{"type":21,"tag":1831,"props":32950,"children":32951},{"__ignoreMap":7},[32952],{"type":21,"tag":2072,"props":32953,"children":32954},{"class":2074,"line":2075},[32955,32959,32963],{"type":21,"tag":2072,"props":32956,"children":32957},{"style":3474},[32958],{"type":26,"value":11855},{"type":21,"tag":2072,"props":32960,"children":32961},{"style":2108},[32962],{"type":26,"value":11860},{"type":21,"tag":2072,"props":32964,"children":32965},{"style":2108},[32966],{"type":26,"value":32967}," pennylane-lightning\n",{"type":21,"tag":2062,"props":32969,"children":32971},{"className":3362,"code":32970,"language":3361,"meta":7,"style":7},"dev = qml.device(\"lightning.qubit\", wires=20)\n",[32972],{"type":21,"tag":1831,"props":32973,"children":32974},{"__ignoreMap":7},[32975],{"type":21,"tag":2072,"props":32976,"children":32977},{"class":2074,"line":2075},[32978,32982,32986,32990,32995,32999,33003,33007,33012],{"type":21,"tag":2072,"props":32979,"children":32980},{"style":2079},[32981],{"type":26,"value":14286},{"type":21,"tag":2072,"props":32983,"children":32984},{"style":3372},[32985],{"type":26,"value":3487},{"type":21,"tag":2072,"props":32987,"children":32988},{"style":2079},[32989],{"type":26,"value":14295},{"type":21,"tag":2072,"props":32991,"children":32992},{"style":2108},[32993],{"type":26,"value":32994},"\"lightning.qubit\"",{"type":21,"tag":2072,"props":32996,"children":32997},{"style":2079},[32998],{"type":26,"value":798},{"type":21,"tag":2072,"props":33000,"children":33001},{"style":3735},[33002],{"type":26,"value":14309},{"type":21,"tag":2072,"props":33004,"children":33005},{"style":3372},[33006],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33008,"children":33009},{"style":2097},[33010],{"type":26,"value":33011},"20",{"type":21,"tag":2072,"props":33013,"children":33014},{"style":2079},[33015],{"type":26,"value":4281},{"type":21,"tag":22,"props":33017,"children":33018},{},[33019,33024,33026,33030,33031,33035],{"type":21,"tag":784,"props":33020,"children":33021},{},[33022],{"type":26,"value":33023},"When to use PennyLane:",{"type":26,"value":33025}," Variational algorithms (",{"type":21,"tag":29,"props":33027,"children":33028},{"href":31},[33029],{"type":26,"value":14},{"type":26,"value":798},{"type":21,"tag":29,"props":33032,"children":33033},{"href":1788},[33034],{"type":26,"value":1777},{"type":26,"value":33036},"), quantum ML, any workflow requiring circuit gradients.",{"type":21,"tag":43,"props":33038,"children":33040},{"id":33039},"nvidia-cuda-q-when-speed-matters",[33041],{"type":26,"value":33042},"NVIDIA CUDA-Q: When Speed Matters",{"type":21,"tag":22,"props":33044,"children":33045},{},[33046,33050],{"type":21,"tag":29,"props":33047,"children":33048},{"href":20792},[33049],{"type":26,"value":18278},{"type":26,"value":33051}," provides GPU-accelerated simulation that is 100–10,000× faster than CPU simulators for large circuits. If you have any NVIDIA GPU, this is the right choice for 25+ qubit circuits:",{"type":21,"tag":2062,"props":33053,"children":33055},{"className":3362,"code":33054,"language":3361,"meta":7,"style":7},"import cudaq\n\n@cudaq.kernel\ndef large_circuit(n: int):\n    qvec = cudaq.qvector(n)\n    h(qvec[0])\n    for i in range(n - 1):\n        cx(qvec[i], qvec[i + 1])\n    mz(qvec)\n\n# Run on GPU (specify 'nvidia' target)\ncudaq.set_target('nvidia')\ncounts = cudaq.sample(large_circuit, 30, shots_count=10000)\nprint(counts)\n",[33056],{"type":21,"tag":1831,"props":33057,"children":33058},{"__ignoreMap":7},[33059,33070,33077,33084,33109,33125,33140,33175,33195,33203,33210,33218,33235,33277],{"type":21,"tag":2072,"props":33060,"children":33061},{"class":2074,"line":2075},[33062,33066],{"type":21,"tag":2072,"props":33063,"children":33064},{"style":3372},[33065],{"type":26,"value":3375},{"type":21,"tag":2072,"props":33067,"children":33068},{"style":2079},[33069],{"type":26,"value":22142},{"type":21,"tag":2072,"props":33071,"children":33072},{"class":2074,"line":164},[33073],{"type":21,"tag":2072,"props":33074,"children":33075},{"emptyLinePlaceholder":3460},[33076],{"type":26,"value":3463},{"type":21,"tag":2072,"props":33078,"children":33079},{"class":2074,"line":2093},[33080],{"type":21,"tag":2072,"props":33081,"children":33082},{"style":3474},[33083],{"type":26,"value":22150},{"type":21,"tag":2072,"props":33085,"children":33086},{"class":2074,"line":2155},[33087,33091,33096,33101,33105],{"type":21,"tag":2072,"props":33088,"children":33089},{"style":3372},[33090],{"type":26,"value":3471},{"type":21,"tag":2072,"props":33092,"children":33093},{"style":3474},[33094],{"type":26,"value":33095}," large_circuit",{"type":21,"tag":2072,"props":33097,"children":33098},{"style":2079},[33099],{"type":26,"value":33100},"(n: ",{"type":21,"tag":2072,"props":33102,"children":33103},{"style":2097},[33104],{"type":26,"value":4149},{"type":21,"tag":2072,"props":33106,"children":33107},{"style":2079},[33108],{"type":26,"value":3525},{"type":21,"tag":2072,"props":33110,"children":33111},{"class":2074,"line":2178},[33112,33116,33120],{"type":21,"tag":2072,"props":33113,"children":33114},{"style":2079},[33115],{"type":26,"value":22173},{"type":21,"tag":2072,"props":33117,"children":33118},{"style":3372},[33119],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33121,"children":33122},{"style":2079},[33123],{"type":26,"value":33124}," cudaq.qvector(n)\n",{"type":21,"tag":2072,"props":33126,"children":33127},{"class":2074,"line":288},[33128,33132,33136],{"type":21,"tag":2072,"props":33129,"children":33130},{"style":2079},[33131],{"type":26,"value":22198},{"type":21,"tag":2072,"props":33133,"children":33134},{"style":2097},[33135],{"type":26,"value":4295},{"type":21,"tag":2072,"props":33137,"children":33138},{"style":2079},[33139],{"type":26,"value":3597},{"type":21,"tag":2072,"props":33141,"children":33142},{"class":2074,"line":16},[33143,33147,33151,33155,33159,33163,33167,33171],{"type":21,"tag":2072,"props":33144,"children":33145},{"style":3372},[33146],{"type":26,"value":3859},{"type":21,"tag":2072,"props":33148,"children":33149},{"style":2079},[33150],{"type":26,"value":3864},{"type":21,"tag":2072,"props":33152,"children":33153},{"style":3372},[33154],{"type":26,"value":3869},{"type":21,"tag":2072,"props":33156,"children":33157},{"style":2097},[33158],{"type":26,"value":3874},{"type":21,"tag":2072,"props":33160,"children":33161},{"style":2079},[33162],{"type":26,"value":6801},{"type":21,"tag":2072,"props":33164,"children":33165},{"style":3372},[33166],{"type":26,"value":3973},{"type":21,"tag":2072,"props":33168,"children":33169},{"style":2097},[33170],{"type":26,"value":5228},{"type":21,"tag":2072,"props":33172,"children":33173},{"style":2079},[33174],{"type":26,"value":3525},{"type":21,"tag":2072,"props":33176,"children":33177},{"class":2074,"line":366},[33178,33183,33187,33191],{"type":21,"tag":2072,"props":33179,"children":33180},{"style":2079},[33181],{"type":26,"value":33182},"        cx(qvec[i], qvec[i ",{"type":21,"tag":2072,"props":33184,"children":33185},{"style":3372},[33186],{"type":26,"value":5658},{"type":21,"tag":2072,"props":33188,"children":33189},{"style":2097},[33190],{"type":26,"value":5228},{"type":21,"tag":2072,"props":33192,"children":33193},{"style":2079},[33194],{"type":26,"value":3597},{"type":21,"tag":2072,"props":33196,"children":33197},{"class":2074,"line":853},[33198],{"type":21,"tag":2072,"props":33199,"children":33200},{"style":2079},[33201],{"type":26,"value":33202},"    mz(qvec)\n",{"type":21,"tag":2072,"props":33204,"children":33205},{"class":2074,"line":3092},[33206],{"type":21,"tag":2072,"props":33207,"children":33208},{"emptyLinePlaceholder":3460},[33209],{"type":26,"value":3463},{"type":21,"tag":2072,"props":33211,"children":33212},{"class":2074,"line":3651},[33213],{"type":21,"tag":2072,"props":33214,"children":33215},{"style":3985},[33216],{"type":26,"value":33217},"# Run on GPU (specify 'nvidia' target)\n",{"type":21,"tag":2072,"props":33219,"children":33220},{"class":2074,"line":2616},[33221,33226,33231],{"type":21,"tag":2072,"props":33222,"children":33223},{"style":2079},[33224],{"type":26,"value":33225},"cudaq.set_target(",{"type":21,"tag":2072,"props":33227,"children":33228},{"style":2108},[33229],{"type":26,"value":33230},"'nvidia'",{"type":21,"tag":2072,"props":33232,"children":33233},{"style":2079},[33234],{"type":26,"value":4281},{"type":21,"tag":2072,"props":33236,"children":33237},{"class":2074,"line":3695},[33238,33242,33246,33251,33256,33260,33264,33268,33273],{"type":21,"tag":2072,"props":33239,"children":33240},{"style":2079},[33241],{"type":26,"value":7591},{"type":21,"tag":2072,"props":33243,"children":33244},{"style":3372},[33245],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33247,"children":33248},{"style":2079},[33249],{"type":26,"value":33250}," cudaq.sample(large_circuit, ",{"type":21,"tag":2072,"props":33252,"children":33253},{"style":2097},[33254],{"type":26,"value":33255},"30",{"type":21,"tag":2072,"props":33257,"children":33258},{"style":2079},[33259],{"type":26,"value":798},{"type":21,"tag":2072,"props":33261,"children":33262},{"style":3735},[33263],{"type":26,"value":22247},{"type":21,"tag":2072,"props":33265,"children":33266},{"style":3372},[33267],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33269,"children":33270},{"style":2097},[33271],{"type":26,"value":33272},"10000",{"type":21,"tag":2072,"props":33274,"children":33275},{"style":2079},[33276],{"type":26,"value":4281},{"type":21,"tag":2072,"props":33278,"children":33279},{"class":2074,"line":3709},[33280,33284],{"type":21,"tag":2072,"props":33281,"children":33282},{"style":2097},[33283],{"type":26,"value":4614},{"type":21,"tag":2072,"props":33285,"children":33286},{"style":2079},[33287],{"type":26,"value":33288},"(counts)\n",{"type":21,"tag":22,"props":33290,"children":33291},{},[33292,33297],{"type":21,"tag":784,"props":33293,"children":33294},{},[33295],{"type":26,"value":33296},"Performance benchmark",{"type":26,"value":33298}," (GHZ circuit, 28 qubits, 1000 shots):",{"type":21,"tag":7925,"props":33300,"children":33301},{},[33302,33307,33312],{"type":21,"tag":6142,"props":33303,"children":33304},{},[33305],{"type":26,"value":33306},"Qiskit Aer CPU: ~45 seconds",{"type":21,"tag":6142,"props":33308,"children":33309},{},[33310],{"type":26,"value":33311},"PennyLane lightning.qubit: ~30 seconds",{"type":21,"tag":6142,"props":33313,"children":33314},{},[33315],{"type":26,"value":33316},"CUDA-Q (A100 GPU): ~0.8 seconds",{"type":21,"tag":22,"props":33318,"children":33319},{},[33320,33325],{"type":21,"tag":784,"props":33321,"children":33322},{},[33323],{"type":26,"value":33324},"When to use CUDA-Q:",{"type":26,"value":33326}," Any circuit with 25+ qubits, performance-critical simulations, multi-GPU workloads.",{"type":21,"tag":43,"props":33328,"children":33330},{"id":33329},"cirq-noise-modeling-and-nisq-research",[33331],{"type":26,"value":33332},"Cirq: Noise Modeling and NISQ Research",{"type":21,"tag":22,"props":33334,"children":33335},{},[33336,33340],{"type":21,"tag":29,"props":33337,"children":33338},{"href":7968},[33339],{"type":26,"value":21031},{"type":26,"value":33341}," includes three simulators:",{"type":21,"tag":2062,"props":33343,"children":33345},{"className":3362,"code":33344,"language":3361,"meta":7,"style":7},"import cirq\n\n# Exact statevector simulation\nsim = cirq.Simulator()\n\n# Density matrix with noise\nnoise_model = cirq.ConstantQubitNoiseModel(\n    cirq.depolarize(p=0.01)\n)\nnoisy_sim = cirq.DensityMatrixSimulator(noise=noise_model)\n\n# Clifford circuits only (but exponentially faster for stabilizer states)\nclifford_sim = cirq.CliffordSimulator()\n",[33346],{"type":21,"tag":1831,"props":33347,"children":33348},{"__ignoreMap":7},[33349,33361,33368,33376,33392,33399,33407,33424,33449,33456,33486,33493,33501],{"type":21,"tag":2072,"props":33350,"children":33351},{"class":2074,"line":2075},[33352,33356],{"type":21,"tag":2072,"props":33353,"children":33354},{"style":3372},[33355],{"type":26,"value":3375},{"type":21,"tag":2072,"props":33357,"children":33358},{"style":2079},[33359],{"type":26,"value":33360}," cirq\n",{"type":21,"tag":2072,"props":33362,"children":33363},{"class":2074,"line":164},[33364],{"type":21,"tag":2072,"props":33365,"children":33366},{"emptyLinePlaceholder":3460},[33367],{"type":26,"value":3463},{"type":21,"tag":2072,"props":33369,"children":33370},{"class":2074,"line":2093},[33371],{"type":21,"tag":2072,"props":33372,"children":33373},{"style":3985},[33374],{"type":26,"value":33375},"# Exact statevector simulation\n",{"type":21,"tag":2072,"props":33377,"children":33378},{"class":2074,"line":2155},[33379,33383,33387],{"type":21,"tag":2072,"props":33380,"children":33381},{"style":2079},[33382],{"type":26,"value":7558},{"type":21,"tag":2072,"props":33384,"children":33385},{"style":3372},[33386],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33388,"children":33389},{"style":2079},[33390],{"type":26,"value":33391}," cirq.Simulator()\n",{"type":21,"tag":2072,"props":33393,"children":33394},{"class":2074,"line":2178},[33395],{"type":21,"tag":2072,"props":33396,"children":33397},{"emptyLinePlaceholder":3460},[33398],{"type":26,"value":3463},{"type":21,"tag":2072,"props":33400,"children":33401},{"class":2074,"line":288},[33402],{"type":21,"tag":2072,"props":33403,"children":33404},{"style":3985},[33405],{"type":26,"value":33406},"# Density matrix with noise\n",{"type":21,"tag":2072,"props":33408,"children":33409},{"class":2074,"line":16},[33410,33415,33419],{"type":21,"tag":2072,"props":33411,"children":33412},{"style":2079},[33413],{"type":26,"value":33414},"noise_model ",{"type":21,"tag":2072,"props":33416,"children":33417},{"style":3372},[33418],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33420,"children":33421},{"style":2079},[33422],{"type":26,"value":33423}," cirq.ConstantQubitNoiseModel(\n",{"type":21,"tag":2072,"props":33425,"children":33426},{"class":2074,"line":366},[33427,33432,33436,33440,33445],{"type":21,"tag":2072,"props":33428,"children":33429},{"style":2079},[33430],{"type":26,"value":33431},"    cirq.depolarize(",{"type":21,"tag":2072,"props":33433,"children":33434},{"style":3735},[33435],{"type":26,"value":22},{"type":21,"tag":2072,"props":33437,"children":33438},{"style":3372},[33439],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33441,"children":33442},{"style":2097},[33443],{"type":26,"value":33444},"0.01",{"type":21,"tag":2072,"props":33446,"children":33447},{"style":2079},[33448],{"type":26,"value":4281},{"type":21,"tag":2072,"props":33450,"children":33451},{"class":2074,"line":853},[33452],{"type":21,"tag":2072,"props":33453,"children":33454},{"style":2079},[33455],{"type":26,"value":4281},{"type":21,"tag":2072,"props":33457,"children":33458},{"class":2074,"line":3092},[33459,33464,33468,33473,33477,33481],{"type":21,"tag":2072,"props":33460,"children":33461},{"style":2079},[33462],{"type":26,"value":33463},"noisy_sim ",{"type":21,"tag":2072,"props":33465,"children":33466},{"style":3372},[33467],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33469,"children":33470},{"style":2079},[33471],{"type":26,"value":33472}," cirq.DensityMatrixSimulator(",{"type":21,"tag":2072,"props":33474,"children":33475},{"style":3735},[33476],{"type":26,"value":14700},{"type":21,"tag":2072,"props":33478,"children":33479},{"style":3372},[33480],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33482,"children":33483},{"style":2079},[33484],{"type":26,"value":33485},"noise_model)\n",{"type":21,"tag":2072,"props":33487,"children":33488},{"class":2074,"line":3651},[33489],{"type":21,"tag":2072,"props":33490,"children":33491},{"emptyLinePlaceholder":3460},[33492],{"type":26,"value":3463},{"type":21,"tag":2072,"props":33494,"children":33495},{"class":2074,"line":2616},[33496],{"type":21,"tag":2072,"props":33497,"children":33498},{"style":3985},[33499],{"type":26,"value":33500},"# Clifford circuits only (but exponentially faster for stabilizer states)\n",{"type":21,"tag":2072,"props":33502,"children":33503},{"class":2074,"line":3695},[33504,33509,33513],{"type":21,"tag":2072,"props":33505,"children":33506},{"style":2079},[33507],{"type":26,"value":33508},"clifford_sim ",{"type":21,"tag":2072,"props":33510,"children":33511},{"style":3372},[33512],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33514,"children":33515},{"style":2079},[33516],{"type":26,"value":33517}," cirq.CliffordSimulator()\n",{"type":21,"tag":22,"props":33519,"children":33520},{},[33521,33526,33527,33531],{"type":21,"tag":784,"props":33522,"children":33523},{},[33524],{"type":26,"value":33525},"When to use Cirq:",{"type":26,"value":790},{"type":21,"tag":29,"props":33528,"children":33529},{"href":120},[33530],{"type":26,"value":2016},{"type":26,"value":33532}," noise modeling, stabilizer circuit research, Google AI Quantum workflows.",{"type":21,"tag":22,"props":33534,"children":33535},{},[33536,33538,33542,33544,33549],{"type":26,"value":33537},"Simulators are also where claims of ",{"type":21,"tag":29,"props":33539,"children":33540},{"href":7996},[33541],{"type":26,"value":7999},{"type":26,"value":33543}," get tested, and classical methods keep moving the goalposts. A 2026 result on ",{"type":21,"tag":29,"props":33545,"children":33546},{"href":10909},[33547],{"type":26,"value":33548},"classical simulation of Rydberg atom arrays",{"type":26,"value":33550}," reproduced experiments previously thought to be beyond classical reach, which is a good reminder to benchmark your own workload rather than trusting a headline qubit count.",{"type":21,"tag":43,"props":33552,"children":33554},{"id":33553},"amazon-braket-localsimulator-isolation-and-portability",[33555],{"type":26,"value":33556},"Amazon Braket LocalSimulator: Isolation and Portability",{"type":21,"tag":22,"props":33558,"children":33559},{},[33560,33561,33566],{"type":26,"value":11131},{"type":21,"tag":29,"props":33562,"children":33563},{"href":21299},[33564],{"type":26,"value":33565},"Braket SDK",{"type":26,"value":33567}," includes a free local simulator that mirrors the cloud API exactly:",{"type":21,"tag":2062,"props":33569,"children":33571},{"className":3362,"code":33570,"language":3361,"meta":7,"style":7},"from braket.devices import LocalSimulator\nfrom braket.circuits import Circuit\n\ndevice = LocalSimulator()\n\ncircuit = Circuit()\ncircuit.h(0)\ncircuit.cnot(0, 1)\ncircuit.probability()\n\ntask = device.run(circuit, shots=1000)\nresult = task.result()\nprint(result.measurement_counts)\n",[33572],{"type":21,"tag":1831,"props":33573,"children":33574},{"__ignoreMap":7},[33575,33596,33617,33624,33641,33648,33665,33681,33705,33713,33720,33753,33769],{"type":21,"tag":2072,"props":33576,"children":33577},{"class":2074,"line":2075},[33578,33582,33587,33591],{"type":21,"tag":2072,"props":33579,"children":33580},{"style":3372},[33581],{"type":26,"value":3398},{"type":21,"tag":2072,"props":33583,"children":33584},{"style":2079},[33585],{"type":26,"value":33586}," braket.devices ",{"type":21,"tag":2072,"props":33588,"children":33589},{"style":3372},[33590],{"type":26,"value":3375},{"type":21,"tag":2072,"props":33592,"children":33593},{"style":2079},[33594],{"type":26,"value":33595}," LocalSimulator\n",{"type":21,"tag":2072,"props":33597,"children":33598},{"class":2074,"line":164},[33599,33603,33608,33612],{"type":21,"tag":2072,"props":33600,"children":33601},{"style":3372},[33602],{"type":26,"value":3398},{"type":21,"tag":2072,"props":33604,"children":33605},{"style":2079},[33606],{"type":26,"value":33607}," braket.circuits ",{"type":21,"tag":2072,"props":33609,"children":33610},{"style":3372},[33611],{"type":26,"value":3375},{"type":21,"tag":2072,"props":33613,"children":33614},{"style":2079},[33615],{"type":26,"value":33616}," Circuit\n",{"type":21,"tag":2072,"props":33618,"children":33619},{"class":2074,"line":2093},[33620],{"type":21,"tag":2072,"props":33621,"children":33622},{"emptyLinePlaceholder":3460},[33623],{"type":26,"value":3463},{"type":21,"tag":2072,"props":33625,"children":33626},{"class":2074,"line":2155},[33627,33632,33636],{"type":21,"tag":2072,"props":33628,"children":33629},{"style":2079},[33630],{"type":26,"value":33631},"device ",{"type":21,"tag":2072,"props":33633,"children":33634},{"style":3372},[33635],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33637,"children":33638},{"style":2079},[33639],{"type":26,"value":33640}," LocalSimulator()\n",{"type":21,"tag":2072,"props":33642,"children":33643},{"class":2074,"line":2178},[33644],{"type":21,"tag":2072,"props":33645,"children":33646},{"emptyLinePlaceholder":3460},[33647],{"type":26,"value":3463},{"type":21,"tag":2072,"props":33649,"children":33650},{"class":2074,"line":288},[33651,33656,33660],{"type":21,"tag":2072,"props":33652,"children":33653},{"style":2079},[33654],{"type":26,"value":33655},"circuit ",{"type":21,"tag":2072,"props":33657,"children":33658},{"style":3372},[33659],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33661,"children":33662},{"style":2079},[33663],{"type":26,"value":33664}," Circuit()\n",{"type":21,"tag":2072,"props":33666,"children":33667},{"class":2074,"line":16},[33668,33673,33677],{"type":21,"tag":2072,"props":33669,"children":33670},{"style":2079},[33671],{"type":26,"value":33672},"circuit.h(",{"type":21,"tag":2072,"props":33674,"children":33675},{"style":2097},[33676],{"type":26,"value":4295},{"type":21,"tag":2072,"props":33678,"children":33679},{"style":2079},[33680],{"type":26,"value":4281},{"type":21,"tag":2072,"props":33682,"children":33683},{"class":2074,"line":366},[33684,33689,33693,33697,33701],{"type":21,"tag":2072,"props":33685,"children":33686},{"style":2079},[33687],{"type":26,"value":33688},"circuit.cnot(",{"type":21,"tag":2072,"props":33690,"children":33691},{"style":2097},[33692],{"type":26,"value":4295},{"type":21,"tag":2072,"props":33694,"children":33695},{"style":2079},[33696],{"type":26,"value":798},{"type":21,"tag":2072,"props":33698,"children":33699},{"style":2097},[33700],{"type":26,"value":3555},{"type":21,"tag":2072,"props":33702,"children":33703},{"style":2079},[33704],{"type":26,"value":4281},{"type":21,"tag":2072,"props":33706,"children":33707},{"class":2074,"line":853},[33708],{"type":21,"tag":2072,"props":33709,"children":33710},{"style":2079},[33711],{"type":26,"value":33712},"circuit.probability()\n",{"type":21,"tag":2072,"props":33714,"children":33715},{"class":2074,"line":3092},[33716],{"type":21,"tag":2072,"props":33717,"children":33718},{"emptyLinePlaceholder":3460},[33719],{"type":26,"value":3463},{"type":21,"tag":2072,"props":33721,"children":33722},{"class":2074,"line":3651},[33723,33728,33732,33737,33741,33745,33749],{"type":21,"tag":2072,"props":33724,"children":33725},{"style":2079},[33726],{"type":26,"value":33727},"task ",{"type":21,"tag":2072,"props":33729,"children":33730},{"style":3372},[33731],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33733,"children":33734},{"style":2079},[33735],{"type":26,"value":33736}," device.run(circuit, ",{"type":21,"tag":2072,"props":33738,"children":33739},{"style":3735},[33740],{"type":26,"value":3226},{"type":21,"tag":2072,"props":33742,"children":33743},{"style":3372},[33744],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33746,"children":33747},{"style":2097},[33748],{"type":26,"value":20641},{"type":21,"tag":2072,"props":33750,"children":33751},{"style":2079},[33752],{"type":26,"value":4281},{"type":21,"tag":2072,"props":33754,"children":33755},{"class":2074,"line":2616},[33756,33760,33764],{"type":21,"tag":2072,"props":33757,"children":33758},{"style":2079},[33759],{"type":26,"value":19471},{"type":21,"tag":2072,"props":33761,"children":33762},{"style":3372},[33763],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33765,"children":33766},{"style":2079},[33767],{"type":26,"value":33768}," task.result()\n",{"type":21,"tag":2072,"props":33770,"children":33771},{"class":2074,"line":3695},[33772,33776],{"type":21,"tag":2072,"props":33773,"children":33774},{"style":2097},[33775],{"type":26,"value":4614},{"type":21,"tag":2072,"props":33777,"children":33778},{"style":2079},[33779],{"type":26,"value":33780},"(result.measurement_counts)\n",{"type":21,"tag":22,"props":33782,"children":33783},{},[33784,33789],{"type":21,"tag":784,"props":33785,"children":33786},{},[33787],{"type":26,"value":33788},"When to use Braket local:",{"type":26,"value":33790}," You're building for AWS deployment and want local dev\u002Ftest that matches the cloud API.",{"type":21,"tag":43,"props":33792,"children":33794},{"id":33793},"the-hlquantum-shortcut",[33795],{"type":26,"value":33796},"The HLQuantum Shortcut",{"type":21,"tag":22,"props":33798,"children":33799},{},[33800,33802,33806],{"type":26,"value":33801},"If you need to run the same circuit on multiple simulators for benchmarking or comparison, ",{"type":21,"tag":29,"props":33803,"children":33804},{"href":19124},[33805],{"type":26,"value":19127},{"type":26,"value":33807}," makes this trivial:",{"type":21,"tag":2062,"props":33809,"children":33811},{"className":3362,"code":33810,"language":3361,"meta":7,"style":7},"import hlquantum as hlq\nimport time\n\nqc = hlq.Circuit(28)\nqc.h(0)\nfor i in range(27):\n    qc.cx(i, i + 1)\nqc.measure_all()\n\nfor backend in [\"qiskit\", \"pennylane\", \"cudaq\"]:\n    t0 = time.time()\n    result = hlq.run(qc, shots=1000, backend=backend)\n    print(f\"{backend}: {time.time() - t0:.2f}s\")\n",[33812],{"type":21,"tag":1831,"props":33813,"children":33814},{"__ignoreMap":7},[33815,33834,33846,33853,33877,33892,33924,33944,33951,33958,34004,34021,34065],{"type":21,"tag":2072,"props":33816,"children":33817},{"class":2074,"line":2075},[33818,33822,33826,33830],{"type":21,"tag":2072,"props":33819,"children":33820},{"style":3372},[33821],{"type":26,"value":3375},{"type":21,"tag":2072,"props":33823,"children":33824},{"style":2079},[33825],{"type":26,"value":19439},{"type":21,"tag":2072,"props":33827,"children":33828},{"style":3372},[33829],{"type":26,"value":3385},{"type":21,"tag":2072,"props":33831,"children":33832},{"style":2079},[33833],{"type":26,"value":19448},{"type":21,"tag":2072,"props":33835,"children":33836},{"class":2074,"line":164},[33837,33841],{"type":21,"tag":2072,"props":33838,"children":33839},{"style":3372},[33840],{"type":26,"value":3375},{"type":21,"tag":2072,"props":33842,"children":33843},{"style":2079},[33844],{"type":26,"value":33845}," time\n",{"type":21,"tag":2072,"props":33847,"children":33848},{"class":2074,"line":2093},[33849],{"type":21,"tag":2072,"props":33850,"children":33851},{"emptyLinePlaceholder":3460},[33852],{"type":26,"value":3463},{"type":21,"tag":2072,"props":33854,"children":33855},{"class":2074,"line":2155},[33856,33860,33864,33868,33873],{"type":21,"tag":2072,"props":33857,"children":33858},{"style":2079},[33859],{"type":26,"value":6514},{"type":21,"tag":2072,"props":33861,"children":33862},{"style":3372},[33863],{"type":26,"value":3487},{"type":21,"tag":2072,"props":33865,"children":33866},{"style":2079},[33867],{"type":26,"value":21612},{"type":21,"tag":2072,"props":33869,"children":33870},{"style":2097},[33871],{"type":26,"value":33872},"28",{"type":21,"tag":2072,"props":33874,"children":33875},{"style":2079},[33876],{"type":26,"value":4281},{"type":21,"tag":2072,"props":33878,"children":33879},{"class":2074,"line":2178},[33880,33884,33888],{"type":21,"tag":2072,"props":33881,"children":33882},{"style":2079},[33883],{"type":26,"value":6530},{"type":21,"tag":2072,"props":33885,"children":33886},{"style":2097},[33887],{"type":26,"value":4295},{"type":21,"tag":2072,"props":33889,"children":33890},{"style":2079},[33891],{"type":26,"value":4281},{"type":21,"tag":2072,"props":33893,"children":33894},{"class":2074,"line":288},[33895,33899,33903,33907,33911,33915,33920],{"type":21,"tag":2072,"props":33896,"children":33897},{"style":3372},[33898],{"type":26,"value":4479},{"type":21,"tag":2072,"props":33900,"children":33901},{"style":2079},[33902],{"type":26,"value":3864},{"type":21,"tag":2072,"props":33904,"children":33905},{"style":3372},[33906],{"type":26,"value":3869},{"type":21,"tag":2072,"props":33908,"children":33909},{"style":2097},[33910],{"type":26,"value":3874},{"type":21,"tag":2072,"props":33912,"children":33913},{"style":2079},[33914],{"type":26,"value":3879},{"type":21,"tag":2072,"props":33916,"children":33917},{"style":2097},[33918],{"type":26,"value":33919},"27",{"type":21,"tag":2072,"props":33921,"children":33922},{"style":2079},[33923],{"type":26,"value":3525},{"type":21,"tag":2072,"props":33925,"children":33926},{"class":2074,"line":16},[33927,33932,33936,33940],{"type":21,"tag":2072,"props":33928,"children":33929},{"style":2079},[33930],{"type":26,"value":33931},"    qc.cx(i, i ",{"type":21,"tag":2072,"props":33933,"children":33934},{"style":3372},[33935],{"type":26,"value":5658},{"type":21,"tag":2072,"props":33937,"children":33938},{"style":2097},[33939],{"type":26,"value":5228},{"type":21,"tag":2072,"props":33941,"children":33942},{"style":2079},[33943],{"type":26,"value":4281},{"type":21,"tag":2072,"props":33945,"children":33946},{"class":2074,"line":366},[33947],{"type":21,"tag":2072,"props":33948,"children":33949},{"style":2079},[33950],{"type":26,"value":13150},{"type":21,"tag":2072,"props":33952,"children":33953},{"class":2074,"line":853},[33954],{"type":21,"tag":2072,"props":33955,"children":33956},{"emptyLinePlaceholder":3460},[33957],{"type":26,"value":3463},{"type":21,"tag":2072,"props":33959,"children":33960},{"class":2074,"line":3092},[33961,33965,33970,33974,33978,33982,33986,33991,33995,34000],{"type":21,"tag":2072,"props":33962,"children":33963},{"style":3372},[33964],{"type":26,"value":4479},{"type":21,"tag":2072,"props":33966,"children":33967},{"style":2079},[33968],{"type":26,"value":33969}," backend ",{"type":21,"tag":2072,"props":33971,"children":33972},{"style":3372},[33973],{"type":26,"value":3869},{"type":21,"tag":2072,"props":33975,"children":33976},{"style":2079},[33977],{"type":26,"value":5791},{"type":21,"tag":2072,"props":33979,"children":33980},{"style":2108},[33981],{"type":26,"value":29173},{"type":21,"tag":2072,"props":33983,"children":33984},{"style":2079},[33985],{"type":26,"value":798},{"type":21,"tag":2072,"props":33987,"children":33988},{"style":2108},[33989],{"type":26,"value":33990},"\"pennylane\"",{"type":21,"tag":2072,"props":33992,"children":33993},{"style":2079},[33994],{"type":26,"value":798},{"type":21,"tag":2072,"props":33996,"children":33997},{"style":2108},[33998],{"type":26,"value":33999},"\"cudaq\"",{"type":21,"tag":2072,"props":34001,"children":34002},{"style":2079},[34003],{"type":26,"value":17643},{"type":21,"tag":2072,"props":34005,"children":34006},{"class":2074,"line":3651},[34007,34012,34016],{"type":21,"tag":2072,"props":34008,"children":34009},{"style":2079},[34010],{"type":26,"value":34011},"    t0 ",{"type":21,"tag":2072,"props":34013,"children":34014},{"style":3372},[34015],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34017,"children":34018},{"style":2079},[34019],{"type":26,"value":34020}," time.time()\n",{"type":21,"tag":2072,"props":34022,"children":34023},{"class":2074,"line":2616},[34024,34029,34033,34037,34041,34045,34049,34053,34057,34061],{"type":21,"tag":2072,"props":34025,"children":34026},{"style":2079},[34027],{"type":26,"value":34028},"    result ",{"type":21,"tag":2072,"props":34030,"children":34031},{"style":3372},[34032],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34034,"children":34035},{"style":2079},[34036],{"type":26,"value":21676},{"type":21,"tag":2072,"props":34038,"children":34039},{"style":3735},[34040],{"type":26,"value":3226},{"type":21,"tag":2072,"props":34042,"children":34043},{"style":3372},[34044],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34046,"children":34047},{"style":2097},[34048],{"type":26,"value":20641},{"type":21,"tag":2072,"props":34050,"children":34051},{"style":2079},[34052],{"type":26,"value":798},{"type":21,"tag":2072,"props":34054,"children":34055},{"style":3735},[34056],{"type":26,"value":18550},{"type":21,"tag":2072,"props":34058,"children":34059},{"style":3372},[34060],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34062,"children":34063},{"style":2079},[34064],{"type":26,"value":28663},{"type":21,"tag":2072,"props":34066,"children":34067},{"class":2074,"line":3695},[34068,34072,34076,34080,34084,34088,34092,34096,34100,34104,34109,34113,34118,34123,34127,34132],{"type":21,"tag":2072,"props":34069,"children":34070},{"style":2097},[34071],{"type":26,"value":17282},{"type":21,"tag":2072,"props":34073,"children":34074},{"style":2079},[34075],{"type":26,"value":3879},{"type":21,"tag":2072,"props":34077,"children":34078},{"style":3372},[34079],{"type":26,"value":3938},{"type":21,"tag":2072,"props":34081,"children":34082},{"style":2108},[34083],{"type":26,"value":7539},{"type":21,"tag":2072,"props":34085,"children":34086},{"style":2097},[34087],{"type":26,"value":3948},{"type":21,"tag":2072,"props":34089,"children":34090},{"style":2079},[34091],{"type":26,"value":18550},{"type":21,"tag":2072,"props":34093,"children":34094},{"style":2097},[34095],{"type":26,"value":3958},{"type":21,"tag":2072,"props":34097,"children":34098},{"style":2108},[34099],{"type":26,"value":66},{"type":21,"tag":2072,"props":34101,"children":34102},{"style":2097},[34103],{"type":26,"value":3948},{"type":21,"tag":2072,"props":34105,"children":34106},{"style":2079},[34107],{"type":26,"value":34108},"time.time() ",{"type":21,"tag":2072,"props":34110,"children":34111},{"style":3372},[34112],{"type":26,"value":3973},{"type":21,"tag":2072,"props":34114,"children":34115},{"style":2079},[34116],{"type":26,"value":34117}," t0",{"type":21,"tag":2072,"props":34119,"children":34120},{"style":3372},[34121],{"type":26,"value":34122},":.2f",{"type":21,"tag":2072,"props":34124,"children":34125},{"style":2097},[34126],{"type":26,"value":3958},{"type":21,"tag":2072,"props":34128,"children":34129},{"style":2108},[34130],{"type":26,"value":34131},"s\"",{"type":21,"tag":2072,"props":34133,"children":34134},{"style":2079},[34135],{"type":26,"value":4281},{"type":21,"tag":22,"props":34137,"children":34138},{},[34139],{"type":26,"value":34140},"One circuit, three backends, directly comparable results.",{"type":21,"tag":22,"props":34142,"children":34143},{},[34144,34146,34150],{"type":26,"value":34145},"When simulation stops being enough, the ",{"type":21,"tag":29,"props":34147,"children":34148},{"href":590},[34149],{"type":26,"value":10797},{"type":26,"value":34151}," covers moving the same circuits onto real QPUs.",{"type":21,"tag":2445,"props":34153,"children":34154},{},[34155],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":34157},[34158,34159,34160,34161,34162,34163,34164],{"id":32141,"depth":164,"text":32144},{"id":32330,"depth":164,"text":32333},{"id":32578,"depth":164,"text":32581},{"id":33039,"depth":164,"text":33042},{"id":33329,"depth":164,"text":33332},{"id":33553,"depth":164,"text":33556},{"id":33793,"depth":164,"text":33796},"content:blog:quantum-simulators-compared.md","blog\u002Fquantum-simulators-compared.md","blog\u002Fquantum-simulators-compared",{"_path":31,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":34169,"description":34170,"date":34171,"author":11,"tags":34172,"readingTime":853,"body":34173,"_type":171,"_id":36318,"_source":173,"_file":36319,"_stem":36320,"_extension":176},"Building a VQE with PennyLane: A Practical Guide","Step-by-step implementation of the Variational Quantum Eigensolver using PennyLane, from Hamiltonian setup to classical optimization loop.","2026-01-28",[14,13846,6280,13845],{"type":18,"children":34174,"toc":36309},[34175,34193,34199,34204,34227,34232,34238,34243,34270,34275,34606,34612,34630,34960,34966,34971,35446,35451,35459,35464,35470,35475,35759,35765,35770,36118,36124,36129,36146,36162,36180,36273,36305],{"type":21,"tag":22,"props":34176,"children":34177},{},[34178,34179,34184,34186,34191],{"type":26,"value":11131},{"type":21,"tag":29,"props":34180,"children":34181},{"href":62},[34182],{"type":26,"value":34183},"Variational Quantum Eigensolver (VQE)",{"type":26,"value":34185}," is one of the most important near-term quantum algorithms, ",{"type":21,"tag":29,"props":34187,"children":34188},{"href":69},[34189],{"type":26,"value":34190},"introduced by Peruzzo et al. in 2014",{"type":26,"value":34192},". It finds the ground state energy of a molecule or material, a calculation that's exponentially hard for classical computers but tractable on NISQ devices. This guide walks through a complete PennyLane VQE implementation.",{"type":21,"tag":43,"props":34194,"children":34196},{"id":34195},"what-vqe-does",[34197],{"type":26,"value":34198},"What VQE Does",{"type":21,"tag":22,"props":34200,"children":34201},{},[34202],{"type":26,"value":34203},"VQE finds the minimum eigenvalue of a Hamiltonian H (usually representing a molecule's energy). It works by:",{"type":21,"tag":6138,"props":34205,"children":34206},{},[34207,34212,34217,34222],{"type":21,"tag":6142,"props":34208,"children":34209},{},[34210],{"type":26,"value":34211},"Preparing a parameterized trial state |ψ(θ)⟩ using a quantum circuit",{"type":21,"tag":6142,"props":34213,"children":34214},{},[34215],{"type":26,"value":34216},"Measuring the expectation value ⟨ψ(θ)|H|ψ(θ)⟩ on the QPU",{"type":21,"tag":6142,"props":34218,"children":34219},{},[34220],{"type":26,"value":34221},"Using a classical optimizer to update θ to minimize the energy",{"type":21,"tag":6142,"props":34223,"children":34224},{},[34225],{"type":26,"value":34226},"Repeating until convergence",{"type":21,"tag":22,"props":34228,"children":34229},{},[34230],{"type":26,"value":34231},"The variational principle guarantees ⟨ψ(θ)|H|ψ(θ)⟩ ≥ E₀ for any state, so minimizing this quantity gives an upper bound on the true ground state energy E₀.",{"type":21,"tag":43,"props":34233,"children":34235},{"id":34234},"setting-up",[34236],{"type":26,"value":34237},"Setting Up",{"type":21,"tag":22,"props":34239,"children":34240},{},[34241],{"type":26,"value":34242},"Install PennyLane with its chemistry plugin:",{"type":21,"tag":2062,"props":34244,"children":34246},{"code":34245,"language":8884,"meta":7,"className":8882,"style":7},"pip install pennylane pennylane-qchem\n",[34247],{"type":21,"tag":1831,"props":34248,"children":34249},{"__ignoreMap":7},[34250],{"type":21,"tag":2072,"props":34251,"children":34252},{"class":2074,"line":2075},[34253,34257,34261,34265],{"type":21,"tag":2072,"props":34254,"children":34255},{"style":3474},[34256],{"type":26,"value":11855},{"type":21,"tag":2072,"props":34258,"children":34259},{"style":2108},[34260],{"type":26,"value":11860},{"type":21,"tag":2072,"props":34262,"children":34263},{"style":2108},[34264],{"type":26,"value":20779},{"type":21,"tag":2072,"props":34266,"children":34267},{"style":2108},[34268],{"type":26,"value":34269}," pennylane-qchem\n",{"type":21,"tag":22,"props":34271,"children":34272},{},[34273],{"type":26,"value":34274},"For hydrogen molecule (H₂), the classic VQE benchmark, we need two electrons and four spin-orbitals (4 qubits):",{"type":21,"tag":2062,"props":34276,"children":34278},{"code":34277,"language":3361,"meta":7,"className":3362,"style":7},"import pennylane as qml\nfrom pennylane import numpy as np\nimport pennylane.qchem as qchem\n\n# H2 at equilibrium bond length (Angstrom)\nsymbols = [\"H\", \"H\"]\ncoordinates = np.array([[0.0, 0.0, -0.6614], [0.0, 0.0, 0.6614]])\n\n# Build the qubit Hamiltonian\nH, qubits = qchem.molecular_hamiltonian(\n    symbols,\n    coordinates,\n    basis=\"sto-3g\"\n)\nprint(f\"Hamiltonian: {len(H.ops)} terms, {qubits} qubits\")\n# Hamiltonian: 15 terms, 4 qubits\n",[34279],{"type":21,"tag":1831,"props":34280,"children":34281},{"__ignoreMap":7},[34282,34301,34328,34349,34356,34364,34397,34468,34475,34483,34500,34508,34516,34532,34539,34598],{"type":21,"tag":2072,"props":34283,"children":34284},{"class":2074,"line":2075},[34285,34289,34293,34297],{"type":21,"tag":2072,"props":34286,"children":34287},{"style":3372},[34288],{"type":26,"value":3375},{"type":21,"tag":2072,"props":34290,"children":34291},{"style":2079},[34292],{"type":26,"value":14153},{"type":21,"tag":2072,"props":34294,"children":34295},{"style":3372},[34296],{"type":26,"value":3385},{"type":21,"tag":2072,"props":34298,"children":34299},{"style":2079},[34300],{"type":26,"value":14162},{"type":21,"tag":2072,"props":34302,"children":34303},{"class":2074,"line":164},[34304,34308,34312,34316,34320,34324],{"type":21,"tag":2072,"props":34305,"children":34306},{"style":3372},[34307],{"type":26,"value":3398},{"type":21,"tag":2072,"props":34309,"children":34310},{"style":2079},[34311],{"type":26,"value":14153},{"type":21,"tag":2072,"props":34313,"children":34314},{"style":3372},[34315],{"type":26,"value":3375},{"type":21,"tag":2072,"props":34317,"children":34318},{"style":2079},[34319],{"type":26,"value":3380},{"type":21,"tag":2072,"props":34321,"children":34322},{"style":3372},[34323],{"type":26,"value":3385},{"type":21,"tag":2072,"props":34325,"children":34326},{"style":2079},[34327],{"type":26,"value":3390},{"type":21,"tag":2072,"props":34329,"children":34330},{"class":2074,"line":2093},[34331,34335,34340,34344],{"type":21,"tag":2072,"props":34332,"children":34333},{"style":3372},[34334],{"type":26,"value":3375},{"type":21,"tag":2072,"props":34336,"children":34337},{"style":2079},[34338],{"type":26,"value":34339}," pennylane.qchem ",{"type":21,"tag":2072,"props":34341,"children":34342},{"style":3372},[34343],{"type":26,"value":3385},{"type":21,"tag":2072,"props":34345,"children":34346},{"style":2079},[34347],{"type":26,"value":34348}," qchem\n",{"type":21,"tag":2072,"props":34350,"children":34351},{"class":2074,"line":2155},[34352],{"type":21,"tag":2072,"props":34353,"children":34354},{"emptyLinePlaceholder":3460},[34355],{"type":26,"value":3463},{"type":21,"tag":2072,"props":34357,"children":34358},{"class":2074,"line":2178},[34359],{"type":21,"tag":2072,"props":34360,"children":34361},{"style":3985},[34362],{"type":26,"value":34363},"# H2 at equilibrium bond length (Angstrom)\n",{"type":21,"tag":2072,"props":34365,"children":34366},{"class":2074,"line":288},[34367,34372,34376,34380,34385,34389,34393],{"type":21,"tag":2072,"props":34368,"children":34369},{"style":2079},[34370],{"type":26,"value":34371},"symbols ",{"type":21,"tag":2072,"props":34373,"children":34374},{"style":3372},[34375],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34377,"children":34378},{"style":2079},[34379],{"type":26,"value":5791},{"type":21,"tag":2072,"props":34381,"children":34382},{"style":2108},[34383],{"type":26,"value":34384},"\"H\"",{"type":21,"tag":2072,"props":34386,"children":34387},{"style":2079},[34388],{"type":26,"value":798},{"type":21,"tag":2072,"props":34390,"children":34391},{"style":2108},[34392],{"type":26,"value":34384},{"type":21,"tag":2072,"props":34394,"children":34395},{"style":2079},[34396],{"type":26,"value":5817},{"type":21,"tag":2072,"props":34398,"children":34399},{"class":2074,"line":16},[34400,34405,34409,34414,34418,34422,34426,34430,34434,34439,34443,34447,34451,34455,34459,34463],{"type":21,"tag":2072,"props":34401,"children":34402},{"style":2079},[34403],{"type":26,"value":34404},"coordinates ",{"type":21,"tag":2072,"props":34406,"children":34407},{"style":3372},[34408],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34410,"children":34411},{"style":2079},[34412],{"type":26,"value":34413}," np.array([[",{"type":21,"tag":2072,"props":34415,"children":34416},{"style":2097},[34417],{"type":26,"value":14977},{"type":21,"tag":2072,"props":34419,"children":34420},{"style":2079},[34421],{"type":26,"value":798},{"type":21,"tag":2072,"props":34423,"children":34424},{"style":2097},[34425],{"type":26,"value":14977},{"type":21,"tag":2072,"props":34427,"children":34428},{"style":2079},[34429],{"type":26,"value":798},{"type":21,"tag":2072,"props":34431,"children":34432},{"style":3372},[34433],{"type":26,"value":3973},{"type":21,"tag":2072,"props":34435,"children":34436},{"style":2097},[34437],{"type":26,"value":34438},"0.6614",{"type":21,"tag":2072,"props":34440,"children":34441},{"style":2079},[34442],{"type":26,"value":4350},{"type":21,"tag":2072,"props":34444,"children":34445},{"style":2097},[34446],{"type":26,"value":14977},{"type":21,"tag":2072,"props":34448,"children":34449},{"style":2079},[34450],{"type":26,"value":798},{"type":21,"tag":2072,"props":34452,"children":34453},{"style":2097},[34454],{"type":26,"value":14977},{"type":21,"tag":2072,"props":34456,"children":34457},{"style":2079},[34458],{"type":26,"value":798},{"type":21,"tag":2072,"props":34460,"children":34461},{"style":2097},[34462],{"type":26,"value":34438},{"type":21,"tag":2072,"props":34464,"children":34465},{"style":2079},[34466],{"type":26,"value":34467},"]])\n",{"type":21,"tag":2072,"props":34469,"children":34470},{"class":2074,"line":366},[34471],{"type":21,"tag":2072,"props":34472,"children":34473},{"emptyLinePlaceholder":3460},[34474],{"type":26,"value":3463},{"type":21,"tag":2072,"props":34476,"children":34477},{"class":2074,"line":853},[34478],{"type":21,"tag":2072,"props":34479,"children":34480},{"style":3985},[34481],{"type":26,"value":34482},"# Build the qubit Hamiltonian\n",{"type":21,"tag":2072,"props":34484,"children":34485},{"class":2074,"line":3092},[34486,34491,34495],{"type":21,"tag":2072,"props":34487,"children":34488},{"style":2079},[34489],{"type":26,"value":34490},"H, qubits ",{"type":21,"tag":2072,"props":34492,"children":34493},{"style":3372},[34494],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34496,"children":34497},{"style":2079},[34498],{"type":26,"value":34499}," qchem.molecular_hamiltonian(\n",{"type":21,"tag":2072,"props":34501,"children":34502},{"class":2074,"line":3651},[34503],{"type":21,"tag":2072,"props":34504,"children":34505},{"style":2079},[34506],{"type":26,"value":34507},"    symbols,\n",{"type":21,"tag":2072,"props":34509,"children":34510},{"class":2074,"line":2616},[34511],{"type":21,"tag":2072,"props":34512,"children":34513},{"style":2079},[34514],{"type":26,"value":34515},"    coordinates,\n",{"type":21,"tag":2072,"props":34517,"children":34518},{"class":2074,"line":3695},[34519,34523,34527],{"type":21,"tag":2072,"props":34520,"children":34521},{"style":3735},[34522],{"type":26,"value":23099},{"type":21,"tag":2072,"props":34524,"children":34525},{"style":3372},[34526],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34528,"children":34529},{"style":2108},[34530],{"type":26,"value":34531},"\"sto-3g\"\n",{"type":21,"tag":2072,"props":34533,"children":34534},{"class":2074,"line":3709},[34535],{"type":21,"tag":2072,"props":34536,"children":34537},{"style":2079},[34538],{"type":26,"value":4281},{"type":21,"tag":2072,"props":34540,"children":34541},{"class":2074,"line":3717},[34542,34546,34550,34554,34559,34563,34568,34572,34577,34581,34585,34589,34594],{"type":21,"tag":2072,"props":34543,"children":34544},{"style":2097},[34545],{"type":26,"value":4614},{"type":21,"tag":2072,"props":34547,"children":34548},{"style":2079},[34549],{"type":26,"value":3879},{"type":21,"tag":2072,"props":34551,"children":34552},{"style":3372},[34553],{"type":26,"value":3938},{"type":21,"tag":2072,"props":34555,"children":34556},{"style":2108},[34557],{"type":26,"value":34558},"\"Hamiltonian: ",{"type":21,"tag":2072,"props":34560,"children":34561},{"style":2097},[34562],{"type":26,"value":25299},{"type":21,"tag":2072,"props":34564,"children":34565},{"style":2079},[34566],{"type":26,"value":34567},"(H.ops)",{"type":21,"tag":2072,"props":34569,"children":34570},{"style":2097},[34571],{"type":26,"value":3958},{"type":21,"tag":2072,"props":34573,"children":34574},{"style":2108},[34575],{"type":26,"value":34576}," terms, ",{"type":21,"tag":2072,"props":34578,"children":34579},{"style":2097},[34580],{"type":26,"value":3948},{"type":21,"tag":2072,"props":34582,"children":34583},{"style":2079},[34584],{"type":26,"value":685},{"type":21,"tag":2072,"props":34586,"children":34587},{"style":2097},[34588],{"type":26,"value":3958},{"type":21,"tag":2072,"props":34590,"children":34591},{"style":2108},[34592],{"type":26,"value":34593}," qubits\"",{"type":21,"tag":2072,"props":34595,"children":34596},{"style":2079},[34597],{"type":26,"value":4281},{"type":21,"tag":2072,"props":34599,"children":34600},{"class":2074,"line":3750},[34601],{"type":21,"tag":2072,"props":34602,"children":34603},{"style":3985},[34604],{"type":26,"value":34605},"# Hamiltonian: 15 terms, 4 qubits\n",{"type":21,"tag":43,"props":34607,"children":34609},{"id":34608},"defining-the-ansatz",[34610],{"type":26,"value":34611},"Defining the Ansatz",{"type":21,"tag":22,"props":34613,"children":34614},{},[34615,34616,34621,34623,34628],{"type":26,"value":11131},{"type":21,"tag":784,"props":34617,"children":34618},{},[34619],{"type":26,"value":34620},"ansatz",{"type":26,"value":34622}," is the ",{"type":21,"tag":29,"props":34624,"children":34625},{"href":13894},[34626],{"type":26,"value":34627},"parameterized circuit",{"type":26,"value":34629}," that prepares the trial state. For chemistry problems, the UCCSD (Unitary Coupled-Cluster Singles and Doubles) ansatz is standard:",{"type":21,"tag":2062,"props":34631,"children":34633},{"code":34632,"language":3361,"meta":7,"className":3362,"style":7},"# Get UCCSD circuit parameters\nelectrons = 2\nsingles, doubles = qchem.excitations(electrons, qubits)\ns_wires, d_wires = qchem.excitations_to_wires(singles, doubles, wires=range(qubits))\n\n# Initial Hartree-Fock state (reference state)\nhf_state = qchem.hf_state(electrons, qubits)\n\ndev = qml.device(\"default.qubit\", wires=qubits)\n\n@qml.qnode(dev)\ndef circuit(weights, wires, s_wires=[], d_wires=[], hf_state=hf_state):\n    # Prepare HF reference state\n    qml.BasisState(hf_state, wires=wires)\n\n    # Apply UCCSD excitations\n    qml.UCCSD(weights, wires, s_wires=s_wires, d_wires=d_wires, init_state=hf_state)\n\n    return qml.expval(H)\n",[34634],{"type":21,"tag":1831,"props":34635,"children":34636},{"__ignoreMap":7},[34637,34645,34661,34678,34712,34719,34727,34744,34751,34787,34794,34805,34848,34856,34877,34884,34892,34942,34949],{"type":21,"tag":2072,"props":34638,"children":34639},{"class":2074,"line":2075},[34640],{"type":21,"tag":2072,"props":34641,"children":34642},{"style":3985},[34643],{"type":26,"value":34644},"# Get UCCSD circuit parameters\n",{"type":21,"tag":2072,"props":34646,"children":34647},{"class":2074,"line":164},[34648,34653,34657],{"type":21,"tag":2072,"props":34649,"children":34650},{"style":2079},[34651],{"type":26,"value":34652},"electrons ",{"type":21,"tag":2072,"props":34654,"children":34655},{"style":3372},[34656],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34658,"children":34659},{"style":2097},[34660],{"type":26,"value":4220},{"type":21,"tag":2072,"props":34662,"children":34663},{"class":2074,"line":2093},[34664,34669,34673],{"type":21,"tag":2072,"props":34665,"children":34666},{"style":2079},[34667],{"type":26,"value":34668},"singles, doubles ",{"type":21,"tag":2072,"props":34670,"children":34671},{"style":3372},[34672],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34674,"children":34675},{"style":2079},[34676],{"type":26,"value":34677}," qchem.excitations(electrons, qubits)\n",{"type":21,"tag":2072,"props":34679,"children":34680},{"class":2074,"line":2155},[34681,34686,34690,34695,34699,34703,34707],{"type":21,"tag":2072,"props":34682,"children":34683},{"style":2079},[34684],{"type":26,"value":34685},"s_wires, d_wires ",{"type":21,"tag":2072,"props":34687,"children":34688},{"style":3372},[34689],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34691,"children":34692},{"style":2079},[34693],{"type":26,"value":34694}," qchem.excitations_to_wires(singles, doubles, ",{"type":21,"tag":2072,"props":34696,"children":34697},{"style":3735},[34698],{"type":26,"value":14309},{"type":21,"tag":2072,"props":34700,"children":34701},{"style":3372},[34702],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34704,"children":34705},{"style":2097},[34706],{"type":26,"value":4068},{"type":21,"tag":2072,"props":34708,"children":34709},{"style":2079},[34710],{"type":26,"value":34711},"(qubits))\n",{"type":21,"tag":2072,"props":34713,"children":34714},{"class":2074,"line":2178},[34715],{"type":21,"tag":2072,"props":34716,"children":34717},{"emptyLinePlaceholder":3460},[34718],{"type":26,"value":3463},{"type":21,"tag":2072,"props":34720,"children":34721},{"class":2074,"line":288},[34722],{"type":21,"tag":2072,"props":34723,"children":34724},{"style":3985},[34725],{"type":26,"value":34726},"# Initial Hartree-Fock state (reference state)\n",{"type":21,"tag":2072,"props":34728,"children":34729},{"class":2074,"line":16},[34730,34735,34739],{"type":21,"tag":2072,"props":34731,"children":34732},{"style":2079},[34733],{"type":26,"value":34734},"hf_state ",{"type":21,"tag":2072,"props":34736,"children":34737},{"style":3372},[34738],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34740,"children":34741},{"style":2079},[34742],{"type":26,"value":34743}," qchem.hf_state(electrons, qubits)\n",{"type":21,"tag":2072,"props":34745,"children":34746},{"class":2074,"line":366},[34747],{"type":21,"tag":2072,"props":34748,"children":34749},{"emptyLinePlaceholder":3460},[34750],{"type":26,"value":3463},{"type":21,"tag":2072,"props":34752,"children":34753},{"class":2074,"line":853},[34754,34758,34762,34766,34770,34774,34778,34782],{"type":21,"tag":2072,"props":34755,"children":34756},{"style":2079},[34757],{"type":26,"value":14286},{"type":21,"tag":2072,"props":34759,"children":34760},{"style":3372},[34761],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34763,"children":34764},{"style":2079},[34765],{"type":26,"value":14295},{"type":21,"tag":2072,"props":34767,"children":34768},{"style":2108},[34769],{"type":26,"value":14300},{"type":21,"tag":2072,"props":34771,"children":34772},{"style":2079},[34773],{"type":26,"value":798},{"type":21,"tag":2072,"props":34775,"children":34776},{"style":3735},[34777],{"type":26,"value":14309},{"type":21,"tag":2072,"props":34779,"children":34780},{"style":3372},[34781],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34783,"children":34784},{"style":2079},[34785],{"type":26,"value":34786},"qubits)\n",{"type":21,"tag":2072,"props":34788,"children":34789},{"class":2074,"line":3092},[34790],{"type":21,"tag":2072,"props":34791,"children":34792},{"emptyLinePlaceholder":3460},[34793],{"type":26,"value":3463},{"type":21,"tag":2072,"props":34795,"children":34796},{"class":2074,"line":3651},[34797,34801],{"type":21,"tag":2072,"props":34798,"children":34799},{"style":3474},[34800],{"type":26,"value":14333},{"type":21,"tag":2072,"props":34802,"children":34803},{"style":2079},[34804],{"type":26,"value":14338},{"type":21,"tag":2072,"props":34806,"children":34807},{"class":2074,"line":2616},[34808,34812,34816,34821,34825,34830,34834,34839,34843],{"type":21,"tag":2072,"props":34809,"children":34810},{"style":3372},[34811],{"type":26,"value":3471},{"type":21,"tag":2072,"props":34813,"children":34814},{"style":3474},[34815],{"type":26,"value":14350},{"type":21,"tag":2072,"props":34817,"children":34818},{"style":2079},[34819],{"type":26,"value":34820},"(weights, wires, s_wires",{"type":21,"tag":2072,"props":34822,"children":34823},{"style":3372},[34824],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34826,"children":34827},{"style":2079},[34828],{"type":26,"value":34829},"[], d_wires",{"type":21,"tag":2072,"props":34831,"children":34832},{"style":3372},[34833],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34835,"children":34836},{"style":2079},[34837],{"type":26,"value":34838},"[], hf_state",{"type":21,"tag":2072,"props":34840,"children":34841},{"style":3372},[34842],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34844,"children":34845},{"style":2079},[34846],{"type":26,"value":34847},"hf_state):\n",{"type":21,"tag":2072,"props":34849,"children":34850},{"class":2074,"line":3695},[34851],{"type":21,"tag":2072,"props":34852,"children":34853},{"style":3985},[34854],{"type":26,"value":34855},"    # Prepare HF reference state\n",{"type":21,"tag":2072,"props":34857,"children":34858},{"class":2074,"line":3709},[34859,34864,34868,34872],{"type":21,"tag":2072,"props":34860,"children":34861},{"style":2079},[34862],{"type":26,"value":34863},"    qml.BasisState(hf_state, ",{"type":21,"tag":2072,"props":34865,"children":34866},{"style":3735},[34867],{"type":26,"value":14309},{"type":21,"tag":2072,"props":34869,"children":34870},{"style":3372},[34871],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34873,"children":34874},{"style":2079},[34875],{"type":26,"value":34876},"wires)\n",{"type":21,"tag":2072,"props":34878,"children":34879},{"class":2074,"line":3717},[34880],{"type":21,"tag":2072,"props":34881,"children":34882},{"emptyLinePlaceholder":3460},[34883],{"type":26,"value":3463},{"type":21,"tag":2072,"props":34885,"children":34886},{"class":2074,"line":3750},[34887],{"type":21,"tag":2072,"props":34888,"children":34889},{"style":3985},[34890],{"type":26,"value":34891},"    # Apply UCCSD excitations\n",{"type":21,"tag":2072,"props":34893,"children":34894},{"class":2074,"line":3769},[34895,34900,34905,34909,34914,34919,34923,34928,34933,34937],{"type":21,"tag":2072,"props":34896,"children":34897},{"style":2079},[34898],{"type":26,"value":34899},"    qml.UCCSD(weights, wires, ",{"type":21,"tag":2072,"props":34901,"children":34902},{"style":3735},[34903],{"type":26,"value":34904},"s_wires",{"type":21,"tag":2072,"props":34906,"children":34907},{"style":3372},[34908],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34910,"children":34911},{"style":2079},[34912],{"type":26,"value":34913},"s_wires, ",{"type":21,"tag":2072,"props":34915,"children":34916},{"style":3735},[34917],{"type":26,"value":34918},"d_wires",{"type":21,"tag":2072,"props":34920,"children":34921},{"style":3372},[34922],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34924,"children":34925},{"style":2079},[34926],{"type":26,"value":34927},"d_wires, ",{"type":21,"tag":2072,"props":34929,"children":34930},{"style":3735},[34931],{"type":26,"value":34932},"init_state",{"type":21,"tag":2072,"props":34934,"children":34935},{"style":3372},[34936],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34938,"children":34939},{"style":2079},[34940],{"type":26,"value":34941},"hf_state)\n",{"type":21,"tag":2072,"props":34943,"children":34944},{"class":2074,"line":3777},[34945],{"type":21,"tag":2072,"props":34946,"children":34947},{"emptyLinePlaceholder":3460},[34948],{"type":26,"value":3463},{"type":21,"tag":2072,"props":34950,"children":34951},{"class":2074,"line":3808},[34952,34956],{"type":21,"tag":2072,"props":34953,"children":34954},{"style":3372},[34955],{"type":26,"value":3701},{"type":21,"tag":2072,"props":34957,"children":34958},{"style":2079},[34959],{"type":26,"value":25506},{"type":21,"tag":43,"props":34961,"children":34963},{"id":34962},"running-the-vqe-optimization",[34964],{"type":26,"value":34965},"Running the VQE Optimization",{"type":21,"tag":22,"props":34967,"children":34968},{},[34969],{"type":26,"value":34970},"With PennyLane's automatic differentiation, we use gradient-based optimizers directly:",{"type":21,"tag":2062,"props":34972,"children":34974},{"code":34973,"language":3361,"meta":7,"className":3362,"style":7},"# Initial parameters (all zeros = Hartree-Fock state)\ninit_params = np.zeros(len(singles) + len(doubles), requires_grad=True)\n\n# Adam optimizer (works well for VQE)\nopt = qml.AdamOptimizer(stepsize=0.4)\n\n# Optimization loop\nenergy_history = []\nparams = init_params.copy()\n\nfor step in range(200):\n    params, energy = opt.step_and_cost(\n        lambda p: circuit(p, range(qubits), s_wires=s_wires, d_wires=d_wires),\n        params\n    )\n    energy_history.append(energy)\n\n    if step % 20 == 0:\n        print(f\"Step {step:3d}: E = {energy:.6f} Ha\")\n\nprint(f\"\\nVQE ground state energy: {energy:.6f} Ha\")\nprint(f\"Reference (exact): -1.136189 Ha\")\n",[34975],{"type":21,"tag":1831,"props":34976,"children":34977},{"__ignoreMap":7},[34978,34986,35040,35047,35055,35087,35094,35102,35119,35134,35141,35172,35188,35235,35243,35250,35258,35265,35297,35363,35370,35422],{"type":21,"tag":2072,"props":34979,"children":34980},{"class":2074,"line":2075},[34981],{"type":21,"tag":2072,"props":34982,"children":34983},{"style":3985},[34984],{"type":26,"value":34985},"# Initial parameters (all zeros = Hartree-Fock state)\n",{"type":21,"tag":2072,"props":34987,"children":34988},{"class":2074,"line":164},[34989,34993,34997,35001,35005,35010,35014,35019,35024,35028,35032,35036],{"type":21,"tag":2072,"props":34990,"children":34991},{"style":2079},[34992],{"type":26,"value":30427},{"type":21,"tag":2072,"props":34994,"children":34995},{"style":3372},[34996],{"type":26,"value":3487},{"type":21,"tag":2072,"props":34998,"children":34999},{"style":2079},[35000],{"type":26,"value":12748},{"type":21,"tag":2072,"props":35002,"children":35003},{"style":2097},[35004],{"type":26,"value":15125},{"type":21,"tag":2072,"props":35006,"children":35007},{"style":2079},[35008],{"type":26,"value":35009},"(singles) ",{"type":21,"tag":2072,"props":35011,"children":35012},{"style":3372},[35013],{"type":26,"value":5658},{"type":21,"tag":2072,"props":35015,"children":35016},{"style":2097},[35017],{"type":26,"value":35018}," len",{"type":21,"tag":2072,"props":35020,"children":35021},{"style":2079},[35022],{"type":26,"value":35023},"(doubles), ",{"type":21,"tag":2072,"props":35025,"children":35026},{"style":3735},[35027],{"type":26,"value":14943},{"type":21,"tag":2072,"props":35029,"children":35030},{"style":3372},[35031],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35033,"children":35034},{"style":2097},[35035],{"type":26,"value":7340},{"type":21,"tag":2072,"props":35037,"children":35038},{"style":2079},[35039],{"type":26,"value":4281},{"type":21,"tag":2072,"props":35041,"children":35042},{"class":2074,"line":2093},[35043],{"type":21,"tag":2072,"props":35044,"children":35045},{"emptyLinePlaceholder":3460},[35046],{"type":26,"value":3463},{"type":21,"tag":2072,"props":35048,"children":35049},{"class":2074,"line":2155},[35050],{"type":21,"tag":2072,"props":35051,"children":35052},{"style":3985},[35053],{"type":26,"value":35054},"# Adam optimizer (works well for VQE)\n",{"type":21,"tag":2072,"props":35056,"children":35057},{"class":2074,"line":2178},[35058,35062,35066,35070,35074,35078,35083],{"type":21,"tag":2072,"props":35059,"children":35060},{"style":2079},[35061],{"type":26,"value":15012},{"type":21,"tag":2072,"props":35063,"children":35064},{"style":3372},[35065],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35067,"children":35068},{"style":2079},[35069],{"type":26,"value":15021},{"type":21,"tag":2072,"props":35071,"children":35072},{"style":3735},[35073],{"type":26,"value":15026},{"type":21,"tag":2072,"props":35075,"children":35076},{"style":3372},[35077],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35079,"children":35080},{"style":2097},[35081],{"type":26,"value":35082},"0.4",{"type":21,"tag":2072,"props":35084,"children":35085},{"style":2079},[35086],{"type":26,"value":4281},{"type":21,"tag":2072,"props":35088,"children":35089},{"class":2074,"line":288},[35090],{"type":21,"tag":2072,"props":35091,"children":35092},{"emptyLinePlaceholder":3460},[35093],{"type":26,"value":3463},{"type":21,"tag":2072,"props":35095,"children":35096},{"class":2074,"line":16},[35097],{"type":21,"tag":2072,"props":35098,"children":35099},{"style":3985},[35100],{"type":26,"value":35101},"# Optimization loop\n",{"type":21,"tag":2072,"props":35103,"children":35104},{"class":2074,"line":366},[35105,35110,35114],{"type":21,"tag":2072,"props":35106,"children":35107},{"style":2079},[35108],{"type":26,"value":35109},"energy_history ",{"type":21,"tag":2072,"props":35111,"children":35112},{"style":3372},[35113],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35115,"children":35116},{"style":2079},[35117],{"type":26,"value":35118}," []\n",{"type":21,"tag":2072,"props":35120,"children":35121},{"class":2074,"line":853},[35122,35126,35130],{"type":21,"tag":2072,"props":35123,"children":35124},{"style":2079},[35125],{"type":26,"value":25569},{"type":21,"tag":2072,"props":35127,"children":35128},{"style":3372},[35129],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35131,"children":35132},{"style":2079},[35133],{"type":26,"value":26240},{"type":21,"tag":2072,"props":35135,"children":35136},{"class":2074,"line":3092},[35137],{"type":21,"tag":2072,"props":35138,"children":35139},{"emptyLinePlaceholder":3460},[35140],{"type":26,"value":3463},{"type":21,"tag":2072,"props":35142,"children":35143},{"class":2074,"line":3651},[35144,35148,35152,35156,35160,35164,35168],{"type":21,"tag":2072,"props":35145,"children":35146},{"style":3372},[35147],{"type":26,"value":4479},{"type":21,"tag":2072,"props":35149,"children":35150},{"style":2079},[35151],{"type":26,"value":15074},{"type":21,"tag":2072,"props":35153,"children":35154},{"style":3372},[35155],{"type":26,"value":3869},{"type":21,"tag":2072,"props":35157,"children":35158},{"style":2097},[35159],{"type":26,"value":3874},{"type":21,"tag":2072,"props":35161,"children":35162},{"style":2079},[35163],{"type":26,"value":3879},{"type":21,"tag":2072,"props":35165,"children":35166},{"style":2097},[35167],{"type":26,"value":14691},{"type":21,"tag":2072,"props":35169,"children":35170},{"style":2079},[35171],{"type":26,"value":3525},{"type":21,"tag":2072,"props":35173,"children":35174},{"class":2074,"line":2616},[35175,35179,35183],{"type":21,"tag":2072,"props":35176,"children":35177},{"style":2079},[35178],{"type":26,"value":26309},{"type":21,"tag":2072,"props":35180,"children":35181},{"style":3372},[35182],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35184,"children":35185},{"style":2079},[35186],{"type":26,"value":35187}," opt.step_and_cost(\n",{"type":21,"tag":2072,"props":35189,"children":35190},{"class":2074,"line":3695},[35191,35196,35201,35205,35210,35214,35218,35222,35226,35230],{"type":21,"tag":2072,"props":35192,"children":35193},{"style":3372},[35194],{"type":26,"value":35195},"        lambda",{"type":21,"tag":2072,"props":35197,"children":35198},{"style":2079},[35199],{"type":26,"value":35200}," p: circuit(p, ",{"type":21,"tag":2072,"props":35202,"children":35203},{"style":2097},[35204],{"type":26,"value":4068},{"type":21,"tag":2072,"props":35206,"children":35207},{"style":2079},[35208],{"type":26,"value":35209},"(qubits), ",{"type":21,"tag":2072,"props":35211,"children":35212},{"style":3735},[35213],{"type":26,"value":34904},{"type":21,"tag":2072,"props":35215,"children":35216},{"style":3372},[35217],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35219,"children":35220},{"style":2079},[35221],{"type":26,"value":34913},{"type":21,"tag":2072,"props":35223,"children":35224},{"style":3735},[35225],{"type":26,"value":34918},{"type":21,"tag":2072,"props":35227,"children":35228},{"style":3372},[35229],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35231,"children":35232},{"style":2079},[35233],{"type":26,"value":35234},"d_wires),\n",{"type":21,"tag":2072,"props":35236,"children":35237},{"class":2074,"line":3709},[35238],{"type":21,"tag":2072,"props":35239,"children":35240},{"style":2079},[35241],{"type":26,"value":35242},"        params\n",{"type":21,"tag":2072,"props":35244,"children":35245},{"class":2074,"line":3717},[35246],{"type":21,"tag":2072,"props":35247,"children":35248},{"style":2079},[35249],{"type":26,"value":3692},{"type":21,"tag":2072,"props":35251,"children":35252},{"class":2074,"line":3750},[35253],{"type":21,"tag":2072,"props":35254,"children":35255},{"style":2079},[35256],{"type":26,"value":35257},"    energy_history.append(energy)\n",{"type":21,"tag":2072,"props":35259,"children":35260},{"class":2074,"line":3769},[35261],{"type":21,"tag":2072,"props":35262,"children":35263},{"emptyLinePlaceholder":3460},[35264],{"type":26,"value":3463},{"type":21,"tag":2072,"props":35266,"children":35267},{"class":2074,"line":3777},[35268,35272,35276,35280,35285,35289,35293],{"type":21,"tag":2072,"props":35269,"children":35270},{"style":3372},[35271],{"type":26,"value":12007},{"type":21,"tag":2072,"props":35273,"children":35274},{"style":2079},[35275],{"type":26,"value":15074},{"type":21,"tag":2072,"props":35277,"children":35278},{"style":3372},[35279],{"type":26,"value":5508},{"type":21,"tag":2072,"props":35281,"children":35282},{"style":2097},[35283],{"type":26,"value":35284}," 20",{"type":21,"tag":2072,"props":35286,"children":35287},{"style":3372},[35288],{"type":26,"value":15200},{"type":21,"tag":2072,"props":35290,"children":35291},{"style":2097},[35292],{"type":26,"value":12021},{"type":21,"tag":2072,"props":35294,"children":35295},{"style":2079},[35296],{"type":26,"value":4045},{"type":21,"tag":2072,"props":35298,"children":35299},{"class":2074,"line":3808},[35300,35304,35308,35312,35316,35320,35324,35329,35333,35338,35342,35346,35351,35355,35359],{"type":21,"tag":2072,"props":35301,"children":35302},{"style":2097},[35303],{"type":26,"value":12953},{"type":21,"tag":2072,"props":35305,"children":35306},{"style":2079},[35307],{"type":26,"value":3879},{"type":21,"tag":2072,"props":35309,"children":35310},{"style":3372},[35311],{"type":26,"value":3938},{"type":21,"tag":2072,"props":35313,"children":35314},{"style":2108},[35315],{"type":26,"value":15291},{"type":21,"tag":2072,"props":35317,"children":35318},{"style":2097},[35319],{"type":26,"value":3948},{"type":21,"tag":2072,"props":35321,"children":35322},{"style":2079},[35323],{"type":26,"value":15300},{"type":21,"tag":2072,"props":35325,"children":35326},{"style":3372},[35327],{"type":26,"value":35328},":3d",{"type":21,"tag":2072,"props":35330,"children":35331},{"style":2097},[35332],{"type":26,"value":3958},{"type":21,"tag":2072,"props":35334,"children":35335},{"style":2108},[35336],{"type":26,"value":35337},": E = ",{"type":21,"tag":2072,"props":35339,"children":35340},{"style":2097},[35341],{"type":26,"value":3948},{"type":21,"tag":2072,"props":35343,"children":35344},{"style":2079},[35345],{"type":26,"value":27220},{"type":21,"tag":2072,"props":35347,"children":35348},{"style":3372},[35349],{"type":26,"value":35350},":.6f",{"type":21,"tag":2072,"props":35352,"children":35353},{"style":2097},[35354],{"type":26,"value":3958},{"type":21,"tag":2072,"props":35356,"children":35357},{"style":2108},[35358],{"type":26,"value":19575},{"type":21,"tag":2072,"props":35360,"children":35361},{"style":2079},[35362],{"type":26,"value":4281},{"type":21,"tag":2072,"props":35364,"children":35365},{"class":2074,"line":3853},[35366],{"type":21,"tag":2072,"props":35367,"children":35368},{"emptyLinePlaceholder":3460},[35369],{"type":26,"value":3463},{"type":21,"tag":2072,"props":35371,"children":35372},{"class":2074,"line":3895},[35373,35377,35381,35385,35389,35393,35398,35402,35406,35410,35414,35418],{"type":21,"tag":2072,"props":35374,"children":35375},{"style":2097},[35376],{"type":26,"value":4614},{"type":21,"tag":2072,"props":35378,"children":35379},{"style":2079},[35380],{"type":26,"value":3879},{"type":21,"tag":2072,"props":35382,"children":35383},{"style":3372},[35384],{"type":26,"value":3938},{"type":21,"tag":2072,"props":35386,"children":35387},{"style":2108},[35388],{"type":26,"value":7539},{"type":21,"tag":2072,"props":35390,"children":35391},{"style":2097},[35392],{"type":26,"value":15428},{"type":21,"tag":2072,"props":35394,"children":35395},{"style":2108},[35396],{"type":26,"value":35397},"VQE ground state energy: ",{"type":21,"tag":2072,"props":35399,"children":35400},{"style":2097},[35401],{"type":26,"value":3948},{"type":21,"tag":2072,"props":35403,"children":35404},{"style":2079},[35405],{"type":26,"value":27220},{"type":21,"tag":2072,"props":35407,"children":35408},{"style":3372},[35409],{"type":26,"value":35350},{"type":21,"tag":2072,"props":35411,"children":35412},{"style":2097},[35413],{"type":26,"value":3958},{"type":21,"tag":2072,"props":35415,"children":35416},{"style":2108},[35417],{"type":26,"value":19575},{"type":21,"tag":2072,"props":35419,"children":35420},{"style":2079},[35421],{"type":26,"value":4281},{"type":21,"tag":2072,"props":35423,"children":35424},{"class":2074,"line":3913},[35425,35429,35433,35437,35442],{"type":21,"tag":2072,"props":35426,"children":35427},{"style":2097},[35428],{"type":26,"value":4614},{"type":21,"tag":2072,"props":35430,"children":35431},{"style":2079},[35432],{"type":26,"value":3879},{"type":21,"tag":2072,"props":35434,"children":35435},{"style":3372},[35436],{"type":26,"value":3938},{"type":21,"tag":2072,"props":35438,"children":35439},{"style":2108},[35440],{"type":26,"value":35441},"\"Reference (exact): -1.136189 Ha\"",{"type":21,"tag":2072,"props":35443,"children":35444},{"style":2079},[35445],{"type":26,"value":4281},{"type":21,"tag":22,"props":35447,"children":35448},{},[35449],{"type":26,"value":35450},"Typical output:",{"type":21,"tag":2062,"props":35452,"children":35454},{"code":35453},"Step   0: E = -1.117498 Ha\nStep  20: E = -1.133254 Ha\nStep  40: E = -1.135901 Ha\nStep  60: E = -1.136140 Ha\n...\nVQE ground state energy: -1.136174 Ha\nReference (exact): -1.136189 Ha\n",[35455],{"type":21,"tag":1831,"props":35456,"children":35457},{"__ignoreMap":7},[35458],{"type":26,"value":35453},{"type":21,"tag":22,"props":35460,"children":35461},{},[35462],{"type":26,"value":35463},"VQE reaches within ~0.015 mHa of the exact energy: chemical accuracy for H₂.",{"type":21,"tag":43,"props":35465,"children":35467},{"id":35466},"using-a-gradient-free-optimizer",[35468],{"type":26,"value":35469},"Using a Gradient-Free Optimizer",{"type":21,"tag":22,"props":35471,"children":35472},{},[35473],{"type":26,"value":35474},"For noisy hardware, gradient-free optimizers like COBYLA or SPSA are often better since hardware gradients are noisy:",{"type":21,"tag":2062,"props":35476,"children":35478},{"code":35477,"language":3361,"meta":7,"className":3362,"style":7},"from scipy.optimize import minimize\n\n# Objective function (no gradient needed)\ndef objective(params):\n    return float(circuit(params, range(qubits), s_wires=s_wires, d_wires=d_wires))\n\nresult = minimize(\n    objective,\n    x0=init_params,\n    method=\"COBYLA\",\n    options={\"maxiter\": 500, \"rhobeg\": 0.1}\n)\n\nprint(f\"COBYLA energy: {result.fun:.6f} Ha\")\n",[35479],{"type":21,"tag":1831,"props":35480,"children":35481},{"__ignoreMap":7},[35482,35501,35508,35516,35532,35581,35588,35604,35612,35629,35650,35701,35708,35715],{"type":21,"tag":2072,"props":35483,"children":35484},{"class":2074,"line":2075},[35485,35489,35493,35497],{"type":21,"tag":2072,"props":35486,"children":35487},{"style":3372},[35488],{"type":26,"value":3398},{"type":21,"tag":2072,"props":35490,"children":35491},{"style":2079},[35492],{"type":26,"value":29540},{"type":21,"tag":2072,"props":35494,"children":35495},{"style":3372},[35496],{"type":26,"value":3375},{"type":21,"tag":2072,"props":35498,"children":35499},{"style":2079},[35500],{"type":26,"value":29549},{"type":21,"tag":2072,"props":35502,"children":35503},{"class":2074,"line":164},[35504],{"type":21,"tag":2072,"props":35505,"children":35506},{"emptyLinePlaceholder":3460},[35507],{"type":26,"value":3463},{"type":21,"tag":2072,"props":35509,"children":35510},{"class":2074,"line":2093},[35511],{"type":21,"tag":2072,"props":35512,"children":35513},{"style":3985},[35514],{"type":26,"value":35515},"# Objective function (no gradient needed)\n",{"type":21,"tag":2072,"props":35517,"children":35518},{"class":2074,"line":2155},[35519,35523,35528],{"type":21,"tag":2072,"props":35520,"children":35521},{"style":3372},[35522],{"type":26,"value":3471},{"type":21,"tag":2072,"props":35524,"children":35525},{"style":3474},[35526],{"type":26,"value":35527}," objective",{"type":21,"tag":2072,"props":35529,"children":35530},{"style":2079},[35531],{"type":26,"value":25478},{"type":21,"tag":2072,"props":35533,"children":35534},{"class":2074,"line":2178},[35535,35539,35543,35548,35552,35556,35560,35564,35568,35572,35576],{"type":21,"tag":2072,"props":35536,"children":35537},{"style":3372},[35538],{"type":26,"value":3701},{"type":21,"tag":2072,"props":35540,"children":35541},{"style":2097},[35542],{"type":26,"value":26257},{"type":21,"tag":2072,"props":35544,"children":35545},{"style":2079},[35546],{"type":26,"value":35547},"(circuit(params, ",{"type":21,"tag":2072,"props":35549,"children":35550},{"style":2097},[35551],{"type":26,"value":4068},{"type":21,"tag":2072,"props":35553,"children":35554},{"style":2079},[35555],{"type":26,"value":35209},{"type":21,"tag":2072,"props":35557,"children":35558},{"style":3735},[35559],{"type":26,"value":34904},{"type":21,"tag":2072,"props":35561,"children":35562},{"style":3372},[35563],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35565,"children":35566},{"style":2079},[35567],{"type":26,"value":34913},{"type":21,"tag":2072,"props":35569,"children":35570},{"style":3735},[35571],{"type":26,"value":34918},{"type":21,"tag":2072,"props":35573,"children":35574},{"style":3372},[35575],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35577,"children":35578},{"style":2079},[35579],{"type":26,"value":35580},"d_wires))\n",{"type":21,"tag":2072,"props":35582,"children":35583},{"class":2074,"line":288},[35584],{"type":21,"tag":2072,"props":35585,"children":35586},{"emptyLinePlaceholder":3460},[35587],{"type":26,"value":3463},{"type":21,"tag":2072,"props":35589,"children":35590},{"class":2074,"line":16},[35591,35595,35599],{"type":21,"tag":2072,"props":35592,"children":35593},{"style":2079},[35594],{"type":26,"value":19471},{"type":21,"tag":2072,"props":35596,"children":35597},{"style":3372},[35598],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35600,"children":35601},{"style":2079},[35602],{"type":26,"value":35603}," minimize(\n",{"type":21,"tag":2072,"props":35605,"children":35606},{"class":2074,"line":366},[35607],{"type":21,"tag":2072,"props":35608,"children":35609},{"style":2079},[35610],{"type":26,"value":35611},"    objective,\n",{"type":21,"tag":2072,"props":35613,"children":35614},{"class":2074,"line":853},[35615,35620,35624],{"type":21,"tag":2072,"props":35616,"children":35617},{"style":3735},[35618],{"type":26,"value":35619},"    x0",{"type":21,"tag":2072,"props":35621,"children":35622},{"style":3372},[35623],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35625,"children":35626},{"style":2079},[35627],{"type":26,"value":35628},"init_params,\n",{"type":21,"tag":2072,"props":35630,"children":35631},{"class":2074,"line":3092},[35632,35637,35641,35646],{"type":21,"tag":2072,"props":35633,"children":35634},{"style":3735},[35635],{"type":26,"value":35636},"    method",{"type":21,"tag":2072,"props":35638,"children":35639},{"style":3372},[35640],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35642,"children":35643},{"style":2108},[35644],{"type":26,"value":35645},"\"COBYLA\"",{"type":21,"tag":2072,"props":35647,"children":35648},{"style":2079},[35649],{"type":26,"value":2175},{"type":21,"tag":2072,"props":35651,"children":35652},{"class":2074,"line":3651},[35653,35658,35662,35666,35671,35675,35680,35684,35689,35693,35697],{"type":21,"tag":2072,"props":35654,"children":35655},{"style":3735},[35656],{"type":26,"value":35657},"    options",{"type":21,"tag":2072,"props":35659,"children":35660},{"style":3372},[35661],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35663,"children":35664},{"style":2079},[35665],{"type":26,"value":3948},{"type":21,"tag":2072,"props":35667,"children":35668},{"style":2108},[35669],{"type":26,"value":35670},"\"maxiter\"",{"type":21,"tag":2072,"props":35672,"children":35673},{"style":2079},[35674],{"type":26,"value":66},{"type":21,"tag":2072,"props":35676,"children":35677},{"style":2097},[35678],{"type":26,"value":35679},"500",{"type":21,"tag":2072,"props":35681,"children":35682},{"style":2079},[35683],{"type":26,"value":798},{"type":21,"tag":2072,"props":35685,"children":35686},{"style":2108},[35687],{"type":26,"value":35688},"\"rhobeg\"",{"type":21,"tag":2072,"props":35690,"children":35691},{"style":2079},[35692],{"type":26,"value":66},{"type":21,"tag":2072,"props":35694,"children":35695},{"style":2097},[35696],{"type":26,"value":14933},{"type":21,"tag":2072,"props":35698,"children":35699},{"style":2079},[35700],{"type":26,"value":2263},{"type":21,"tag":2072,"props":35702,"children":35703},{"class":2074,"line":2616},[35704],{"type":21,"tag":2072,"props":35705,"children":35706},{"style":2079},[35707],{"type":26,"value":4281},{"type":21,"tag":2072,"props":35709,"children":35710},{"class":2074,"line":3695},[35711],{"type":21,"tag":2072,"props":35712,"children":35713},{"emptyLinePlaceholder":3460},[35714],{"type":26,"value":3463},{"type":21,"tag":2072,"props":35716,"children":35717},{"class":2074,"line":3709},[35718,35722,35726,35730,35735,35739,35743,35747,35751,35755],{"type":21,"tag":2072,"props":35719,"children":35720},{"style":2097},[35721],{"type":26,"value":4614},{"type":21,"tag":2072,"props":35723,"children":35724},{"style":2079},[35725],{"type":26,"value":3879},{"type":21,"tag":2072,"props":35727,"children":35728},{"style":3372},[35729],{"type":26,"value":3938},{"type":21,"tag":2072,"props":35731,"children":35732},{"style":2108},[35733],{"type":26,"value":35734},"\"COBYLA energy: ",{"type":21,"tag":2072,"props":35736,"children":35737},{"style":2097},[35738],{"type":26,"value":3948},{"type":21,"tag":2072,"props":35740,"children":35741},{"style":2079},[35742],{"type":26,"value":30605},{"type":21,"tag":2072,"props":35744,"children":35745},{"style":3372},[35746],{"type":26,"value":35350},{"type":21,"tag":2072,"props":35748,"children":35749},{"style":2097},[35750],{"type":26,"value":3958},{"type":21,"tag":2072,"props":35752,"children":35753},{"style":2108},[35754],{"type":26,"value":19575},{"type":21,"tag":2072,"props":35756,"children":35757},{"style":2079},[35758],{"type":26,"value":4281},{"type":21,"tag":43,"props":35760,"children":35762},{"id":35761},"running-vqe-with-hlquantum",[35763],{"type":26,"value":35764},"Running VQE with HLQuantum",{"type":21,"tag":22,"props":35766,"children":35767},{},[35768],{"type":26,"value":35769},"HLQuantum includes a built-in VQE implementation that works across all backends:",{"type":21,"tag":2062,"props":35771,"children":35773},{"code":35772,"language":3361,"meta":7,"className":3362,"style":7},"import hlquantum as hlq\n\n# Define the Hamiltonian in HLQuantum's format\nH = hlq.hamiltonians.h2_molecule(bond_length=1.32)\n\n# Run VQE on any backend\nresult = hlq.algorithms.vqe(\n    hamiltonian=H,\n    ansatz=\"uccsd\",\n    optimizer=\"adam\",\n    max_iterations=200,\n    backend=\"pennylane\",   # or \"qiskit\", \"cudaq\"\n)\n\nprint(f\"Ground state energy: {result.energy:.6f} Ha\")\nprint(f\"Optimal parameters: {result.params}\")\nprint(f\"Converged in {result.iterations} iterations\")\n",[35774],{"type":21,"tag":1831,"props":35775,"children":35776},{"__ignoreMap":7},[35777,35796,35803,35811,35845,35852,35860,35875,35892,35913,35933,35953,35978,35985,35992,36035,36076],{"type":21,"tag":2072,"props":35778,"children":35779},{"class":2074,"line":2075},[35780,35784,35788,35792],{"type":21,"tag":2072,"props":35781,"children":35782},{"style":3372},[35783],{"type":26,"value":3375},{"type":21,"tag":2072,"props":35785,"children":35786},{"style":2079},[35787],{"type":26,"value":19439},{"type":21,"tag":2072,"props":35789,"children":35790},{"style":3372},[35791],{"type":26,"value":3385},{"type":21,"tag":2072,"props":35793,"children":35794},{"style":2079},[35795],{"type":26,"value":19448},{"type":21,"tag":2072,"props":35797,"children":35798},{"class":2074,"line":164},[35799],{"type":21,"tag":2072,"props":35800,"children":35801},{"emptyLinePlaceholder":3460},[35802],{"type":26,"value":3463},{"type":21,"tag":2072,"props":35804,"children":35805},{"class":2074,"line":2093},[35806],{"type":21,"tag":2072,"props":35807,"children":35808},{"style":3985},[35809],{"type":26,"value":35810},"# Define the Hamiltonian in HLQuantum's format\n",{"type":21,"tag":2072,"props":35812,"children":35813},{"class":2074,"line":2155},[35814,35818,35822,35827,35832,35836,35841],{"type":21,"tag":2072,"props":35815,"children":35816},{"style":2079},[35817],{"type":26,"value":25215},{"type":21,"tag":2072,"props":35819,"children":35820},{"style":3372},[35821],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35823,"children":35824},{"style":2079},[35825],{"type":26,"value":35826}," hlq.hamiltonians.h2_molecule(",{"type":21,"tag":2072,"props":35828,"children":35829},{"style":3735},[35830],{"type":26,"value":35831},"bond_length",{"type":21,"tag":2072,"props":35833,"children":35834},{"style":3372},[35835],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35837,"children":35838},{"style":2097},[35839],{"type":26,"value":35840},"1.32",{"type":21,"tag":2072,"props":35842,"children":35843},{"style":2079},[35844],{"type":26,"value":4281},{"type":21,"tag":2072,"props":35846,"children":35847},{"class":2074,"line":2178},[35848],{"type":21,"tag":2072,"props":35849,"children":35850},{"emptyLinePlaceholder":3460},[35851],{"type":26,"value":3463},{"type":21,"tag":2072,"props":35853,"children":35854},{"class":2074,"line":288},[35855],{"type":21,"tag":2072,"props":35856,"children":35857},{"style":3985},[35858],{"type":26,"value":35859},"# Run VQE on any backend\n",{"type":21,"tag":2072,"props":35861,"children":35862},{"class":2074,"line":16},[35863,35867,35871],{"type":21,"tag":2072,"props":35864,"children":35865},{"style":2079},[35866],{"type":26,"value":19471},{"type":21,"tag":2072,"props":35868,"children":35869},{"style":3372},[35870],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35872,"children":35873},{"style":2079},[35874],{"type":26,"value":23071},{"type":21,"tag":2072,"props":35876,"children":35877},{"class":2074,"line":366},[35878,35883,35887],{"type":21,"tag":2072,"props":35879,"children":35880},{"style":3735},[35881],{"type":26,"value":35882},"    hamiltonian",{"type":21,"tag":2072,"props":35884,"children":35885},{"style":3372},[35886],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35888,"children":35889},{"style":2079},[35890],{"type":26,"value":35891},"H,\n",{"type":21,"tag":2072,"props":35893,"children":35894},{"class":2074,"line":853},[35895,35900,35904,35909],{"type":21,"tag":2072,"props":35896,"children":35897},{"style":3735},[35898],{"type":26,"value":35899},"    ansatz",{"type":21,"tag":2072,"props":35901,"children":35902},{"style":3372},[35903],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35905,"children":35906},{"style":2108},[35907],{"type":26,"value":35908},"\"uccsd\"",{"type":21,"tag":2072,"props":35910,"children":35911},{"style":2079},[35912],{"type":26,"value":2175},{"type":21,"tag":2072,"props":35914,"children":35915},{"class":2074,"line":3092},[35916,35920,35924,35929],{"type":21,"tag":2072,"props":35917,"children":35918},{"style":3735},[35919],{"type":26,"value":23139},{"type":21,"tag":2072,"props":35921,"children":35922},{"style":3372},[35923],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35925,"children":35926},{"style":2108},[35927],{"type":26,"value":35928},"\"adam\"",{"type":21,"tag":2072,"props":35930,"children":35931},{"style":2079},[35932],{"type":26,"value":2175},{"type":21,"tag":2072,"props":35934,"children":35935},{"class":2074,"line":3651},[35936,35941,35945,35949],{"type":21,"tag":2072,"props":35937,"children":35938},{"style":3735},[35939],{"type":26,"value":35940},"    max_iterations",{"type":21,"tag":2072,"props":35942,"children":35943},{"style":3372},[35944],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35946,"children":35947},{"style":2097},[35948],{"type":26,"value":14691},{"type":21,"tag":2072,"props":35950,"children":35951},{"style":2079},[35952],{"type":26,"value":2175},{"type":21,"tag":2072,"props":35954,"children":35955},{"class":2074,"line":2616},[35956,35960,35964,35968,35973],{"type":21,"tag":2072,"props":35957,"children":35958},{"style":3735},[35959],{"type":26,"value":23119},{"type":21,"tag":2072,"props":35961,"children":35962},{"style":3372},[35963],{"type":26,"value":3487},{"type":21,"tag":2072,"props":35965,"children":35966},{"style":2108},[35967],{"type":26,"value":33990},{"type":21,"tag":2072,"props":35969,"children":35970},{"style":2079},[35971],{"type":26,"value":35972},",   ",{"type":21,"tag":2072,"props":35974,"children":35975},{"style":3985},[35976],{"type":26,"value":35977},"# or \"qiskit\", \"cudaq\"\n",{"type":21,"tag":2072,"props":35979,"children":35980},{"class":2074,"line":3695},[35981],{"type":21,"tag":2072,"props":35982,"children":35983},{"style":2079},[35984],{"type":26,"value":4281},{"type":21,"tag":2072,"props":35986,"children":35987},{"class":2074,"line":3709},[35988],{"type":21,"tag":2072,"props":35989,"children":35990},{"emptyLinePlaceholder":3460},[35991],{"type":26,"value":3463},{"type":21,"tag":2072,"props":35993,"children":35994},{"class":2074,"line":3717},[35995,35999,36003,36007,36011,36015,36019,36023,36027,36031],{"type":21,"tag":2072,"props":35996,"children":35997},{"style":2097},[35998],{"type":26,"value":4614},{"type":21,"tag":2072,"props":36000,"children":36001},{"style":2079},[36002],{"type":26,"value":3879},{"type":21,"tag":2072,"props":36004,"children":36005},{"style":3372},[36006],{"type":26,"value":3938},{"type":21,"tag":2072,"props":36008,"children":36009},{"style":2108},[36010],{"type":26,"value":27211},{"type":21,"tag":2072,"props":36012,"children":36013},{"style":2097},[36014],{"type":26,"value":3948},{"type":21,"tag":2072,"props":36016,"children":36017},{"style":2079},[36018],{"type":26,"value":19562},{"type":21,"tag":2072,"props":36020,"children":36021},{"style":3372},[36022],{"type":26,"value":35350},{"type":21,"tag":2072,"props":36024,"children":36025},{"style":2097},[36026],{"type":26,"value":3958},{"type":21,"tag":2072,"props":36028,"children":36029},{"style":2108},[36030],{"type":26,"value":19575},{"type":21,"tag":2072,"props":36032,"children":36033},{"style":2079},[36034],{"type":26,"value":4281},{"type":21,"tag":2072,"props":36036,"children":36037},{"class":2074,"line":3750},[36038,36042,36046,36050,36055,36059,36064,36068,36072],{"type":21,"tag":2072,"props":36039,"children":36040},{"style":2097},[36041],{"type":26,"value":4614},{"type":21,"tag":2072,"props":36043,"children":36044},{"style":2079},[36045],{"type":26,"value":3879},{"type":21,"tag":2072,"props":36047,"children":36048},{"style":3372},[36049],{"type":26,"value":3938},{"type":21,"tag":2072,"props":36051,"children":36052},{"style":2108},[36053],{"type":26,"value":36054},"\"Optimal parameters: ",{"type":21,"tag":2072,"props":36056,"children":36057},{"style":2097},[36058],{"type":26,"value":3948},{"type":21,"tag":2072,"props":36060,"children":36061},{"style":2079},[36062],{"type":26,"value":36063},"result.params",{"type":21,"tag":2072,"props":36065,"children":36066},{"style":2097},[36067],{"type":26,"value":3958},{"type":21,"tag":2072,"props":36069,"children":36070},{"style":2108},[36071],{"type":26,"value":7539},{"type":21,"tag":2072,"props":36073,"children":36074},{"style":2079},[36075],{"type":26,"value":4281},{"type":21,"tag":2072,"props":36077,"children":36078},{"class":2074,"line":3769},[36079,36083,36087,36091,36096,36100,36105,36109,36114],{"type":21,"tag":2072,"props":36080,"children":36081},{"style":2097},[36082],{"type":26,"value":4614},{"type":21,"tag":2072,"props":36084,"children":36085},{"style":2079},[36086],{"type":26,"value":3879},{"type":21,"tag":2072,"props":36088,"children":36089},{"style":3372},[36090],{"type":26,"value":3938},{"type":21,"tag":2072,"props":36092,"children":36093},{"style":2108},[36094],{"type":26,"value":36095},"\"Converged in ",{"type":21,"tag":2072,"props":36097,"children":36098},{"style":2097},[36099],{"type":26,"value":3948},{"type":21,"tag":2072,"props":36101,"children":36102},{"style":2079},[36103],{"type":26,"value":36104},"result.iterations",{"type":21,"tag":2072,"props":36106,"children":36107},{"style":2097},[36108],{"type":26,"value":3958},{"type":21,"tag":2072,"props":36110,"children":36111},{"style":2108},[36112],{"type":26,"value":36113}," iterations\"",{"type":21,"tag":2072,"props":36115,"children":36116},{"style":2079},[36117],{"type":26,"value":4281},{"type":21,"tag":43,"props":36119,"children":36121},{"id":36120},"tips-for-real-hardware",[36122],{"type":26,"value":36123},"Tips for Real Hardware",{"type":21,"tag":22,"props":36125,"children":36126},{},[36127],{"type":26,"value":36128},"When running VQE on real QPUs (IBM Quantum, IonQ), several additional considerations apply:",{"type":21,"tag":22,"props":36130,"children":36131},{},[36132,36137,36139,36144],{"type":21,"tag":784,"props":36133,"children":36134},{},[36135],{"type":26,"value":36136},"Use fewer shots per step.",{"type":26,"value":36138}," 1000 shots per optimization step is usually enough for the gradient estimate. Don't use 10,000 shots at every step. It wastes QPU time. See ",{"type":21,"tag":29,"props":36140,"children":36141},{"href":6211},[36142],{"type":26,"value":36143},"how to cut your shot count",{"type":26,"value":36145}," for measurement grouping and shot-frugal optimizers.",{"type":21,"tag":22,"props":36147,"children":36148},{},[36149,36154,36156,36160],{"type":21,"tag":784,"props":36150,"children":36151},{},[36152],{"type":26,"value":36153},"Start with shallow circuits.",{"type":26,"value":36155}," Fewer CNOT gates = less noise. For hardware, consider hardware-efficient ansatz circuits rather than UCCSD. Deep, randomly-initialized ansatze also risk ",{"type":21,"tag":29,"props":36157,"children":36158},{"href":14007},[36159],{"type":26,"value":31959},{"type":26,"value":36161},": regions where gradients vanish exponentially with qubit count and the optimizer stops making progress.",{"type":21,"tag":22,"props":36163,"children":36164},{},[36165,36170,36172,36178],{"type":21,"tag":784,"props":36166,"children":36167},{},[36168],{"type":26,"value":36169},"Enable error mitigation.",{"type":26,"value":36171}," HLQuantum's ",{"type":21,"tag":1831,"props":36173,"children":36175},{"className":36174},[],[36176],{"type":26,"value":36177},"error_mitigation=\"zne\"",{"type":26,"value":36179}," applies Zero Noise Extrapolation, which significantly improves results on noisy hardware:",{"type":21,"tag":2062,"props":36181,"children":36183},{"code":36182,"language":3361,"meta":7,"className":3362,"style":7},"result = hlq.run(vqe_circuit, backend=\"qiskit\", device=\"ibm_sherbrooke\",\n                 error_mitigation=\"zne\", shots=2048)\n",[36184],{"type":21,"tag":1831,"props":36185,"children":36186},{"__ignoreMap":7},[36187,36235],{"type":21,"tag":2072,"props":36188,"children":36189},{"class":2074,"line":2075},[36190,36194,36198,36203,36207,36211,36215,36219,36223,36227,36231],{"type":21,"tag":2072,"props":36191,"children":36192},{"style":2079},[36193],{"type":26,"value":19471},{"type":21,"tag":2072,"props":36195,"children":36196},{"style":3372},[36197],{"type":26,"value":3487},{"type":21,"tag":2072,"props":36199,"children":36200},{"style":2079},[36201],{"type":26,"value":36202}," hlq.run(vqe_circuit, ",{"type":21,"tag":2072,"props":36204,"children":36205},{"style":3735},[36206],{"type":26,"value":18550},{"type":21,"tag":2072,"props":36208,"children":36209},{"style":3372},[36210],{"type":26,"value":3487},{"type":21,"tag":2072,"props":36212,"children":36213},{"style":2108},[36214],{"type":26,"value":29173},{"type":21,"tag":2072,"props":36216,"children":36217},{"style":2079},[36218],{"type":26,"value":798},{"type":21,"tag":2072,"props":36220,"children":36221},{"style":3735},[36222],{"type":26,"value":22542},{"type":21,"tag":2072,"props":36224,"children":36225},{"style":3372},[36226],{"type":26,"value":3487},{"type":21,"tag":2072,"props":36228,"children":36229},{"style":2108},[36230],{"type":26,"value":29194},{"type":21,"tag":2072,"props":36232,"children":36233},{"style":2079},[36234],{"type":26,"value":2175},{"type":21,"tag":2072,"props":36236,"children":36237},{"class":2074,"line":164},[36238,36243,36247,36252,36256,36260,36264,36269],{"type":21,"tag":2072,"props":36239,"children":36240},{"style":3735},[36241],{"type":26,"value":36242},"                 error_mitigation",{"type":21,"tag":2072,"props":36244,"children":36245},{"style":3372},[36246],{"type":26,"value":3487},{"type":21,"tag":2072,"props":36248,"children":36249},{"style":2108},[36250],{"type":26,"value":36251},"\"zne\"",{"type":21,"tag":2072,"props":36253,"children":36254},{"style":2079},[36255],{"type":26,"value":798},{"type":21,"tag":2072,"props":36257,"children":36258},{"style":3735},[36259],{"type":26,"value":3226},{"type":21,"tag":2072,"props":36261,"children":36262},{"style":3372},[36263],{"type":26,"value":3487},{"type":21,"tag":2072,"props":36265,"children":36266},{"style":2097},[36267],{"type":26,"value":36268},"2048",{"type":21,"tag":2072,"props":36270,"children":36271},{"style":2079},[36272],{"type":26,"value":4281},{"type":21,"tag":22,"props":36274,"children":36275},{},[36276,36278,36283,36284,36289,36291,36296,36298,36303],{"type":26,"value":36277},"Check the full ",{"type":21,"tag":29,"props":36279,"children":36280},{"href":14130},[36281],{"type":26,"value":36282},"PennyLane guide",{"type":26,"value":667},{"type":21,"tag":29,"props":36285,"children":36286},{"href":19124},[36287],{"type":26,"value":36288},"HLQuantum algorithms reference",{"type":26,"value":36290}," for more details on quantum chemistry simulations. If you're weighing how far variational methods get you today, our ",{"type":21,"tag":29,"props":36292,"children":36293},{"href":13841},[36294],{"type":26,"value":36295},"quantum machine learning reality check",{"type":26,"value":36297}," covers the evidence, and the ",{"type":21,"tag":29,"props":36299,"children":36300},{"href":1788},[36301],{"type":26,"value":36302},"QAOA walkthrough",{"type":26,"value":36304}," applies the same hybrid loop to optimization.",{"type":21,"tag":2445,"props":36306,"children":36307},{},[36308],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":36310},[36311,36312,36313,36314,36315,36316,36317],{"id":34195,"depth":164,"text":34198},{"id":34234,"depth":164,"text":34237},{"id":34608,"depth":164,"text":34611},{"id":34962,"depth":164,"text":34965},{"id":35466,"depth":164,"text":35469},{"id":35761,"depth":164,"text":35764},{"id":36120,"depth":164,"text":36123},"content:blog:vqe-pennylane-practical-guide.md","blog\u002Fvqe-pennylane-practical-guide.md","blog\u002Fvqe-pennylane-practical-guide",{"_path":428,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":36322,"description":36323,"date":36324,"author":11,"tags":36325,"readingTime":288,"body":36326,"_type":171,"_id":36823,"_source":173,"_file":36824,"_stem":36825,"_extension":176},"Understanding Quantum Error Correction Without the Math","Why quantum computers make errors, how error correction works, and what it means for the future of fault-tolerant quantum computing.","2026-01-15",[365,2891,2016],{"type":18,"children":36327,"toc":36814},[36328,36333,36339,36344,36363,36369,36379,36412,36417,36423,36451,36470,36478,36492,36498,36516,36524,36529,36534,36540,36545,36563,36568,36573,36579,36584,36620,36625,36739,36744,36750,36766,36776,36786,36810],{"type":21,"tag":22,"props":36329,"children":36330},{},[36331],{"type":26,"value":36332},"Quantum computers make mistakes, a lot of them. A typical superconducting qubit gate has a 0.1–1% error rate. Run a 1000-gate circuit and you're essentially guaranteed to get a wrong answer. This isn't a bug in current hardware. It's a fundamental challenge. Quantum error correction (QEC) is the solution, and understanding it is key to understanding where quantum computing is headed.",{"type":21,"tag":43,"props":36334,"children":36336},{"id":36335},"why-quantum-errors-are-different",[36337],{"type":26,"value":36338},"Why Quantum Errors Are Different",{"type":21,"tag":22,"props":36340,"children":36341},{},[36342],{"type":26,"value":36343},"Classical computers have errors too, but they're easy to handle: copy the bit three times, and take a majority vote. If one copy flips, the other two outvote it.",{"type":21,"tag":22,"props":36345,"children":36346},{},[36347,36349,36354,36356,36361],{"type":26,"value":36348},"Qubits can't be copied. The ",{"type":21,"tag":784,"props":36350,"children":36351},{},[36352],{"type":26,"value":36353},"no-cloning theorem",{"type":26,"value":36355}," forbids it. You cannot measure a qubit to check for errors without collapsing its superposition. And quantum errors aren't only bit flips: there are also ",{"type":21,"tag":784,"props":36357,"children":36358},{},[36359],{"type":26,"value":36360},"phase errors",{"type":26,"value":36362}," (where the relative phase between |0⟩ and |1⟩ shifts) and combinations of both.",{"type":21,"tag":43,"props":36364,"children":36366},{"id":36365},"the-three-types-of-quantum-errors",[36367],{"type":26,"value":36368},"The Three Types of Quantum Errors",{"type":21,"tag":22,"props":36370,"children":36371},{},[36372,36374,36378],{"type":26,"value":36373},"Every quantum error decomposes into combinations of three ",{"type":21,"tag":29,"props":36375,"children":36376},{"href":11146},[36377],{"type":26,"value":24888},{"type":26,"value":12478},{"type":21,"tag":7925,"props":36380,"children":36381},{},[36382,36392,36402],{"type":21,"tag":6142,"props":36383,"children":36384},{},[36385,36390],{"type":21,"tag":784,"props":36386,"children":36387},{},[36388],{"type":26,"value":36389},"X error (bit flip):",{"type":26,"value":36391}," |0⟩ → |1⟩ and |1⟩ → |0⟩. Like a classical bit flip.",{"type":21,"tag":6142,"props":36393,"children":36394},{},[36395,36400],{"type":21,"tag":784,"props":36396,"children":36397},{},[36398],{"type":26,"value":36399},"Z error (phase flip):",{"type":26,"value":36401}," |0⟩ → |0⟩, |1⟩ → −|1⟩. No classical analog. Affects the phase.",{"type":21,"tag":6142,"props":36403,"children":36404},{},[36405,36410],{"type":21,"tag":784,"props":36406,"children":36407},{},[36408],{"type":26,"value":36409},"Y error:",{"type":26,"value":36411}," Combined X and Z error simultaneously.",{"type":21,"tag":22,"props":36413,"children":36414},{},[36415],{"type":26,"value":36416},"Any error on a qubit is expressed as a linear combination of X, Y, Z (and identity). This means correcting X and Z errors independently means correcting any error, a key insight for QEC.",{"type":21,"tag":43,"props":36418,"children":36420},{"id":36419},"the-big-idea-redundancy-without-copying",[36421],{"type":26,"value":36422},"The Big Idea: Redundancy Without Copying",{"type":21,"tag":22,"props":36424,"children":36425},{},[36426,36428,36435,36437,36442,36444,36449],{"type":26,"value":36427},"QEC encodes one ",{"type":21,"tag":784,"props":36429,"children":36430},{},[36431],{"type":21,"tag":29,"props":36432,"children":36433},{"href":874},[36434],{"type":26,"value":8089},{"type":26,"value":36436}," across many ",{"type":21,"tag":784,"props":36438,"children":36439},{},[36440],{"type":26,"value":36441},"physical qubits",{"type":26,"value":36443},". The idea is similar to classical repetition codes, but adapted for quantum mechanics. Peter Shor's ",{"type":21,"tag":29,"props":36445,"children":36446},{"href":8191},[36447],{"type":26,"value":36448},"1995 nine-qubit code",{"type":26,"value":36450}," was the first proof that this is possible at all.",{"type":21,"tag":22,"props":36452,"children":36453},{},[36454,36456,36461,36463,36468],{"type":26,"value":36455},"The simplest example is the ",{"type":21,"tag":784,"props":36457,"children":36458},{},[36459],{"type":26,"value":36460},"3-qubit bit-flip code",{"type":26,"value":36462},": encode |0⟩ as |000⟩ and |1⟩ as |111⟩. If one qubit flips, you detect it by measuring ",{"type":21,"tag":103,"props":36464,"children":36465},{},[36466],{"type":26,"value":36467},"parity",{"type":26,"value":36469}," between pairs of qubits (without measuring their actual values) and correct it:",{"type":21,"tag":2062,"props":36471,"children":36473},{"code":36472},"Logical |0⟩ = |000⟩\nLogical |1⟩ = |111⟩\n\nIf qubit 1 flips: |100⟩ or |011⟩\nParity check: measure (q0 ⊕ q1) and (q1 ⊕ q2)\n  → 10 → qubit 0 flipped → apply X to correct\n",[36474],{"type":21,"tag":1831,"props":36475,"children":36476},{"__ignoreMap":7},[36477],{"type":26,"value":36472},{"type":21,"tag":22,"props":36479,"children":36480},{},[36481,36483,36490],{"type":26,"value":36482},"The parity measurements use ",{"type":21,"tag":784,"props":36484,"children":36485},{},[36486],{"type":21,"tag":29,"props":36487,"children":36488},{"href":8113},[36489],{"type":26,"value":8116},{"type":26,"value":36491},": helper qubits that absorb the error information without disturbing the data qubits. This is the magic: you detect errors without collapsing the encoded state.",{"type":21,"tag":43,"props":36493,"children":36495},{"id":36494},"the-surface-code-todays-leading-approach",[36496],{"type":26,"value":36497},"The Surface Code: Today's Leading Approach",{"type":21,"tag":22,"props":36499,"children":36500},{},[36501,36502,36507,36509,36514],{"type":26,"value":11131},{"type":21,"tag":784,"props":36503,"children":36504},{},[36505],{"type":26,"value":36506},"surface code",{"type":26,"value":36508},", descended from ",{"type":21,"tag":29,"props":36510,"children":36511},{"href":8204},[36512],{"type":26,"value":36513},"Kitaev's 1997 work on topological codes and anyons",{"type":26,"value":36515},", is the most promising QEC code for near-term hardware. It encodes one logical qubit in a 2D grid of physical qubits arranged like this:",{"type":21,"tag":2062,"props":36517,"children":36519},{"code":36518},"● — ● — ● — ●\n|   |   |   |\n● — ● — ● — ●\n|   |   |   |\n● — ● — ● — ●\n|   |   |   |\n● — ● — ● — ●\n",[36520],{"type":21,"tag":1831,"props":36521,"children":36522},{"__ignoreMap":7},[36523],{"type":26,"value":36518},{"type":21,"tag":22,"props":36525,"children":36526},{},[36527],{"type":26,"value":36528},"Data qubits (●) hold the quantum information. Ancilla qubits between them continuously measure parity. A 7×7 grid (49 physical qubits) encodes 1 logical qubit with error rate ~p². If physical gate error rate is 1%, the logical error rate drops to ~0.01%.",{"type":21,"tag":22,"props":36530,"children":36531},{},[36532],{"type":26,"value":36533},"The surface code's threshold is ~1%: if hardware gate errors are below this, adding more physical qubits makes the logical error rate arbitrarily small. IBM's best systems are approaching this threshold.",{"type":21,"tag":43,"props":36535,"children":36537},{"id":36536},"how-many-physical-qubits-do-you-need",[36538],{"type":26,"value":36539},"How Many Physical Qubits Do You Need?",{"type":21,"tag":22,"props":36541,"children":36542},{},[36543],{"type":26,"value":36544},"To run Shor's algorithm to break RSA-2048 error-free, estimates suggest:",{"type":21,"tag":7925,"props":36546,"children":36547},{},[36548,36553,36558],{"type":21,"tag":6142,"props":36549,"children":36550},{},[36551],{"type":26,"value":36552},"~20 million physical qubits",{"type":21,"tag":6142,"props":36554,"children":36555},{},[36556],{"type":26,"value":36557},"Each logical qubit needs ~1000–10,000 physical qubits",{"type":21,"tag":6142,"props":36559,"children":36560},{},[36561],{"type":26,"value":36562},"Gate error rates must be below 0.1%",{"type":21,"tag":22,"props":36564,"children":36565},{},[36566],{"type":26,"value":36567},"Current hardware: ~1000 qubits, ~0.1–1% gate errors. The gap is real. We're roughly 10-15 years from fault-tolerant RSA-breaking quantum computers.",{"type":21,"tag":22,"props":36569,"children":36570},{},[36571],{"type":26,"value":36572},"For near-term quantum advantage in chemistry or optimization, the requirements are much lower: ~100 logical qubits might be sufficient for molecules beyond classical reach.",{"type":21,"tag":43,"props":36574,"children":36576},{"id":36575},"what-this-means-for-nisq-devices-today",[36577],{"type":26,"value":36578},"What This Means for NISQ Devices Today",{"type":21,"tag":22,"props":36580,"children":36581},{},[36582],{"type":26,"value":36583},"Current NISQ devices don't have QEC. Every gate adds noise. The approach instead is:",{"type":21,"tag":6138,"props":36585,"children":36586},{},[36587,36597,36610],{"type":21,"tag":6142,"props":36588,"children":36589},{},[36590,36595],{"type":21,"tag":784,"props":36591,"children":36592},{},[36593],{"type":26,"value":36594},"Keep circuits shallow",{"type":26,"value":36596},": fewer gates means less accumulated noise",{"type":21,"tag":6142,"props":36598,"children":36599},{},[36600,36608],{"type":21,"tag":784,"props":36601,"children":36602},{},[36603,36604],{"type":26,"value":28886},{"type":21,"tag":29,"props":36605,"children":36606},{"href":3086},[36607],{"type":26,"value":8416},{"type":26,"value":36609}," (not correction): post-processing techniques like Zero Noise Extrapolation (ZNE) that reduce the effect of errors statistically without extra qubits",{"type":21,"tag":6142,"props":36611,"children":36612},{},[36613,36618],{"type":21,"tag":784,"props":36614,"children":36615},{},[36616],{"type":26,"value":36617},"Design noise-tolerant algorithms",{"type":26,"value":36619},": VQE, QAOA, and other variational methods are designed to tolerate moderate noise",{"type":21,"tag":22,"props":36621,"children":36622},{},[36623],{"type":26,"value":36624},"HLQuantum includes built-in error mitigation that applies to any circuit:",{"type":21,"tag":2062,"props":36626,"children":36628},{"code":36627,"language":3361,"meta":7,"className":3362,"style":7},"result = hlq.run(\n    qc,\n    backend=\"qiskit\",\n    device=\"ibm_sherbrooke\",\n    error_mitigation=\"zne\",  # Zero Noise Extrapolation\n    shots=8192\n)\n",[36629],{"type":21,"tag":1831,"props":36630,"children":36631},{"__ignoreMap":7},[36632,36647,36654,36673,36692,36716,36732],{"type":21,"tag":2072,"props":36633,"children":36634},{"class":2074,"line":2075},[36635,36639,36643],{"type":21,"tag":2072,"props":36636,"children":36637},{"style":2079},[36638],{"type":26,"value":19471},{"type":21,"tag":2072,"props":36640,"children":36641},{"style":3372},[36642],{"type":26,"value":3487},{"type":21,"tag":2072,"props":36644,"children":36645},{"style":2079},[36646],{"type":26,"value":29149},{"type":21,"tag":2072,"props":36648,"children":36649},{"class":2074,"line":164},[36650],{"type":21,"tag":2072,"props":36651,"children":36652},{"style":2079},[36653],{"type":26,"value":29157},{"type":21,"tag":2072,"props":36655,"children":36656},{"class":2074,"line":2093},[36657,36661,36665,36669],{"type":21,"tag":2072,"props":36658,"children":36659},{"style":3735},[36660],{"type":26,"value":23119},{"type":21,"tag":2072,"props":36662,"children":36663},{"style":3372},[36664],{"type":26,"value":3487},{"type":21,"tag":2072,"props":36666,"children":36667},{"style":2108},[36668],{"type":26,"value":29173},{"type":21,"tag":2072,"props":36670,"children":36671},{"style":2079},[36672],{"type":26,"value":2175},{"type":21,"tag":2072,"props":36674,"children":36675},{"class":2074,"line":2155},[36676,36680,36684,36688],{"type":21,"tag":2072,"props":36677,"children":36678},{"style":3735},[36679],{"type":26,"value":29185},{"type":21,"tag":2072,"props":36681,"children":36682},{"style":3372},[36683],{"type":26,"value":3487},{"type":21,"tag":2072,"props":36685,"children":36686},{"style":2108},[36687],{"type":26,"value":29194},{"type":21,"tag":2072,"props":36689,"children":36690},{"style":2079},[36691],{"type":26,"value":2175},{"type":21,"tag":2072,"props":36693,"children":36694},{"class":2074,"line":2178},[36695,36699,36703,36707,36711],{"type":21,"tag":2072,"props":36696,"children":36697},{"style":3735},[36698],{"type":26,"value":29232},{"type":21,"tag":2072,"props":36700,"children":36701},{"style":3372},[36702],{"type":26,"value":3487},{"type":21,"tag":2072,"props":36704,"children":36705},{"style":2108},[36706],{"type":26,"value":36251},{"type":21,"tag":2072,"props":36708,"children":36709},{"style":2079},[36710],{"type":26,"value":29199},{"type":21,"tag":2072,"props":36712,"children":36713},{"style":3985},[36714],{"type":26,"value":36715},"# Zero Noise Extrapolation\n",{"type":21,"tag":2072,"props":36717,"children":36718},{"class":2074,"line":288},[36719,36723,36727],{"type":21,"tag":2072,"props":36720,"children":36721},{"style":3735},[36722],{"type":26,"value":29212},{"type":21,"tag":2072,"props":36724,"children":36725},{"style":3372},[36726],{"type":26,"value":3487},{"type":21,"tag":2072,"props":36728,"children":36729},{"style":2097},[36730],{"type":26,"value":36731},"8192\n",{"type":21,"tag":2072,"props":36733,"children":36734},{"class":2074,"line":16},[36735],{"type":21,"tag":2072,"props":36736,"children":36737},{"style":2079},[36738],{"type":26,"value":4281},{"type":21,"tag":22,"props":36740,"children":36741},{},[36742],{"type":26,"value":36743},"ZNE amplifies the noise intentionally at multiple levels and extrapolates back to the zero-noise limit. It's not QEC. It's a statistical trick. But it works well for short circuits.",{"type":21,"tag":43,"props":36745,"children":36747},{"id":36746},"the-near-term-milestones-to-watch",[36748],{"type":26,"value":36749},"The Near-Term Milestones to Watch",{"type":21,"tag":22,"props":36751,"children":36752},{},[36753,36758,36760,36764],{"type":21,"tag":784,"props":36754,"children":36755},{},[36756],{"type":26,"value":36757},"Error correction demonstration at scale",{"type":26,"value":36759},": IBM, Google, and Microsoft are racing to demonstrate that surface code logical qubits outperform physical qubits (error rate below the threshold). Google claimed a ",{"type":21,"tag":29,"props":36761,"children":36762},{"href":8250},[36763],{"type":26,"value":9986},{"type":26,"value":36765}," in late 2024.",{"type":21,"tag":22,"props":36767,"children":36768},{},[36769,36774],{"type":21,"tag":784,"props":36770,"children":36771},{},[36772],{"type":26,"value":36773},"Magic state distillation",{"type":26,"value":36775},": Non-Clifford gates (like T gates) require special distillation protocols in fault-tolerant architectures. This is currently extremely expensive in qubit overhead.",{"type":21,"tag":22,"props":36777,"children":36778},{},[36779,36784],{"type":21,"tag":784,"props":36780,"children":36781},{},[36782],{"type":26,"value":36783},"Logical gate speed",{"type":26,"value":36785},": Logical gates in surface codes are much slower than physical gates. Speeding them up is a key hardware challenge for 2026–2030.",{"type":21,"tag":22,"props":36787,"children":36788},{},[36789,36791,36796,36797,36802,36804,36809],{"type":26,"value":36790},"For a deeper dive into how error correction interacts with specific SDKs, see the ",{"type":21,"tag":29,"props":36792,"children":36793},{"href":409},[36794],{"type":26,"value":36795},"quantum error correction glossary entry",{"type":26,"value":667},{"type":21,"tag":29,"props":36798,"children":36799},{"href":120},[36800],{"type":26,"value":36801},"NISQ era guide",{"type":26,"value":36803},". For the qubit-overhead numbers and what \"fault-tolerant\" requires, see ",{"type":21,"tag":29,"props":36805,"children":36806},{"href":487},[36807],{"type":26,"value":36808},"logical qubits and fault tolerance explained",{"type":26,"value":237},{"type":21,"tag":2445,"props":36811,"children":36812},{},[36813],{"type":26,"value":2449},{"title":7,"searchDepth":164,"depth":164,"links":36815},[36816,36817,36818,36819,36820,36821,36822],{"id":36335,"depth":164,"text":36338},{"id":36365,"depth":164,"text":36368},{"id":36419,"depth":164,"text":36422},{"id":36494,"depth":164,"text":36497},{"id":36536,"depth":164,"text":36539},{"id":36575,"depth":164,"text":36578},{"id":36746,"depth":164,"text":36749},"content:blog:understanding-quantum-error-correction.md","blog\u002Funderstanding-quantum-error-correction.md","blog\u002Funderstanding-quantum-error-correction"]