ComputeReciprocalFxP operation

Warning

This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.

Namespace: Microsoft.Quantum.Arithmetic

Package: Microsoft.Quantum.Numerics

Computes the reciprocal of a number stored in a quantum register with the fixed-point representation.

operation ComputeReciprocalFxP (x : Microsoft.Quantum.Arithmetic.FixedPoint, result : Microsoft.Quantum.Arithmetic.FixedPoint) : Unit is Adj + Ctl

Description

Given a register in the state $\ket{x}$ for a fixed-point number $x$, computes the reciprocal $1 / x$ into the state of the result register.

Input

x : FixedPoint

Fixed-point number to be inverted.

result : FixedPoint

Fixed-point number that will hold the result. Must be initialized to $\ket{0.0}$.

Output : Unit