I am trying to implement https://qiskit.org/textbook/ch-machine-learning/machine-learning-qiskit-pytorch.html#3.-Let's-code!- in IBMQ using a dataset present on my desktop.

While uploading a dataset in IBM Q,

train = pd.read_csv("C:/Users/akanm/OneDrive/Desktop/Dataset/train.csv")

when I check the current working directory with the help of command os.cwd, it shows:


How do I change the path to my desktop where the data file is present so that it does not give errors as:

No such file or directory Tried the commands Change Directory but still, the same error occurs.

  • $\begingroup$ Did you try to upload your file directly on the quantum lab and then upload it on your notebook via read_csv? $\endgroup$
    – Lena
    Jul 2 '21 at 7:41
  • $\begingroup$ I tried to upload the file directly but due to large size it doesn't upload. So, I tried with read_csv. $\endgroup$
    – user14924
    Jul 2 '21 at 7:44
  • $\begingroup$ Then why not work locally? I mean directly work with notebooks on your computer and not via the lab, because as said in the answer I'm not sure it is possible to do what you want... $\endgroup$
    – Lena
    Jul 2 '21 at 7:55
  • $\begingroup$ Thanks for the help. Actually, I have implemented the program with my dataset in Jupyter notebook. But the accuracy is coming out to be low. So, I wanted whether running the code in jupyter nodebook(with qiskit simulator in backend) is similar to that in IBMQ. Or the quantum lab might increase the performance? $\endgroup$
    – user14924
    Jul 2 '21 at 11:25
  • $\begingroup$ Kindly let me know if anyone has compared the two? $\endgroup$
    – user14924
    Jul 2 '21 at 11:36

I don't think you can easily change the path to your desktop since IBMQ's jupyter notebook is running on IBM's server, not your computer.

Maybe you could consult this answer but I haven't tried it myself so I'm not sure if it works.


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