I.14.2 (Controlled-controlled-Y)

Hello. It would appear that S^dagger CCNOT S corresponds to the Pauli Y with two control bits, including the correct phase. However, the grader says that my solution is incorrect. Where am I making the mistake?


Hi @qreg, your circuit is actually structurally correct, there is just an issue in how adjoint is being invoked. qml.adjoint is something called a transform. There are a number of different types of transforms (you can see plenty of examples here, but the core feature is that transforms return functions). So when we call


what gets returned is a function that computes the adjoint of S, and takes the same arguments as S (in this case, a wire). However, we still need to call that function and pass those arguments:


Hope that helps, please let us know if there’s anything else we can clarify!


Thank you, it helped.