unitaryfund / metriq-gym

Standard benchmark script implementations for https://metriq.info
Apache License 2.0
2 stars 0 forks source link

Decouple backend-specific functionality from benchmarking #52

Open vprusso opened 1 day ago

vprusso commented 1 day ago

The bench.py file contains components that should be extracted into a separate module. For instance, any functions that pertain to acquiring the backend, circuit transpilation, etc. should all be moved. The common aspect of these functions include some aspect of obtaining an object or property that is contingent on the backend requested.

For instance, for the get_backend function, the object that is returned is the object that corresponds to the backend device for the requested backend. The transpile_circuit function transpile the input circuit on the requested backend, etc.

Perhaps this functionality would be best placed in something like a provider.py/device.py/etc. This can change as the project evolves, but it's clear that this should not be in the bench.py file.