Endian ness of circuit simulator

What is the endian-ness of the simulator. For example, if i do X0X1X2 on 6 qubits do I get bitstring 56 or bitstring 7?

Hi @Nicholas_Rubin, welcome to the forum!

We don’t really produce bitstrings, but if we just run the scenario you described and return a 1-shot sample we get tensor([1, 1, 1, 0, 0, 0]).

Now whether you get 7 or 56 depends on how you interpret this array, but the 0th qubit is at the 0th index of the result.

I hope this helps and enjoy using PennyLane!

Hey @Nicholas_Rubin, just to add on here: the PennyLane simulators use big endian ordering (e.g., opposite to Qiskit’s little endian ordering of qubit registers)