Blog

When Quantum and Classical play together

25
May
,
2021
Nir Minerbi

Playing Angry Birds on a quantum computer? probably a bad idea. But embedding classical logic in a quantum circuit is a crucial step towards useful quantum algorithms. Let’s dive deeper.

Hypothetically speaking, would it be possible to conduct a Zoom call on a quantum computer?

Theoretically, YES. Since classical logic can be implemented by quantum logic (i.e — NAND gates could be translated into Toffoli gates), every classical program could be executed on a quantum computer

Practically — it’s a poor idea. In most cases, classical computers are much more efficient than quantum computers in processing classical logic. Thus, running Zoom on a quantum machine will result in a disappointing user experience. Quantum computers have an advantage when there is an algorithmic quantum speedup. These are very important, but currently rare, cases.

But here is where it gets interesting: sometimes, embedding classical logic within a quantum algorithm, is a necessary step in our way to a useful quantum circuit that could bring a real advantage.

Classical logic is an inherent part of some of the most useful quantum algorithms, such as creating complex oracles in a Grover search, embedding classical wisdom in a VQE ansatz, or comparing asset price to a benchmark when calculating option pricing using the amplitude estimation algorithm.

Over time, the development of quantum algorithms will accelerate, and classical logic embedded in a quantum circuit will play a crucial role. However, there is a risk that such embedded logic might also become a significant bottleneck.

Let’s explore this further. Imagine designing a classical circuit that executes a simple logic function at the gate level, and doing so without using an abstraction language such as VHDL. If you succeed, it might look like this -

However, if you used a high-level language, it becomes much more manageable effort, such as:

If designing such a classical circuit with no abstraction language is difficult, it is practically impossible to design — without an abstraction language — a quantum circuit that applies the same classical logic. For example, here’s a real quantum circuit that implements the simple operation of a² — b², on two small quantum registers:

Such a circuit would be nearly impossible to design at the gate level. How did I do it? It was synthesized from a high-level model using the Classiq platform, and you can see the code below.

I could not have designed it without automatic synthesis, and definitely couldn’t design more complex, large-scale quantum circuits, applying classical logic. Moreover, this circuit would just be a part of a larger, more complex circuit that performs other functions. A platform like Classiq not only makes it possible to design previously impossible circuits but also optimizes them in the context of the additional functionality that the designer wishes to implement.

Hybrid quantum/classic circuits are here to stay. Having such synthesis tools that allow the implementation of the desired logic is a major and critical step in our ability to safely say we are prepared for the quantum future.

Playing Angry Birds on a quantum computer? probably a bad idea. But embedding classical logic in a quantum circuit is a crucial step towards useful quantum algorithms. Let’s dive deeper.

Hypothetically speaking, would it be possible to conduct a Zoom call on a quantum computer?

Theoretically, YES. Since classical logic can be implemented by quantum logic (i.e — NAND gates could be translated into Toffoli gates), every classical program could be executed on a quantum computer

Practically — it’s a poor idea. In most cases, classical computers are much more efficient than quantum computers in processing classical logic. Thus, running Zoom on a quantum machine will result in a disappointing user experience. Quantum computers have an advantage when there is an algorithmic quantum speedup. These are very important, but currently rare, cases.

But here is where it gets interesting: sometimes, embedding classical logic within a quantum algorithm, is a necessary step in our way to a useful quantum circuit that could bring a real advantage.

Classical logic is an inherent part of some of the most useful quantum algorithms, such as creating complex oracles in a Grover search, embedding classical wisdom in a VQE ansatz, or comparing asset price to a benchmark when calculating option pricing using the amplitude estimation algorithm.

Over time, the development of quantum algorithms will accelerate, and classical logic embedded in a quantum circuit will play a crucial role. However, there is a risk that such embedded logic might also become a significant bottleneck.

Let’s explore this further. Imagine designing a classical circuit that executes a simple logic function at the gate level, and doing so without using an abstraction language such as VHDL. If you succeed, it might look like this -

However, if you used a high-level language, it becomes much more manageable effort, such as:

If designing such a classical circuit with no abstraction language is difficult, it is practically impossible to design — without an abstraction language — a quantum circuit that applies the same classical logic. For example, here’s a real quantum circuit that implements the simple operation of a² — b², on two small quantum registers:

Such a circuit would be nearly impossible to design at the gate level. How did I do it? It was synthesized from a high-level model using the Classiq platform, and you can see the code below.

I could not have designed it without automatic synthesis, and definitely couldn’t design more complex, large-scale quantum circuits, applying classical logic. Moreover, this circuit would just be a part of a larger, more complex circuit that performs other functions. A platform like Classiq not only makes it possible to design previously impossible circuits but also optimizes them in the context of the additional functionality that the designer wishes to implement.

Hybrid quantum/classic circuits are here to stay. Having such synthesis tools that allow the implementation of the desired logic is a major and critical step in our ability to safely say we are prepared for the quantum future.

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