# Implementing Readout Error in my circuit seems to have no effect whatsoever

I am trying to perform a simulation using Qasm in order to see how the readout error actually affects my circuit. The circuit I am implementing is a trivial one, the three qubit one that implements the GHZ state: https://qiskit.org/documentation/tutorials/circuits/01_circuit_basics.html

Below I attach the code:

import numpy as np
from qiskit import QuantumCircuit

circ = QuantumCircuit(3)
circ.h(0)
circ.cx(0, 1)
circ.cx(0, 2)
# Create a Quantum Circuit
meas = QuantumCircuit(3, 3)
meas.barrier(range(3))
# map the quantum measurement to the classical bits
meas.measure(range(3), range(3))

# The Qiskit circuit object supports composition.
# Here the meas has to be first and front=True (putting it before)
# as compose must put a smaller circuit into a larger one.
qc = meas.compose(circ, range(3), front=True)

#drawing the circuit
qc.draw('mpl');


Next, I create the Readout Error model:

from qiskit.providers.aer.noise import NoiseModel

# Create noise model

# Create the readout error matrix

P = np.array([[0.9,0.02,0.02,0.02,0.02,0.01,0.01,0.0],
[0.02,0.9,0.02,0.02,0.02,0.01,0.01,0.0],
[0.02,0.02,0.9,0.02,0.02,0.01,0.01,0.0],
[0.02,0.02,0.02,0.9,0.02,0.01,0.01,0.0],
[0.02,0.02,0.02,0.02,0.9,0.01,0.01,0.0],
[0.02,0.02,0.02,0.01,0.01,0.9,0.01,0.01],
[0.01,0.02,0.02,0.02,0.03,0.04,0.84,0.02],
[0.02,0.02,0.02,0.02,0.04,0.04,0.04,0.8]])



And now run the simulation:

from qiskit import transpile
from qiskit.providers.aer import AerSimulator

backend = AerSimulator()

# First we have to transpile the quantum circuit
# to the low-level QASM instructions used by the
# backend
qc_compiled = transpile(qc, backend)

# Execute the circuit on the qasm simulator.
# We've set the number of repeats of the circuit
# to be 1024, which is the default.

# Grab the results from the job.

result_sim = job_sim.result()
counts = result_sim.get_counts(qc_compiled)
print(counts)


And obtain the histogram:

from qiskit.visualization import plot_histogram
plot_histogram(counts);


Now, without noise I would expect indeed, as in the Qiskit link provided, that about 50% of the times I get the first state and about 50% the other one. For example something like this:

However, I would assume that since I am biasing the noise (observe the last two or three rows of the P matrix) I should get slightly offset result. I do not seem to get offset results favoring the $$|000\rangle$$ state for example (of the opposite).

My questions are:

1. Is my Readout Error properly implemented?
2. How can I force a bias in such a circuit?

Replace

meas.measure(range(3), range(3))


with:

meas.append(Instruction("measure", 3, 3, []), range(3), range(3))


This makes a custom measurement instruction that measures the 3 qubits together, as per https://github.com/Qiskit/qiskit-aer/issues/319.

After doing this, you will find it both favors 000 over 111 and also there will be sporadic instances of the other computational basis states: