Articles

What does Quantum Computing Mean for AI?

2
June
,
2022

What does Quantum Computing Mean for AI?

Quantum computing and its application to AI have made dramatic progress in recent years — from Google’s quantum supremacy experiment to public market activities and product roadmap announcements — have generated justified excitement coupled with a splash of caution in the machine learning and AI community. Will quantum computers help AI and usher in a QML (quantum machine learning) revolution? How soon will this happen? What should forward-thinking executives do to plan for that day responsibly?

Why are quantum computers interesting?

Quantum computers use qubits (quantum bits) instead of regular bits. While qubits are much more difficult to produce, stabilize and scale these days, qubits bring with them two intrinsically unique capabilities that stem from quantum mechanics: — superposition and entanglement. Superposition allows a qubit to hold multiple values at once (with different probabilities). Entanglement allows multiple qubits to be interconnected in a way that expands the dimensionality of the problem. While 10 classical bits can hold a single value out of 1024 possible values at any given time, 10 qubits can hold all these 1024 values simultaneously. A 50-qubit quantum computer can hold and process over a quadrillion values at the same time, whereas a classical computer can process only one such value at any given time. For context, a quadrillion is about 50 times the number of red blood cells in the body. 

Quantum computers are programmed differently than classical computers. Quantum code resembles electronic design: connecting qubits with quantum gates that operate on them. When algorithms are appropriately coded in ‘quantum speak,’ quantum computers can potentially create dramatic and exponential speed improvement over their classical counterparts. 50-qubit quantum computers are now a reality, and as quantum computers with hundreds or even thousands of qubits come online, the exponential increase in capacity will quickly leave classical computers in the dust.

If we can overcome the difficulty of creating quantum computers, data scientists can use this dramatic speedup to find new insights in AI/ML algorithms and advance AI to new heights. In short, quantum computers hold the potential to revolutionize AI. Quantum AI is possible and quantum computers can be used for AI, but organizations need to be aware of pitfalls and limitations, as described below.

What are the benefits of using quantum computing for AI?

Quantum computers are not easy to use but offer significant incentives for using them in artificial intelligence and machine learning applications:

Quantum heuristics

Quantum computing heuristics behave differently from classical heuristics. Many classical machine learning and AI algorithms have been empirically shown to work but lack theoretical proof of their effectiveness. An inquisitive AI and machine learning engineer would be justified in trying quantum heuristics. Perhaps quantum computers could produce better results? Perhaps they would succeed in instances where classical heuristics do not meet expectations. Quantum computers could provide another arrow in the metaphorical quiver.

Quantum computers can compactly represent data

Quantum computers can load data in an exponentially more compact way. Not only does the superposition property of qubits allows them to hold multiple values simultaneously, but these values can be assigned different weights.  Many AI and machine learning packages explore solutions in a multi-dimensional space, and thus it could be easier to model these large spaces and load data into them on quantum computers. Indeed, it might be possible to model certain problems on quantum computers that could not be modeled on classical computers.

Quantum computers offer algorithmic speedup

One of quantum computing’s most popular algorithms is the Harrow, Hassidim, Lloyd (HHL) algorithm. It delivers a proven exponential acceleration in solving linear systems of equations. Linear systems of equations are used extensively in least-squares linear regression and Gaussian processes, and solving them exponentially faster relative to classical computers is very valuable.

Another popular quantum algorithm is the Grover search, which allows efficient searches in unstructured data sets, delivering a proven speedup over classical searches. For instance, if a classical search algorithm completes the search on a given data set in a certain amount of time, that time will increase four-fold if the size of the data set increases four-fold. In contrast, the time to perform a Grover search would double – instead of a four-fold increase – with every four-fold increase in the size of the data set.

These are just two examples of quantum algorithms that offer speedup. The exact speedup is different from one quantum algorithm to another, but the fact that certain algorithms can execute much faster on quantum computers offers hope to make certain algorithmic operations move from impractical to practical.

Quantum computers can discover new data patterns

Quantum computers produce new types of data patterns. This leads to the hope of identifying these patterns by using reverse algorithms (e.g. algorithms that were reverse-engineered by observing their behavior).

Can quantum computers be used alongside classical computers for AI?

In a few years, when we’ll have quantum computers with numerous high-quality qubits, there will still be tasks that will be better performed with classical computers. That’s why even today, when quantum computers are far from perfect, many companies are exploring using both quantum and classical computers side-by-side. This class of algorithms is called “hybrid classic/quantum algorithms”.

Hybrid quantum computing algorithms: why are they attractive today?

Quantum computers are great, but they are not the solution to everything. One reason is that classical computers might be better for certain tasks, such as reading data from external storage, communicating over existing networks, or just running the endless variety of programs that run well enough on classical computers. In those cases, one could build on the CPU/GPU analogy. The GPU — a graphical processing unit — is a very useful co-processor to a general CPU. Similarly, a QPU — the quantum processing unit — could be a fantastic processor alongside a classical CPU.

Quantum computers today are not as stable as we would like. Whether because of temperature changes, vibrations, or external interference, quantum computers are limited in how long they can sustain a calculation. As a result, quantum information scientists modify the algorithms — sometimes quite extensively — to work in a hybrid fashion. Examples of quantum algorithms that are hybrid algorithms are VQE (Variational Quantum Eigensolver) and QAOA (Quantum Approximate OptimizationAlgorighm). These algorithms operate in a ‘generate/solve’ loop, which goes something like the following:

As you can see, part of the calculation (yellow blocks) is done using classical computers and part (green blocks) are done via the quantum computer.

Are there hybrid quantum software packages for AI?

Yes. Quantum computing artificial intelligence hybrids are becoming increasingly popular, and our platform offers similar opportunities to create hybrid circuits. Learning packages such as Google Tensorflow have released quantum computing extensions to allow quantum computers to be used alongside existing CPU/GPU combinations. According to Google, they deliver the following key functions:

  • Prepare a quantum dataset. The data set needs to be encoded in tensors (multi-dimensional array of numbers that fit the number of qubits). Qubits need to be initialized to specific values, and this initialization is also done by creating a quantum circuit. 
  • Evaluate a quantum neural network model - The researcher can prototype a quantum neural network. Quantum models are often parameterized (as is in the case of quantum optimization algorithms like QAOA and VQE). The goal of the model is to perform quantum computations in order to extract information hidden in a typically entangled state, making it accessible to local measurements and classical post-processing.
  • Measure - at the end of a quantum processing circuit, measurements (also referred to as sampling) need to take place. Measurements convert the state of qubits into classical numbers that classical code can then use to optimize the quantum circuit. Because qubits are often in a superposition of states, multiple measurements need to take place in order to approximate the value of a qubit. For a simplistic example, consider a single qubit that has an 80% probability of being in state “0” and 20% probability of being in state “1”. A single measurement will result in “0” or a “1” but only if we conduct hundreds of thousands of measurements, will we be able to see that in about 80% of the measurements we get a “0”.
  • Evaluate a classical neural networks model - Once the measurement has taken place, it can be used in classical post-processing. Classical deep neural networks can be applied to distill correlations between measured expectations.
  • Evaluate the cost function - The cost function could be based on how accurately the model performs the classification task or any other criteria that the user wishes to maximize or minimize.
  • Update the model parameters - After evaluating the cost function, the free parameters in the pipeline should be updated to optimize the cost. 

This entire process is depicted in the following diagram:

Above: A high-level abstract overview of the computational steps involved in the end-to-end pipeline for inference and training of a hybrid quantum-classical discriminative model for quantum data in TensorFlow quantum.

Quantum computers for AI: What are the limitations?

But alongside the exciting promise of quantum computing for AI, one must be aware of the realities and current limitations of quantum computing.

What are the important limitations of quantum computing as it relates to AI?

Quantum computers today offer a limited number of qubits

Today’s computers have only a limited number of qubits. While the number of qubits is not the only measure of the capability of quantum computers (other important measures include coherence time, qubit fidelity, and connectivity), it is a good first approximation. This is similar to using horsepower as an approximation of the capability of a car. Practically any quantum program that uses 50 qubits or less can be simulated on a classical computer (which is cheaper, more accessible, and easier to use). But, as quantum computers grow in scale and capability, it will no longer be possible to simulate sophisticated quantum circuits on classical computers. Instead, they will need to be executed on actual quantum hardware. Product roadmaps from companies like IBM, Honeywell, and many others, predict hundreds or even thousands of qubits in the coming years, leading to a growing performance chasm in favor of quantum computers.

Programming a quantum computer is hard

Quantum programming requires a different way of thinking than classical programming. Most quantum development environments today operate at the gate level, meaning that programmers have to almost manually specify the “wiring” between the qubits and the quantum gates that perform actions on them. At some level, this is similar to the process of creating electronic circuits: wires connect to logic gates that, in turn, connect to other logic gates. While this manual approach might be practical for a handful of qubits, it does not scale well to hundreds of thousands of them. Fortunately, programming platforms such as Classiq’s that provide higher-level abstractions are becoming available, allowing AI engineers to specify the desired functionality at a high level of abstraction and then let a computer program synthesize a quantum circuit from it.

Quantum-proficient talent is hard to find

Programming a quantum computer today assumes a high level of expertise, essentially Ph.D.-level knowledge of quantum information science. While universities are ramping up quantum education curricula, qualified and experienced quantum software engineers are hard to come by. While outsourcing quantum development is an option, many organizations feel that quantum is a strategic technology and that it is important to develop internal competencies. This is also an area where new development platforms make quantum more accessible to domain-specific experts (such as those in finance, logistics, material sciences, and of course, AI and machine learning) without requiring a deep understanding of quantum physics. Without appropriate talent solutions or better programming environments, it will be difficult to realize the potential of quantum computing for AI.

Quantum Computers are incompatible with one another

Quantum computers from different manufacturers are not compatible. They do not use the exact same gates (akin to available instruction sets). They don’t have the same number of qubits. The qubits are not connected to each other in the same way. This poses an entirely new set of issues than those that we are used to in classical computers. For instance, IT managers can safely assume that code running on a Lenovo notebook will run on a Dell notebook, but they cannot make the same assumptions for quantum computers. Customers regularly tell us that they are not yet ready to commit to one hardware vendor because they are unsure who will emerge as the winner of the hardware race. Thus, organizations often look for development platforms that harmonize or abstract the hardware and make it easy to port algorithms from one computer to another. Additionally, enterprises often prefer to use quantum cloud providers (such as Amazon Braket or Azure Quantum) because these providers carry several types of quantum computers and make experimentation much easier.

What is the future of quantum computing for artificial intelligence?

Customers understand that quantum computing can deliver a strategic impact on their business, but they realize that it might take a couple of years for that impact to materialize. Having said that, enterprises understand that now is the time to take these first steps into the quantum world, build internal expertise, identify early use cases, and perform short proof of concepts, so that they do not lag behind those that mastered quantum machine learning and AI when the hardware and software live up to the immense promise of quantum.

Quantum computers have a bright future alongside classical ones to push artificial intelligence ahead. In the future, it may be that quantum computers can be used to perform most of the learning and inference of AI, but users need to be aware of the current and future limitations and prepare an appropriate development toolset to achieve their goals.

Want to get started? upgrade your quantum journey with our Quantum Algorithm Design platform.

 

 

 

What does Quantum Computing Mean for AI?

Quantum computing and its application to AI have made dramatic progress in recent years — from Google’s quantum supremacy experiment to public market activities and product roadmap announcements — have generated justified excitement coupled with a splash of caution in the machine learning and AI community. Will quantum computers help AI and usher in a QML (quantum machine learning) revolution? How soon will this happen? What should forward-thinking executives do to plan for that day responsibly?

Why are quantum computers interesting?

Quantum computers use qubits (quantum bits) instead of regular bits. While qubits are much more difficult to produce, stabilize and scale these days, qubits bring with them two intrinsically unique capabilities that stem from quantum mechanics: — superposition and entanglement. Superposition allows a qubit to hold multiple values at once (with different probabilities). Entanglement allows multiple qubits to be interconnected in a way that expands the dimensionality of the problem. While 10 classical bits can hold a single value out of 1024 possible values at any given time, 10 qubits can hold all these 1024 values simultaneously. A 50-qubit quantum computer can hold and process over a quadrillion values at the same time, whereas a classical computer can process only one such value at any given time. For context, a quadrillion is about 50 times the number of red blood cells in the body. 

Quantum computers are programmed differently than classical computers. Quantum code resembles electronic design: connecting qubits with quantum gates that operate on them. When algorithms are appropriately coded in ‘quantum speak,’ quantum computers can potentially create dramatic and exponential speed improvement over their classical counterparts. 50-qubit quantum computers are now a reality, and as quantum computers with hundreds or even thousands of qubits come online, the exponential increase in capacity will quickly leave classical computers in the dust.

If we can overcome the difficulty of creating quantum computers, data scientists can use this dramatic speedup to find new insights in AI/ML algorithms and advance AI to new heights. In short, quantum computers hold the potential to revolutionize AI. Quantum AI is possible and quantum computers can be used for AI, but organizations need to be aware of pitfalls and limitations, as described below.

What are the benefits of using quantum computing for AI?

Quantum computers are not easy to use but offer significant incentives for using them in artificial intelligence and machine learning applications:

Quantum heuristics

Quantum computing heuristics behave differently from classical heuristics. Many classical machine learning and AI algorithms have been empirically shown to work but lack theoretical proof of their effectiveness. An inquisitive AI and machine learning engineer would be justified in trying quantum heuristics. Perhaps quantum computers could produce better results? Perhaps they would succeed in instances where classical heuristics do not meet expectations. Quantum computers could provide another arrow in the metaphorical quiver.

Quantum computers can compactly represent data

Quantum computers can load data in an exponentially more compact way. Not only does the superposition property of qubits allows them to hold multiple values simultaneously, but these values can be assigned different weights.  Many AI and machine learning packages explore solutions in a multi-dimensional space, and thus it could be easier to model these large spaces and load data into them on quantum computers. Indeed, it might be possible to model certain problems on quantum computers that could not be modeled on classical computers.

Quantum computers offer algorithmic speedup

One of quantum computing’s most popular algorithms is the Harrow, Hassidim, Lloyd (HHL) algorithm. It delivers a proven exponential acceleration in solving linear systems of equations. Linear systems of equations are used extensively in least-squares linear regression and Gaussian processes, and solving them exponentially faster relative to classical computers is very valuable.

Another popular quantum algorithm is the Grover search, which allows efficient searches in unstructured data sets, delivering a proven speedup over classical searches. For instance, if a classical search algorithm completes the search on a given data set in a certain amount of time, that time will increase four-fold if the size of the data set increases four-fold. In contrast, the time to perform a Grover search would double – instead of a four-fold increase – with every four-fold increase in the size of the data set.

These are just two examples of quantum algorithms that offer speedup. The exact speedup is different from one quantum algorithm to another, but the fact that certain algorithms can execute much faster on quantum computers offers hope to make certain algorithmic operations move from impractical to practical.

Quantum computers can discover new data patterns

Quantum computers produce new types of data patterns. This leads to the hope of identifying these patterns by using reverse algorithms (e.g. algorithms that were reverse-engineered by observing their behavior).

Can quantum computers be used alongside classical computers for AI?

In a few years, when we’ll have quantum computers with numerous high-quality qubits, there will still be tasks that will be better performed with classical computers. That’s why even today, when quantum computers are far from perfect, many companies are exploring using both quantum and classical computers side-by-side. This class of algorithms is called “hybrid classic/quantum algorithms”.

Hybrid quantum computing algorithms: why are they attractive today?

Quantum computers are great, but they are not the solution to everything. One reason is that classical computers might be better for certain tasks, such as reading data from external storage, communicating over existing networks, or just running the endless variety of programs that run well enough on classical computers. In those cases, one could build on the CPU/GPU analogy. The GPU — a graphical processing unit — is a very useful co-processor to a general CPU. Similarly, a QPU — the quantum processing unit — could be a fantastic processor alongside a classical CPU.

Quantum computers today are not as stable as we would like. Whether because of temperature changes, vibrations, or external interference, quantum computers are limited in how long they can sustain a calculation. As a result, quantum information scientists modify the algorithms — sometimes quite extensively — to work in a hybrid fashion. Examples of quantum algorithms that are hybrid algorithms are VQE (Variational Quantum Eigensolver) and QAOA (Quantum Approximate OptimizationAlgorighm). These algorithms operate in a ‘generate/solve’ loop, which goes something like the following:

As you can see, part of the calculation (yellow blocks) is done using classical computers and part (green blocks) are done via the quantum computer.

Are there hybrid quantum software packages for AI?

Yes. Quantum computing artificial intelligence hybrids are becoming increasingly popular, and our platform offers similar opportunities to create hybrid circuits. Learning packages such as Google Tensorflow have released quantum computing extensions to allow quantum computers to be used alongside existing CPU/GPU combinations. According to Google, they deliver the following key functions:

  • Prepare a quantum dataset. The data set needs to be encoded in tensors (multi-dimensional array of numbers that fit the number of qubits). Qubits need to be initialized to specific values, and this initialization is also done by creating a quantum circuit. 
  • Evaluate a quantum neural network model - The researcher can prototype a quantum neural network. Quantum models are often parameterized (as is in the case of quantum optimization algorithms like QAOA and VQE). The goal of the model is to perform quantum computations in order to extract information hidden in a typically entangled state, making it accessible to local measurements and classical post-processing.
  • Measure - at the end of a quantum processing circuit, measurements (also referred to as sampling) need to take place. Measurements convert the state of qubits into classical numbers that classical code can then use to optimize the quantum circuit. Because qubits are often in a superposition of states, multiple measurements need to take place in order to approximate the value of a qubit. For a simplistic example, consider a single qubit that has an 80% probability of being in state “0” and 20% probability of being in state “1”. A single measurement will result in “0” or a “1” but only if we conduct hundreds of thousands of measurements, will we be able to see that in about 80% of the measurements we get a “0”.
  • Evaluate a classical neural networks model - Once the measurement has taken place, it can be used in classical post-processing. Classical deep neural networks can be applied to distill correlations between measured expectations.
  • Evaluate the cost function - The cost function could be based on how accurately the model performs the classification task or any other criteria that the user wishes to maximize or minimize.
  • Update the model parameters - After evaluating the cost function, the free parameters in the pipeline should be updated to optimize the cost. 

This entire process is depicted in the following diagram:

Above: A high-level abstract overview of the computational steps involved in the end-to-end pipeline for inference and training of a hybrid quantum-classical discriminative model for quantum data in TensorFlow quantum.

Quantum computers for AI: What are the limitations?

But alongside the exciting promise of quantum computing for AI, one must be aware of the realities and current limitations of quantum computing.

What are the important limitations of quantum computing as it relates to AI?

Quantum computers today offer a limited number of qubits

Today’s computers have only a limited number of qubits. While the number of qubits is not the only measure of the capability of quantum computers (other important measures include coherence time, qubit fidelity, and connectivity), it is a good first approximation. This is similar to using horsepower as an approximation of the capability of a car. Practically any quantum program that uses 50 qubits or less can be simulated on a classical computer (which is cheaper, more accessible, and easier to use). But, as quantum computers grow in scale and capability, it will no longer be possible to simulate sophisticated quantum circuits on classical computers. Instead, they will need to be executed on actual quantum hardware. Product roadmaps from companies like IBM, Honeywell, and many others, predict hundreds or even thousands of qubits in the coming years, leading to a growing performance chasm in favor of quantum computers.

Programming a quantum computer is hard

Quantum programming requires a different way of thinking than classical programming. Most quantum development environments today operate at the gate level, meaning that programmers have to almost manually specify the “wiring” between the qubits and the quantum gates that perform actions on them. At some level, this is similar to the process of creating electronic circuits: wires connect to logic gates that, in turn, connect to other logic gates. While this manual approach might be practical for a handful of qubits, it does not scale well to hundreds of thousands of them. Fortunately, programming platforms such as Classiq’s that provide higher-level abstractions are becoming available, allowing AI engineers to specify the desired functionality at a high level of abstraction and then let a computer program synthesize a quantum circuit from it.

Quantum-proficient talent is hard to find

Programming a quantum computer today assumes a high level of expertise, essentially Ph.D.-level knowledge of quantum information science. While universities are ramping up quantum education curricula, qualified and experienced quantum software engineers are hard to come by. While outsourcing quantum development is an option, many organizations feel that quantum is a strategic technology and that it is important to develop internal competencies. This is also an area where new development platforms make quantum more accessible to domain-specific experts (such as those in finance, logistics, material sciences, and of course, AI and machine learning) without requiring a deep understanding of quantum physics. Without appropriate talent solutions or better programming environments, it will be difficult to realize the potential of quantum computing for AI.

Quantum Computers are incompatible with one another

Quantum computers from different manufacturers are not compatible. They do not use the exact same gates (akin to available instruction sets). They don’t have the same number of qubits. The qubits are not connected to each other in the same way. This poses an entirely new set of issues than those that we are used to in classical computers. For instance, IT managers can safely assume that code running on a Lenovo notebook will run on a Dell notebook, but they cannot make the same assumptions for quantum computers. Customers regularly tell us that they are not yet ready to commit to one hardware vendor because they are unsure who will emerge as the winner of the hardware race. Thus, organizations often look for development platforms that harmonize or abstract the hardware and make it easy to port algorithms from one computer to another. Additionally, enterprises often prefer to use quantum cloud providers (such as Amazon Braket or Azure Quantum) because these providers carry several types of quantum computers and make experimentation much easier.

What is the future of quantum computing for artificial intelligence?

Customers understand that quantum computing can deliver a strategic impact on their business, but they realize that it might take a couple of years for that impact to materialize. Having said that, enterprises understand that now is the time to take these first steps into the quantum world, build internal expertise, identify early use cases, and perform short proof of concepts, so that they do not lag behind those that mastered quantum machine learning and AI when the hardware and software live up to the immense promise of quantum.

Quantum computers have a bright future alongside classical ones to push artificial intelligence ahead. In the future, it may be that quantum computers can be used to perform most of the learning and inference of AI, but users need to be aware of the current and future limitations and prepare an appropriate development toolset to achieve their goals.

Want to get started? upgrade your quantum journey with our Quantum Algorithm Design platform.

 

 

 

About "The Qubit Guy's Podcast"

Hosted by The Qubit Guy (Yuval Boger, our Chief Marketing Officer), the podcast hosts thought leaders in quantum computing to discuss business and technical questions that impact the quantum computing ecosystem. Our guests provide interesting insights about quantum computer software and algorithm, quantum computer hardware, key applications for quantum computing, market studies of the quantum industry and more.

If you would like to suggest a guest for the podcast, please contact us.

See Also

No items found.

Start Creating Quantum Software Without Limits

contact us