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

    Interface StateRenderOptions

    Defines options for rendering a quantum state vector.

    interface StateRenderOptions {
        maxAmplitudes?: number;
        precision?: number;
        onlyNonZero?: boolean;
        sortByProbability?: boolean;
        showPhase?: boolean;
    }
    Index

    Properties

    maxAmplitudes?: number

    The maximum number of amplitudes to display. Defaults to 32.

    precision?: number

    The number of decimal places for formatting numbers. Defaults to 3.

    onlyNonZero?: boolean

    If true, only displays amplitudes with non-zero probabilities. Defaults to true.

    sortByProbability?: boolean

    If true, sorts the displayed amplitudes by probability in descending order. Defaults to false.

    showPhase?: boolean

    If true, includes phase information in the output. Defaults to true.