qat.generators.RemoteBatchGenerator
A remote generator started in server mode can be accessed by connecting to the port and IP address. The usage of a remote generator is detailed in the executing section
- class qat.generators.RemoteBatchGenerator(port, ip: str = None, ssl_cert: str = None, ssl_key: str = None, check_server_cert: bool = False, connection=None)
Remote batch generator. This batch generator creates connection between you and a remote
AbstractGenerator
started in server mode (c.f.serve()
)- Parameters
port (int) – port number of the QPU server
ip (str, optional) – QPU server IP Default: None
ssl_cert (str, optional) – path to the client SSL certificate Default: None
ssl_key (str, optional) – path to the client SSL key, use SSL if provided Default: None
check_server_cert (bool, optional) – check the server certificate if True and in SSL mode
connection (optional Thrift connection) – for internal use
- generate(specs, *args, **kwargs)
Call generate method of the remote batch generator object
- Parameters
specs (
HardwareSpecs
) – hardware specs*args (
*any
) – additional arguments passed to the generator**kwargs (
**any
) – additional keyword arguments passed to the generator
- Returns
generated batch
- Return type
- post_process(batch_result)
Call post process method of the remote batch generator object
- Parameters
batch_result (
BatchResult
) – batch result to post process- Returns
Any python object returned by the remote batch generator
- Return type
object