qc2.algorithms.pennylane.qpe ============================ .. py:module:: qc2.algorithms.pennylane.qpe .. autoapi-nested-parse:: Module defining QPE algorithm for PennyLane. Classes ------- .. autoapisummary:: qc2.algorithms.pennylane.qpe.QPE Module Contents --------------- .. py:class:: QPE(qc2data=None, active_space=None, mapper=None, device=None, reference_state=None, num_evaluation_qubits=None, verbose=0) Bases: :py:obj:`qc2.algorithms.pennylane.pebase.PEBase` .. py:attribute:: num_evaluation_qubits :value: 3 .. py:method:: get_phase() Estimate the phase from the quantum circuit. The method executes the quantum circuit and determines the most probable measurement outcome's index. This index is then divided by 2 raised to the power of the number of evaluation qubits to estimate the phase. :returns: The estimated phase. :rtype: float .. py:method:: _build_circuit(dev: str, qubits: int, num_estimation_wires: int, reference_state: pennylane.numpy.ndarray, unitary_op: pennylane.operation.Operator, device_args=None, device_kwargs=None, qnode_args=None, qnode_kwargs=None) -> pennylane.QNode :staticmethod: Builds and return PennyLane QNode. :param dev: PennyLane quantum device. :type dev: str :param qubits: Number of qubits in the circuit. :type qubits: int :param num_estimation_wires: number of qubits for estimation :type num_estimation_wires: int :param reference_state: Reference state for the circuit. :type reference_state: np.ndarray :param unitary_op: Qubit operator for the exp(iH). :type unitary_op: Operator :param device_args: Additional arguments for the quantum device. Defaults to None. :type device_args: list, optional :param device_kwargs: Additional keyword arguments for the quantum device. Defaults to None. :type device_kwargs: dict, optional :param qnode_args: Additional arguments for the QNode. Defaults to None. :type qnode_args: list, optional :param qnode_kwargs: Additional keyword arguments for the QNode. Defaults to None. :type qnode_kwargs: dict, optional :returns: PennyLane qnode with built-in ansatz. :rtype: QNode