Tutorials
qcr:2606.97883.1

Simulating Noisy Circuits in Cirq

Real quantum hardware is noisy, so being able to model and simulate the effects of noise is essential for predicting how an algorithm will actually perform and for developing error-mitigation and error-correction techniques. This Cirq tutorial demonstrates how to add noise to a circuit and simulate the resulting mixed-state dynamics using the ConstantQubitNoiseModel, which applies the same single-qubit noise channel (such as depolarizing or bit-flip noise) uniformly after every operation in the circuit. The example shows the full workflow: building an ideal circuit, wrapping it with a noise model so that each gate is followed by the chosen error channel, and running it on a density-matrix simulator that tracks the full mixed state rather than a pure state vector. It then reads back the noisy measurement statistics, letting you compare the degraded results against the ideal, noiseless outcome and see how quickly errors accumulate with circuit depth. It is a practical, beginner-friendly introduction to noise modeling in Cirq, the foundation for studying realistic device behavior, benchmarking error rates, and prototyping the error-mitigation strategies that near-term quantum computing depends on.
Qubit
Circuit-based
Uploaded 2 days ago
9
Views
GitHub4990
Citing this entry? Use this QCR ID
Uploaded by
QL
QCR Librarian

Overview

quantumlib/Cirq
49901228
README.md

Simulating Noisy Circuits in Cirq

Real quantum hardware is noisy, so being able to model and simulate the effects of noise is essential for predicting how an algorithm will actually perform and for developing error-mitigation and error-correction techniques. This Cirq tutorial demonstrates how to add noise to a circuit and simulate the resulting mixed-state dynamics using the ConstantQubitNoiseModel, which applies the same single-qubit noise channel (such as depolarizing or bit-flip noise) uniformly after every operation in the circuit. The example shows the full workflow: building an ideal circuit, wrapping it with a noise model so that each gate is followed by the chosen error channel, and running it on a density-matrix simulator that tracks the full mixed state rather than a pure state vector. It then reads back the noisy measurement statistics, letting you compare the degraded results against the ideal, noiseless outcome and see how quickly errors accumulate with circuit depth. It is a practical, beginner-friendly introduction to noise modeling in Cirq, the foundation for studying realistic device behavior, benchmarking error rates, and prototyping the error-mitigation strategies that near-term quantum computing depends on.

Run it

pip install -r requirements.txt
python noisy_simulation_example.py

Source and license

Imported from examples/noisy_simulation_example.py in quantumlib/Cirq at v1.6.1, under the Apache License 2.0. Original authors: The Cirq Developers. The upstream LICENSE is included alongside this example.

Join the Discussion

Comments (0)

No comments yet. Be the first to share your thoughts!

Indexed by QCR Librarian

This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.

Versions

v1 Latest
Jun 16, 2026
qcr:2606.97883.1

Cite all versions? Use the base QCR ID to always reference the latest version of this entry.

Tools used

Cirq

Keywords

noise
density-matrix
noise-model
simulation
error-channels

You may also like5