# Quantum Computing on Azure

# How it Works, What’s Coming, & What You Can Try Today

Set up a high performance hybrid quantum compute environment in your own Azure Quantum workspace, and run your code on real quantum machines. See the latest advances, core concepts, and Microsoft’s distinct topological approach to get us closer to realizing the world’s first scalable quantum machine with Azure Quantum Computing.

Microsoft Distinguished Engineer and Azure Quantum VP, Krysta Svore, joins host Apoorva Nori, to share what it is and how to set it up.

## Run your quantum code on real hardware.

Bring the best of classical and quantum computing together. Check it out.

## Create and build a Quantum workspace — all you need is a browser.

Set up a high performance hybrid Quantum compute environment in your Azure Quantum workspace. Get started here.

## Use Quantum Intermediate Representation (QIR) in Azure Quantum.

Target different quantum machines, so code is compatible across hardware. See it in action.

## Watch our video here.

## QUICK LINKS:

00:00 — Introduction

02:40 — What is Quantum Computing?

04:40 — Applications suited for quantum computers

05:50 — Topological qubits

07:43 — Majorana zero modes

09:43 — How to set up Azure Quantum

12:51 — Quantum Intermediate Representations (QIR)

14:18 — Wrap up

## Link References:

Start using Azure Quantum today at https://aka.ms/quantumworkspace

Open source samples and learning materials at https://aka.ms/learnquantum

## Unfamiliar with Microsoft Mechanics?

As Microsoft’s official video series for IT, you can watch and share valuable content and demos of current and upcoming tech from the people who build it at Microsoft.

- Subscribe to our YouTube: https://www.youtube.com/c/MicrosoftMechanicsSeries
- Talk with other IT Pros, join us on the Microsoft Tech Community: https://techcommunity.microsoft.com/t5/microsoft-mechanics-blog/bg-p/MicrosoftMechanicsBlog
- Watch or listen from anywhere, subscribe to our podcast: https://microsoftmechanics.libsyn.com/podcast

## Keep getting this insider knowledge, join us on social:

- Follow us on Twitter: https://twitter.com/MSFTMechanics
- Share knowledge on LinkedIn: https://www.linkedin.com/company/microsoft-mechanics/
- Enjoy us on Instagram: https://www.instagram.com/msftmechanics/
- Loosen up with us on TikTok: https://www.tiktok.com/@msftmechanics

## Video Transcript:

- Up next, we’re joined by one of the foremost experts on quantum computing to unpack the latest advances. We’ll recap some of the core concepts, along with Microsoft’s distinct topological approach, to get us closer to realizing the world’s first scalable quantum machine. And we’ll also demonstrate how to set up a high performance quantum compute environment in your own Azure Quantum workspace, and run your code on real quantum machines. And joining us today to walk through all of this is Microsoft distinguished engineer, Krysta Svore.

- It’s great to be back.

- We’re thrilled to have you on with us, Krysta. It’s been a big year for Microsoft and for Azure Quantum.

- Yeah, it really has. This past March, we shared a very significant breakthrough. We demonstrated the underlying physics of our approach for scalable quantum computing, which paves our unique path forward to building a topological qubit, which is our foundation to a scalable quantum machine. And long term, we aim to bring Microsoft’s quantum machine to Azure Quantum, our cloud platform for quantum innovation. Already, Azure Quantum has a diverse set of quantum hardware and lots of learning materials, so you can start today.

- And as a data scientist, this is a really exciting area for me. It was actually pretty easy for me to get started. I used the Quantum Katas tutorials and I’ve started experimenting with the Azure Quantum Jupyter Notebooks.

- I love hearing that you’ve been experimenting. We need everyone to dive in. Our ambitions are bold, and to realize them completely will take time and the community. And it’s really important for the community to understand what motivates us and where we’re headed. What’s exciting is we’re making meaningful progress every day, and each element of progress is part of our full-stack approach to achieving scale. And that requires three things. The first is to engineer an industrial scale quantum machine. That means one with more than a million physical qubits. And our recent breakthrough, it gets us closer to realizing this. The second is to unleash the power of the cloud. And the third is to empower an ecosystem of innovators, because it’s with the community, you, that we’ll see the creation of more quantum algorithms and applications. And spanning all three of these ambitions is our Azure Quantum platform, with access to the most diverse hardware and simulators, as well as your choice of languages and tools. And here you can see some of the many samples contributed by the growing community.

- This is a significant amount of progress in a relatively short span of time, but it’s still a really new area for many of us. So before we get into what’s new, could you maybe share a quick primer on quantum computing and maybe how it compares to today’s computing?

- Yeah, sure. So think of quantum computing as something very new and different, right? It’s a new and different form of computing that can help accelerate some solutions and ultimately accelerate the cloud, Azure. It’s hybrid, so it works with classical computing rather than replacing it. Today’s computers, what I’ll call classical computers, are based on classical bits using transistors. And these support only two states. It’s like a light switch with two positions, one or zero. Quantum computers, on the other hand, leverage how the world works at the smallest scales. They’re governed by quantum mechanics. And so, you use quantum bits, or qubits. And a qubit can have these two states called basis states in what we call a superposition, which is almost like a dimmer switch. It’s a combo. Qubits can be entangled with one another, intrinsically correlating the information between them. Now, each quantum basis state has an associated probability amplitude. These amplitudes are important, because as qubits become entangled, the goal is to change the amplitudes of the basis states to become either larger and amplified, or smaller and canceled out. And we do this by taking advantage of what’s called quantum interference. Ultimately, quantum computation is probabilistic. You get back one of the basis states upon measurement and the probability of that answer is directly related to the amplitude of that state. So it’s a lot like waves. When they collide, they become amplified and larger, or they get smaller and disappear. Now, in the end, you might have to repeat your program to have a high probability of getting the right solution. It’s when superposition, entanglement, and interference all come together at scale that quantum computing can be game-changing.

- And we are approaching a limit in terms of the number of transistors we can fit in a CPU, so quantum is a way to open up the possibility to solve some really tough problems. I’d imagine though that there are probably some applications that are better suited for quantum computers than others, right?

- Yeah, absolutely. Classical computers are not going away. Quantum computers, when scaled up, will help solve some problems that can never be solved by even today’s most powerful super computers. And they’ll help reduce lifetime of the universe run times to a matter of months, weeks, or even days. With a quantum computer, we’re able to compute a bit more like nature. So take nitrogen fixation, a process for producing ammonia, a natural fertilizer that occurs in the soil by small microbes. Now, if we could decode their process, we’d be able to help find an alternate, less energy intensive catalyst for today’s artificial fertilizer production. And in turn, this could help address food shortages and reduce the environmental impact. Or, if we could more accurately study the chemical reaction behind carbon fixation, we could help identify a catalyst to help efficiently capture carbon and in turn reduce global warming.

- And even if these were the only problems we’re ever able to solve with quantum computers, it’s going to change everything. But not all qubits are created equal, right?

- Yeah, that’s right. There are several approaches to building and engineering qubits, and they’re not all the same. Ultimately, what it boils down to is qubits need to be of the right size, speed, and reliability to reach a scalable quantum machine to solve these sorts of problems. Now, qubits are inherently fragile. They like to interact with their environment and they need to be protected from things like heat, stray particles, vibrations to ensure an accurate solution. Our approach at Microsoft has been to design a qubit that is in the sweet spot for size, speed, and reliability. And that’s why we’re building a topological qubit, a qubit with the right properties for scaling up that quantum machine.

- And I know for you and your team really being at the forefront of this, it has been no small task. With the breakthrough earlier this year in March, how much closer does that bring us to realizing this topological qubit?

- So now we’ve gone beyond just the mathematical theory and demonstrated on multiple devices the physics that underlies a topological qubit. And there’s a lot to it. But at a high level, it’s a deep interplay between hardware and software, modeling and experiment. It started with a theory, and then we engineered a device to match that theory with atomically precise interfaces between semiconducting and superconducting materials. These materials are layered along with gates to form a nanowire. We control what happens on this nanowire by creating the right environment with a magnetic field, voltages, and temperatures. We then tune the device into what’s called a topological phase, which is a different phase of matter, much like driving a transition from water to ice. And this topological phase has some really nice properties. It has what are called majorana zero modes that appear simultaneously both ends of the wire. Now these modes indicate a non-local property, which is key for making a scalable topological qubit. Now, when we saw this behavior in a device for the first time, it gave us goosebumps. And with this, we’ve now validated our approach to a topological qubit. And so, after that, it’s on to scaling up.

- So how do you create a quantum machine that protects this fragile qubit state?

- So qubits are just one foundational element of many that are needed to build a computer. Quantum devices operate at almost absolute zero temperature, in the low millikelvins, which is colder than most of deep space, and they’re inside a dilution refrigerator to keep the qubits protected from things like thermal noise. Now, we’ve also designed cryogenic CMOS, it sits inside the fridge, and this eliminates hundreds or more wires and their heat running from the outside. We also need petabyte scale classical compute to help maintain the quantum computer. This requires integrating with the most modern, high performance compute in Azure. This integration with Azure is also important to enable application development. Quantum algorithms have both classical and quantum parts, and Azure Quantum helps automatically map and optimize those instructions for the classical or quantum compute in Azure. Now, for example, you’re seeing here a feature we just released in Azure Quantum, interactive hybrid quantum and classical instructions. We’ve enabled controlling the application of quantum operations based on classically computed information. This means more advanced control flow in your quantum program and the ability to perform more advanced hybrid computation. So it’s a really great time to learn how to quantum program, or if you’re already started, bring your favorite quantum code and run it on a diverse set of real hardware. Wow, I can’t wait to try this. I’d love to see it in action. Could you show us how to set up a compute environment to actually run on real quantum hardware?

- Yeah, that’s where Azure Quantum comes in. It makes it easy to develop quantum programs and run them across simulators and real quantum hardware. All you need is a browser and an Azure account. I’m in the Azure Portal. I’ll search for quantum and go to my quantum workspaces and create a new one. The fastest way to get started is with quick create. Now I just need to name it, demo-qir, and I’ll keep the region as is. Then you can see our available quantum providers, including IonQ, Quantinuum, and Rigetti. Now you don’t have to choose one in this case. You’ll be able to target any of these later with your quantum jobs, which I’ll show you in a minute. Next, I’ll just hit Create. That will take a few moments to provision. And once it’s ready, I can go to my quantum workspace and start building.

- So is this where I could bring in the code that I’ve had running until now in my simulator to actually run it using real quantum hardware?

- Exactly. You can bring your existing quantum code right to Azure Quantum. And if you’re just getting started, we’ve done a lot of work to make it really easy to use samples. In fact, here you’re seeing our sample Jupyter Notebooks. These use Q#, Qiskit, and Cirq, and there’s lots of practical exercises here to try. To save time, I’ve already created a custom notebook, which is currently designed to use a Rigetti quantum machine. You’ll see here in our code that first we are connecting to our Azure Quantum workspace. Once we’re connected, you’ll see the notebook has enumerated all of the available quantum providers. As a best practice, we’ll run the algorithm on a simulator first to validate everything, and then we’ll run it on a real quantum machine when the code is ready. What I’m going to run here is a simple Q# function that returns a secret pattern of zeros and ones. Remember, this combination of one, one, zero because our quantum computer is going to decipher it. Next, I’m going to show you the BernStein-Vazirani Algorithm in Q# that takes my secret pattern and uses quantum compute to figure it out. So everything looks good, so let’s run the algorithm. It’s going to take a moment to run, and once it completes, you’ll see that it was able to detect our secret one, one, zero pattern. Now that we verified that the algorithm is working, we can target a real quantum machine. So I’m going to execute the same command from before on the real quantum hardware from Rigetti. Now I’ll let it run, and this will take a moment. When it completes, you’ll notice the result here is different than with the simulator. As I mentioned, the quantum machine is probabilistic, and it runs the algorithm multiple times. So you can see the highest confidence is with our one, one, zero pattern, but it’s also assessed for other possible combinations. And one of the reasons these others appear with lower confidence is that noise exists in this probabilistic quantum hardware.

- When you were provisioning the quantum workspace and connected to it just now, we saw that there were some other providers available. Would it be particularly difficult to change the target hardware if I wanted to?

- Yeah, not at all. It’s why we’ve designed our open source representation to make it really easy to target different hardware backends. It’s called the Quantum Intermediate Representation, or QIR, and it’s developed in partnership with the Linux Foundation and a global consortium of industrial and academic members. It acts like a common interface between multiple languages and multiple target quantum platforms. So let me show you. I’m back in the same notebook that I just ran against the Rigetti machine. Here, I’m changing the target to an IonQ simulator. Now I’ll run it one more time. And normally, doing something like this could require assembly language modifications. But QIR makes that translation for me. And you’ll see it runs with the exact same code as before and even returned the right result of one, one, zero. So your code, whether it’s Q#, Qiskit, or Cirq, is portable and compatible across different hardware. And behind the scenes, it’s QIR that makes this possible.

- And moving beyond simulators to actually harness real quantum hardware takes it to the next level.

- Exactly. You can innovate for the scaled future today in Azure Quantum. And as you do, we’ll be working to scale up the quantum machine with topological qubits.

- So for everyone looking to try this out, what would you recommend?

- Well, to get started today, for free, just visit Azure Quantum or go to aka.ms/quantumworkspace to start running quantum programs in Azure. And if you want to learn more about quantum programming, you’ll find our learning materials and open source samples at aka.ms/learnquantum.

- Thank you so much for joining us today, Krysta. And for all the latest updates, be sure to subscribe to Mechanics. Thanks for watching.