CQCL / guppylang

Pythonic quantum-classical programming language
Apache License 2.0
18 stars 2 forks source link

Guppy output should be deterministic #256

Open doug-q opened 2 weeks ago

doug-q commented 2 weeks ago

Guppy should guarantee that compiling the same program twice produces exactly the same Hugr.

This can potentially go wrong if time-of-build or other timestamps are included by guppy in the Hugr. Best is to provide an option to use a timestamp other than gettimeofday.

If we decide to do this then we should write some pytest magic that runs the guppy compiler twice, and verifies that exactly the same Hugr is produced each time.