1
$\begingroup$

Let's say the definition of an erroneous CNOT gate is given as - CNOT is a 2-qubit quantum gate when the control qubit is at state 0, applies identity operation on the target qubit, when the control qubit is at state 1, applies NOT operation on the target with probability 𝑝 and applies identity operation on the target with probability 1−𝑝.

Was trying to solve it via CU gate for p=0.81 and trying to calculate the parameters but I'm arriving at an incorrect answer. Any insights on how can I solve it?

$\endgroup$

1 Answer 1

0
$\begingroup$

tl;dr: The operation you're describing is not unitary and cannot be implemented with a CU gate.


A standard CX gate implements the operation

$$ CX = |0\rangle\langle 0| \otimes \mathbb{1} + |1\rangle\langle 1| \otimes X $$

This is a unitary operation, since $CX^\dagger CX = \mathbb{1} \otimes \mathbb{1}$. The erroneous CX you describe above would perform the operation

$$ CX_{err} = |0\rangle\langle 0| \otimes \mathbb{1} + |1\rangle\langle 1| \otimes \left((1-p)\mathbb{1} + pX\right) $$

We can check if this is unitary by computing

$$ CX_{err}^\dagger CX_{err} = ... = |0\rangle\langle 0| \otimes \mathbb{1} + |1\rangle\langle 1| \otimes \left((p^2 + (1-p)^2)\mathbb{1} + 2p(1-p)X\right) \neq \mathbb{1} \otimes \mathbb{1} $$

The CU gate is a unitary operation and can therefore not be used to implement $CX_{err}$.

$\endgroup$
4
  • $\begingroup$ sorry I edited the question, the p is 0.81 $\endgroup$
    – codeit
    Nov 5, 2023 at 9:36
  • $\begingroup$ This operation is not unitary, except p=0 :) $\endgroup$
    – Cryoris
    Nov 5, 2023 at 9:39
  • $\begingroup$ Got it is it possible via some other gate or methodology in qiskit? $\endgroup$
    – codeit
    Nov 5, 2023 at 13:41
  • $\begingroup$ Since it's not a unitary operation, you can represent it using a quantum channel on a density matrix. You could e.g. use the Kraus operators (qiskit.org/documentation/stubs/qiskit.quantum_info.Kraus.html) and write your operation as sum of two A-matrices. $\endgroup$
    – Cryoris
    Nov 7, 2023 at 10:41

Your Answer

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

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