Quantum simulators are software programs that run on classical computers and act as the target machine for a Q# program, making it possible to run and test quantum programs in an environment that predicts how qubits will react to different operations.
The quantum simulator is responsible for providing implementations of quantum operations for an algorithm. This includes primitive operations such as
Measure, as well as qubit management and tracking. The Quantum Development Kit includes different classes of quantum simulators representing different ways of simulating the same quantum algorithm.
Each type of quantum simulator can provide different implementations of these primitives. For example, the full state simulator runs the quantum algorithm by fully simulating the quantum state vector, whereas the quantum computer trace simulator doesn't consider the actual quantum state at all. Rather, it tracks gate, qubit, and other resource usage for the algorithm.
Quantum machine classes
In the future, the QDK will define additional quantum machine classes to support other types of simulation and to support running on quantum hardware. Allowing the algorithm to stay constant while varying the underlying machine implementation makes it easy to test and debug an algorithm in simulation and then run it on real hardware with confidence that the algorithm hasn't changed.
|Full state simulator||
||Runs and debugs quantum algorithms, and is limited to about 30 qubits.|
||Simulates quantum algorithms with sparse states, small number of states in superposition.|
|Trace-based resource estimator||
||Runs advanced analysis of resources consumptions for the algorithm's entire call-graph, and supports thousands of qubits.|
||Performs a top level analysis of the resources needed to run a quantum algorithm, and supports thousands of qubits.|
||Simulates quantum algorithms that are limited to
||Simulates quantum algorithms under the presence of noise, and also the stabilizer representation (also known as CHP simulation) of quantum algorithms.|
For details about how to invoke target machines for Q# programs in different environments, see Ways to run a Q# program.
Submit and view feedback for