API Reference Qx - Quantum Computing Simulator v#0.11.0
View SourceModules
Qx - A Quantum Computing Simulator for Elixir
Raised for two related computational-basis misuses
Raised when a classical bit index is out of range.
Raised when there are issues with conditional operations.
Visualization for quantum simulation results.
Tier 1: a core Qx type — the SVG image artifact produced by
Qx.draw_bloch/2 and Qx.draw_circuit/2.
Tier 1: a core Qx type — the quantum-state table artifact produced by
Qx.draw_state/2: every basis state with its amplitude and
probability, pre-rendered in three encodings.
Placeholder base exception for Qx library errors. Not currently raised by any Qx function.
Utility module: reached from Qx.* in normal use — export/import is the
documented tier-2 escape hatch for OpenQASM interop.
Raised when there are issues with gate operations.
Utility module: reached from Qx.* in normal use — the documented tier-2
surface for running circuits on cloud QPUs.
Utility module: the tier-2 configuration struct for Qx.Hardware.
Raised when a Qx.Hardware.Config value is invalid.
Raised by Qx.Hardware.run!/3 (and friends) when the underlying
pipeline returns {:error, {stage, reason}} and the caller asked for
a bang variant.
Raised when a circuit submitted to Qx.Hardware has no measurement
instructions.
Utility module: a documented tier-2 escape hatch below the circuit API
(normal use never reaches it — normalize/1 and probabilities/1 are
the supported surface).
Raised when there are issues with quantum measurements.
Raised when a Qx function needs an optional dependency that the host application hasn't added.
Raised when an option passed to a public Qx function is invalid.
Raised when a gate parameter (rotation angle or phase) is not a number.
Utility module: reached from Qx.* in normal use — the _all, cx_chain,
and state-prep helpers front Qx.h_all/1, Qx.cx_chain/2, Qx.bell_state/1, etc.
Raised when an OpenQASM source string cannot be parsed.
Raised when an OpenQASM program uses a feature or gate that Qx does not currently support.
Tier 1: a core Qx type. Circuits are created and threaded by the Qx.*
facade (Qx.create_circuit/2, the gate builders, Qx.run/2); direct use
of this module is rarely needed.
Raised when the number of qubits is invalid.
Raised when a qubit index is out of range.
Raised when register construction receives invalid input.
Utility module: reached from Qx.* in normal use — Qx.run/2, Qx.steps/2,
Qx.get_state/1, and Qx.get_probabilities/1 front this engine.
Tier 1: a core Qx type — the struct Qx.run/2 hands back. Inspect it with
its own helpers (most_frequent/1, outcomes/1, probability/2).
Utility module: a documented tier-2 escape hatch below the circuit API (normal use never reaches it — circuits are the primary path).
Raised when a quantum state is not properly normalized.
Raised when a state vector's shape does not match the expected size for the target quantum circuit.
Tier 1: a core Qx type — the struct Qx.steps/2 yields, one per executed
operation. Render it with Qx.Step.show/1.