qat.lang.algorithms.amplification.grover_diffusion

qat.lang.algorithms.amplification.grover_diffusion(nbits)

An implementation of Grover’s diffusion.

The returned routine implements the following Householder transform:

\[2|s\rangle\langle s| - I\]

where \(|s\rangle\) is the uniform distribution.

Parameters:

nbits (int) – the arity of the diffusion

Returns:

a routine

Return type:

QRoutine