latticesurgery-com / lattice-surgery-compiler

Lattice surgery quantum error correction compiler
https://latticesurgery.com
GNU Lesser General Public License v2.1
46 stars 6 forks source link

Replace UUIDs with random bytes #255

Closed gwwatkin closed 2 years ago

gwwatkin commented 2 years ago

An idea to improve performance, unfortunately not significant. Opens the possibility of very rare id collision and printing might not always be easy, so need to think about it a bit more.

Running the gigant qft benchmark. Before:

num_qubits=20
Generating qft with AO-Benchmark
Time to generate: 0.01850271224975586
Generated:  PauliOpCircuit : 20 qubit(s), 1200 block(s)
Approximate all gates with pi/2, pi/4, pi/8 rotations
Generated (took 50.95249819755554:  PauliOpCircuit : 20 qubit(s), 953005 block(s)
Make logical lattice ops
Generated (took 136.13677263259888s):  PauliOpCircuit : 20 qubit(s), 953005 block(s)

After:

num_qubits=20
Generating qft with AO-Benchmark
Time to generate: 0.018328428268432617
Generated:  PauliOpCircuit : 20 qubit(s), 1200 block(s)
Approximate all gates with pi/2, pi/4, pi/8 rotations
Generated (took 48.364278078079224:  PauliOpCircuit : 20 qubit(s), 953005 block(s)
Make logical lattice ops
Generated (took 116.9310896396637s):  PauliOpCircuit : 20 qubit(s), 953005 block(s)
gwwatkin commented 2 years ago

Not worth it, better to implement manual incrementing like #257