Microsoft.Quantum.Convert namespace
This namespace contains functions for converting between various Q# data types.
Description
To learn more about this namespace, see Type Conversions.
Operations
| Name | Summary |
|---|---|
| Call | Calls a function with a given input. |
Functions
| Name | Summary |
|---|---|
| BigIntAsBoolArray | Converts a given big integer to an array of Booleans. The 0 element of the array is the least significant bit of the big integer. |
| BigIntAsString | Converts a given integer number to an equivalent string representation. |
| BoolArrayAsBigInt | Converts a given array of Booleans to an equivalent big integer. The 0 element of the array is the least significant bit of the big integer. |
| BoolArrayAsFixedPoint | Returns the double value of a fixed-point approximation from of a Bool array. |
| BoolArrayAsInt | Produces a non-negative integer from a string of bits in little endian format. |
| BoolArrayAsPauli | Given a bit string, returns a multi-qubit Pauli operator represented as an array of single-qubit Pauli operators. |
| BoolArrayAsResultArray | Converts a Bool[] type to a Result[] type, where true is mapped to One and false is mapped to Zero. |
| BoolAsResult | Converts a Bool type to a Result type, where true is mapped to One and false is mapped to Zero. |
| BoolAsString | Converts a given boolean value to an equivalent string representation. |
| DoubleAsFixedPoint | Discretizes a double value as a fixed-point approximation and returns its value as a double. |
| DoubleAsInt | Converts a floating-point number to an integer by returning the truncation to its integral part. |
| DoubleAsString | Converts a given double-precision floating-point number to an equivalent string representation. |
| DoubleAsStringWithFormat | Converts a given double-precision floating-point number to an equivalent string representation, using the given format. |
| FixedPointAsBoolArray | Computes fixed-point approximation for a double and returns it as Bool array. |
| FunctionAsOperation | Converts functions to operations. |
| IntAsBigInt | Converts a given integer to an equivalent big integer. |
| IntAsBoolArray | Produces a binary representation of a non-negative integer, using the little-endian representation for the returned array. |
| IntAsDouble | Converts a given integer to an equivalent double-precision floating-point number. |
| IntAsString | Converts a given integer number to an equivalent string representation. |
| IntAsStringWithFormat | Converts a given integer number to an equivalent string representation, using the given format. |
| MaybeBigIntAsInt | Converts a given big integer to an equivalent integer, if possible. The function returns a pair of the resulting integer and a Boolean flag which is true, if and only if the conversion was possible. |
| PauliArrayAsInt | Encodes a multi-qubit Pauli operator represented as an array of single-qubit Pauli operators into an integer. |
| RangeAsIntArray | Creates an array arr of integers enumerated by start..step..end. |
| ResultArrayAsBoolArray | Converts a Result[] type to a Bool[] type, where One is mapped to true and Zero is mapped to false. |
| ResultArrayAsInt | Produces a non-negative integer from a string of Results in little endian format. |
| ResultAsBool | Converts a Result type to a Bool type, where One is mapped to true and Zero is mapped to false. |
反馈
提交和查看相关反馈