cda-tum/mqt-ddsim

Entanglement circuit running failed

Closed this issue · 4 comments

After build the ddsim_simple in the build folder by using:
cmake --build . --config Release --target ddsim_simple
It seems success build but when I run:
./ddsim_simple --simulate_file entanglement_4.real --display_vector --shots 1000 --ps
The case seems run failed. Here are the returns:
ddsim/build$ ./ddsim_simple --simulate_file entanglement_4.real --display_vector --shots 1000 --ps terminate called after throwing an instance of 'qc::QFRException' what(): [import] Error processing input stream: entanglement_4

I think I got the reason why this cmd will run failed. Because there is no file named entanglement_4.real in this repo. There are only one example .real file in this repo which is named: test_original.real in the test/circuits folder. And I don't get the point why there is a entanglement_4.real in this readme.md file. After I change the running cmd to:
ddsim/build$ ./ddsim_simple --simulate_file test/circuits/test_original.real --display_vector
Then I will get the result:
{ "state_vector": [ 0, +0.707107+0i, 0, +0.707107+0i ], "non_zero_entries": 2, "dummy": 0 }
The examples available is really too less. I hope there will be more example circuits in the future.

We'll update the documentation with the next push with links to circuits in real and OpenQASM format.

Ok, that would be fine. I can test cases based on openqasm now. Thx a lot :)

This is fixed with a8b9bf6