qsharp.run executes a Q# operation from Python through a simulator instance. Unlike qsharp.eval, it supports repeated test shots, creating a new simulator instance for each execution. section 4.1.3
Running a Q# test
Initialize the project, then call qsharp.run("Test.TestReadInformation()", shots=100) to execute the Q# test repeatedly. The Q# operation generates random basis-state cases and validates each measurement result. section 4.1.3
import qsharp
def test_read_info():
qsharp.init(project_root='.')
qsharp.run("Test.TestReadInformation()", shots=100)
Use this compact Python wrapper as the execution pattern for Q# tests whose testing logic resides in Q#. section 4.1.3
