[{"data":1,"prerenderedAt":558},["ShallowReactive",2],{"blog-post-docs\u002Fideal-vs-noise-model-simulators":3,"sibling-dives-docs\u002Fideal-vs-noise-model-simulators":382,"learn-track-docs\u002Fideal-vs-noise-model-simulators":383,"learn-prereq-docs\u002Fideal-vs-noise-model-simulators":384,"learn-docs-groups":385},{"id":4,"title":5,"authors":6,"body":7,"breadcrumb":6,"builders":6,"byline":6,"category":364,"categoryName":365,"challenge":6,"courseAuthor":6,"courseLead":6,"dek":6,"description":366,"draft":367,"extension":368,"eyebrow":6,"featured":367,"finish":6,"fork":6,"group":6,"groupName":6,"hero":6,"heroAlt":6,"heroCta":6,"heroImage":6,"homepageFeatured":367,"kind":369,"lessonCount":6,"meta":370,"navigation":371,"newsItems":6,"next":6,"ogImage":6,"order":372,"outcomes":6,"path":373,"prerequisite":6,"prerequisiteLinks":6,"publishDate":374,"readingTime":6,"related":375,"relatedProjects":6,"section":6,"seo":376,"spotlight":367,"stem":379,"tags":380,"track":6,"trackName":6,"updates":6,"__hash__":381},"blog\u002Fblog\u002Flearn\u002Fdocs\u002Fideal-vs-noise-model-simulators.md","Ideal vs. noise-model simulators",null,{"type":8,"value":9,"toc":354},"minimark",[10,27,32,108,111,115,118,150,159,163,166,184,202,208,212,215,297,300,309,313,326,330],[11,12,13,14,18,19,22,23,26],"p",{},"Every simulator in the ",[15,16,17],"strong",{},"Select QPU"," dialog carries one of two labels: ",[15,20,21],{},"Ideal"," or ",[15,24,25],{},"Noise model",". The label tells you what the simulator computes, and it also tells you how its run time responds when you raise the shot count.",[28,29,31],"h2",{"id":30},"which-backends-are-which","Which backends are which",[33,34,35,51],"table",{},[36,37,38],"thead",{},[39,40,41,45,48],"tr",{},[42,43,44],"th",{},"Backend",[42,46,47],{},"Kind",[42,49,50],{},"What runs",[52,53,54,70,88,98],"tbody",{},[39,55,56,60,62],{},[57,58,59],"td",{},"Built-in simulator",[57,61,21],{},[57,63,64,65,69],{},"Qiskit's ",[66,67,68],"code",{},"BasicSimulator",", in your browser",[39,71,72,75,77],{},[57,73,74],{},"AWS Braket local simulator",[57,76,21],{},[57,78,79,80,83,84,87],{},"Braket's ",[66,81,82],{},"StateVectorSimulator"," (the default ",[66,85,86],{},"LocalSimulator"," device), in your browser",[39,89,90,93,95],{},[57,91,92],{},"IBM simulators (Boston, Fez, and the rest)",[57,94,25],{},[57,96,97],{},"A Qiskit fake backend for that device, run on Qiskit Aer with the device's calibrated noise model, in your browser",[39,99,100,103,105],{},[57,101,102],{},"IonQ remote simulators",[57,104,25],{},[57,106,107],{},"IonQ's cloud simulator with that QPU's noise model",[11,109,110],{},"The two ideal simulators compute the same thing: the exact output of your circuit with perfect gates. Given the same circuit and enough shots, their counts converge to the same distribution. They differ only in speed and in which gates they accept.",[28,112,114],{"id":113},"why-ideal-simulators-ignore-the-shot-count","Why ideal simulators ignore the shot count",[11,116,117],{},"An ideal simulator applies each gate of your circuit to a state vector once. When it reaches the final measurements, it has the exact probability of every outcome, and it draws as many shots from that distribution as you asked for.",[11,119,120,121,124,125,128,129,132,133,136,137,139,140,142,143,146,147,149],{},"Say your circuit has ",[66,122,123],{},"N"," gates and each gate takes time ",[66,126,127],{},"G"," to apply. Applying all the gates takes ",[66,130,131],{},"G·N",". Drawing a shot is a lookup into a table of probabilities, so ",[66,134,135],{},"S"," shots add a small cost proportional to ",[66,138,135],{},". For any circuit worth simulating, that sampling cost is tiny next to ",[66,141,131],{},", and the total is close to ",[66,144,145],{},"O(G·N)"," whatever ",[66,148,135],{}," is.",[11,151,152,153,155,156,158],{},"Drawing every shot from one pass over the state vector only works when every measurement comes at the end. A circuit that measures a qubit and then keeps applying gates to it, or that resets a qubit, can end in a different state depending on what each measurement returned. ",[66,154,68],{}," handles such a circuit by running it again for every shot, so its time grows with ",[66,157,135],{}," too. On a 10-qubit test circuit with one mid-circuit measurement, 1,000 shots took 13 seconds instead of 0.07.",[28,160,162],{"id":161},"why-noise-model-run-time-usually-grows-with-the-shot-count","Why noise-model run time usually grows with the shot count",[11,164,165],{},"A noise model describes how a real device goes wrong: after each gate there is some probability of an error, and each measurement can misread. A noise-model simulator samples those errors at random. One shot might get a bit flip after gate 40; the next might get none. Each shot is a different circuit, so the simulator has to apply every gate again for every shot.",[11,167,168,169,172,173,176,177,179,180,183],{},"Sampling the errors also adds work at every gate. Call that extra factor ",[66,170,171],{},"C",". Each shot costs about ",[66,174,175],{},"C·G·N",", and ",[66,178,135],{}," shots cost ",[66,181,182],{},"O(C·G·N·S)",". Double the shots and the run takes roughly twice as long.",[11,185,186,187,190,191,194,195,198,199,201],{},"A simulator can avoid the per-shot loop by tracking the whole probability mixture of states as a density matrix. The simulator then samples all shots from that matrix, the same way an ideal simulator does. For ",[66,188,189],{},"n"," qubits a density matrix holds ",[66,192,193],{},"4^n"," numbers against ",[66,196,197],{},"2^n"," for a state vector, so each gate costs roughly ",[66,200,197],{}," times more.",[11,203,204,205,207],{},"Qiskit Aer, which runs the IBM simulators, can switch to the density-matrix method on its own once shots exceed ",[66,206,197],{},", if every measurement comes at the end. Once it switches, the IBM simulators stop slowing down as you add shots. For a circuit on 10 active qubits the switch can happen above 1,024 shots. For 20 qubits it would take over a million, so in practice most circuits stay on the per-shot path.",[28,209,211],{"id":210},"measured-run-times","Measured run times",[11,213,214],{},"These are timings for one 10-qubit circuit made of 20 layers of H, T and a CNOT chain. They were measured with native Python on one CPU core, with IBM Fez as the noise model. The browser runs the same libraries compiled to WebAssembly on one thread, so expect it to be several times slower, but the shape is the same.",[33,216,217,232],{},[36,218,219],{},[39,220,221,224,226,229],{},[42,222,223],{},"Shots",[42,225,59],{},[42,227,228],{},"AWS Braket local",[42,230,231],{},"IBM Fez noise model",[52,233,234,248,261,273,285],{},[39,235,236,239,242,245],{},[57,237,238],{},"1",[57,240,241],{},"0.02 s",[57,243,244],{},"0.2 s",[57,246,247],{},"9.8 s",[39,249,250,253,255,258],{},[57,251,252],{},"100",[57,254,241],{},[57,256,257],{},"0.4 s",[57,259,260],{},"11.0 s",[39,262,263,266,268,270],{},[57,264,265],{},"500",[57,267,241],{},[57,269,244],{},[57,271,272],{},"16.9 s",[39,274,275,278,280,282],{},[57,276,277],{},"1,000",[57,279,241],{},[57,281,244],{},[57,283,284],{},"22.6 s",[39,286,287,290,292,294],{},[57,288,289],{},"2,000",[57,291,241],{},[57,293,257],{},[57,295,296],{},"14.4 s",[11,298,299],{},"The ideal simulators do not move. The IBM simulator has a fixed cost of about 10 seconds to set up a model of a 156-qubit device, then adds about 13 ms per shot. At 2,000 shots it has passed the 1,024-shot threshold, switched to a density matrix, and got faster. On a deeper circuit the per-shot cost dominates.",[11,301,302,303,308],{},"IonQ's remote simulators run on IonQ's servers, not in your browser, but the same rule applies: as ",[304,305,307],"a",{"href":306},"\u002Flearn\u002Fdocs\u002Fcompute-backends","Compute backends"," notes, IonQ runs one noise-model simulation per shot, so run time grows with the shot count.",[28,310,312],{"id":311},"choosing-an-ideal-or-a-noise-model-simulator","Choosing an ideal or a noise-model simulator",[314,315,316,320,323],"ul",{},[317,318,319],"li",{},"To check that your circuit is correct, use an ideal simulator. The built-in simulator is the fastest to start. Raise the shot count as far as you like.",[317,321,322],{},"To see how noise changes your results, use a noise-model simulator, and start with a small shot count, such as 100. Raise it once you know how long one run takes.",[317,324,325],{},"If a noise-model run is taking too long, lower the shot count or reduce the circuit depth before anything else. Transpiling with a higher optimization level often removes gates.",[28,327,329],{"id":328},"related","Related",[314,331,332,336,342,348],{},[317,333,334],{},[304,335,307],{"href":306},[317,337,338],{},[304,339,341],{"href":340},"\u002Flearn\u002Fdocs\u002Frun-your-code","Running your code",[317,343,344],{},[304,345,347],{"href":346},"\u002Flearn\u002Fdocs\u002Fwhy-your-results-look-wrong","Why your results look wrong",[317,349,350],{},[304,351,353],{"href":352},"\u002Flearn\u002Fdocs\u002Ferror-mitigation","Error mitigation",{"title":355,"searchDepth":356,"depth":356,"links":357},"",2,[358,359,360,361,362,363],{"id":30,"depth":356,"text":31},{"id":113,"depth":356,"text":114},{"id":161,"depth":356,"text":162},{"id":210,"depth":356,"text":211},{"id":311,"depth":356,"text":312},{"id":328,"depth":356,"text":329},"running-code","Running code","Why an ideal simulator takes about the same time for 10 shots as for 10,000, and why a noise-model simulator does not.",false,"md","doc",{},true,11,"\u002Fblog\u002Flearn\u002Fdocs\u002Fideal-vs-noise-model-simulators","2026-09-26",[],{"title":377,"description":378},"Ideal vs. noise-model simulators · Qollab docs","How ideal and noise-model quantum simulators differ, which Qollab backends are which, and why noise-model run time grows with the shot count.","blog\u002Flearn\u002Fdocs\u002Fideal-vs-noise-model-simulators",[],"t6A4fe1Y9MU7yVfiHX_GmuXUavtDqaN0UvdHpqLIzpw",[],[],[],[386,393,412,438,537,547],{"category":387,"categoryName":388,"articles":389},"account","Account",[390],{"title":391,"href":392},"Account and profile","\u002Flearn\u002Fdocs\u002Faccount-and-profile",{"category":394,"categoryName":395,"articles":396},"projects","Projects",[397,400,403,406,409],{"title":398,"href":399},"The project page","\u002Flearn\u002Fdocs\u002Fproject-anatomy",{"title":401,"href":402},"Editing your project","\u002Flearn\u002Fdocs\u002Fwrite-your-project-page",{"title":404,"href":405},"Publishing and versions","\u002Flearn\u002Fdocs\u002Fpublish",{"title":407,"href":408},"Forking a project","\u002Flearn\u002Fdocs\u002Ffork-and-remix",{"title":410,"href":411},"Uploading your own files","\u002Flearn\u002Fdocs\u002Fupload-your-files",{"category":364,"categoryName":365,"articles":413},[414,415,416,419,422,425,428,430,433,436],{"title":341,"href":340},{"title":307,"href":306},{"title":417,"href":418},"The runtime environment","\u002Flearn\u002Fdocs\u002Fruntime-environment",{"title":420,"href":421},"JS \u002F Qiskit projects","\u002Flearn\u002Fdocs\u002Fjs-qiskit-projects",{"title":423,"href":424},"Python \u002F Qiskit projects","\u002Flearn\u002Fdocs\u002Fpython-qiskit-projects",{"title":426,"href":427},"How your circuit is compiled","\u002Flearn\u002Fdocs\u002Fhow-your-circuit-is-compiled",{"title":429,"href":352},"Error mitigation and debiasing",{"title":431,"href":432},"Transpilation","\u002Flearn\u002Fdocs\u002Ftranspilation",{"title":434,"href":435},"Primitives","\u002Flearn\u002Fdocs\u002Fprimitives",{"title":5,"href":437},"\u002Flearn\u002Fdocs\u002Fideal-vs-noise-model-simulators",{"category":439,"categoryName":440,"articles":441},"gates","Gates",[442,445,450,453,456,459,462,465,468,471,474,477,480,483,486,489,494,497,500,503,506,509,512,515,520,523,528,531,534],{"title":443,"href":444},"Gate reference","\u002Flearn\u002Fdocs\u002Fgates",{"title":446,"href":447,"group":448,"groupName":449},"H gate","\u002Flearn\u002Fdocs\u002Fh-gate","single-qubit","Single-qubit gates",{"title":451,"href":452,"group":448,"groupName":449},"X gate","\u002Flearn\u002Fdocs\u002Fx-gate",{"title":454,"href":455,"group":448,"groupName":449},"Y gate","\u002Flearn\u002Fdocs\u002Fy-gate",{"title":457,"href":458,"group":448,"groupName":449},"Z gate","\u002Flearn\u002Fdocs\u002Fz-gate",{"title":460,"href":461,"group":448,"groupName":449},"S gate","\u002Flearn\u002Fdocs\u002Fs-gate",{"title":463,"href":464,"group":448,"groupName":449},"Sdg gate","\u002Flearn\u002Fdocs\u002Fsdg-gate",{"title":466,"href":467,"group":448,"groupName":449},"T gate","\u002Flearn\u002Fdocs\u002Ft-gate",{"title":469,"href":470,"group":448,"groupName":449},"Tdg gate","\u002Flearn\u002Fdocs\u002Ftdg-gate",{"title":472,"href":473,"group":448,"groupName":449},"√X gate","\u002Flearn\u002Fdocs\u002Fsx-gate",{"title":475,"href":476,"group":448,"groupName":449},"√X† gate","\u002Flearn\u002Fdocs\u002Fsxdg-gate",{"title":478,"href":479,"group":448,"groupName":449},"P gate","\u002Flearn\u002Fdocs\u002Fp-gate",{"title":481,"href":482,"group":448,"groupName":449},"RX gate","\u002Flearn\u002Fdocs\u002Frx-gate",{"title":484,"href":485,"group":448,"groupName":449},"RY gate","\u002Flearn\u002Fdocs\u002Fry-gate",{"title":487,"href":488,"group":448,"groupName":449},"RZ gate","\u002Flearn\u002Fdocs\u002Frz-gate",{"title":490,"href":491,"group":492,"groupName":493},"CX gate","\u002Flearn\u002Fdocs\u002Fcx-gate","two-qubit","Two-qubit gates",{"title":495,"href":496,"group":492,"groupName":493},"CY gate","\u002Flearn\u002Fdocs\u002Fcy-gate",{"title":498,"href":499,"group":492,"groupName":493},"CZ gate","\u002Flearn\u002Fdocs\u002Fcz-gate",{"title":501,"href":502,"group":492,"groupName":493},"CP gate","\u002Flearn\u002Fdocs\u002Fcp-gate",{"title":504,"href":505,"group":492,"groupName":493},"Swap gate","\u002Flearn\u002Fdocs\u002Fswap-gate",{"title":507,"href":508,"group":492,"groupName":493},"RXX gate","\u002Flearn\u002Fdocs\u002Frxx-gate",{"title":510,"href":511,"group":492,"groupName":493},"RYY gate","\u002Flearn\u002Fdocs\u002Fryy-gate",{"title":513,"href":514,"group":492,"groupName":493},"RZZ gate","\u002Flearn\u002Fdocs\u002Frzz-gate",{"title":516,"href":517,"group":518,"groupName":519},"CCX gate","\u002Flearn\u002Fdocs\u002Fccx-gate","multi-qubit","Multi-qubit gates",{"title":521,"href":522,"group":518,"groupName":519},"Pauli evolution gate","\u002Flearn\u002Fdocs\u002Fpauli-evolution-gate",{"title":524,"href":525,"group":526,"groupName":527},"GPi gate","\u002Flearn\u002Fdocs\u002Fgpi-gate","native","IonQ native gates",{"title":529,"href":530,"group":526,"groupName":527},"GPi2 gate","\u002Flearn\u002Fdocs\u002Fgpi2-gate",{"title":532,"href":533,"group":526,"groupName":527},"MS gate","\u002Flearn\u002Fdocs\u002Fms-gate",{"title":535,"href":536,"group":526,"groupName":527},"ZZ gate","\u002Flearn\u002Fdocs\u002Fzz-gate",{"category":538,"categoryName":539,"articles":540},"credits","Credits",[541,544],{"title":542,"href":543},"How credits work","\u002Flearn\u002Fdocs\u002Fhow-credits-work",{"title":545,"href":546},"Before you spend credits","\u002Flearn\u002Fdocs\u002Fbefore-you-spend-credits",{"category":548,"categoryName":549,"articles":550},"troubleshooting","Troubleshooting",[551,554,557],{"title":552,"href":553},"Troubleshooting and FAQ","\u002Flearn\u002Fdocs\u002Ffaq",{"title":555,"href":556},"Error reference","\u002Flearn\u002Fdocs\u002Ferror-reference",{"title":347,"href":346},1790607255861]