Q-Bridge
Statevector Simulator vs Real Quantum Hardware: What Each One Tells You
An ideal statevector simulator returns the distribution your circuit defines. A quantum device returns that distribution plus noise, connectivity constraints and queue time. Learn what each result means, why simulation size is bounded, and how Q-Bridge handles both.
Two different answers to the same question
Suppose you have a circuit in hand and you want to know what it does. There are two places you can send it. One is a statevector simulator, a classical program that follows the mathematics of the circuit exactly. The other is a quantum device, a physical machine that runs the circuit on real qubits.
Both give you a table of measurement counts. The tables look alike, and it is tempting to treat them as two attempts at the same answer. They are not. The simulator reports the distribution your circuit defines. The device reports what happens when that circuit is run through physical hardware, with everything that physical hardware adds. Understanding the difference is the point of this page, and it matters whether you are learning, debugging, or deciding whether a device run is worth your queue time.
What an ideal statevector simulator computes
A quantum state on a set of qubits can be written as a list of complex numbers called amplitudes, one for each possible bitstring the qubits could be measured as. A statevector simulator stores that entire list and updates every entry as each gate is applied. When the circuit is finished, the simulator holds the complete final state.
From the final state, the probability of any measurement outcome is the squared magnitude of its amplitude. The simulator can therefore produce the whole probability distribution directly. When you ask it for a number of shots, it draws random samples from that distribution and tallies them into counts. Those counts carry ordinary sampling error, as any sample does, but the distribution underneath is exact, up to the floating-point precision of the arithmetic.
Three properties follow from this, and they are what make an ideal simulator useful:
- It is noiseless. Every gate does precisely what the circuit says. Qubits do not decay between gates, and a measurement never reports the wrong bit.
- It has no connectivity limits. Any gate can act on any pair of qubits. The circuit runs as written, with no rewriting to fit a device layout.
- It is reproducible. Run the same circuit twice and the underlying distribution is identical; only the sampled counts vary, and that variation shrinks as you take more shots. Our page on shots and measurement counts covers how to read that variation.
An ideal simulator answers the question "what does this circuit define?" It is the reference against which everything else is measured.
What a quantum device returns
A device starts from the same circuit, but several things happen on the way to the counts table.
The circuit is rewritten. A device supports a specific native gate set, and its qubits are connected in a specific pattern. Before your circuit runs, it is typically transpiled: gates are decomposed into the native set, and two-qubit gates between qubits that are not physically adjacent are routed through intermediate qubits, which adds operations. The circuit that executes is a cousin of the one you wrote, usually with more gates and more depth. If you want to see how large your circuit is before this happens, depth and gate count explains what to read from the text.
Gates are imperfect. Each physical gate applies something close to, but not exactly, the intended operation. Two-qubit gates are generally less accurate than single-qubit gates. Errors accumulate as the circuit gets deeper.
Qubits lose their state over time. Physical qubits only hold a superposition for a limited time before interactions with their surroundings degrade it. A long circuit gives this decay more time to act.
Readout is noisy. The final measurement can itself report the wrong value for a qubit, so even a circuit that produced a clean state can come back with a smear of wrong bitstrings.
Devices change day to day. Hardware is recalibrated, and its error characteristics drift. The same circuit submitted on two different days can give measurably different counts.
Results arrive later. A device is a shared resource with a queue. You submit, wait, and retrieve. For a description of what that waiting involves physically, see where a quantum job runs.
Put together, a device returns the ideal distribution blurred by all of these effects, plus the same sampling error the simulator has. That blur is not a defect in your result. It is the information you went to the device for: how your circuit behaves on real qubits.
Why simulation size is bounded
The simulator's exactness has a price. Each additional qubit doubles the number of amplitudes in the state, because every existing bitstring now has a version with the new qubit as zero and a version with it as one. Memory to store the state and time to update it both grow exponentially with the qubit count.
This growth is gentle for small circuits and then stops being gentle. A simulator that handles a modest circuit instantly will, not many qubits later, need more memory than a machine has. The ceiling is set by the simulation method, not by any particular product, and no amount of engineering removes the exponential; it only moves the point at which it bites. Products that offer simulation therefore impose a qubit limit, and the honest ones state it plainly rather than implying it does not exist.
This is also why a simulator cannot stand in for a device at scale. For circuits small enough to simulate, the simulator gives you an exact reference. Beyond that size, the device is the only place the circuit can run at all, and you lose the ability to check its output against an ideal answer directly.
Which one to reach for
Neither tool is the better one in general. Each is right for different questions.
Reach for the simulator when you want to:
- confirm that a circuit does what you intended before spending queue time on it;
- compare two versions of a circuit on equal, noiseless footing;
- debug a wrong result, since an ideal simulator removes noise as a suspect;
- learn, where seeing the clean distribution is the whole point.
Reach for hardware when you want to:
- see how a circuit holds up against real noise, which no ideal simulator will tell you;
- run something larger than can be simulated;
- produce a result that was genuinely obtained from a quantum device, when that is what the exercise calls for.
A sensible habit is to do both in order: simulate first, read the ideal distribution, then run on a device and compare. The gap between the two is a direct measure of how sensitive your circuit is to the device's noise. If the gap is small, the circuit is robust on that device at that size. If it is large, you have learned something about the circuit's depth, its two-qubit gates, or the device, and you can go back and simplify.
Reading a comparison honestly
When you lay a simulator result next to a device result, keep three things separate:
- Sampling error is present in both and shrinks with more shots. Before attributing a difference to the device, check whether the shot count is large enough that the difference is not just sampling.
- Noise and transpilation are present only in the device result. These are what you are actually measuring when you compare.
- Circuit changes are a different matter. If you edited the circuit between the two runs, the comparison is not between simulator and device at all.
Also resist reading too much into agreement. A device result that matches the simulator well on a small circuit does not mean it will match on a deeper one; noise accumulates. And an ideal simulator that agrees with a device tells you nothing about how that device would behave on a circuit the simulator cannot handle. Make claims only about the circuit you actually ran, at the size you ran it.
How this works in Q-Bridge
Q-Bridge is a web dashboard for writing OpenQASM circuits, running them and keeping the resulting jobs. It supports both sides of the comparison described above, and it is deliberate about which is which.
The built-in simulator is ideal. Q-Bridge's built-in simulator is an ideal statevector simulator with no noise model. It is classical simulation, and it is what runs a job when no vendor credentials are supplied. It gives you the distribution your circuit defines, which makes it the right first stop for checking logic and comparing versions. It will not predict how any particular device behaves, and Q-Bridge does not present it as if it would. The simulator has a qubit ceiling, as every statevector simulator does; the limits per plan are on the pricing page. Our walkthrough of running OpenQASM in the browser shows the editor and the counts it returns.
Hardware is bring your own credentials. Q-Bridge holds no hardware-vendor credentials. If you want to send a job to a device, you enter your own provider credentials in dashboard settings. They are kept only in the browser tab's memory, not in browser storage, and are dropped on reload, tab close or logout. They are attached only to the job-submit, job-result and backend-catalogue requests and to nothing else. The backend list always starts with the built-in simulator; other backends come from the service's catalogue and are marked usable only when the service can reach them with the credentials you supplied. Q-Bridge does not promise that any particular device is available, because availability depends on your provider account, not on Q-Bridge. The details are in bring your own key job submission.
Both produce the same kind of result. A completed job shows the submitted circuit and a histogram of its measurement counts, whichever backend ran it. That makes the side-by-side comparison straightforward: run on the simulator, run on a device with your credentials, and read the two histograms together with the cautions above in mind.
Q-Bridge makes no claim that either path is faster, more accurate or more powerful than the other. The simulator is simulation and is labelled as such. The device is your provider's device, reached with your key.
A workflow worth repeating
Start every circuit on the simulator and look at the distribution it defines. Read the circuit's depth and two-qubit gate count. If the circuit is small enough to simulate and you want to know how it behaves on real qubits, submit it to a device with your own credentials, wait for the result, and compare the histograms. Then ask the only question the comparison can answer: how much did the device's noise move the result away from the ideal, and what in the circuit made it sensitive? That question, asked repeatedly, is how you learn to write circuits that run well on hardware.
Run your circuit on Q-Bridge's built-in simulator to see the distribution it defines, then compare it with a device run using your own provider credentials.
Get started