Open lazyoracle opened 3 years ago
Closed in #59
The fix introduced in #59 misses edge cases. For example 011111
should be flipped to 111110
but that doesn't happen because any leading zeros are automatically removed when converting from binary to hex or int. So 011111
is treated as 11111
and it stays the same. A possible fix would be to delay the conversion to hex until the very last step, before returning the counts in the result data structure. It would then require changes in get_labels()
and flip_labels()
in c3_backend_utils.py
Describe the bug Qiskit ordering of qubits is different from what is commonly used in Physics textbooks. C3 follows the general Physics textbook style. However when producing output through the C3-Qiskit interface, the expectation is to get results with compatible qubit ordering.
To Reproduce The following code snippet checks C3 output with Qiskit output. This fails due to qubit indexing mismatch:
Expected behavior By default, the c3-qiskit interface should produce qiskit compatible labels with an option to disable this feature if required by the user.
Additional context Importantly, this change in the representation of multi-qubit states affects the way multi-qubit gates are represented in Qiskit. More details are available here and it might be useful to check if a possible fix goes beyond mere relabelling of qubit state names in the experiment result.