qiskit.circuit.library.MCXGate.get_num_ancilla_qubits¶

static MCXGate.get_num_ancilla_qubits(num_ctrl_qubits, mode='noancilla')[source]

Get the number of required ancilla qubits without instantiating the class.

This staticmethod might be necessary to check the number of ancillas before creating the gate, or to use the number of ancillas in the initialization.