Historically, Microsoft Research had two teams interested in quantum computing: the QuArC team based in Redmond, Washington,5 directed by Krysta Svore, that explored the construction of quantum circuitry, and Station Q initially located in Santa Barbara and directed by Michael Freedman, that explored topological quantum computing.67
During a Microsoft Ignite Keynote on September 26, 2017, Microsoft announced that they were going to release a new programming language geared specifically towards quantum computers.8 On December 11, 2017, Microsoft released Q# as a part of the Quantum Development Kit.9
At Build 2019, Microsoft announced that it would be open-sourcing the Quantum Development Kit, including its Q# compilers and simulators.10
To support Q#, Microsoft developed Quantum Intermediate Representation (QIR) in 2023 as a common interface between programming languages and target quantum processors. The company also announced a compiler extension that generates QIR from Q#.11
Bettina Heim currently leads the Q# language development effort.1213
Q# is available as a separately downloaded extension for Visual Studio,14 but it can also be run as an independent tool from the command line or Visual Studio Code. Q# was introduced on Windows and is available on MacOS and Linux.15
The Quantum Development Kit includes a quantum simulator capable of running Q# and simulated 30 logical qubits.1617
In order to invoke the quantum simulator, another .NET programming language, usually C#, is used, which provides the (classical) input data for the simulator and reads the (classical) output data from the simulator.18
A primary feature of Q# is the ability to create and use qubits for algorithms. As a consequence, some of the most prominent features of Q# are the ability to entangle and introduce superpositioning to qubits via controlled NOT gates and Hadamard gates, respectively, as well as Toffoli Gates, Pauli X, Y, Z Gate, and many more which are used for a variety of operations (See quantum logic gates).
The hardware stack that will eventually come together with Q# is expected to implement Qubits as topological qubits. The quantum simulator that is shipped with the Quantum Development Kit today is capable of processing up to 32 qubits on a user machine and up to 40 qubits on Azure.19
Currently, the resources available for Q# are scarce, but the official documentation is published: Microsoft Developer Network: Q#. Microsoft Quantum Github repository is also a large collection of sample programs implementing a variety of Quantum algorithms and their tests.
Microsoft has also hosted a Quantum Coding contest on Codeforces, called Microsoft Q# Coding Contest - Codeforces, and also provided related material to help answer the questions in the blog posts, plus the detailed solutions in the tutorials.
Microsoft hosts a set of learning exercises to help learn Q# on GitHub: microsoft/QuantumKatas with links to resources, and answers to the problems.
Q# is syntactically related to both C# and F# yet also has some significant differences.
The following source code is a multiplexer from the official Microsoft Q# library repository.
QuantumWriter. "The Q# Programming Language". docs.microsoft.com. Retrieved 2017-12-11. https://docs.microsoft.com/en-us/quantum/quantum-qr-intro?view=qsharp-preview ↩
"Announcing the Microsoft Quantum Development Kit". Retrieved 2017-12-11. https://cloudblogs.microsoft.com/quantum/2017/12/11/announcing-microsoft-quantum-development-kit/ ↩
"Microsoft makes play for next wave of computing with quantum computing toolkit". Ars Technica. 25 Sep 2017. Retrieved 2024-09-04. https://arstechnica.com/gadgets/2017/09/microsoft-quantum-toolkit/ ↩
"Quantum Computers Barely Exist—Here's Why We're Writing Languages for Them Anyway". MIT Technology Review. 22 Dec 2017. Retrieved 2024-09-04. https://www.technologyreview.com/2017/12/22/3662/quantum-computers-barely-exist-heres-why-were-writing-languages-for-them-anyway/ ↩
"Solving the quantum many-body problem with artificial neural networks". Microsoft Azure Quantum. 15 February 2017. https://cloudblogs.microsoft.com/quantum/2017/02/15/solving-the-quantum-many-body-problem-with-artificial-neural-networks/ ↩
Scott Aaronson's blog, 2013, 'Microsoft: From QDOS to QMA in less than 35 years', https://scottaaronson.blog/?p=1471 /wiki/Scott_Aaronson ↩
"What are the Q# programming language & QDK? - Azure Quantum". learn.microsoft.com. 12 January 2024. https://learn.microsoft.com/en-us/azure/quantum/overview-what-is-qsharp-and-qdk ↩
"Microsoft announces quantum computing programming language". Retrieved 2017-12-14. https://cloudblogs.microsoft.com/quantum/2017/09/26/microsoft-announces-quantum-computing-programming-language/ ↩
Microsoft is open-sourcing its Quantum Development Kit https://venturebeat.com/2019/05/06/microsoft-open-sourcing-quantum-development-kit/ ↩
Krill, Paul (29 Sep 2020). "Microsoft taps LLVM for quantum computing". InfoWorld. Retrieved 2024-09-04. https://www.infoworld.com/article/2260508/microsoft-taps-llvm-for-quantum-computing.html ↩
"The Women of QuArC". 30 March 2019. https://devblogs.microsoft.com/qsharp/the-women-of-quarc/ ↩
"Intro to Q# - Intro to Quantum Software Development". stem.mitre.org. https://stem.mitre.org/quantum/software-tools/intro-qsharp.html ↩
QuantumWriter. "Setting up the Q# development environment". docs.microsoft.com. Retrieved 2017-12-14. https://docs.microsoft.com/en-us/quantum/quantum-installconfig?view=qsharp-preview ↩
Coppock, Mark (26 Feb 2018). "Microsoft's quantum computing language is now available for MacOS". Digital Trends. Retrieved 2024-09-04. https://www.digitaltrends.com/computing/microsoft-quantum-computing-q-available-macos-linux/ ↩
Akdogan, Erman (23 October 2022). "Quantum computing is coming for finance & crypto". Medium. https://medium.datadriveninvestor.com/quantum-computing-is-coming-for-finance-crypto-b56c0255cb09 ↩
Melanson, Mike (16 Dec 2017). "This Week in Programming: Get Quantum with Q Sharp". The New Stack. Retrieved 2024-09-04. https://thenewstack.io/week-programming-get-quantum-q-sharp/ ↩
"This Week in Programming: Get Quantum with Q Sharp". The New Stack. 16 December 2017. https://thenewstack.io/week-programming-get-quantum-q-sharp/ ↩
"Microsoft previews quantum computing development kit". CIO. https://www2.cio.com.au/article/631142/microsoft-previews-quantum-computing-development-kit/ ↩
"Types in Q# - Microsoft Quantum". docs.microsoft.com. 27 July 2022. https://docs.microsoft.com/en-us/quantum/user-guide/language/types ↩