Simulating nature with the new Microsoft Quantum Development Kit chemistry library

Quantum computers have the potential to solve the world’s hardest computational problems and alter the economic, industrial, academic, and societal landscape. In just hours or days, a quantum computer can solve complex problems that would otherwise take billions of years to solve.

To unlock these potential applications, the Microsoft Quantum Development Kit includes a new chemistry library that allows chemists to simulate molecular interactions and explore quantum algorithms for real-world applications in the chemistry domain. Features included in the library are state-of-the-art Q# implementations of methods for Hamiltonian simulation – including Trotterization and Qubitization techniques – state preparation techniques, and samples to help chemists to get started quickly.

For example, the 100-year-old Haber-Bosch process, a key industrial process to create artificial fertilizers, might be improved using computational chemistry methods that are enhanced by quantum computing. That could improve the catalytic process for creating ammonia from atmospheric nitrogen, a process that currently requires high temperatures, high pressures, and carefully selected catalysts. This process is so heat- and pressure-intensive that it consumes upwards of two percent of the world’s natural energy sources. Using quantum algorithms such as those supported by the Microsoft Quantum chemistry library, scientists can learn from nature’s natural process of nitrogen fixation how to achieve this task at lower pressures and temperatures.

Microsoft Quantum & Pacific Northwest Laboratory collaboration

The Microsoft Quantum Development Kit chemistry library was developed in collaboration with Pacific Northwest National Laboratory (PNNL), a leader in both chemistry and data analytics. The chemistry library – working with PNNL’s NWChem, an open-source, high-performance computational chemistry tool developed by the U.S. Department of Energy’s Office of Science – enables quantum solutions to solve computationally complex chemistry problems.

Watch this video made with Pacific Northwest National Laboratory:

“Quantum computing has the potential to help us answer our questions much, much faster with much higher accuracy.”  Wendy Shaw, Director, Physical Sciences Division, Pacific Northwest National Laboratory

Tackling hard computational chemistry problems using the quantum chemistry library

To get started in quantum chemistry simulations, the chemistry library offers features such as:

  • State-of-the-art Hamiltonian simulation methods: Two main methods are supported, Trotterization and Qubitization.
    • Trotterization uses the fact that fast alternation of time-slices converges to the given Hamiltonian. This typically leads to quantum circuits that implement the time evolution with a low number of qubits by cycling through all terms that are present in the given Hamiltonian in a sequential way and in a prescribed order.
    • Qubitization is a technique that allows to perform an estimation of energies by way of implementing a linear combination of operators. This typically has a slightly higher cost in terms of qubits compared to Trotterization but can lead to substantially lower circuit size and circuit depth, depending on the chemistry problem at hand. A crucial part of Qubitization quantum algorithms are state-preparation techniques, which are provided as part of this release.
  • Estimation of ground and excited state energies. The chemistry library enables the estimates of ground state and excited state energies as a function of bond distance. Many real-world chemistry problems involve not only estimates of ground state energies but also the understanding of the dynamics of the various transitions between excited states and a characterization of their energy levels. This type of problems can be studied with the new chemistry library as well.

As an example, the figure below shows the results of one of the samples that uses the data from NWChem. It graphically shows the equilibrium bonding distance of Lithium Hydride for various distances and energy levels.

Estimating the ground and excited state energies for equilibrium bonding distance of Lithium Hydride, an inorganic compound with chemical formula LiH.
  • Automatic resource estimation. The Trace simulator that is part of the Quantum Development Kit allows chemists to estimate important metrics about quantum algorithms, such as the number of qubits, the total gate count for various types of primitive gates, and the total circuit depth. Shown below is the output of the GetGateCount sample that is shipped with the library and which computes a variety of useful metrics for various molecular benchmarks that are provided as part of the library.
Resource estimates of quantum algorithms simulating various molecules, obtained using the Quantum Development Kit Tracer resource estimator.
  • Interface to powerful chemistry modeling tools. The release introduces an open source YAML-based schema called Broombridge (in reference to a landmark celebrated as a birthplace of Hamiltonians), to make it easy for a chemist to input real-world chemistry models into Q#. Broombridge is a structured, extensible, and human-readable and human-editable way of representing electronic structure problems.  Learn more about the schema.
  • Samples: The chemistry library contains several benchmark samples molecules using the to help programmers and chemist simulate molecules and chemical interactions. Some examples:
    • Beta-Carotine: this is a benchmark to study the most common form of carotene in plants and oxidative damage; an ideal candidate for singlet fission processes.
    • C20: this benchmark studies C20 systems often used to calibrate various electron correlation effects.
    • Ozone: this benchmark to study quantum mechanical excited-state studies of the Ozone and an understanding its role in Earth atmosphere.
  • Real-world chemistry modeling in NWChem. The chemistry library interfaces with NWChem, a high-performance computational chemistry software package. There are several ways to explore the interplay between NWChem and the Q# quantum chemistry library, including:
    • Try out the sample molecules listed above that have been generated by NWChem and are already a part of the Quantum Development Kit Samples.
    • Use EMSL Arrows Builder for the Microsoft Quantum Development Kit – a web-based frontend to NWChem – to generate new Broombridge-formatted molecular input files
    • Use the Docker image, provided by PNNL to run NWChem and generate your own molecule models

You can learn more about the chemistry library by exploring the documentation, including a set of conceptual documentation to describe basic principles of quantum chemistry, its mapping to a quantum computer, and the API documentation.

Today, developers and chemists around the world can begin exploring the Microsoft Quantum Development Kit and experiencing the world of quantum computing.  Resources such as the chemistry library will enable problem-solvers in the computational chemistry domain to explore the world of quantum. We’re excited to help our growing community take another step toward the new world of quantum computing.


Updated Quantum Development Kit offers new chemistry library, improved developer tools

At Microsoft Ignite, we shared our advancements over the past year and new capabilities within the Quantum Development Kit that will help us tackle real-world challenges. Starting today, you can download the updated Microsoft Quantum Development Kit and start leveraging the latest features. The update includes:

  • New quantum chemistry library. The new quantum chemistry library can be used to develop quantum simulation solutions in the chemistry domain.
  • Improved Q# developer experience. The Quantum Development Kit now delivers deeper integration with Visual Studio and Visual Studio Code. This update includes live feedback as you type, with errors indicated by underlined errors and warnings.
  • New Q# language capabilities. The Q# programming language has been extended in ways that unify how developers code common operations, such as iteration over arrays, making coding in Q# easier and faster.

New quantum chemistry library

Quantum computers have the potential to solve the world’s hardest computational problems and forever alter our economic, industrial, academic, and societal landscape.  One significant area is computational chemistry, where quantum computers will drive advancements in areas such as drug discovery, development of pigments and dyes, and the development of catalysts for industrial processes. These processes could break down pollutants in exhaust streams, extract atmospheric nitrogen to make fertilizer, and enable new methods for carbon capture. For example, a quantum computer may help identify a way to remove carbon from our environment more efficiently, to combat global warming.

To unlock these potential applications, this release of the Quantum Development Kit now includes a state-of-the-art chemistry library that allows users to explore quantum algorithms for real-world applications in the computational chemistry domain. New features include:

  • State-of-the-art Q# implementations of methods for Hamiltonian simulation.
  • Various samples to help the user get started quickly.
  • Integrations with NWChem, an open source high-performance computational chemistry software package.

The chemistry library was developed in collaboration with Pacific Northwest National Laboratory (PNNL), a leader in both chemistry and data analytics. Together, the chemistry library and NWChem enable quantum solutions and allow researchers and developers a higher-level of study and discovery as they tackle today’s computationally complex chemistry problems.

Learn more about the new chemistry library here.

Exploring the quantum chemistry library with Visual Studio Code
Exploring the quantum chemistry library with Visual Studio Code

Enhanced Q# language and developer experience

The updated Quantum Development Kit offers enhanced integration with both Visual Studio and Visual Studio Code. This includes IntelliSense features such as real-time feedback on errors. Additionally, the Q# language continues to improve and now provides more powerful language expressions that simplify the task of quantum programming. For instance, to simplify common code patterns, we added a conditional operator (condition? true | false) and iteration over arrays as well as ranges.

Learn more about the new Q# language changes here.

Valuable Hover information with Visual Studio
Valuable Hover information with Visual Studio

Update to Quantum Development Kit 0.3 Today!

With the updated kit you’ll find a suite of detailed documentation, tutorials, libraries, and sample algorithms and Q# code. You can dive right in with the included quantum codes and find easy-to-follow samples crafted in Q# for highly optimized and intuitively written code. The Quantum Development Kit supports a broad and inclusive range of development platforms, including Windows, Linux, and macOS. It also supports programming languages such as Python on Windows.

The kit also includes simulation tools that can mimic execution on a quantum computer and allows users to optimize their code and estimate the resource cost of running a solution on a real quantum computer with the help of the included Trace Simulator.

To start learning how to program for quantum, try our self-paced tutorials called the Microsoft Quantum Katas. These coding katas are great tools for learning a new programming language and rely on several simple learning principles: active learning, incremental complexity growth, and feedback.

Today, developers around the world are exploring the Microsoft Quantum Development Kit and experiencing the world of quantum computing, from startups to the enterprise and across academia, research, and design. The scalable Microsoft quantum computing solution is already enabling problem-solvers from various disciplines and skill levels to explore the world of quantum development and begin solving some of the planet’s most complex challenges. With our updated Quantum Development Kit, we’re excited to help our growing community take another step toward the new world of quantum computing.


Microsoft’s new Copenhagen lab accelerates quantum materials research

Microsoft is pleased to announce the recent opening of our new Quantum Materials Laboratory in Copenhagen, Denmark, on September 21. We have high expectations for the new lab. It’s where the heart of our quantum computer—the topological qubit—will be developed under the direction of Scientific Director Peter Krogstrup.

Reporting to Krogstrup is a team of skilled mechanical engineers, materials scientists, and quantum physicists. Together, they’re synthesizing ultra-clean quantum crystals, the building blocks of future quantum computers. The Copenhagen lab will supply these crystals to Microsoft Quantum labs located in Delft, the Netherlands; Sydney, Australia; Santa Barbara, California; and other locations.

Adults and children congregating outside the the glass walls of the Quantum Materials Lab

It’s fitting that Copenhagen should host this groundbreaking new lab. After all, it was Danish physicist Hans Christian Oersted who in 1820 discovered the link between electricity and magnetism—a breakthrough that in time helped lead to the use of electricity to run our world. Another Danish scientist, Niels Bohr, received a Nobel prize in physics in 1922 for his work on quantum theory. Bohr later founded the Institute of Theoretical Physics in Copenhagen. Our new quantum lab will lead to discoveries that are equally groundbreaking.

Given that people such as Oersted and Bohr are household names in Denmark—with streets and parks named for them—it wasn’t surprising that the opening of our new lab was a newsworthy event. Danish Minister of Higher Education and Science Tommy Ahlers was among those attending, and later joked on Twitter about a TV interview he gave: “Everything was going fine until they asked me to explain the physics behind quantum computing!”

Materials scientists using state of the art lab equipment to synthesize quantum crystals

Child observing the Microsoft Quantum team at workBeyond research and development, another role for the new Copenhagen lab is to help educate the public on the field of quantum computing. It’s been designed such that passersby, families with children, students, and others can see researchers at work behind large glass windows creating materials that will make scalable quantum computing possible. The lab’s neighbor is the Technical University of Denmark, where half of Denmark’s engineers are trained. Students there are finding inspiration in the Microsoft lab and charting their own futures around quantum computing.

The Microsoft Quantum Materials Lab’s impressive array of scientific equipment speaks to the exciting research it’s tackling. One of the problems researchers there will investigate is how to create quantum states that are more easily interpreted. “Quantum states are extremely fragile and therefore very difficult to maintain and read,” lab director Krogstrup says. “And quantum materials must be perfect. That means not one atom can lie in the wrong place—literally. This is among the things we need to do more research in.”

Quantum computing is a complex concept and can be a challenge for people to wrap their heads around. But the potential of the field is clear—creating computers far more powerful than anything available today, with the ability to solve some of the most difficult computing problems imaginable. We look forward to delivering that reality with the Quantum Materials Lab.


Learn the Q# programming language at your own pace with the new open source Microsoft Quantum Katas project

For those who want to explore quantum computing and learn the Q# programming language at their own pace, we have created the Quantum Katas – an open source project containing a series of programming exercises that provide immediate feedback as you progress.

Coding katas are great tools for learning a programming language. They rely on several simple learning principles: active learning, incremental complexity growth, and feedback.

The Microsoft Quantum Katas are a series of self-paced tutorials aimed at teaching elements of quantum computing and Q# programming at the same time. Each kata offers a sequence of tasks on a certain quantum computing topic, progressing from simple to challenging. Each task requires you to fill in some code; the first task might require just one line, and the last one might require a sizable fragment of code. A testing framework validates your solutions, providing real-time feedback.

Working with the Quantum Katas in Visual Studio
Working with the Quantum Katas in Visual Studio

Programming competitions are another great way to test your quantum computing skills. Earlier this month, we ran the first Q# coding contest and the response was tremendous. More than 650 participants from all over the world joined the contest or the warmup round held the week prior. More than 350 contest participants solved at least one problem, while 100 participants solved all fifteen problems! The contest winner solved all problems in less than 2.5 hours. You can find problem sets for the warmup round and main contest by following the links below. The Quantum Katas include the problems offered in the contest, so you can try solving them at your own pace.

We hope you find the Quantum Katas project useful in learning Q# and quantum computing. As we work on expanding the set of topics covered in the katas, we look forward to your feedback and contributions!

Updated Quantum Development Kit brings faster simulations, enhanced debugging

This post was authored with contributions by Cathy Palmer, Program Manager, Quantum Software & Services.

Today, Microsoft released an update to the Microsoft Quantum Development Kit including an enhanced debugging experience and faster simulations, as well as several contributions from the Q# community. We’re excited about the momentum generated by the many new Q# developers joining us in building a new generation of quantum computing.

Just over six months ago, we released a preview of Q#, our new programming language for quantum development featuring rich integration with Visual Studio. The February 26 release added integration with Visual Studio Code to support Q# development on macOS and Linux as well as Python interoperability for Windows. Since then, tens of thousands of developers have begun to explore Q# and the world of quantum development.

Today’s update includes significant performance improvements for simulations, regardless of the number of qubits required, as shown in the H2 simulation below. This is a standard sample included in the Microsoft Quantum Development Kit.

Simulation comparison

This update includes new debugging functionality within Visual Studio. The probability of measuring a “1” on a qubit is now automatically shown in the Visual Studio debugging window, making it easier to check the accuracy of your code. The release also improves the display of variable properties, enhancing the readability of the quantum state.

Screen showing enhanced debugging

Adding to the new debugging improvements, you’ll find two new functions that output probability information related to the target quantum machine at a specified point in time, called DumpMachine and DumpRegister. To learn more, you can review this additional information on debugging quantum programs.

Thanks to your community contributions, the Microsoft Quantum Development Kit now includes new helper functions and operations, plus new samples to improve the onboarding and debugging experience. Check out the release notes for a full list of contributions.

Download the latest Microsoft Quantum Development Kit

We’ve been thrilled with the participation, contributions, and inspiring work of the Q# community. We can’t wait to see what you do next.


Director of Quantum Computing Julie Love: Microsoft making progress on quantum computer ‘every day’

Microsoft is “all-in” on building a quantum computer and is making advancements “every day”, according to one of the company’s top experts on the technology.

Julie Love (above), Director of Quantum Computing, called the firm’s push to build the next generation of computer technology “one of the biggest disruptive bets we have made as a company”.

Quantum computing has the potential to help humans tackle some of the world’s biggest problems in areas such as materials science, chemistry, genetics, medicine and the environment. It uses the physics of qubits to create a way of computing that can work on specific kinds of problems that are impossible with today’s computers. In theory, a problem that would take today’s machines billions of years to solve could be completed by a quantum computer in minutes, hours or days.

While Microsoft has noted that no one has yet built a working quantum computer, Love said the company has the right team in place to make progress and eventually create a system and software that can tackle real-world issues. Over the past decade, Microsoft has built a team comprised of some of the greatest minds in quantum physics, mathematics, computer science and engineering. It is also working with some of the leading experts in universities across the world.

“Quantum computers could solve a set of problems that are completely intractable to humans at this time, and it could do so in 100 seconds,” she said during a speech at London Tech Week. “Microsoft’s enterprise customers are interested in changing their businesses using this technology, and we have set our sights beyond the hype cycle. We have a good understanding of what’s needed.

“Microsoft is working on the only scalable solution, one that will run seamlessly on the Azure cloud, and be much more immune to errors. The truth is that not all qubits are equal; most are inherently unstable and susceptible to error-creating noise from the environment. Our approach uses topological qubits specifically for their higher accuracy, lower cost and ability to perform long enough to solve complex real-world problems.”

Microsoft is the only major company attempting to build topological qubits, which aims to significantly reduce any interference at a subatomic level that might affect the machine. With this approach, the computational qubits will be “corrected” by the other qubits.

“When we run systems, there are trade-offs in power, because they have to be very cold. However, we get higher compute capabilities,” said Love, who started studying quantum computing in the late-1990s.

Last year, Microsoft released a Quantum Development Kit, which includes its Q# programming language for people who want to start writing applications for a quantum computer. These can be tested in Microsoft’s online simulator. Q# is designed for developers who are keen to learn how to program on these machines whether or not they are experts in the field of quantum physics.

“We have released the Quantum Development Kit so developers can learn to program a quantum computer and join us on this journey,” Love added.

Tags: , , , ,