I want to run the Linear Algebra tutorial exercise of QuantumKatas in vscode. But the package of "testing" can't be found. The package of "qsharp" and "pytest" have been installed. What others can I do?
1 Answer
It is defined in the testing.py
file in the same folder as the tutorial itself. If you clone the Quantum Katas repository as is and run the tutorial notebook from the folder tutorials/LinearAlgebra
directly, Python should be able to find it.
I'm not sure what your local setup looks like, though, since I know this tutorial doesn't have a file liner.py
:-) Did you copy the code cells from LinearAlgebra.ipynb
into a separate Python file?
-
$\begingroup$ Yes, I just copied the code cells from LinearAlgebra.ipynb into a separate Python File and renamed it as liner.py. Oh , I found the testing.py file as you said. That's really good. You help me really much. I really appreciate it. $\endgroup$ Mar 29, 2022 at 1:22
-
$\begingroup$ Of course! By the way, you can mark an answer as accepted (the checkmark next to the question) to let everybody know that the question is answered and other folks don't need to try and figure out another answer $\endgroup$ Mar 30, 2022 at 17:23