Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Implement bridge and native backing for math functions Q# depends on #501

Closed
kuzminrobin opened this issue Feb 5, 2021 · 2 comments · Fixed by #511, #500 or #526
Closed

Implement bridge and native backing for math functions Q# depends on #501

kuzminrobin opened this issue Feb 5, 2021 · 2 comments · Fixed by #511, #500 or #526
Assignees
Labels
enhancement New feature or request

Comments

@kuzminrobin
Copy link
Contributor

kuzminrobin commented Feb 5, 2021

Implement the following math functions

function ArcCos (x : Double) : Double   arccos__body
function ArcSin (y : Double) : Double   arcsin__body
function ArcTan (d : Double) : Double   arctan__body
function ArcTan2 (y : Double, x : Double) : 
                        Double          arctan2__body
function Cos (theta : Double) : Double  cos__body
function Cosh (d : Double) : Double     cosh__body
function Sin (d : Double) : Double      sin__body
function Sinh (d : Double) : Double     sinh__body
function Tan (d : Double) : Double      tan__body
function Tanh (d : Double) : Double     tanh__body
function Ceiling (value : Double) : Int ceiling__body
function Floor (value : Double) : Int   floor__body
function DivRemL(dividend : BigInt, divisor : BigInt) : 
                    (BigInt, BigInt)    divreml__body
function IEEERemainder (x : Double, y : Double) : Double    
                                        ieeeremainder_body
function Log (input : Double) : Double  log__body
function Sqrt (d : Double) : Double     sqrt__body

and other functions in the following requested order:

__quantum__qis__sqrt__body
__quantum__qis__ceiling__body
__quantum__qis__log__body
__quantum__qis__powd__body
__quantum__qis__arctan2__body
__quantum__qis__mini__body
__quantum__qis__absi__body
__quantum__qis__absd__body

__quantum__rt__int_power
__quantum__rt__pauli_to_string

__quantum__qis__drawrandomint__body
__quantum__qis__message__body

Refer the internal work item 25149 for more details.

@kuzminrobin kuzminrobin added enhancement New feature or request needs triage An initial review by a maintainer is needed labels Feb 5, 2021
@kuzminrobin kuzminrobin self-assigned this Feb 5, 2021
@bettinaheim bettinaheim removed the needs triage An initial review by a maintainer is needed label Feb 5, 2021
@cgranade
Copy link
Contributor

cgranade commented Feb 5, 2021

Following #497, a few of those functions will no longer be intrinsic. In particular, Ceiling, Floor, MinI, AbsI, and AbsD should have pure Q# implementations such that providing explicit implementations for those should no longer be needed once #497 completes. The per-repo build completed, but that PR is currently awaiting an end-to-end build.

@kuzminrobin
Copy link
Contributor Author

Implementing

function DivRemL(dividend : BigInt, divisor : BigInt) : 
                    (BigInt, BigInt)    divreml__body

has been postponed until BigInt is imeplemented. See #525.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
3 participants