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 +... 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