microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.28.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

katas/content/marking_oracles/pattern_match/solution.md

8lines · modecode

1This task is similar to the previous one: the function we're evaluating depends only on the states of a subset of qubits, so we can ignore the rest of them. The main difference here is getting the set of qubits we need to use as controls.
2
3Q# library function `Subarray` from the `Std.Arrays` namespace extracts the elements of the given array at the given indices, which is exactly what we need here.
4
5@[solution]({
6 "id": "marking_oracles__pattern_match_solution",
7 "codePath": "./Solution.qs"
8})
9