Seems to be old code in Codercise I.13.4

Hi there! Hope you’re doing well.

It seems like the explanation preceding Codercise I.13.4 may contain old code.

It says to use 'qml.MultiControlledX(control_wires=[0, 1, 2], wires=4, control_values="001")`

but this gave me an error: Error: MultiControlledX.__init__() got an unexpected keyword argument 'control_wires'.

Using qml.MultiControlledX(wires=[0, 1, 2, 3], control_values=[0, 0, 1]) works.

Thanks!

Hi @PranavUpreti! Welcome to the forum.
Yes, you are definitely right about this. Thank you for reporting this.
I’ll correct it asap.

1 Like

Hello @daniela.murcillo ,

The same problem also appears in the tip of the codercise G.3.1

Tip. MultiControlledX(control_wires, wires, control_values) has a specified set of control_wires, a single target wire given by wires, and a string of control values, e.g., control_values = "1011" rather than a list of bits [1,0,1,1].

Hi @Mulldrifter, welcome to the forum!
Thanks for reporting this, I’ll fix it right now.