I am trying to exponentiate a multi-controlled NOT gate (MCX) via .exp_i() function for trotterization in Qiskit , but I cannot find such a gate represented in opflow. Is there a convenient way around it?


1 Answer 1


MCXGate exists in Qiskit's circuit library. So, you can get the operator as follows:

from qiskit.circuit.library import MCXGate
from qiskit.opflow import CircuitOp

num_ctrl_qubits = 3
ctrl_state = '111' # Optionally, set the control state
gate = MCXGate(num_ctrl_qubits, ctrl_state = ctrl_state)
mcx_op = CircuitOp(gate)

Now, you may call exp_i()

evolution_op = mcx_op.exp_i()

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.