MCPcopy Create free account
hub / github.com/davisking/dlib / is_key

Function is_key

examples/quantum_computing_ex.cpp:119–122  ·  view source on GitHub ↗

This is the function we will use in Grover's search algorithm. In this case the value we are searching for is 257.

Source from the content-addressed store, hash-verified

117// This is the function we will use in Grover's search algorithm. In this
118// case the value we are searching for is 257.
119bool is_key (unsigned long n)
120{
121 return n == 257;
122}
123
124// ----------------------------------------------------------------------------------------
125

Callers 2

operator()Method · 0.85
compute_state_elementMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected