Closed ferbetanzo closed 5 months ago
Why do we need the following code at the beginning of tk_to_quest
?
if not circ.is_simple:
FlattenRegisters().apply(circ)
If circuit contains multiple qubit registers with custom names (not q
or c
) or qubit indexation has gaps so to normalize namings and qubits numeration circuit we must have consistent circuit view that later on we can reverse qubit index in case of different qubits ordering.
Why do we skip measurement gates in logic of converting circuit?
To support measurements we must have at least two types of registers: quantum and classical where we will store results of measurements. But QuEST doesn't have a notion of classical registers because after applying measurement to a particular qubit its state collapses due to the destructive nature of measurement.
Gates mapping betwnn tket
and pyQuest
you can find here https://github.com/ferbetanzo/pytket-quest/wiki/%5BPhase-1%5D-Gates-mapping
qulacs_convert.py
.quest_to_tk
as well?