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?
Asked
Active
Viewed 25 times
0

Mariia Mykhailova
- 9,010
- 1
- 12
- 39

W.xueshan
- 43
- 4
1 Answers
2
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?

Mariia Mykhailova
- 9,010
- 1
- 12
- 39
-
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. – W.xueshan Mar 29 '22 at 01:22
-
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 – Mariia Mykhailova Mar 30 '22 at 17:23