Why Simulate?

This entire chapter will be dedicated to simulating quantum computers and their functionality on traditional/classical computers. Let's see why.

We'll cover the following

This is the last step before we introduce you to practical quantum algorithms. While other courses do not specifically go over this exercise of building your own quantum computing simulator, this is one of the best ways to understand quantum computing and its mathematics.

Credits: While studying quantum computing ourselves, we (the authors) solved the screening tasks for the QOSF Mentorship Program. Building one’s own quantum computing simulator was one of the tasks we solved and found especially useful and fun to code. The credits for the original idea and for setting the task go to the QOSF Mentorship Program.

Limited resources

Moreover, once we get to practical quantum algorithms, we’ll still use simulators from quantum computing libraries. That is for two reasons. First, the existing quantum computers of the NISQ-era are not perfect, so their results are not always accurate. Second, while many companies like IBM, AWS, and Google are beginning to connect their real quantum computers to the cloud, technology is still in its preliminary stages. Currently, jobs have to be queued for one of the quantum computers to return its results. This process can take a lot of time. It isn’t the best option in a learning environment, where rapid prototyping, debugging, and results are integral.

Furthermore, you need to have an account on the service provider’s website to run your jobs on these quantum computers. Tokens associated with that account are necessary for queuing a job. We feel that this added bulk might detract learners who want to quickly get into quantum computing with as little a barrier to entry as possible.

As such, we shall stick to simulators that mimic quantum computers on classical computers.

Just as a side note, simulating quantum computers is exceedingly difficult for large qubit counts. The following excerpt shows why:

Since qubits can exist in more states than just the traditional 0 and 1 of a bit, we can encode more information using them. In practice, it is possible to encode a classical bit using a qubit, but the converse is not true. You cannot encode a qubit of information in a classical transistor. Using bits, an n-component system can be encoded using n transistors. Only 88 stored bits are required to encapsulate an 88-bit classical system. If the nn-component systems were quantum instead, 2n2^n complex numbers would be required to encode it. By extension, encoding an 88-qubit quantum computer requires 256256 complex numbers. And to simulate 6464 qubits one will need 264=18,446,744,073,709,551,6162^{64}=18, 446, 744, 073, 709, 551, 616 complex numbers on a classical machine.

From: Knocking on Turing’s Door: Quantum Computing and Machine Learning

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy