You wrote a short circuit. The compiler returned a longer one. That can be a necessary part of making it fit a real device.
Key takeaways
- Keep compiler configuration with the output.
- Check logical-to-physical mapping.
- Preserve unsupported source instead of dropping instructions.
Chapter 01
A device imposes constraints
The gates and connections available on a target need not match your abstract circuit. Compilation translates between those descriptions and may optimize the result. A changed drawing therefore deserves inspection, not an immediate assumption that the computation has changed.
Chapter 02
Inspect the compiler settings
pytket exposes compiler passes and target requirements. Keep the selected passes, software version and backend with the resulting circuit. If you rerun a comparison later with different settings, treat it as a changed experiment even when the original source is identical.
Chapter 03
Check qubit mapping and outputs
Routing can add operations or change the physical qubits used. Verify how logical qubits and classical results are mapped before reading a histogram. A bitstring needs that context, especially when several compilation stages or backend adapters are involved.
Chapter 04
What is a Quantinuum Nexus workflow?
Nexus, a compiler library and QFlow’s supported representations serve different purposes. Use QFlow to inspect supported circuit operations and preserve the external compilation record. A conversion should stop when it cannot keep the meaning, rather than conceal an unsupported instruction.




