mimiqcircuits.operations.gates.generalized.polynomialoracle¶
Polynomial Oracle gate.
Classes
|
Polynomial Oracle. |
- class mimiqcircuits.operations.gates.generalized.polynomialoracle.PolynomialOracle(*args)[source]¶
Bases:
GatePolynomial Oracle.
- Parameters:
a (Num) – Coefficient a in the polynomial.
b (Num) – Coefficient b in the polynomial.
c (Num) – Coefficient c in the polynomial.
d (Num) – Coefficient d in the polynomial.
- Raises:
ValueError – If the input parameters do not satisfy the required conditions.
- Returns:
The Polynomial Oracle.
- Return type:
Examples
>>> from mimiqcircuits import * >>> c = Circuit() >>> c.push(PolynomialOracle(5,5,1, 2, 3, 4), 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) 11-qubit circuit with 1 instruction: └── PolynomialOracle(1, 2, 3, 4) @ q[1:5], q[6:10]
- inverse()[source]¶
Raise an error, as non-unitary operators cannot be inverted.
This method is not implemented for non-unitary operators and will raise a NotImplementedError if called.
- Raises:
NotImplementedError – If the method is called.