1
$\begingroup$

I'm told that the input register is in little-endian format. But the vscode gives me error telling me that it is wrong argument for QFT even after using a suitable converter. Am I missing something here?

    operation Task31 (qs : Qubit[]) : Unit {
        X(qs[Length(qs)-1]);
        ApplyReversedOpBE(QFT, qs);
    }
$\endgroup$
3
$\begingroup$

You'll need to cast your qubit array as type LittleEndian:

let LEArray = LittleEndian(qs);

A good example of this is in the QuantumKatas under Quantum Phase Estimation.

$\endgroup$

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.