qiskit-serverless
qiskit-serverless copied to clipboard
Make BaseProvider an abstract class
BaseProvider
was intended to be an abstract base class to be used as a reference implementation for connecting to various cloud providers (AWS, Azure, etc.), but it is implemented as a normal class with quite a few methods which throw NotImplementedErrors
. It is probably better to make this an actual abstract base class.
BaseProvider
is used in testing and in the client.quantum_serverless
module for its ability to be instantiated with a specified ComputeResource
. In order to continue making this interface available in testing, we may need something like a TestProvider
class, which is duck-typed to behave like BaseProvider
, even if we don't properly implement the entire interface. It would serve the purpose in testing that BaseProvider
is currently used for. TestProvider
should probably be an internal class used for testing, since it would likely not be able to implement the actual interface required by BaseProvider
.
Open to any suggestions on implementations, but it does seem like we need a reference/abstract class here.