QNLP
v1.0
|
Class definition for applying Grover diffusion to a marked register. More...
#include <diffusion.hpp>
Public Member Functions | |
Diffusion () | |
Construct a new Diffusion object. More... | |
~Diffusion () | |
Destroy the Diffusion object. More... | |
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 structure as defined in https://arxiv.org/pdf/quant-ph/0005055.pdf. More... | |
Class definition for applying Grover diffusion to a marked register.
SimulatorType | Class Simulator type |
Definition at line 27 of file diffusion.hpp.
|
inline |
|
inline |
|
inline |
Application of the Grover diffusion operator to already marked register. Follows the Q = -A S_0 A structure as defined in https://arxiv.org/pdf/quant-ph/0005055.pdf.
sim | The quantum simulator object to apply the operator. |
ctrlIndices | Vector of qubit indices on ctrl lines (non NCU target) |
target | Target for application of the nCZ op |
Definition at line 49 of file diffusion.hpp.
References ncu_opt_tester::sim, and ncu_opt_tester::target.
Referenced by QNLP::SimulatorGeneral< IntelSimulator >::applyDiffusion(), and TEST_CASE().