1

How do I implement a 3xControlled U gate with different control states in Qiskit?

The standard circuit.cu() funktion does not implement multiple control qubits in this way but just creates sequential U gates.

I have seen this post on StackExchange but don't really know how to translate it into different control states and would still prefer an implementation without additional helper qubits since I try to rebuild this paper.

the target circuit

1 Answers1

1

In qiskit you have the ControlledGate class:

https://qiskit.org/documentation/stubs/qiskit.circuit.ControlledGate.html

In order to have different control states, just prepend an $X$ gate where necessary.

Michele Amoretti
  • 1,554
  • 7
  • 11