Qx.Remote.Config (Qx - Quantum Computing Simulator v0.5.0)
View SourceConfiguration for connecting to a QxServer instance.
Fields
:url- Base URL of the qx_server (required), e.g."http://localhost:4040":api_key- API key for authentication (optional, depends on server config):timeout- HTTP request timeout in milliseconds (default: 300_000 = 5 min)
Examples
config = Qx.Remote.Config.new!(url: "http://localhost:4040", api_key: "my-key")
{:ok, config} = Qx.Remote.Config.new(url: "http://localhost:4040")
Summary
Types
@type t() :: %Qx.Remote.Config{ api_key: String.t() | nil, timeout: pos_integer(), url: String.t() }
Functions
Creates a new remote config.
Options
:url- Base URL of the qx_server (required):api_key- API key for authentication (optional):timeout- HTTP request timeout in milliseconds (default: 300_000)
Returns
{:ok, %Config{}}on success{:error, reason}on validation failure
Examples
{:ok, config} = Qx.Remote.Config.new(url: "http://localhost:4040")
Creates a new remote config, raising on invalid input.
Examples
config = Qx.Remote.Config.new!(
url: "http://localhost:4040",
api_key: System.get_env("QX_SERVER_API_KEY")
)