Quantum Compilation & Transpilation
How logical circuits become hardware programs: basis translation, layout, routing, optimization — the layer almost nobody teaches, live on our reference compiler.
The circuit you write is not the one the chip runs. A compiler first rewrites your gates into the few gates the chip can do. Then it picks a real qubit for each of your qubits. Then it adds extra steps so every two-qubit gate lands on qubits that are wired together. The new circuit does the same job, but it can have more gates, take more steps, and put your answer on different wires.
A native gate is one the chip can do directly, as a single tuned control pulse. Every other gate must be rewritten using native gates. A small set of the right gates can build any gate, either exactly or within a stated error. So a chip with a short list of native gates is not weaker because of it.
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.
A coupling map is a picture of which qubit pairs on a chip can work together directly. A two-qubit gate between qubits that are not linked cannot run as written. Routing moves qubit states until the two qubits sit side by side. Every extra step of distance costs extra two-qubit gates, so distance turns straight into error.
A SWAP trades the full states of two qubits. So after every SWAP, the compiler must update its table of which real qubit holds which of your qubits. If it forgets, later gates hit the wrong qubits. On most chips one SWAP costs three CX gates. So read the SWAP count, the two-qubit gate count, and the depth together.
Decomposition rewrites a gate the chip can't do as a short list of gates it can do. The rewrite is either exact (up to a global phase that no test can detect) or close, within a stated error limit. Different correct rewrites trade gate count against depth and against how well each gate is tuned. So shorter is not always better.
Depth is the number of time steps a circuit needs, when gates on different qubits run at the same time. Compilers lower it in two ways. They delete pairs of gates that undo each other. They also pack gates that don't share qubits into the same step. But they may only make changes that are proven to leave the answer the same.
Hardware-aware compilation uses measured, time-stamped error data to pick among the many valid ways to place and route a circuit. Sometimes a longer route through better qubits beats the shortest one. Every choice must record which error snapshot and which random seed it used. Without that, nobody can repeat or check the result.
On a superconducting chip, each qubit can only work with a few fixed neighbours. So far-apart qubits pay a "SWAP tax" of extra two-qubit gates. Trapped-ion machines let any pair work together directly, but their two-qubit gates are much slower. Neither type wins every time. The result depends on which qubits your circuit pairs up, and on which cost you care about most.
Total gate count is one number. It hides the type of each gate, which gates run at the same time, how long they take, and how often they fail. So the compiled circuit with the fewest gates can still lose on expected success or run time. To choose between circuits, you need a clearly written scoring formula. Different sensible formulas can rank the same circuits in different orders.
A compilation report is a record that lets anyone repeat the compile. It lists a fingerprint of the input, the compiler and target versions, the seed, the qubit mapping, and the numbers before and after. You can trust it when you can trace every added gate to a specific step and the arithmetic adds up. You can't check it when the mapping or the source details are missing.
In the capstone, you compile one fixed logical circuit for three kinds of chip: a line, a grid, and all-to-all. Then you explain every difference in gate count, depth and expected success with arithmetic anyone can check. What you hand in is a sourced, repeatable comparison report. It is not a verdict on which QPU is best.