3

My question especially relates to the CNOT because I'd like to carefully understand how Qiskit simulate a CNOT model.

Specifically, from my understanding, two independent qubits are affected by a noise well modeled by i.i.d. pauli operators. This can be implemented with the pauli_error model to each qubit.

When it comes to the $CNOT$ I don't know if I can stil model it by tensoring the two wires, e.g.:

error = pauli_error([('I', 1 - 3*p), ('X', p), ('Y', p), ('Z', p)])
error = error.tensor(error)
noise_model.add_quantum_error(error, ['cx'], [i,j])

Or it is more appropriate to model it with the depolarizing_error method as follows:

error = depolarizing_error(p,2)
noise_model.add_quantum_error(error, ['cx'], [i,j])

If they are equivalent, the first one is better because the simulation runs much faster.

EDIT: To me, a noisy $CNOT$ gate can be modeled as a perfect $CNOT$ which mixes up i.i.d. operators through the wires -- according to propagation rules --. So at the end of the gate, the noise is mixed, but, it can still be expressed with i.i.d. Pauli operators.

Daniele Cuomo
  • 2,068
  • 10
  • 25

1 Answers1

3

Reading the documentation for depolarizing_error, they are not the same. Under two-qubit depolarizing noise the $X \otimes X$ error case is as likely as the $X \otimes I$ case, whereas if you instead apply two single-qubit depolarizing noise channels then $X \otimes X$ will be much less likely because it requires two simultaneous failures.

You can easily check this for yourself by applying depolarizing noise to the state $|00\rangle$ then measuring it and seeing how often you see the result $11$. It should be much higher for depolarizing_error(p, 2) than for pauli_error([('I', 1 - 3*p), ('X', p), ('Y', p), ('Z', p)]).tensor(pauli_error([('I', 1 - 3*p), ('X', p), ('Y', p), ('Z', p)])) especially as p becomes small (e.g. less than 1%).

I'm not sure why qiskit would be slower at applying a two-qubit depolarizing error channel than two applications of a custom-defined single qubit error channels. In stim it's the other way around.

Craig Gidney
  • 44,299
  • 1
  • 41
  • 116