# Q# language: How to write quantum code in Visual Studio

On February 13, 2018 by IleneThe future of the computer isn’t silicon; we’re already at the limits of Moore’s Law in terms of the performance we can get from traditional transistors. We’re also working on much bigger problems, especially when it comes to cryptography and in mathematical modeling; problems that require days of compute time even on the largest supercomputers.

So where do we go from here? Microsoft Research, like Google and IBM, has been investing heavily in quantum computing. Much of its research has been in basic physics, working with universities around the world to produce efficient low-temperature environments and stable quantum computing environments. But creating a qubit—the probabilistic quantum bit that essentially replaces the 0’s and 1’s of a traditional bit—is only part of the story. What’s also needed is a way to program a quantum computer and interpret the qubits’ probabilistic state.

## Constructing quantum computers

The architecture of a quantum program is relatively simple: A traditional program gets values from user input or from other code. It then passes those values to a quantum application that sets the qubits in a quantum processor, using one of many quantum algorithms, before passing the results back to the parent application.

It’s a process very similar to the one I used at my first programming job, writing Fortran finite-element analysis code that used a vector processor attached to a supercomputer to handle matrix algebra. The vector libraries I used to build and solve my 3D electromagnetic models worked on both that specialized hardware or on a math coprocessor in a desktop workstation, so I could test my code before using expensive supercomputer time.

## Recent Comments