-
Notifications
You must be signed in to change notification settings - Fork 4
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
QSoverlay generating wrong circuits, when gate time is supplied... #19
Comments
This is the desired, correct circuit, that I have written in qsoverlay:
And this is the code qsoverlay outputs:
Notice that qsoverlay somehow decided to ignore the position of my I checked, and the error is already present before b.finalize() is called: the X and Y gates already have an incorrect timing before this. |
Ok, I think I found the error. I made some changes and the gates are now introduced with the correct time in builder.py. The problem was that some gate functions ( A fix possibility would be to pass a dictionary ( An easier fix is probably to just modify The __lt__operator is also not prepared to receive such a time argument through the gate_desc list. |
Made a pull request #20 in order to solve this. |
I created a circuit using overlay.
However, qsoverlay generates wrong quantumsim code.
I tried simulating both the intented circuit (written in qsoverlay) and the resulting circuit (exported by qsoverlay) and the simulation results do not match. This is supposed to be a deterministic computation, which is not the case on the quantumsim circuit generated by qsoverlay (I set
noise_flag = False
during the function call.)Here's the qsoverlay circuit:
If I run this code, I get the result below:
As can be seen, the probability distribution is concentrated in 2 outputs (with 50% chance each), instead of just in one output, as calculated for the equivalent cQasm circuit in Quantum Inspire.
The text was updated successfully, but these errors were encountered: