As shown in the figure, there are two labelled quantum states 000, 101. why are 3 $Z$-gates placed first in the phase oracle and then 2 controllable $Z$-gates in sequence?
What is the logic that makes up this? Also, I'm curious as to why the Boolean Oracle doesn't use $X$-gates when 011 and 100 are labelled. Instead, $CNOT$ or $CCX$ gates are used instead?
My digital circuit fundamentals are so poor that I can't grasp these patterns; besides, these diagrams are from (C. Figgatt et al., 2017).
This article lists many cases where I tried to discover patterns in the placement of these Oracle's quantum gates, but I failed.