atlas_q.grover.BitmapOracle#
- class atlas_q.grover.BitmapOracle(n_qubits, marked_states, device='cuda', dtype=torch.complex128)[source]#
Bases:
OracleBaseOracle based on explicit bitmap of marked states
More efficient than FunctionOracle for small marked sets.
- Example:
oracle = BitmapOracle(n_qubits=4, marked_states={3, 7, 11})
Methods
apply(mps)Apply oracle by marking all states in bitmap
get_marked_count()Return number of marked items
mark(mps, state)Mark a specific basis state by flipping its phase
Methods