Closed dongcc closed 1 year ago
I took a look at this while testing the output of https://github.com/Qiskit/qiskit-aer/pull/1504. I'm pretty sure this is an aer bug around running on big endian platforms (which in practice s390x linux is probably the only one). Probably specifically around around https://github.com/Qiskit/qiskit-aer/blob/main/src/framework/pybind_json.hpp#L241 and https://github.com/Qiskit/qiskit-aer/blob/main/src/framework/pybind_json.hpp#L143-L165 I think aer is interpreting the endianess of the input unitary 2d array from the circuit/qobj incorrectly and that's causing it to fail it's internal is_unitary()
function. You can easily reproduce this same error without qiskit-experiments
using:
from qiskit import Aer
from qiskit.quantum_info import random_unitary
from qiskit.circuit import QuantumCircuit
backend = Aer.get_backend("aer_simulator")
qc = QuantumCircuit(2)
qc.unitary(random_unitary(4), [0, 1])
qc.measure_all()
backend.run(qc)
Please open a new issue if the above workaround doesn't work.
Informations
What is the current behavior?
When I'm trying to run quantum volume measurement(https://github.com/Qiskit/qiskit-experiments/blob/main/docs/tutorials/quantum_volume.ipynb) on the LinuxONE Linux, I encountered following error :
Not sure whether it is a qiskit-experiment issue or qiskit-Aer issue as I do noticed that the error was reported from https://github.com/Qiskit/qiskit-aer/blob/main/src/framework/operations.hpp#L1002
Steps to reproduce the problem
Run the notebook https://github.com/Qiskit/qiskit-experiments/blob/main/docs/tutorials/quantum_volume.ipynb on LinuxONE Linux.
What is the expected behavior?
The measurement can be successfully performed.
Suggested solutions