qrisp.QuantumCircuit.mcx#

QuantumCircuit.mcx(control_qubits, target_qubits, method='gray', ctrl_state=-1)[source]#

Instruct a multi-controlled X-gate.

Parameters:
control_qubitslist

The list of Qubits to control on.

target_qubitsQubit

The target Qubit.

methodstr, optional

The algorithm to synthesize the mcx gate. The default is “gray”.

ctrl_statestr or int, optional

The state on which the X gate is activated. Can be supplied as a string (i.e. “010110…”) or an integer. The default is all ones (“11111…”).