def METHOD_NAME():
    generated_circuit = generate_qpe_circuit(3, cirq.X)
    qubits = cirq.LineQubit.range(3 + 1)
    expected_circuit = cirq.Circuit(
        [
            cirq.Moment(
                cirq.H(qubits[0]),
                cirq.H(qubits[1]),
                cirq.H(qubits[2]),
            ),
            cirq.Moment(
                cirq.CNOT(qubits[2], qubits[3]),
            ),
            cirq.Moment(
                cirq.CNOT(qubits[1], qubits[3]),
            ),
            cirq.Moment(
                cirq.CNOT(qubits[1], qubits[3]),
            ),
            cirq.Moment(
                cirq.CNOT(qubits[0], qubits[3]),
            ),
            cirq.Moment(
                cirq.CNOT(qubits[0], qubits[3]),
            ),
            cirq.Moment(
                cirq.CNOT(qubits[0], qubits[3]),
            ),
            cirq.Moment(
                cirq.CNOT(qubits[0], qubits[3]),
            ),
            cirq.Moment(
                cirq.SWAP(qubits[0], qubits[2]),
            ),
            cirq.Moment(
                cirq.H(qubits[0]),
            ),
            cirq.Moment(
                (cirq.CNOT**-1.0).on(qubits[0], qubits[1]),
            ),
            cirq.Moment(
                cirq.H(qubits[1]),
            ),
            cirq.Moment(
                (cirq.CNOT**-1.0).on(qubits[0], qubits[2]),
            ),
            cirq.Moment(
                (cirq.CNOT**-1.0).on(qubits[1], qubits[2]),
            ),
            cirq.Moment(
                cirq.H(qubits[2]),
            ),
        ]
    )
    assert _equal(generated_circuit, expected_circuit)