q5m.js - Quantum Computing Library - v0.1.1
    Preparing search index...

    Class StateRenderer

    Provides static methods for visualizing and analyzing quantum states.

    This class can render quantum states in various formats, including amplitude displays, probability histograms, and Bloch sphere data for single qubits.

    Index

    Constructors

    Methods - Visualization

    • Renders the state's probability distribution as an ASCII bar chart.

      Parameters

      • state: QubitState

        The quantum state to render.

      • maxWidth: number = 50

        The maximum width of the bar chart in characters. Defaults to 50.

      Returns string

      A string containing the ASCII bar chart.