qiskit-aer icon indicating copy to clipboard operation
qiskit-aer copied to clipboard

Aborted (core dumped) QASM simulator error for extremely high depth circuits with rz gates

Open epelofske-LANL opened this issue 1 year ago • 3 comments

Environment

  • Qiskit Terra version: qiskit-terra==0.25.0
  • Python version: Python 3.9.12
  • Operating system: Linux

What is happening?

For some extremely large (high depth, high gate count) circuits, the local QASM simulator (qasm_simulator) occasionally encounters a core dump:

terminate called after throwing an instance of 'std::invalid_argument'
  what():  QubitUnitary::State::invalid instruction 'rz'.
Aborted (core dumped)

How can we reproduce the issue?

I encountered this on a 16 qubit circuit that was extremely high depth - it contained upwards of 38000 rz gates, 16000 rx gates, and 32000 cx gates.

Oddly, it appears that the error disappears if I compile the circuit to not use any rz gates. Although, I think that the error also only occurs sometimes - I can not deterministically replicate it so far.

What should happen?

No error. No core dump.

Any suggestions?

No response

epelofske-LANL avatar Aug 14 '23 22:08 epelofske-LANL

I think this a bug in qiskit-aer the exception being raised is at least coming from qiskit-aer and qasm-simulator is definitely part of aer. I'm going to transfer this issue to the aer repo.

mtreinish avatar Aug 15 '23 14:08 mtreinish

This error is raised in gate fusion. An workaround is set fusion_enable=False.

hhorii avatar Aug 22 '23 14:08 hhorii

@epelofske-LANL Could you share your codes that reproduce this issue? I would like to take a look.

hhorii avatar Aug 24 '23 04:08 hhorii