Summary
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.
Key takeaways
- Wolfram has built quantum computing functions directly into Mathematica's symbolic engine, so quantum circuits and states can be manipulated alongside ordinary symbolic math rather than as a separate tool.
- The users drawn to quantum in Mathematica are often people already doing symbolic or scientific computation in Wolfram Language, not dedicated quantum software engineers coming from a circuit-first background.
- Mathematica's approach differs from Qiskit in that quantum objects are treated as another data type within a general-purpose computation system, rather than a dedicated quantum SDK built around circuit execution.
- Mads Bahrami's role spans both educational programs and quantum projects at Wolfram, reflecting how the company positions quantum features as part of teaching and exploring math and physics, not just running jobs on hardware.
The full transcript is available on the Quantum Computing Report site
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 foundations. When we talk about quantum foundations, oh my gosh, every expert in this field has a different interpretation of what quantum foundations is.
But I can tell you what I have done. In my official academic training, I worked on the persistence of quantum interference in noisy environments. And I was very lucky that the mathematical modeling I was working with is applicable to the foundations of quantum, and it is applicable to quantum computing. 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, right? What do you do for them?
Mads: One of the things about Wolfram Research is that we always multitask. So part of my job is managing academic outreach and educational programs. Basically, working directly with people in academia and helping them develop content using our technology, first and foremost Wolfram Mathematica.
So that's one big chunk of the activities I do at Wolfram Research. The other activity is that I'm leading our team of a few developers, developing a framework to do quantum computation. We call it the 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 framework, 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. Before I jump to the meaning of a paclet, let me give some detail.
When you install Wolfram Mathematica, you have access to about 6,000 built-in functions. Because Wolfram Language is a functional programming language, each function does a collection of specific jobs. So when you install our quantum framework paclet, basically what happens is that you add a new collection of about 15 new functions, and those functions can be used to do any sort of computation in a finite-dimensional Hilbert space.
So it's not only about quantum computing. It's 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 are available in Wolfram Language. And then, through our API services and a couple of other service connections that we have, they can communicate with quantum processing units, run their code on actual quantum hardware, get the results, and 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, true. That's one of the things about our framework. I know people are familiar with the idea of a quantum simulator, but all the calculations that are done in our framework, because of the functionality that we have in Mathematica, are basically analytical approaches.
So it's not like, for example, we run a couple of times and we get the probabilities. Those probabilities are calculated exactly. And one other thing is that even those probabilities 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, which is a Wolfram Notebook. And then, if you like, and if possible… One thing people should remember is that communication with any quantum hardware has some limitations.
So let's say your circuit is applicable to a specific quantum hardware. You can just send your query to that quantum hardware, communicate with it, get the result back in a Wolfram Notebook, and do everything 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 it. 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 calculus and you had some functions, for example, sine AX. When you were taking the derivative, A was a symbol, and you knew how to track it when you were taking the derivative, or doing integration, et cetera.
Qiskit, for example, is Python-based, and in Python and most other programming languages, when you do this sort of calculation, you need to assign some numerical value to the variables involved in your calculation. But in Wolfram Language, you can treat them as symbols, literally exactly the same way that you do it on paper.
And that's the biggest benefit. That's the fundamental difference from other alternative platforms for quantum computing. The other thing I would like to highlight is that we are practically standing on the shoulders of all the other functionality in Mathematica.
Mathematica, for example, has a big collection of functionality for random processes, so you don't need to reinvent the wheel. In other platforms, 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 functionality for quantum computation.
Yuval: You mentioned two things. 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. I think you spoke about optimization.
Mads: Mm-hmm.
Yuval: If you 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 max-cut optimization using Mathematica's quantum package, how would that work?
Mads: So basically, the simple answer would be this. When we talk about doing a quantum version of anything, the fundamental question is: what are the objects that are quantum, or where is the fingerprint of that quantumness?
Sometimes that quantumness appears in, for example, working with a matrix, and that matrix represents a Hamiltonian. If that's the case, then the rest is all the other functionality that we have in Mathematica that can deal with matrices, doing all types of decomposition or anything else you can do with a matrix. It is applicable here.
For example, a big chunk of interesting quantum algorithms is practically about decomposing a matrix. You start with a large matrix and you would like to factorize it into simpler ones. So here, that quantumness is nothing but the fact that the matrix represents an actual quantum Hamiltonian.
In other cases, the quantumness appears in the way you calculate your probabilities: the measurement, et cetera. So you have some rules for a probability distribution. If you define how you are calculating your probability distribution, the other Mathematica functions understand that whenever they calculate the probability, that's the method to use.
And then all the other optimization algorithms, whenever they want to calculate the probability, follow the particular rule that you are telling Mathematica to follow. That's basically the neat way of using that integrated environment. You have everything else that is available.
Now you, as the user, just need to identify which part you want to use and where the quantumness is that you are injecting into the rest of Mathematica's functionality. And basically, my team's main contribution with that paclet is giving users that option. We introduce some new objects, for example, quantum state, quantum operator, quantum measurement operator, quantum measurement.
These are the new objects that, after installing the paclet, Mathematica can understand, and you can do everything else that you were doing before the 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 examples on our documentation front page. People can go and see them. But let me remind you about one thing. This is a very new project. Compared to other companies, maybe we entered this quantum business late.
We started toward the end of 2021, but we managed to develop something quite fast. And of course, that's true of everything else we do at Wolfram Research. Our teams are relatively small, but very efficient compared to other teams.
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. Because of that, some of the algorithms you can implement, but it might be… How should I say it?
Some of them are automatic. For example, if somebody wants to do the 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 item on our to-do list is identifying the fundamental building blocks from which every quantum algorithm can be automatically generated. That part is under development. So for a few of the algorithms that are common out there, people may need to implement some parts themselves.
But a good collection of the famous ones, such as Shor's algorithm, quantum phase estimation, Grover's algorithm, and a few other famous ones, are automated. They are built in, and people can use them.
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 going into production? Say I'm a financial services company and I want to do portfolio optimization. Would I run Mathematica in the production environment?
Mads: Very good question. I would say our target users are the usual users of Wolfram technology.
And basically, the answer would be all of the above. Some of our users are using Wolfram Mathematica for the sake of education. They want to learn. So they can also use our quantum framework to learn quantum theory, and to learn quantum computation in particular.
Some of the users are professional users. For example, they are looking for financial applications of quantum algorithms for business purposes. We have some users like that. So it's the same community of users as Wolfram Mathematica, and it would be all of the above that you mentioned.
Yuval: I think Wolfram also has speech recognition or some kind of NLP analysis, so you could interact with the product in natural language. Do you see any tie-in between that and the quantum side?
Mads: Natural language processing is a very strong thing in Wolfram Language. In particular, we have a product called Wolfram|Alpha. Wolfram|Alpha is an online platform where you just go and type your query in plain English, and you get the computational results.
For example, you can go and compare the GDP of different countries, or any other computational data that you want. One of our future goals is something we can implement, and we will get there, but maybe some of our users will beat us to it and implement it themselves.
They could develop a sort of conversational agent. Basically, you could communicate in plain English with our platform, and after just pressing Enter, that query would be processed through our natural language processing functionality.
It would understand what you're asking and generate, for example, the corresponding quantum circuit. That's quite doable. Of course, the devil is in the details. The actual implementation is going to take time, but I'm sure there are some people out there who can take it on as one of their projects and get it done.
Yuval: So, just between you and me, 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: Okay. The most important thing is that we are planning to have a universal approach to developing quantum algorithms, the building blocks that I told you about.
We are actively looking at what fundamental objects we need in order to write down and develop a particular quantum algorithm. Let me just give you an idea. In standard quantum theory, when we talk about quantum states, quantum operators, quantum measurements, et cetera, we treat each of them differently, right?
For example, a quantum operator is a matrix, and a quantum state is something else. We think of them as fundamentally different objects. As we started developing the framework, what we realized is that we could come up with a unified metadata with which we can treat all of them.
For us, that was the language of tensor contraction: the very fundamental idea of a tensor and how we can play with the tensor indices, et cetera. We realized that even a quantum circuit can be described like that.
And we managed to come up with this unified language to address the different objects that we have in the world of quantum. For quantum algorithms, we don't know yet. We have some good guesses, some educated guesses, about what that's going to look like, but we are actively working to identify the fundamental entities that one can use for a unified approach to quantum algorithm development.
Of course, we are learning from the researchers out there. One of our everyday homework assignments is going to the relevant platforms where researchers upload their research, reading it to understand it, seeing what the new ideas are, and seeing how we can use those ideas to develop the fundamental building blocks that I mentioned.
Yuval: Excellent. Well, I'll certainly stay tuned to see your future developments.
Mads: Thanks.
Yuval: Mads, how can people get in touch with you to learn more about your work?
Mads: The easiest way would be quantum@wolfram.com. Send us an email. We would be more than happy to help with any training sessions they may need, or any technical questions they may have.
Sometimes we get very technical questions, so technical that it takes us some time to understand what the topic is. And sometimes we get very generic requests. My team and I would be more than happy to address all of those requests.
One more time, it's quantum, Q-U-A-N-T-U-M, the usual spelling, @wolfram.com. So please reach out to us and tell us what you need and what you have seen in our framework. User feedback is very important to us. And of course, if they check our Wolfram webpage, they will see that we try to have bi-monthly training on our framework, introducing different tricks, different aspects, et cetera.
Users out there who are familiar with Wolfram Mathematica know this, but for those who are new to Wolfram Mathematica, one thing that is interesting about Wolfram Language is that many complicated tasks that you have to write in, I don't know, 10, 20, maybe 50 lines of code in other programming languages could be a one-liner in Wolfram Language. Just one line, and you can do a complicated task.
The other feature that we spend lots of resources on is making sure that the code is readable by people who are not even experts in that field. That's one of the things we are very proud of. For example, if people look at Qiskit code and other quantum code, like the code from Microsoft or Google, you need to be an expert not only in quantum but also in that very specific platform just to read the code.
By design, which is basically the characteristic trait of Wolfram Language, we did our best to make our framework quite readable. Even somebody who doesn't understand quantum or Wolfram Language can read the code when they see it: okay, this is a quantum state, this is an operator acting on a quantum state, et cetera.
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.
