atlas_q.grover.OracleBase#

class atlas_q.grover.OracleBase(n_qubits, device='cuda', dtype=torch.complex128)[source]#

Bases: object

Base class for quantum oracles

Methods

apply(mps)

Apply oracle to MPS (marks all target states)

get_marked_count()

Return number of marked items

mark(mps, state)

Mark a specific basis state by flipping its phase

__init__(n_qubits, device='cuda', dtype=torch.complex128)[source]#

Methods

__init__(n_qubits[, device, dtype])

apply(mps)

Apply oracle to MPS (marks all target states)

get_marked_count()

Return number of marked items

mark(mps, state)

Mark a specific basis state by flipping its phase

mark(mps, state)[source]#

Mark a specific basis state by flipping its phase

apply(mps)[source]#

Apply oracle to MPS (marks all target states)

Returns:

New MPS after oracle application

get_marked_count()[source]#

Return number of marked items