Robin Kuzmin
Robin Kuzmin
Consider consolidating the open systems simulator and CommonNativeSimulator (or its derived classes)
[Details](https://github.com/microsoft/qsharp-runtime/pull/853#discussion_r728494870)
```c# public CommonNativeSimulator? Simulator { get; set; } // Must not be nullable (and public). But we cannot // initialize it properly _during construction_. We initialize it _after construction_. //...
See [here](https://github.com/microsoft/qsharp-runtime/pull/810#discussion_r702589297).
In [Testing](https://github.com/microsoft/qsharp-runtime#testing) section the `Simulation.sln` open in VS hits an unexpected error: ``` Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Unable to find C:\ed\dev\QSharpCompiler\qsharp-runtime\tmp\qsharp-runtime\src\Xunit\bin\Debug\netstandard2.1\testhost.dll. Please publish your test project and retry. at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.GetTestHostPath(String runtimeConfigDevPath, String depsFilePath,...
QIR RT is a dynamic library. There can be [issues](https://stackoverflow.com/questions/22797418/how-do-i-safely-pass-objects-especially-stl-objects-to-and-from-a-dll/22797419#22797419) when crossing the dynamic library boundary with a C++ code. Consider refactoring the QIR RT API such that the C...
[Fragment](https://github.com/microsoft/qsharp-runtime/blob/a234eb8360c1add269fdcfdd115e0938a8292708/src/Qir/Runtime/public/QSharpSimApi_I.hpp#L70) caused [this](https://github.com/microsoft/qsharp-runtime/pull/675#discussion_r627895101) discussion. Consider refactoring.
Consider implementing `ToffoliSimulator::DumpMachine()`, `ToffoliSimulator::DumpRegister}()`. [Details](https://github.com/microsoft/qsharp-runtime/pull/634#discussion_r616945402), [how to implement](https://github.com/microsoft/qsharp-runtime/pull/634#discussion_r615183791).
[Story](https://github.com/microsoft/qsharp-runtime/pull/634#discussion_r614915473) ("this has been a longstanding limitation, such that we should consider relaxing it at some point in the future.").
Consider calling LLVM intrinsics directly from the compiler-generated .ll code (rather than through QIR RT). Similar to the way the [`Truncate()`](https://docs.microsoft.com/en-us/qsharp/api/qsharp/microsoft.quantum.math.truncate) is implemented with the direct call to [`fptosi`](https://llvm.org/docs/LangRef.html#fptosi-to-instruction). More...
The [Native Simulator](https://github.com/microsoft/qsharp-runtime/tree/main/src/Simulation/Native) is compiled (to a dynamic library) with `g++` on WSL, and presumably with MSVC++ on Win. Our QIR wrappers around it, e.g. [`CFullstateSimulator`](https://github.com/microsoft/qsharp-runtime/blob/main/src/Qir/Runtime/lib/Simulators/FullstateSimulator.cpp) in QIR Runtime, are...