3
$\begingroup$

I'm trying to run a program in the Qiskit Notebook on the IBMQ Experience. I need to import some .py files that I've done in order to run my main program but the notebook won't accept .py files. I've tried uploading them (doesn't work, it loads forever) and also tried to write a .ipynb file and then change the name to .py but then the file disappeared.

$\endgroup$
1
$\begingroup$

The file editor only uploads, downloads and displays .ipynb files. However, you can create additional files using notebooks. To see that they are there, you can use the sys package.

You won't be able to import from local .py files, but you can open them as a text file and do something like eval their contents as a workaround.

$\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.