0
$\begingroup$

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? enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

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?

$\endgroup$
2
  • $\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$
    – W.xueshan
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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