Returns an image of a pyquil circuit.

    See circuit_to_latex() for more details.

def pyquil_to_image(program: pyquil.Program) -> PIL.Image:  # pragma: no cover
    """Returns an image of a pyquil circuit.

    See circuit_to_latex() for more details.
    """
    circ = pyquil_to_circuit(program)
    latex = circuit_to_latex(circ)
    img = render_latex(latex)
    return img