Apply a single-qubit channel between in between two circuits in Qiskit

Suppose, you have two parts of a circuit in Qiskit, qc1 and qc2 on any number of qubits such that the entire circuit is given by

qc = qc1.compose(qc2)


For sake of concreteness, here is an example on 2 qubits:

qc1 = QuantumCircuit(2)
qc2 = QuantumCircuit(2)

qc1.h([0,1])
qc2.x(0)


I want to apply a single-qubit channel on the first qubit, say a depolarizing one, in between qc1 and qc2 and then simulate the whole circuit using qiskit. That is, after qc1 and before qc2. After having looked at the Qiskit Aer noise module, my idea would be to introduce a noisy version of an identity gate between the two circuits qc1 and qc2. How to do this?

• Good question! At least according to the documentation, a noise model applies to an execution and not to a specific piece of a circuit. qiskit.org/documentation/apidoc/aer_noise.html Dec 1, 2022 at 19:26
• Are you open to a classical Monte Carlo like simulation where you execute the circuit again and again? Then you could introduce a u3 gate in between (on a specific qubit) and sample the gate parameters from a distribution of your choice.
– Sam
Dec 6, 2022 at 1:55
• Thanks for the comment. What you describe is precisely the workaround that I am using at the moment. I just find it extremely annoying that I have to manually implement the effect of the noise myself when there is a noise module. I am looking for an answer that is native to qiskit. Dec 6, 2022 at 8:50
• You could do something like qiskit.org/documentation/tutorials/simulators/… with a u3 gate. Dec 7, 2022 at 14:33
• @RKRupesh could you come up with some example code? Dec 8, 2022 at 10:55