mimiqcircuits.operations.gates.generalized.polynomialoracle

Polynomial Oracle gate.

Classes

PolynomialOracle(*args)

Polynomial Oracle.

class mimiqcircuits.operations.gates.generalized.polynomialoracle.PolynomialOracle(*args)[source]

Bases: Gate

Polynomial 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:

PolynomialOracle

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]
__init__(nx, ny, a, b, c, d)[source]
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.