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)ΒΆ
add_note()ΒΆ

Exception.add_note(note) – add a note to the exception

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: str | None = 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: