def METHOD_NAME(self):
    """Test the standard phase estimation circuit."""
    with self.subTest("U=S, psi=|1>"):
        unitary = QuantumCircuit(1)
        unitary.s(0)
        eigenstate = QuantumCircuit(1)
        eigenstate.x(0)
        # eigenvalue is 1j = exp(2j pi 0.25) thus phi = 0.25 = 0.010 = '010'
        # using three digits as 3 evaluation qubits are used
        phase_as_binary = "0100"
        pec = PhaseEstimation(4, unitary)
        self.assertPhaseEstimationIsCorrect(pec, eigenstate, phase_as_binary)
    with self.subTest("U=SZ, psi=|11>"):
        unitary = QuantumCircuit(2)
        unitary.z(0)
        unitary.s(1)
        eigenstate = QuantumCircuit(2)
        eigenstate.x([0, 1])
        # eigenvalue is -1j = exp(2j pi 0.75) thus phi = 0.75 = 0.110 = '110'
        # using three digits as 3 evaluation qubits are used
        phase_as_binary = "110"
        pec = PhaseEstimation(3, unitary)
        self.assertPhaseEstimationIsCorrect(pec, eigenstate, phase_as_binary)
    with self.subTest("a 3-q unitary"):
        #      ┌───┐
        # q_0: ┤ X ├──■────■───────
        #      ├───┤  │    │
        # q_1: ┤ X ├──■────■───────
        #      ├───┤┌───┐┌─┴─┐┌───┐
        # q_2: ┤ X ├┤ H ├┤ X ├┤ H ├
        #      └───┘└───┘└───┘└───┘
        unitary = QuantumCircuit(3)
        unitary.x([0, 1, 2])
        unitary.cz(0, 1)
        unitary.h(2)
        unitary.ccx(0, 1, 2)
        unitary.h(2)
        #      ┌───┐
        # q_0: ┤ H ├──■────■──
        #      └───┘┌─┴─┐  │
        # q_1: ─────┤ X ├──┼──
        #           └───┘┌─┴─┐
        # q_2: ──────────┤ X ├
        #                └───┘
        eigenstate = QuantumCircuit(3)
        eigenstate.h(0)
        eigenstate.cx(0, 1)
        eigenstate.cx(0, 2)
        # the unitary acts as identity on the eigenstate, thus the phase is 0
        phase_as_binary = "00"
        pec = PhaseEstimation(2, unitary)
        self.assertPhaseEstimationIsCorrect(pec, eigenstate, phase_as_binary)