Mads Bahrami, Manager of Educational Programs and Quantum Projects at Wolfram is interviewed by Yuval Boger. Mads and Yuval talk about the quantum capabilities of Mathematica, the types of users that might find it interesting, the difference between Mathematica and Qiskit as it relates to quantum computing, and much more.

Transcript

Yuval Boger: Hello, Mads. And thanks for joining me today.

Mads Bahrami: Hello, Yuval. How are you today?

Yuval: I’m doing great. So who are you and what do you do?

Mads: Okay. Who am I? By training, I’m a physical chemist, and I am an expert on quantum foundation. When we talk about quantum foundation, every expert in this field, they have a different interpretation of what is quantum foundation. But I can tell that what I have done under my official academic training, I work on persistence of quantum interference in noisy environments. And I was very lucky that the mathematic modeling that I was working with it is applicable on foundation of quantum, and it’s applicable on quantum computing. And that was basically my entry point after a couple of my postdocs, I said, okay, the math is the same. Why not work on quantum computing in noisy environments? So I can say I’m an expert who understands what happens to quantum superposition in noisy environments. That’s how I would like to identify myself.

Yuval: Excellent. And I think you work at Wolfram. What do you do for them?

Mads: Well, Wolfram Research… One of the things about Wolfram Research is that we always do multitasking. So part of my job is managing academic outreach and educational programs, basically working directly with people in academia and helping them to develop content using our technology, first and foremost, in a Wolfram Mathematica. So that’s one big chunk of activities that I do at Wolfram Research. And the other activity is that I’m leading our team of a few developers, developing a framework to do quantum computation. We call it Wolfram Quantum Computation Framework. So that’s another important part of my job at Wolfram Research.

Yuval: So if I’m a Mathematica user and I saw that you have this new quantum computation network, what could I do with it?

Mads: So basically the technical term that we use for that quantum framework is that it’s a Paclet. So the meaning of the Paclet is that one, before I jump to the detail. So Wolfram Mathematica, when you install that, you have access to about 6,000 building functionalities and each functionality, because Wolfram language is a functional programming language, each function, it does a collection of a specific jobs. So when you install our quantum framework, that Paclet, basically what happens is that you add a new collection, about 15 new functions, and those functions can be used to do any sort of computation in a finite-dimensional Hilbert space.

So basically, it’s not only about quantum computing, it’s basically practically any computation that people learn in their quantum courses in a finite-dimensional Hilbert space. They can do that. And, of course, they can design their quantum circuits. They can use the optimization methods that is available in Wolfram Language, and then through our API services and a couple of other service connects that we have, they can communicate with the quantum processing units, run their code on an actual quantum hardware, get their results, and then basically from that point, they can do whatever they need to do with that data.

Yuval: So it’s not just limited to simulation, but one could actually run it on real quantum hardware?

Mads: Yeah, true. So practically, that’s one of the things about our framework. I know people are familiar with the idea of quantum simulator, but all the calculations that are done in our framework because of the functionalities that we have in Mathematica, they are basically analytical approaches. So it’s not, for example, we run a couple of times, and we get the probability, those probabilities are calculated exactly. And one other thing is that even those probabilities, they can be symbolic. You don’t need to assign numerical values, they can be symbolic. And that’s one side.

So when you are designing your circuit and doing optimization and everything else, you can do it in one integrated environment, the Wolfram Notebook. And then, if you like and if possible, one thing that people should remember is that communication with any quantum hardware, it has some limitations. So let’s say that you know your circuit is applicable for a specific quantum hardware. So you can just send your query to that quantum hardware, communicate with that quantum hardware, get a result again back in a Wolfram Notebook and do everything in a quantum… in a Wolfram Notebook. So the simple answer is yes, that’s possible.

Yuval: Would you position this package as an alternative to Qiskit, or would you look at it as something else?

Mads: That’s one way of seeing that. One fundamental difference that I would like to highlight is the possibility of doing symbolic calculation. So what’s the meaning of symbolic calculation? Think about when you were learning about calculus and you were some functions and those functions, for example, sin(aX). And when you were taking the derivative, “a” was a symbol, and how to basically track that when you were taking the derivative, when you were taking, I don’t know, integration and etcetera, because for example, Qiskit is a Python base. And in that Python and most programming languages, when you do this sort of calculation, you need to assign some numerical value to those variables that are involved in your calculation, but in Wolfram Language, you can treat them as a symbol. So literally exactly the same way that you do it on paper, and that’s the biggest benefit.

So that’s the fundamental difference with other alternative platform to do quantum computing, and the other things that is like I would like to highlight is that basically practically, if we are standing on the shoulder of all other functionalities in Mathematica, meaning that Mathematica, for example, it has a big collection of functionalities for random processes. So you don’t need to basically reinventing the wheel in other platforms. For example, if you want to do a random process, you have to develop it yourself or have some means of doing that. Here in Mathematica, you can just call those functions, and those functions work seamlessly together with our functionalities for quantum computation.

Yuval: You mentioned two things. So on the symbolic math, I think I understand. Mathematica surely had tensor math even before quantum. And so now, if I want to do tensor math for quantum symbolically, I could do it. I get that part. But you mentioned the integration with other types of Mathematica packages. So I think you spoke about optimization. If you don’t want to do quantum optimization, you have to tweak the algorithm to work in quantum. How does that work in Mathematica? If I wanted to do a MaxCut optimization using Mathematica’s quantum package, how would that work?

Mads: So basically, the simple answer would be like this. When we talk about doing a quantum version of everything, the fundamental question is that what are the objects that are quantum or basically where is that fingerprint of that quantumness. Sometimes know that quantumness appears in, for example, you are working with the matrix and that matrix represents a Hamiltonian. So if that’s the case, so the rest would be all other functionalities that we have in Mathematica that can deal with matrices and doing all type of decomposition or everything that you can do with the metrics it is applicable here. So, for example, a big chunk of interesting quantum algorithms is about practically decomposing a matrix, you know, solving the large matrix. And you would like to factorize it into a simpler one. So here that quantumness is nothing, but okay, that matrix represents an actual quantum Hamiltonian.

The other part is no, no, no. That quantumness appears in the way that you calculate your probabilities, the measurement, and et cetera. So it’s like you have some rules for some probability distribution. So if you basically define how you are calculating your probability distribution, the other Mathematica functionalities, they understand that, okay, so whenever I’m calculating the method to calculate that probability. And then all other optimization algorithms, whenever they want to calculate, the probability they follow that particular rule that you are telling Mathematica to follow. So that’s basically the neat way of using in that integrated environment.

You have everything else that is available now, you as the user, you just need to identify which part you want to use. And basically, where is that quantumness that you are injecting to the rest of Mathematica functionalities. And basically my team, our main contribution with that Paclet is giving the users that option. Basically, we introduce some new objects, for example, quantum state, quantum operator, quantum measurement operator, quantum measurement. These are the new objects that, after installing that Paclet, so Mathematica can understand them and, you know, can do everything else that you were doing before that quantum Paclet.

Yuval: So, in the current state, could I implement, for instance, Shor’s algorithm? Or could I do VQE with Mathematica?

Mads: Yeah. We have both of them as an example in our documentation front face. They can go and they can see that. Let me remind you about one thing. So this is a very new project compared to other companies. Maybe we entered this quantum business maybe late. So we have started toward the end of 2021, but we managed to develop something quite fast and the size of the team. And, of course, that’s true with everything else that we do at Wolfram. Our teams are relatively small but very efficient compared to the other team. So the size of our team is no comparison with other quantum platforms out there, but I’m going to claim that we are very efficient and as good as many of them. So because of that, some of the algorithms, you know, you can implement them, but it might be… How should I say? Some of them are automatic.

For example, if somebody wants to do Grover search algorithm, it’s automatic now in our framework, meaning that you just need to define your boolean function. And then we generate the corresponding quantum circuit for that. But not all the algorithms are automated as of now. One of our to do lists is how we can identify the fundamental building blocks that we can take and having those blocks, every quantum algorithm can be automatically generated out of that. So that part is under development. So a few of those algorithms that are common out there, people may need to implement some parts of that. But a good collection, the famous ones, such as Shor’s algorithm, Quantum Phase Estimation, Grover’s algorithm, and a few other famous ones, they are automated, they are built in, and they can use that.

Yuval: Who is your ideal user? Is that someone who is learning quantum? Is that someone who is developing a new algorithm, or do you also see Mathematica as going into production? So I’m a financial services company. I want to do portfolio optimization. Would I run Mathematica to actually run it in the production environment?

Mads: Very good question. I would say target users are the usual users who are using Wolfram technology. And basically, the answer would be all of the above. Some of our users are using Wolfram Mathematica, they are using that for the sake of education. They want to learn it. So they can also use our quantum framework to learn quantum theory. They can learn it to learn quantum computation, in particular. Some of the users are professional users. For example, they are looking for some financial application of quantum algorithms for business purposes. We have some of the users like that. So the same community of users as well from Mathematica. So it would be all of the above list that you mentioned.

Yuval: I think for Wolfram, you also have speech recognition or some kind of NLP analysis so you could interact in natural language with the product. Do you see any tie-in between that and the quantum side?

Mads: That natural language processing is a very strong thing in Wolfram Language. In particular, we have a product called Wolfram|Alpha. So what happening with the Wolfram|Alpha is that it’s an online platform that you just go there, and you type your query in plain English, and you can get the computational result. I don’t know, you can go and compare the GDP of different countries versus any other computational data that you want. One of our future goals is that we can implement, but we would reach there, but maybe some of our users, they can beat us on that and they can implement it themselves.

And they can develop a sort of conversational agents basically, you can communicate in plain English with our platform. And through that simple query in plain English, after just pressing the enter, that query will be processed through the natural language processing functionalities. They understand what you’re asking and they generate, for example, the corresponding quantum circuit. That’s quite doable, of course. Devils are in detail, the actual implementation it’s going to take time, but I’m sure there are some people out there that can take it as one of their projects and get it done.

Yuval: So just between you and I, what does your roadmap look like? What do you expect Wolfram Quantum to offer in the next several months that it doesn’t offer today?

Mads: So the most important thing is we are planning to have basically a universal approach to develop quantum algorithms. The building blocks that I told you, we are actively looking to see what are the fundamental objects that we need in order to write down, develop a very particular quantum algorithm. Let me just give you an idea, for example, in the standard quantum theory, even we talk about quantum states, quantum operator and quantum measurement and et cetera, each of them, we treat them differently. For example, a quantum operator is a matrix and quantum state is something else. And we think of them as fundamentally different objects. As we started developing our framework, what we realized is that we can come up with a unified metadata that we can treat all of them. And for us was the language of tensor contraction, the very fundamental idea of a tensor and how we can play with the tensor indexes and et cetera.

We realized even a quantum circuit, we can describe it like that. And we managed to come up with this unified language to address different objects that we have in the world of quantum, for the quantum algorithms. We don’t know yet. We have some good guesses, some educated guesses that what that’s going to look like, but we are actively working on that to see how we can identify those fundamental entities that one can use to have a unified approach for the quantum algorithm development. So, of course, we are learning from the researchers out there. One of our everyday homework is just going to relevant platforms that researchers are uploading their research and read them to understand that and then see what’s the new ideas and see how we can use those ideas to develop those fundamental building blocks that I mentioned.

Yuval: Excellent. Well, I’ll certainly stay tuned to see your future development.

Mads: Thanks.

Yuval: Mads, how can people get in touch with you to learn more about your work?

Mads: So the easiest way would be quantum@wolfram.com. So send us an email. We would be more than happy to help with any training sessions they may need, any technical questions they may have. We are getting sometimes very technical, so technical that it takes us some time to understand what’s that topic. And sometimes we get very generic request. Me and my team more than happy to address all of those requests. So please reach out to us, tell us what you need, what you have seen in our framework. User’s feedback is very important for us. And of course, if they check our Wolfram webpage, they would see that we try to have bimonthly training on our framework, introduce different tricks, different aspects and etcetera, because one thing about, I guess, users out there who are familiar with Wolfram Mathematica, they know that, but those who are new to Wolfram Mathematica, one thing that is interesting about Wolfram Language is that many complicated tasks in other programming language is that you have to write it down in, I don’t know, ten, 20, maybe 50 lines of code. In Wolfram Languages, it could be one-liner, just one line, and you can do a complicated task.

And the other feature that we spend lots of resources is making sure that those codes are readable by the people who are not even the expert on that field. So that’s one of the things that we are very proud of that. And for example, if people see for example, Qiskit code and other quantum codes, like the one that Microsoft or Google has, you need to be an expert, not only on quantum, but also on that very specific platform, just to read the code. By design, with design, which is basically the characteristic trait of Wolfram Language, we did our best to develop in our framework that is quite readable. Even somebody who doesn’t understand quantum Wolfram Language, when they see the code, they can read it. Okay. This is a quantum state. This is an operator acting in quantum state and etcetera.

Yuval: Excellent. Well, thank you so much for joining me today.

Mads: Thanks. It was a great pleasure and hopefully we can chat more in the future.

Yuval: Absolutely. Have a good one.

Yuval Boger is a quantum computing executive. Known as the “Superposition Guy” as well as the original “Qubit Guy,” he most recently served as Chief Marketing Officer for Classiq. He can be reached on LinkedIn or at this email.

October 3, 2022