def amplitude_amplification(self, num_iterations: int):
        """Applies amplitude amplification to increase the probability of measuring the ancilla
        qubit as 1.

        Args:
            num_iterations: The number of times to apply amplitude amplification.

        Returns:
            The circuit with amplitude amplification applied.
        """
        hhl_circuit = self.hhl_circuit()
        c = cirq.Circuit()
        c += hhl_circuit

        r_succ = cirq.Z(self.ancilla)
        r_init = self.diffusion_operator()

        for _ in range(num_iterations):
            c.append(r_succ)
            c += hhl_circuit**-1
            c += r_init
            c += hhl_circuit

        return c
Applies amplitude amplification to increase the probability of measuring the ancilla
        qubit as 1.

        Args:
            num_iterations: The number of times to apply amplitude amplification.

        Returns:
            The circuit with amplitude amplification applied.
        
examples/hhl.py