Open poojarao8 opened 8 months ago
This might be my lack of understanding, but I am also confused about what convention we are following here - the little endian or the big endian. When initializing from statevector (0,1,0,0,0,0,0,0), you get |001>. Shouldn't it be |100> as per the cudaq convention? Thank you!
To be tackled as part of https://github.com/NVIDIA/cuda-quantum/issues/1086.
Required prerequisites
Describe the bug
The
from_state
seems to work as expected for up to 2 qubits, but for the 3 and 4 qubit examples I tested, several discrepancies show up. For e.g., the statevector (0,0,0,0,0,0,0,1) should correspond to state |111>, but the sampling result is |110> instead.Steps to reproduce the bug
Expected behavior
from_state
on (0,0,0,0,0,0,0,1) should lead to |111> upon samplingIs this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
Suggestions
No response