1
$\begingroup$

I see the QFT operation in the document given by Microsoft, but I don't know how to call it.

operation QFT (qs : Microsoft.Quantum.Arithmetic.BigEndian) : Unit is Adj + Ctl

Does this method need to be rewritten? How to set the parameters here? Can I have a brief example?

$\endgroup$
0
$\begingroup$

BigEndian is a data type that is effectively just a wrapper for an array of qubits. If you want to apply QFT to a qubit array register, you need to convert it to BigEndian first:

QFT(BigEndian(register));
$\endgroup$
6
  • $\begingroup$ Thank you! May I ask you another question?I want to realize a quantum gate defined by myself: [ [1, 0], [0, e^iθ ]] . What way can I implement in Q? On the IBM Q platform, I can realize it with the specified angle value: p (θ) q [0]. $\endgroup$ – Damon Mar 22 at 3:16
  • $\begingroup$ @Damon docs.microsoft.com/en-us/qsharp/api/qsharp/… $\endgroup$ – Mariia Mykhailova Mar 22 at 14:45
  • $\begingroup$ Thank you very much for your patient guidance! Here R1 needs to use radian value as a parameter, which is different from the angle value parameter.😊 $\endgroup$ – Damon Mar 23 at 7:50
  • $\begingroup$ You can convert one to another using docs.microsoft.com/en-us/qsharp/api/qsharp/… $\endgroup$ – Mariia Mykhailova Mar 23 at 8:50
  • $\begingroup$ Is the inverse Fourier transform realized by BigEndian and LittleEndian transformations?I didn't find any other way out of the way Microsoft gave me.Can you solve it? $\endgroup$ – Damon Mar 25 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.