# Test the quantum codes

**URL:** <https://discuss.pennylane.ai/t/test-the-quantum-codes/8314>\
**Category:** PennyLane Help\
**Created:** [March 24, 2025, 6:05pm UTC](https://discuss.pennylane.ai/t/test-the-quantum-codes/8314 "2025-03-24T18:05:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrewScu](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@AndrewScu](https://discuss.pennylane.ai/u/AndrewScu)\
**Post date:** [March 24, 2025, 6:05pm UTC](https://discuss.pennylane.ai/t/test-the-quantum-codes/8314/1 "2025-03-24T18:05:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![CatalinaAlbornoz](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/catalinaalbornoz/32/1196_2.png) [@CatalinaAlbornoz](https://discuss.pennylane.ai/u/CatalinaAlbornoz)\
**Post date:** [March 24, 2025, 8:36pm UTC](https://discuss.pennylane.ai/t/test-the-quantum-codes/8314/2 "2025-03-24T20:36:02Z")

</div>

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](https://pennylane.ai/) 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 😎), 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](https://pennylane.ai/codebook).

I hope this helps!

---

<div class="post-metadata">

**Author:** ![AndrewScu](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@AndrewScu](https://discuss.pennylane.ai/u/AndrewScu)\
**Post date:** [March 25, 2025, 11:10pm UTC](https://discuss.pennylane.ai/t/test-the-quantum-codes/8314/3 "2025-03-25T23:10:02Z")

</div>

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