This PR renames the parameter verify_equivalences of generate() to invoke_python_verifier as a switch to invoke the Python verifier or not. When this is true, the behavior is exactly the same as before this PR.
When invoke_python_verifier is false, Quartz will not invoke the Python verifier which verifies all equivalences by Z3. Instead, it treats circuits with hash values differing no more than 1 as equivalent.
When there are no parameters in the circuits, as long as two circuits' hash values are very close to each other, even if they are actually not equivalent, it is guaranteed that their matrices will not differ much. So it is considered safe to not invoke the Python verifier (which will accelerate the generation time by a lot) in this case.
This PR renames the parameter
verify_equivalences
ofgenerate()
toinvoke_python_verifier
as a switch to invoke the Python verifier or not. When this istrue
, the behavior is exactly the same as before this PR.When
invoke_python_verifier
isfalse
, Quartz will not invoke the Python verifier which verifies all equivalences by Z3. Instead, it treats circuits with hash values differing no more than 1 as equivalent.When there are no parameters in the circuits, as long as two circuits' hash values are very close to each other, even if they are actually not equivalent, it is guaranteed that their matrices will not differ much. So it is considered safe to not invoke the Python verifier (which will accelerate the generation time by a lot) in this case.