From 6d86d011580b61990afb2960195a1854060f8578 Mon Sep 17 00:00:00 2001 From: mhucka Date: Mon, 12 Jan 2026 22:06:47 +0000 Subject: [PATCH 1/2] Add config file for YAPF This adds a `.style.yapf`. --- .style.yapf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .style.yapf diff --git a/.style.yapf b/.style.yapf new file mode 100644 index 000000000..b2ead2e19 --- /dev/null +++ b/.style.yapf @@ -0,0 +1,19 @@ +# Copyright 2025 The TensorFlow Quantum Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============================================================================ + +# Summary: configure yapf (https://github.com/google/yapf) for this project. + +[style] +based_on_style = google From 975d5c62255688761106aa3da73b15224e7d05e6 Mon Sep 17 00:00:00 2001 From: mhucka Date: Mon, 12 Jan 2026 22:07:45 +0000 Subject: [PATCH 2/2] Add a `.clang-format` config file for `clang-format` This adds a configuration file for `clang-format`. It's based on the one from TensorFlow, with the addition of a section for Protobufs (which `clang-format` is also able to format). --- .clang-format | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..967212883 --- /dev/null +++ b/.clang-format @@ -0,0 +1,26 @@ +# Copyright 2026 The TensorFlow Quantum Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============================================================================ + +# Summary: configure clang-format for this project's style guidelines. +# This should be kept in sync with TensorFlow's .clang-format. + +--- +Language: Cpp +BasedOnStyle: Google +DerivePointerAlignment: false +--- +Language: Proto +BasedOnStyle: Google +...