qiskit-community / ffsim

Faster simulations of fermionic quantum circuits.
https://qiskit-community.github.io/ffsim/
Apache License 2.0
19 stars 5 forks source link

implement apply_num_num_interaction and on_site_interaction using apply_diag_coulomb_evolution #222

Closed kevinsung closed 1 month ago

kevinsung commented 1 month ago

It didn't speed things up

| Change   | Before [64894ec5] <main>   | After [4085f837] <pull/222/head>   |   Ratio | Benchmark (Parameter)                                         |
|----------|----------------------------|------------------------------------|---------|---------------------------------------------------------------|
| +        | 5.40±0.01ms                | 38.2±0.2ms                         |    7.07 | gates.GatesBenchmark.time_apply_num_num_interaction(16, 0.25) |
| +        | 75.3±0.3μs                 | 476±5μs                            |    6.31 | gates.GatesBenchmark.time_apply_num_num_interaction(12, 0.25) |
| +        | 4.43±0.04ms                | 13.8±0.09ms                        |    3.11 | gates.GatesBenchmark.time_apply_num_num_interaction(12, 0.5)  |
| +        | 993±0.3ms                  | 2.90±0s                            |    2.92 | gates.GatesBenchmark.time_apply_num_num_interaction(16, 0.5)  |
| +        | 52.5±0.5μs                 | 112±0.7μs                          |    2.13 | gates.GatesBenchmark.time_apply_num_num_interaction(8, 0.5)   |
| +        | 26.4±0.3μs                 | 51.7±0.5μs                         |    1.96 | gates.GatesBenchmark.time_apply_num_num_interaction(4, 0.25)  |
| +        | 33.2±0.5μs                 | 60.5±4μs                           |    1.82 | gates.GatesBenchmark.time_apply_num_num_interaction(8, 0.25)  |
| +        | 32.9±0.5μs                 | 51.0±4μs                           |    1.55 | gates.GatesBenchmark.time_apply_num_num_interaction(4, 0.5)   |
| Change   | Before [64894ec5] <main>   | After [4085f837] <pull/222/head>   |   Ratio | Benchmark (Parameter)                                         |
|----------|----------------------------|------------------------------------|---------|---------------------------------------------------------------|
| +        | 2.17±0.01ms                | 13.5±0.1ms                         |    6.24 | gates.GatesBenchmark.time_apply_on_site_interaction(12, 0.5)  |
| +        | 487±2ms                    | 2.92±0.01s                         |    6    | gates.GatesBenchmark.time_apply_on_site_interaction(16, 0.5)  |
| +        | 25.2±0.1μs                 | 95.5±2μs                           |    3.79 | gates.GatesBenchmark.time_apply_on_site_interaction(8, 0.5)   |
| +        | 14.9±0.3μs                 | 40.2±0.5μs                         |    2.71 | gates.GatesBenchmark.time_apply_on_site_interaction(8, 0.25)  |
| +        | 14.5±0.2μs                 | 32.5±0.2μs                         |    2.24 | gates.GatesBenchmark.time_apply_on_site_interaction(4, 0.5)   |
| +        | 15.5±0.2μs                 | 31.9±0.3μs                         |    2.06 | gates.GatesBenchmark.time_apply_on_site_interaction(4, 0.25)  |
| +        | 2.85±0.02ms                | 38.0±0.2ms                         |   13.33 | gates.GatesBenchmark.time_apply_on_site_interaction(16, 0.25) |
| +        | 39.7±0.3μs                 | 446±4μs                            |   11.23 | gates.GatesBenchmark.time_apply_on_site_interaction(12, 0.25) |