1
$\begingroup$

enter image description here

I want to decompose an 8-control qubit gate like the one in the picture on the right using Qiskit, similar to the decomposition shown. To do this, I need a C7XGate for 7 control bits, but it seems that Qiskit only supports up to a C4XGate. What should I do?

$\endgroup$

1 Answer 1

2
$\begingroup$

For multi-controlled X gate, use Qiskit's class MCXGate which can be added to your circuit as follows:

circ.mcx(range(7), 7)
$\endgroup$
1
  • $\begingroup$ I got it! Thank you sir $\endgroup$
    – junghyunHa
    Commented May 2 at 5:23

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.