2020年10月27日火曜日
2020年10月23日金曜日
Quantum Fourier Transform (QFT) Part 1
I'm trying to implement Quantum Fourier Transform (QFT), not from "Quantum Algorithm Implementations for Beginners" but Quantum Dojo (https://dojo.qulacs.org/ja/latest/notebooks/2.3_quantum_Fourier_transform.html# ).
That's because "Beginners" does not explain the algorithm in detail.
Quantum Dojo's one needs the computation of 1/sqrt(8)(|000>+|001>+,,,+|111> (in 3 qubits case), which is not clear in Q#.
I think this could be formed by applying the Adamard Gate for all qubits, and in order to make sure that I am correct, I have implemented the following code.
The results are:117, 107, 125, 138, 128, 144, 133, 108.
Although there are errors because of random numbers, in general looks OK.
2020年10月16日金曜日
With NEW SDK "Rewriting sample codes in Quantum Algorithm Implementations for Beginners (Bell state)"
Since the new SDK does not use Driver.cs, the Bell state example needs to be rewritten without the C# part.
Now you only need to write Program.qs, and the example looks like,
Result is |00> 500, |01> 0, |10> 0, |11> 500. Looks still valid.