Quantum Errors and Noise

from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit_aer import AerSimulator
from qiskit.visualization import plot_histogram
/Users/butlerju/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
# Create the Bell State
q = QuantumRegister(2)
c = ClassicalRegister(2)
circuit = QuantumCircuit(q, c)

# Add a H gate on qubit 0
circuit.h(0)

# Add a CX (CNOT) gate on control qubit 0 and target qubit 1
circuit.cx(0, 1)

# Map the quantum measurement to the classical bits
circuit.measure(range(2), range(2))

circuit.draw("mpl")

# Simulate the Bell State as normal, with no noise
simulator = AerSimulator()
results = simulator.run(circuit).result().get_counts()
plot_histogram(results)

# Construct a simulator using a noise model from a real backend.
provider = QiskitRuntimeService(channel="ibm_quantum", token="fbc77e68310da5c90990728b892ef5e327787a28a126ad837f8fb88280922284da2784a01e90dc9ccd3be7d48bbe76ca0b8375ac0d3f0f312b1e19da181a18ed")
backend = provider.get_backend("ibm_brisbane")
aersim_backend = AerSimulator.from_backend(backend)
# Perform noisy simulation
results = aersim_backend.run(circuit).result().get_counts()
plot_histogram(results)