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?
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
evolution_op = mcx_op.exp_i()