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)
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:
After: