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

    Function formatAmplitude

    • Formats a complex number into a human-readable string.

      Parameters

      • c: Complex

        The complex number to format.

      • precision: number = 3

        The number of decimal places for the real and imaginary parts. Defaults to 3.

      Returns string

      A formatted string representation (e.g., "3.000 - 4.000i").