Skip to content
Microsoft Quantum

Developers, enterprises, and students are all eager to understand the potential of quantum computing and to start building quantum solutions. To do that, we offer a programming language – called Q# – that lets people develop quantum programs that can take on real-world problems.

Current small-scale quantum computers lack the scale and reliability needed to execute all but the simplest of programs. To develop, test, debug and optimize quantum programs, we can work around this hurdle using quantum simulators to test quantum the execution of a quantum program on a classical computer and other tools that give the developer insight on their program.

Close up of atoms

We recently released an update to the Microsoft Quantum Development Kit that includes two new tools. One, a Toffoli simulator, can execute a specific set of quantum algorithms that implement classical arithmetic in a coherent superposition. The other, a resource estimator, helps to better understand the memory footprint and overall computational cost that it will take to implement quantum algorithms at scale.

These new tools add to the collection of simulators that were already available: a full-state simulator and a trace simulator.

Adding a Toffoli simulator and resource estimator

The Toffoli simulator is a special-purpose simulator that is valuable for coherent quantum implementations of simulating classical arithmetic operations. These are common subroutines of many quantum algorithms. The simulator can simulate quantum algorithms that are limited to X, CNOT, and multi-controlled X quantum operations. Any classical can be realized on a quantum computer using these operations, which can all be expressed through Toffoli gates.

While the Toffoli simulator is restricted to these specific operations, it can simulate millions of qubits, in contrast to the full-state simulator that is limited to moderate numbers of qubits. As a result, the Toffoli simulator is a great resource for developers to debug quantum implementations of complex classical algorithms. It is especially valuable for simulating classical arithmetic operations that appear in many real-world applications.

The other new tool for the Quantum Development Kit, the resource estimator, helps quantum application developers evaluate what resources a program will use on a quantum computer. It can do so even when it is impossible to simulate the program on a classical computer. Without changing the Q# operation, the resource estimator counts the overall number of primitive operations and qubits needed to execute a given Q# operation on a quantum computer. Then, based on estimated costs of primitive operations, the resource estimator analyzes the operation and provide metrics on the overall cost for that operation.

The resource estimator is built on top of the quantum computer trace simulator, which provides a richer set of metrics and other capabilities described below. We have found that it is very common for our users to use the trace simulator to perform resource estimation of the whole program, so we provided this new tool to give users a way to quickly get these basic metrics for their program. Quantum resource estimation is a valuable tool for quantum software developers. As a quantum program is developed, developers can understand the resources the algorithm consumes and improve its efficiency before a quantum computer is available.

Simulators play a big role in developing real-world quantum solutions

The new tools in our Quantum Development Kit are important additions to our existing set of important simulators: a full-state simulator and a trace simulator. Each can execute a quantum algorithm on a classical computer instead of on a quantum computer.

For developing, testing and finding bugs in quantum programs, it is ideal to fully simulate the algorithm. When developing a Q# program, the full-state simulator executes the quantum algorithm by keeping track of the state of the qubits and models the operations on those qubits. The full-state simulator can be used to run quantum programs that manipulate in the range of 30 qubits on a laptop, to more than 40 qubits on a cluster of computers in Azure.

In many ways, a full-state quantum simulator running on classical hardware is more useful than any developing algorithms on NISQ (Noisy Intermediate-Scale Quantum) devices. That’s because the developer does not have to manage fragile qubit state (noise); the simulator can run longer and more complex algorithms; and most importantly, a classical simulator allows full inspection of the wave function, which is very helpful for debugging. For these reasons, developers will continue to develop and debug using the simulator even when able to run these programs on actual hardware.

While full-state simulators are a valuable tool for quantum program development, true advances in computation with quantum algorithms requires far greater scale than can be simulated on classical hardware or NISQ devices. The Quantum Development Kit’s trace simulator executes a quantum program without actually simulating the state of a quantum computer.  For this reason, the trace simulator can execute quantum programs that use thousands of qubits. This very powerful simulator collects data about gate counts, depth, number of qubits of a Q# operations’ call-graph.  It provides a rich set of metrics to give more detailed and customized resource estimates that help the developer understand the quantum program performance and help find bugs on Q# programs. The trace simulator can also be used to provide customizable resource estimation when the developer wishes to change the default costs used by the new resource estimator tool.

Running the quantum simulators and the resource estimator is a great way for developers to build real applications today that will work on tomorrow’s quantum hardware.  Here are some resources for learning more:

Explore the Microsoft Quantum Development Kit

Whether it’s creating new materials, developing new pharmaceuticals, or improving artificial intelligence, quantum computers hold the potential to re-shape our world. Our Quantum Development Kit makes it easier to investigate quantum solutions and prepare for working with the quantum computers we think are just a few years away. The kit’s extensive set of quantum simulators help developers gain more insight into how to create programs for quantum computers, helping our growing community take another step toward the new world of quantum computing.

Get started with the Quantum Development Kit.