Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version

QuadraticProgramToNegativeValueOracle

QuadraticProgramToNegativeValueOracle(num_value_qubits, measurement=False)

GitHub(opens in a new tab)

Converts an optimization problem (QUBO) to a negative value oracle.

In addition, a state preparation operator is generated from the coefficients and constant of a QUBO, which can be used to encode the function into a quantum state. In conjunction, this oracle and operator can be used to flag the negative values of a QUBO encoded in a quantum state.

The construction of the oracle is discussed in [1].

References

[1]: Gilliam et al., Grover Adaptive Search for Constrained Polynomial Binary Optimization.

arxiv:1912.04088.

Parameters

  • num_value_qubits (int) – The number of qubits required to represent the output.
  • measurement (bool) – Whether the A operator contains measurements.

Methods

encode

QuadraticProgramToNegativeValueOracle.encode(problem)

A helper function that converts a QUBO into an oracle that recognizes negative numbers.

Parameters

problem (QuadraticProgram) – The problem to be solved.

Return type

Tuple[Custom, CustomCircuitOracle, Dict[Union[int, Tuple[int, int]], int]]

Returns

A state preparation operator A, an oracle O that recognizes negative numbers, and a dictionary representation of the function coefficients, where the key -1 represents the constant.

Was this page helpful?
Report a bug or request content on GitHub.