Test the quantum codes

Hi everyone, I have a question: how can a quantum computer be simulated on a normal computer to test quantum codes?

Hi @AndrewScu, welcome to the Forum!

There are different kinds of simulators and they work differently depending on what they’re trying to simulate.

PennyLane simulates the result of running a computation on a quantum computer. So it doesn’t simulate the physical processes happening inside the computer, it simulates the math behind the computer. In fact, most devices in PennyLane simulate computers that don’t exist yet! They simulate fault-tolerant quantum computers, or computers with no errors.

So how does PennyLane simulate this math? The actions between quantum states and quantum gates can be simulated with linear algebra (matrices and vectors :smiling_face_with_sunglasses:), and the measurements are simulated by calculating the probabilities for the different outputs.

If you want to learn how to do quantum programming and quantum computing I encourage you to explore the PennyLane Codebook.

I hope this helps!

1 Like

Thank you very much, you helped me a lot💪🏻

1 Like