quantum-compiler / quartz

The Quartz Quantum Compiler
Apache License 2.0
77 stars 19 forks source link

[bug] Sort each ECC when loading the ECC set #52

Closed xumingkuan closed 2 years ago

xumingkuan commented 2 years ago

This PR sorts each ECC when loading the ECC set. If we don't do this, when 2 ECCs are merged together in the Python verifier, there is no guarantee that the ECC with the lexicographically smaller representative will appear first, so the new representative might be not maintained to still be the smallest one in the ECC. Simply sorting the ECC will solve this problem.