tensorcircuit.cloud.utils#

utility functions for cloud connection

exception tensorcircuit.cloud.utils.HttpStatusError[source]#

Bases: Exception

Used when the return request has http code beyond 200

__init__(*args, **kwargs)#
args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

tensorcircuit.cloud.utils.reconnect(tries: int = 5, timeout: int = 12) Callable[[...], Any][source]#
tensorcircuit.cloud.utils.rget_json(*args: Any, **kws: Any) Any[source]#
tensorcircuit.cloud.utils.rpost_json(*args: Any, **kws: Any) Any[source]#
tensorcircuit.cloud.utils.set_proxy(proxy: Optional[str] = None) None[source]#
Parameters

proxy – str. format as “http://user:passwd@host:port” user passwd part can be omitted if not set. None for turning off the proxy.

Returns