Closed DechinPhy closed 4 years ago
For a manual operation you can just add a mapper like what I have done. But I think this problem should be fixed.
The order of the qubit stored inside the internal representation of the wavefunction does not necessarily reflects the order in which the qubits were created. This behaviour is documented here.
If you plan on using the cheat()
method of the simulator in your code, you need to manually make the conversion between the logical qubit IDs and the order of the qubits stored in the second element of the return value of cheat()
References:
Since this behaviour is properly documented, I'm closing this issue.
Document Statement
In this file I will show a Bell's state with a unoperated qubit. This unoperated qubits seems collected by the garbage system? With the default setting this unoperated qubit shouldn't change its index or collected by the garbage system I think. Such we can directly use the quantum state generated otherwise we can only use the measurement results.
The wrong result
$\left(\left|00\right>+\left|11\right>\right)\otimes\left|0\right>$
The right result
$\left|000\right>+\left|101\right>$