Qx.Draw.SVG.Charts (Qx - Quantum Computing Simulator v0.5.0)
View SourceSVG chart generation for quantum simulation results.
This module handles all SVG-based chart rendering, including:
- Probability distribution bar charts
- Measurement count histograms
- Raw probability histograms
SVG visualizations are standalone and can be embedded in web pages, saved to files, or used in environments where VegaLite is not available.
Internal Module
This module is part of the Qx.Draw refactoring and should be accessed
through the public Qx.Draw API rather than directly.
Summary
Functions
Creates an SVG histogram from raw probability data.
Creates an SVG bar chart of probability distribution from simulation result.
Creates an SVG bar chart of measurement counts from simulation result.
Functions
Creates an SVG histogram from raw probability data.
Parameters
data- List of maps with "state" and "probability" keystitle- Chart titlewidth- Chart width in pixelsheight- Chart height in pixels
Returns
SVG string for probability histogram.
Creates an SVG bar chart of probability distribution from simulation result.
Parameters
result- Simulation result map containing probabilitiestitle- Chart titlewidth- Chart width in pixelsheight- Chart height in pixels
Returns
SVG string that can be saved to file or embedded in HTML.
Creates an SVG bar chart of measurement counts from simulation result.
Parameters
result- Simulation result containing measurement countstitle- Chart titlewidth- Chart width in pixelsheight- Chart height in pixels
Returns
SVG string showing count distribution of measurement outcomes.