Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FollowUp] NeedlessOperation lint cleanup in samples not in list #1585

Closed
Manvi-Agrawal opened this issue May 29, 2024 · 0 comments · Fixed by #1687
Closed

[FollowUp] NeedlessOperation lint cleanup in samples not in list #1585

Manvi-Agrawal opened this issue May 29, 2024 · 0 comments · Fixed by #1687
Labels
enhancement New feature or request good first issue Good for newcomers samples

Comments

@Manvi-Agrawal
Copy link
Contributor

Manvi-Agrawal commented May 29, 2024

Fix the samples where the outer callable should be a function because it doesnt manipulate quantum state. See #1579 (comment) for more details

@Manvi-Agrawal Manvi-Agrawal added enhancement New feature or request needs triage labels May 29, 2024
github-merge-queue bot pushed a commit that referenced this issue Jun 10, 2024
Fixes #1471.

### Future TODO
- #1585
- #1593


![image](https://github.com/microsoft/qsharp/assets/40084144/3c512530-ac54-4f9b-85f5-b6327917b7b2)

![image](https://github.com/microsoft/qsharp/assets/40084144/9eeec703-c92e-4906-aecf-91ace0b594d2)


Based on
https://github.com/microsoft/qsharp/blob/main/compiler/qsc_passes/src/callable_limits.rs

### Note to reviewers
Main changes are in `qsc_linter` folder. Changes in other tests are due
to this lint rule complaining about NeedlessOperation, so I converted to
function and it changes span accordingly.

---------

Co-authored-by: orpuente-MS <[email protected]>
Co-authored-by: Mine Starks <[email protected]>
@minestarks minestarks added good first issue Good for newcomers and removed needs triage labels Jun 27, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers samples
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants