Modeling Errors as Gates
Our simulator has no noise on purpose. So we add errors by hand. We put a real X gate (a bit flip) or Z gate (a phase flip) into the circuit, right where the fault would strike. That turns noise into something you can place, trace by hand, and predict exactly. It also shows a surprising rule: one error that goes into a CX gate can come out as two.
How can a noise-free simulator teach us about noise?
Our simulator is exact on purpose. It tracks every amplitude to full computer precision and adds no noise at all. See noise-free simulation limits for why that is a design choice, not a flaw. So how do you study errors on a machine that never makes any?
You make them yourself. When a quantum error strikes, you can treat it as an extra, unwanted gate that slipped into your circuit. So we take a clean circuit and add the fault on purpose. We put an X gate where a bit flip would strike, or a Z gate where a phase flip would.
Quick definitions, in case you landed here first:
- A qubit holds a superposition. That is a mix of 0 and 1 with a weight on each part.
- Each weight is an amplitude. Square it to get the chance of seeing that answer when you measure.
Xswaps the 0-part and the 1-part, like a NOT gate.Zleaves both parts in place but flips the sign (plus to minus) of the 1-part.
See X, Y, Z gates for more.
Think of a fire drill. A real fire is random and scary. A drill puts a "fire" in one known room at one known time, so you can watch what happens. Adding an error gate works the same way. Real noise is random, smooth, and hidden. An added gate is an error with an exact spot, an exact type, and an exact result we can compute. In this chapter you will place errors and trace them by hand. You will watch one wreck a circuit. Then you will watch the same error, in a new spot, do nothing at all. Finally you will find the rule for how errors spread.
- Why are X and Z the only errors we need?
- Worked example: how do you trace an X error by hand?
- What does a corrupted Bell pair look like?INTERACTIVE
- What if the same error strikes earlier?INTERACTIVE
- How does one error become two?
- What are the odds an error strikes at all?
- How does this connect to errors on real devices?
You’ve read the opening of chapter 2. Pro unlocks the other 7 sections — plus every chapter of every course, with circuits you can run right on the page. That’s $11.99 a month, about the price of a coffee, or $99.99 a year (save 30%). The first chapter of every course, and the whole math course, stay free.