@@ -0,0 +1,1942 @@
+#   Copyright 2021 Google LLC%0A%0A#   Licensed under the Apache License, Version 2.0 (the %22License%22);%0A#   you may not use this file except in compliance with the License.%0A#   You may obtain a copy of the License at%0A#%0A#       http://www.apache.org/licenses/LICENSE-2.0%0A#%0A#   Unless required by applicable law or agreed to in writing, software%0A#   distributed under the License is distributed on an %22AS IS%22 BASIS,%0A#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A#   See the License for the specific language governing permissions and%0A#   limitations under the License.%0A%22%22%22Tool to generate external api_docs for FQE (Shameless copy from TFQ).%22%22%22%0A%0Aimport os%0A%0Afrom absl import app%0Afrom absl import flags%0Afrom tensorflow_docs.api_generator import doc_controls%0Afrom tensorflow_docs.api_generator import generate_lib%0Afrom tensorflow_docs.api_generator import public_api%0A%0Aimport fqe%0A%0Aflags.DEFINE_string(%22output_dir%22, %22/tmp/openfermion_api%22,%0A                    %22Where to output the docs%22)%0A%0Aflags.DEFINE_string(%22code_url_prefix%22,%0A                    (%22https://github.com/quantumlib/OpenFermion-FQE/tree/master/src%22%0A                     %22fqe%22), %22The url prefix for links to code.%22)%0A%0Aflags.DEFINE_bool(%22search_hints%22, True,%0A                  %22Include metadata search hints in the generated files%22)%0A%0Aflags.DEFINE_string(%22site_path%22, %22quark/openfermion_fqe/api_docs/python%22,%0A                    %22Path prefix in the _toc.yaml%22)%0A%0AFLAGS = flags.FLAGS%0A%0A%0Adef main(unused_argv):%0A%0A    doc_generator = generate_lib.DocGenerator(%0A        root_title=%22OpenFermion-FQE%22,%0A        py_modules=%5B(%22fqe%22, fqe)%5D,%0A        base_dir=os.path.dirname(fqe.__file__),%0A        code_url_prefix=FLAGS.code_url_prefix,%0A        search_hints=FLAGS.search_hints,%0A        site_path=FLAGS.site_path,%0A        callbacks=%5Bpublic_api.local_definitions_filter%5D,%0A    )%0A%0A    doc_generator.build(output_dir=FLAGS.output_dir)%0A%0A%0Aif __name__ == %22__main__%22:%0A    app.run(main)%0A

Add script to build API docs.