I'm trying to understand how the noise model works in Qiskit Aer noise simulator. From this information page, add_all_qubit_quantum_error()
has two required arguments: param
, which specifies the noise strength, and instructions
, which is ' the instructions error applies to'.
For 1-qubit noise, I noticed the general way to produce a noise model (say the depolarization channel) is
error_1 = depolarizing_error(0.1, 1)
depolarizing_model.add_all_qubit_quantum_error(error_1, ['u1', 'u2', 'u3'])
What is the appropriate instruction for 2-qubit circuits? Should I use the following code?
error_2 = depolarizing_error(0.1, 2)
depolarizing_model.add_all_qubit_quantum_error(error_2, ['cx'])
I also noticed if I add any random instructions to the list, like
depolarizing_model.add_all_qubit_quantum_error(error_2, ['cx','ww','yz1'])
It seems like the noise simulation still works. What is the appropriate way to build a noise model for a 2-qubit circuit? Which kind of instructions should I use?
Thanks!!