tencent-quantum-lab / tensorcircuit

Tensor network based quantum software framework for the NISQ era
https://tensorcircuit.readthedocs.io
Apache License 2.0
265 stars 78 forks source link

Add examples benchmarking different contractor settings provided by cotengra #212

Closed refraction-ray closed 4 months ago

refraction-ray commented 4 months ago

Task description

Add an example script in /examples or a jupyter notebook in /docs/source/tutorials to demonstrate the usage of different cotengra optimizers and benchmark the performance metric (pathfinding time, and the metrics for the tensor contraction), specifically with the newly added SimulatedAnnealing optimizer in cotengra (accessed by opt = HyperOptimizer(simulated_annealing_opts={}), might try combination of different path finding strategy if allowed ).

Implementation

The contraction path finding can be evaluated on different circuit sets: random circuits, qft circuits tc.templates.blocks.qft, QAOA circuits on different types of graph instances (regular graph, all-to-all graph, grid graph...), etc.

Also note that the contraction metric can be directly obtained without any real computation by setting debug_level=2 for contractor setup in tc.

References

king-p3nguin commented 4 months ago

Hi, I would like to work on this issue for unitaryhack.