Simplifying CX pairs #356
-
|
I am running the following, and noticed some surprising outputs. I expect the circuit to compile down to the identity but I only see that ~50% of the time. One surprising output I have seen is the following, which seems to be incorrect, if I've understood the definition of U3. Outputs such as the following are also common I've also tested with circuits such as and in that case I relatively often get results such as the following. I just wanted to clarify if I should be surprised by this, or if there are some parameters that I can set to help the workflow identify identities. I have taken this workflow from this example -> https://github.com/BQSKit/bqskit/blob/main/examples/qfast.py. Perhaps there is a better workflow for this use case? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
You should try QSearch synthesis for small (3 or fewer qubits) circuits; it will lead to the best results. Nevertheless, identity or extremely close to identity synthesis is actually very difficult for our tools, as they are not optimized for that. If this is an important use case for you, then there is probably some modified synthesis method that we can cook up to solve it more efficiently, but it isn't as simple as using different settings. From your comment, it seems more like you are using these examples to benchmark/experiment, which then to answer your question directly, no, these results are not surprising. |
Beta Was this translation helpful? Give feedback.
-
|
Many thanks @edyounis. If that is the expected behaviour then thats all understood. mentioned above is quite far from the identity? Might there be any tools to quantifying how close the result is from the original circuit? |
Beta Was this translation helpful? Give feedback.
You should try QSearch synthesis for small (3 or fewer qubits) circuits; it will lead to the best results. Nevertheless, identity or extremely close to identity synthesis is actually very difficult for our tools, as they are not optimized for that. If this is an important use case for you, then there is probably some modified synthesis method that we can cook up to solve it more efficiently, but it isn't as simple as using different settings. From your comment, it seems more like you are using these examples to benchmark/experiment, which then to answer your question directly, no, these results are not surprising.