-1
$\begingroup$

Can we create a Controlled gate with below functionality?

if {a==|1> && b==|1>} then {qc.x(b)}

Basically, a CCX gate but the output Qubit is actually one of the input Qubits. Apparently, In ccx/mct repetition isn't allowed!

Please do let me know. TIA!

$\endgroup$
2
$\begingroup$

No, you can't do that. It wouldn't be reversible. It sends both a=1,b=1 and a=1,b=0 to a=1,b=0.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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