Translates a given pyquil Program to a TikZ picture in a Latex document.

    :param Program circuit: The circuit to be drawn, represented as a pyquil program.
    :param dict settings: An optional dictionary with settings for drawing the circuit. See `get_default_settings`
     in `latex_config` for more information about what settings should contain.
    :return: LaTeX document string which can be compiled.
    :rtype: string

def to_latex(circuit, settings=None):
    """
    Translates a given pyquil Program to a TikZ picture in a Latex document.

    :param Program circuit: The circuit to be drawn, represented as a pyquil program.
    :param dict settings: An optional dictionary with settings for drawing the circuit. See `get_default_settings`
     in `latex_config` for more information about what settings should contain.
    :return: LaTeX document string which can be compiled.
    :rtype: string
    """
    if settings is None:
        settings = get_default_settings()
    text = header(settings)
    text += body(circuit, settings)
    text += footer()
    return text