Qubit Mapping
Mapping means giving each qubit in your program its own real qubit on the chip, one to one. A good starting layout puts qubits that work together often side by side, on the chip's best-tuned spots. The mapping record then tells you which real readout belongs to which of your qubits.
What is a qubit mapping?
Why care? Where your qubits sit on the chip can change how many errors you get, even when the program is exactly the same.
Your program numbers its qubits 0, 1, 2. These are logical qubits. They are names for roles in your program. The chip has physical qubits. These are real parts of the chip, each at a fixed spot. Each one has its own measured error rates.
A mapping gives each logical qubit its own physical qubit, one to one. The first choice, before the circuit starts, is called the initial layout. Logical q0 does not have to sit on physical qubit 0. The compiler puts it wherever the whole circuit runs cheapest.
An everyday example: seating guests at a dinner. People who talk a lot should sit next to each other. And you want them at the table with the good chairs. Here the example stops working. Guests can shout across the room. Qubits cannot. Two qubits can only work together if they are wired side by side.
So the choice matters in two ways. It sets how far apart working partners start. That decides how much routing, or moving qubit states around, is needed later. It also decides which of the chip's better or worse tuned gates your circuit uses.
- Worked example: two layouts, one circuit, different bills
- What does a Bell pair on side-by-side wires give?INTERACTIVE
- What happens when the compiler moves half the pair?INTERACTIVE
- Worked example: placing next to the good gates
- What happens if you move the other half too?INTERACTIVE
- Does the best layout stay the same on a real chip?
You’ve read the opening of chapter 3. Pro unlocks the other 6 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.