3
$\begingroup$

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.

$\endgroup$

1 Answer 1

3
$\begingroup$

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.

$\endgroup$
6
  • $\begingroup$ Perhaps the point is that, due to propagation rules, an $X\otimes X$ is indeed as likely as $X\otimes I$ (with first qubit being the target). $\endgroup$ Jun 8, 2022 at 21:10
  • $\begingroup$ @DanieleCuomo Propagation rules just rearrange which cases are less likely. It doesn't fix the fact that they don't all have the same probability. $\endgroup$ Jun 8, 2022 at 21:16
  • $\begingroup$ No yes, not all. I meant that specific case. Assuming $X \sim p$, i.i.d. on the two wires. At the end of a $CNOT$ gate, the probability of $X\otimes X$ and $X\otimes I$ are equally likely ($p$), while $I\otimes X$ should be $p^2$. But maybe you meant that depolarizing_error just put all equally likely.. $\endgroup$ Jun 8, 2022 at 21:23
  • 1
    $\begingroup$ @DanieleCuomo Yes it just puts them all equally likely. The idea is that the qubits are coupled during the CNOT so noise tends to affect them both instead of just one. In practice you would find that certain terms are more likely, but which terms exactly would depend strongly on how the gate was implemented. Setting them all equal puts a lower bound of ~10x on how badly you can underestimate the effects of the noise, whereas setting some of them to p^2 means you could easily be off by ~1000x when it comes to comparing to practice. $\endgroup$ Jun 8, 2022 at 21:31
  • $\begingroup$ May I equivalently model the i.i.d by adding an identity noisy gate $I$ before each $CNOT$? Instead of tensoring the error for the $CNOT$ I mean. $\endgroup$ Jun 8, 2022 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.