Skip to content

Release 0.9.0

Choose a tag to compare

@github-actions github-actions released this 03 Jul 19:57

What's Changed

Changed

  • The IBM Quantum client now retries transient GET failures
    (retry: :safe_transient) instead of failing on the first blip, and raises
    the /results receive timeout to 60 s for multi-MB Sampler V2 results.
    Qx.Hardware.Portal GETs retry transiently too; POST requests (IAM exchange,
    job submission, transpile) are never auto-replayed.

  • Raised minimum runtime dependency versions: nx ~> 0.12 (was ~> 0.10),
    complex ~> 0.7 (was ~> 0.6, now required by nx 0.12), and req ~> 0.6
    (was ~> 0.5). No Qx API or numerical changes; Nx 0.12 renders float32
    tensors at native precision, so two Qx.Math doctests were updated to match.

Security

  • Qx.Hardware.Ibm and Qx.Hardware.Portal HTTP error tuples
    ({:error, {:http, status, body}}) no longer echo the full decoded response
    body, which could carry echoed request context. The body is reduced to a
    recognised error message or a generic marker, bounded to ~256 characters.
    Behaviour change: the third element is now a bounded string rather than
    the raw response map/body.

  • Qx.Hardware.Config now rejects plaintext http:// URLs to non-loopback
    hosts for portal_url, base_url, and iam_url. These carry the portal
    bearer token and route IBM IAM token exchange, so a remote http URL would
    expose them in cleartext. http:// stays valid for loopback hosts
    (localhost, 127.0.0.1, ::1) so local mocks and dev are unaffected.
    Behaviour change: a config with a remote http URL now raises
    Qx.Hardware.ConfigError instead of being accepted.

  • The OpenQASM importer now caps parenthesis nesting depth (64) before parsing.
    The expression grammar recurses one frame per (, so a ((((…)))) chain
    within the 1 MB source cap could exhaust the stack (:enomem); deeply nested
    input now raises Qx.QasmParseError.

  • Qx.Export.OpenQASM.from_qasm_function/1 now wraps the generated code in a
    unique Qx.Generated.<Name>_<hash> module instead of returning a bare def,
    so a downstream Code.compile_string/1 can no longer inject an
    attacker-named helper into the caller's module. Behaviour change: the
    returned source is a defmodule, and the result map gains a :module key.

Installation

Add to your mix.exs:

def deps do
  [
    {:qx_sim, "~> 0.9.0"}
  ]
end

Documentation