-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added classical functions to math library (#258)
This adds a few classical functions to the math namespace. Added new project for library testing (thanks @swernli!) 1. Simple functions that are very convenient and their I, D, L variants for completeness: Sign, Abs, Min, Max. 2. Inverse hyperbolic functions: ArcCosh , ArcSinh, ArcTanh. 3. Intrinsic Sqrt. 4. Intrinsic Log (base e), and derived Log10 and Lg (base 2). 5. ModulusI and ModulusL to compute remainder in canonical way (always non-negative). 6. ExpModI and ExpModL to compute exponentiation with respect to modulus. 7. GCD and extended GCD. Many of these functions are used in Shor and Grover. Not including [ModPowL](https://github.com/microsoft/qsharp-runtime/blob/4976e913cf007f14958f5ab9a09db3a49fc57698/src/Simulation/QSharpFoundation/Math/Math.qs#L317) - same intended functionality as [ExpModL](https://github.com/microsoft/QuantumLibraries/blob/2214d89925e732bd3a10c642885699834cb975fa/Standard/src/Math/Functions.qs#L244) and no use found. --------- Co-authored-by: Dmitry Vasilevsky <dmitryv@microsoft.com>
- Loading branch information
1 parent
6315a97
commit 3555242
Showing
10 changed files
with
677 additions
and
35 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ members = [ | |
"compiler/qsc_hir", | ||
"compiler/qsc_passes", | ||
"katas", | ||
"library/tests", | ||
"pip", | ||
"wasm", | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.