-
Notifications
You must be signed in to change notification settings - Fork 19
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
rewrite hash function #57
Comments
Where do we encounter this issue? When we have two topologically identical circuits, which one do we want to keep, and is there a memory leakage problem? |
In RL, we want to find out the shortest path from the original input circuit to the best circuit discovered by us. On the optimization path, it's very common to see some loops like ... -> A_1 -> B -> ... -> A_2 -> ..., but we are unable to simplify this since A simple workaround is converting circuits to strings and then use string hash function to decide whether two circuits are equivalent. @xumingkuan For quartz (not RL), why we need to involve memory address into hash computation? For BFS, how the current hash function guarantee that there's no loop? |
I just read the function quartz/src/quartz/tasograph/substitution.cpp Line 668 in 6d5da4c
This function returns the same We should document this somewhere, but I believe two equivalent |
@xumingkuan Thank you for your investigation (I didn't get a chance to dig into it)! Then I think in one process, two equivalent graphs should have the same hash values. I will check it later whether I got something seemed contradictory to this. |
Another issue about the function |
Currently our hash function will give different values for topologically identical circuits, because it involves GUID/pointer address of gates in hash value computation.
The text was updated successfully, but these errors were encountered: