This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
Inconsistent output for QuantumSimulator vs SparseSimulator #1081
Labels
bug
Something isn't working
Describe the bug
The same code produces different output when executed on QuantumSimulator vs SparseSimulator.
It appears that the basis states are labeled in little endian for QuantumSimulator, but for SparseSimulator they are sometimes labeled in big endian.
To Reproduce
The following code:
produces this output on QuantumSimualtor (basis state |2⟩ has zero amplitude)
but this output on SparseSimulator (basis state |1⟩ has zero amplitude)
Oddly enough, for simpler examples (such as just applying an H gate to the first qubit without following it with Controlled Ry) the output of both simulators is the same.
Expected behavior
I expect both simulators to have consistent output (up to omitting basis states with zero amplitude).
System information
The text was updated successfully, but these errors were encountered: