-
Notifications
You must be signed in to change notification settings - Fork 34
DDSim has segmentation fault when running QAOA and Portfolio Optimization with QAOA circuits from MQT Bench #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for bringing up this issue. I can reproduce the segmentation fault locally but unfortunately I did not find the cause yet. Some observations:
|
This PR fixes a bug where the parameters of parameterized gates are not saved when reading in circuits from `QasmQobjExperiments`. Previously the `params` list was always empty. Related: - munich-quantum-toolkit/ddsim#190 - munich-quantum-toolkit/ddsim#248
The latest commit to the main branch should fix the problem. Could you test this as well? I will add a new test for the fix later and create a new release. |
The update works. I no longer encounter segmentation faults when running QAOA-related circuits using the Some additional information: I'm running MQT Bench's circuits on the different DDSim backends including When running a QAOA circuit using the When running a QAOA circuit using the Is this expected behavior or is it a possible issue? (maybe related to |
The In fact, the simulator should automatically remove the measurements at the end of the circuit but I guess the barriers are blocking the removal. Maybe something @burgholzer can also comment on? |
I am fairly sure that the barrier statements are the problem. @rentristandelacruz would you mind creating a separate issue for that? |
I created a separate issue for this. |
mqt.ddsim version
1.17.2
OS
Linux Mint 21.1
Python version
3.10
C++ compiler
11.3.0
Additional environment information
No response
Description
I am simulating some circuits from the MQT Bench (https://www.cda.cit.tum.de/mqtbench/) using DDSim. Specifically, I am the using
qasm_simulator
backend and for the circuits I download a set of target-independent (compiler: qiskit) qasm files from the MQT Bench web page. I am currently using the DDSimv1.17.2
.When I recently run a QAOA or Portfolio Optimization with QAOA circuits (e.g.
portfolioqaoa_indep_qiskit_3.qasm
,qaoa_indep_qiskit_3.qasm
.) using theqasm_simulator
backend I encounter segmentation faults. I did not encounter the segmentation fault issue with the other circuits from the set (i.e. Deutsch-Jozsa, GHZ, Grover's, etc).I was simulating the same set of circuits a couple of months ago and I did not encounter the segmentation fault when running the QAOA-related circuits. Upon checking, I was using DDSim
v1.13.1
. I prepared different Python virtual environments and installed different versions ofmqt.ddsim
. The segmentation fault when running QAOA-related circuits started occurring in version1.17.0
. Version1.16.0
can run the QAOA and Portfolio Optimization with QAOA circuits without the segmentation fault occurring.Expected behavior
No response
How to Reproduce
mqt.ddsim v.1.17.0
.mdkir ddsim-1.17.0
python3.10 -m venv ddsim-1.17.0
source ddsim-1.17.0/bin/activate
pip install --force-reinstall -v "mqt.ddsim==1.17.0"
portfolioqaoa_indep_qiskit_3.qasm
,qaoa_indep_qiskit_3.qasm
.qasm_simulator
backend and simulate both qaoa and portfolioqaoa circuit.e.g. script:
The text was updated successfully, but these errors were encountered: