Rene: Hi welcome to QuBites, your bite-sized pieces of quantum computing. My name is Rene from Valorem Reply and today Rene: Hi welcome to QuBites, your bite-sized pieces of quantum computing. My name is Rene from Valorem Reply and today we're going to hear much more about the fantastic Microsoft QDK, Q# and QIR. That's a lot, but Bettina will tell us all about it. And like I said, we have a special expert guest today, Bettina Heim, who actually works on all of those mentioned things directly and is actually one of the main drivers also behind Q#. So, we have a true Q# expert here today. Hi Bettina and welcome to the show. Or should I rather say, Grüezi? You know, she’s originally from Switzerland so, Grüezi Bettina!

Bettina: Yeah, hi Rene! It's great to be here. And indeed, I’m from Switzerland.

Rene: Yeah. So, can you tell us a little bit about yourself and your background as it relates to programming, quantum computing, or quantum physics, or whatever it is?

Bettina: Sure, yeah. So actually, my background is in physics. I did my degree in physics. But then went on towards computational physics, modeling physical systems, and from there to optimization problems. So, I like any kind of interesting complex problems. So that brought me into quantum, and I fell in love with software, with software engineering. I started working on Q#, or before Q# existed and then building the compiler from there and today I lead the compiler and runtime team at Microsoft Quantum.

Rene: That's impressive, an impressive career. And if this is not impressive enough, I looked up and I found out that you were also a former competitive figure skater for Switzerland, which is just amazing! And I need to tell you something, just recently, I had the pleasure to interview here also at QuBites, Xenia Bogomolec, who was actually a professional contemporary dancer before she studied math and then became a quantum security expert, right? So, it seems like there’s a relationship between quantum computing and dancing. Well, figure skating could be seen as dancing on ice maybe, but there seems to be something related. Maybe it's just like the strength and pulling through. Cause you need to have a lot of strength and of course you know willingness to work through it right?

Rene: Yeah. I got to tell you I'm also not the only at former figure skater on our team. So apparently, if you are wondering ‘how do I get into quantum computing’ and ‘what should I learn,’ apparently the answer is figure skating.

Rene: Love it. Love it. OK well we gotta talk about this another day a little bit more in detail, but let's dive into today's main topic in fact. I know you work on the Q# compiler and other developer tooling, but for the audience here that are not familiar with Q# and QDK, can you please explain how Q# and QDK are also related to Azure Quantum and what Q# and QDK actually are?

Bettina: Yeah. Sure. So, I know you're already familiar with Azure Quantum and among other things, what you can do there is of course run things on actual quantum hardware. And Q# is our dedicated quantum programming language. Quantum hardware works very differently than classical hardware. So having a custom language to make it easier for hardware to understand and make it natural for people to express the program, is really important. And one of the coolest things about Q# I think, is that you can really do things that people didn’t think were possible beforehand, right? A tight interaction between classical and quantum is something that now is starting to really come up and hardware is starting to support it more and more extensively. And Q# is kind of one step ahead of that and we do a lot of magic to make that happen.

Rene: Nice. So, it’s a dedicated language for quantum computing and also, it’s not dependent on a certain hardware stack, right? And this is really also where I think this QIR, the Quantum Intermediate Representation, comes into play right? Like for the folks here in the audience that might be familiar with C# and .Net, .Net has been CIL, Comedian Intermediate Language, right? And so, it’s also this kind of layer between you're actual programming language before you access the hardware, so that you're more flexible in terms of what kind of hardware you can support. Is that analogy actually also correct when we think about Q# and the QIR, the Quantum Intermediate Representation? Or what is the purpose of the QIR piece here in Q#?

Bettina: Yeah, definitely. On one hand, when it comes to intermediate representation, really what's important to us is what kind of information do we really need to ensure that everything executes you know efficiently, quickly, to good quality and all of that. And for us to really think hard about what's needed within the language and at the intermediate level, is a very important step to make that happen. Like any intermediate representation, so usually the goal is the goal of formalizing essentially. That the format that basically the compiler internally uses is that multiple backends can connect to it and multiple languages on the front end can connect to it. But for us mostly also what it enables is really that we have full control over how really to execute certain programs. So that we can make smart decisions around which pieces we want [on] quantum hardware, what pieces we on classical compute close by, you know what gets pre-evaluated ahead of time, and all of these things right? So that's actually the interesting compilation part that we do with that format.

Rene: Wow, I wasn’t actually aware that this was also basically where it could for example split up. OK this is a piece for a classical computation basically, this is not needed to run on a quantum computer, or it actually wouldn't work. But you also basically, represented in QIR, can make these decisions there. Wow.

Bettina: Yeah, yeah. No. I mean, quantum hardware itself has no classical compute whatsoever. And then device manufacturers today, you know there are an arsenal of devices out there. And they often do have some classical compute really close by. So, if you just use them, you might not realize what is running where. But of course, when you actually build the whole stack to work with that, you know exactly what goes where ultimately. And the interesting part is always when you’ve measured and for the first time you start getting a classical value, right? So, this is kind of this connection between the two worlds. And anything beyond that, any variables or anything like that, that you can have, that's not there on the quantum processor, right?

Rene: That makes a lot of sense. And also, you know, who knows what kind of, well there is apparently already known what kind of different quantum computers are out there and will be coming but we definitely don't know exactly which ones will be coming. So, you get much more flexibility in the future, right? Because you can integrate your quantum algorithms even on newer hardware as long as you have the correct back-end support for QIR, right? Is that correct?

Bettina: Yeah, exactly. And also, we work with a lot of upcoming and you know kind of the experimental quote, unquote, hardware before it's already in production to exactly essentially develop the stack to support it and the hardware. So that's really what we hope to enable with QIR. Which I'm really excited about. And it's also, I should mention explicitly, QIR is essentially just a convention for how to represent quantum programs within the LLVM IR, which is a well-established compiler framework in classical computing. So, we’ll build on a lot of the existing tools for everything that we can and then the actual quantum pieces of course requires some dedicated attention and some customization that we do.

Rene: That’s super clever that you build on top of the open source LLVM, right? That’s fantastic ‘cause you can leverage some of that and also extend it. Super, super smart approach. Love it. And so, of course, QIR is more of a, well not something as a developer you have to actually care so much about, of course you should always care about how things work under the hood, but the question I'm going at is like as a developer you would probably use Q# right? And then it does the magic, the compiler and all of that does the magic under the hood, so you don't need to care so much about it. That's the fantastic part about the compiler and the QIR, that you don't have to worry about all these specific things. But you know for developers who want to get started with Q# and QDK, what is a good place to get started with for learning it?

Bettina: Yeah definitely. So, it depends a little bit where your primary interest is because you can do a lot in quantum computing you know. If you're interested in learning about quantum computing, quantum algorithms, you know how applications could look like, then we do have a great set of MS Learn modules and the Quantum Katas, that I'm sure you've heard about before. They're really a great starting point to really engage just with the topic of quantum. But then there's also a lot of needs of course within quantum computing to write classical software for quantum computing potentially. And so, here is where all the knowledge about you know if you want to engage with the compiler framework comes in, we do definitely welcome that as well. Pretty much all of it is open source so our GitHub repos are good place to start engaging there.

Rene: Gotcha. Makes sense. Azure quantum learning and the GitHub repos. Like you said, there is fantastic stuff, there is so much open source out there from the get-go and so that’s great think. Hey but maybe also this book is good to get started. And folks I’m not getting paid to show this book, I paid for it myself. But it's just fantastic. It is Learn Quantum Computing with Python and Q# by Sarah Kaiser [who was] actually a guest in previous episodes of QuBites, as well as her partner Chris Grenade. It’s a fantastic book and you know what Bettina is actually also featured in there in the acknowledgements section. I quoted what is written there, “for working to make Q# an amazing language,” right? So, I can definitely recommend this book if you want to get started. It's fantastic and you know they consulted with the true Q# experts, Bettina here. Well Bettina we could talk for hours and much, much longer but we are already at the end of our short episodes. And so, thank you so much for your insights today and explaining all about Q#, QIR, and the things you're working on. It's great work and I think it's really amazing groundwork that a lot of people will build on top off in the next couple of years. So highly appreciated that you joined us today and shared the knowledge.

Bettina: Yeah, definitely. Thanks for having me here. And the credit, of course, goes always out to a whole bunch of people. There's a big team behind it. So, you know there are a lot of awesome people I work with.

Rene: Of course. Thank you so much everyone also for joining us today for yet another episode of QuBites, your bite-sized pieces of quantum computing. Watch our blog, follow our social media channels to hear all about the next episodes. And until then, take care and see you soon. Bye, bye!