12 #ifndef QNLP_DIFFUSION 13 #define QNLP_DIFFUSION 26 template <
class SimulatorType>
51 for(
auto& ctrl : ctrlIndices){
58 sim.applyGateNCU(
sim.getGateZ(), ctrlIndices,
target,
"Z");
63 for(
auto& ctrl : ctrlIndices){
Class definition for applying Grover diffusion to a marked register.
void applyOpDiffusion(SimulatorType &sim, const std::vector< std::size_t > &ctrlIndices, const std::size_t target)
Application of the Grover diffusion operator to already marked register. Follows the Q = -A S_0 A str...
~Diffusion()
Destroy the Diffusion object.
Diffusion()
Construct a new Diffusion object.