2

I would like to perform the Quantum Fourier Transform (QFT) of a sequence of, say, 8 elements. I have then the problem of encoding the sequence of 8 elements into 3 qubits.

My question is how performing this task with Qiskit.

I would say that one could use the IterativeAmplitudeEstimation class, but the example at https://github.com/Qiskit/qiskit-aqua/blob/master/test/aqua/test_amplitude_estimation.py under my Qiskit account, but I receive

No module named 'test.aqua'
Vitality
  • 20,705
  • 4
  • 108
  • 146
  • Are you running this example off of the stable branch (the code that gets downloaded when you do `pip install qiskit`) or the master branch (the code that gets downloaded when you clone the original repo from the master branch? I think this example will only work if you're running it off of the master branch. – Matthew Stypulkoski Feb 24 '20 at 18:06
  • @MatthewStypulkoski Thank you for your comment. I'm using my Qiskit account. I have also `pip` installed `qiskit` on my local machine, but the result is the same. How can I install the `test.aqua` library? – Vitality Feb 25 '20 at 08:57
  • 1
    You will need to install qiskit from source (fork/cloning from the github repo), as these test files are only on the `master` (dev) branch and not included within the stable package you get when you run `pip install qiskit`. [This article](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) explains how to clone a github repo, and [this guide](https://qiskit.org/documentation/contributing_to_qiskit.html#installing-from-source) explains how to install the qiskit elements from source. – Matthew Stypulkoski Feb 25 '20 at 14:57

0 Answers0