Skip to content

Grover assumes type GroverOperator #76

@woodsp-ibm

Description

@woodsp-ibm

In Grover here

max_power = np.ceil(
2 ** (len(amplification_problem.grover_operator.reflection_qubits) / 2)
)
it simply accesses reflection_qubits on what was passed to the AmplificationProblem as a grover_operator
grover_operator: QuantumCircuit | None = None,
but this is of type QuantumCircuit which does not have that field - only the GroverOperator subclass does. This should be more dynamically taken care of such that if a QuantumCircuit is passed, without that field, that it is handled accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions