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

Details or example lacking for ResultArrayAsInt function #635

Open
ezander opened this issue Oct 18, 2022 · 5 comments
Open

Details or example lacking for ResultArrayAsInt function #635

ezander opened this issue Oct 18, 2022 · 5 comments
Labels
Area-Documentation Issue relates to API documentation comments, READMEs, or other documentation in this repo. good first issue Good for newcomers Kind-Enhancement New feature or request Pkg-Standard Issue relates to the Microsoft.Quantum.Standard package.

Comments

@ezander
Copy link

ezander commented Oct 18, 2022

How exactly is the mapping done? At least an example would be nice like ResultArrayAsInt([One,Zero])==1 or ResultArrayAsInt([One,Zero])==2 or something (I guess the first one, but this shouldn't be guesswork).

[Enter feedback here]


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@msoeken msoeken added Kind-Enhancement New feature or request Area-Documentation Issue relates to API documentation comments, READMEs, or other documentation in this repo. Pkg-Standard Issue relates to the Microsoft.Quantum.Standard package. labels Oct 18, 2022
@msoeken
Copy link
Member

msoeken commented Oct 18, 2022

Thanks @ezander for filing this issue. This is little endian formatting, so the result would be 1. But indeed an example would be very helpful here. Would you be interested and available to create a PR for this? I'd be happy to assist.

@msoeken msoeken added the good first issue Good for newcomers label Oct 18, 2022
@kinkeadian25
Copy link
Contributor

Thanks @ezander for filing this issue. This is little endian formatting, so the result would be 1. But indeed an example would be very helpful here. Would you be interested and available to create a PR for this? I'd be happy to assist.

I'd love to try to fix this if you are willing to help!

@msoeken
Copy link
Member

msoeken commented Oct 19, 2022

Thanks @ezander, that's great. You can find an example on how to embed an example into the documentation here:

/// # Summary
/// Creates an array `arr` of integers enumerated by start..step..end.
///
/// # Input
/// ## range
/// A `Range` of values `start..step..end` to be converted to an array.
///
/// # Output
/// A new array of integers corresponding to values iterated over by `range`.
///
/// # Example
/// ```qsharp
/// // The following returns [1,3,5,7];
/// let array = RangeAsIntArray(1..2..8);
/// ```

This is in the same file where ResultArrayAsInt is implemented.

General documentation on how to get started with a pull request is here:

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

@ezander
Copy link
Author

ezander commented Oct 19, 2022

Okay, thanks! I'll give it a shot...

@kinkeadian25
Copy link
Contributor

Hi @msoeken, I was wondering what you thought about the PR I submitted. I am currently going through the Microsoft Software and Systems Academy, and I am new to open source! Trying to get started though.

msoeken pushed a commit that referenced this issue Oct 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area-Documentation Issue relates to API documentation comments, READMEs, or other documentation in this repo. good first issue Good for newcomers Kind-Enhancement New feature or request Pkg-Standard Issue relates to the Microsoft.Quantum.Standard package.
Projects
None yet
Development

No branches or pull requests

3 participants