page_type: sample languages:
This sample uses a quantum algorithm to find the order of a cycle in a permutation. It succeeds with a higher probability than the classical best possible strategy. A challenge in the algorithm is to find a quantum circuit to realize the input permutation. We utilize reversible logic synthesis for this task.
The algorithm has been presented by L.M.K. Vandersypen, M. Steffen, G. Breyta, C.S. Yannoni, R. Cleve, and I.L. Chuang in Experimental realization of an order-finding algorithm with an NMR quantum computer, Phys. Rev. Lett. 85, 5452, 2000. The quantum algorithm in the Q# file is implemented for permutations over 2ⁿ elements, however, the classical post-processing in the C# file is restricted to permutations over 4 elements.
To run the sample, use the dotnet run --index VALUE
command from your terminal.
The value VALUE
passed to the index argument must be between 0 and 3 inclusive.
Permutation: [1 2 3 0]
Find cycle length at index 0
Exact order: 4
Guess classically:
2: 50.78%
4: 49.22%
Guess with Q#:
4: 55.27%
2: 25.29%
1: 15.72%
3: 3.71%
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )