PolynomialRotation.build

PolynomialRotation.build(qc, q, q_target, q_ancillas=None, reverse=0)[source]

Build the circuit.

Parameters
  • qc (QuantumCircuit) – quantum circuit

  • q (list) – list of qubits (has to be same length as self.num_state_qubits)

  • q_target (Qubit) – qubit to be rotated. The algorithm is successful when this qubit is in the |1> state

  • q_ancillas (list) – list of ancilla qubits (or None if none needed)

  • reverse (int) – if 1, apply with reversed list of qubits (i.e. q_n as q_0, q_n-1 as q_1, etc).