Quantum algorithms for scientific computing require modules implementingfundamental functions, such as the square root, the logarithm, and others. Werequire algorithms that have a well-controlled numerical error, that areuniformly scalable and reversible (unitary), and that can be implementedefficiently. We present quantum algorithms and circuits for computing thesquare root, the natural logarithm, and arbitrary fractional powers. We provideperformance guarantees in terms of their worst-case accuracy and cost. Wefurther illustrate their performance by providing tests comparing them to therespective floating point implementations found in widely used numericalsoftware.
展开▼