From f674ec5f424d7b947b823a98c6defa783cc0a469 Mon Sep 17 00:00:00 2001 From: Aniket Singh Yadav Date: Wed, 18 Feb 2026 12:19:22 +0530 Subject: [PATCH 1/2] Complete migration from master to main across workflows and scripts --- .github/workflows/ci-build-checks.yaml | 4 +-- .github/workflows/ci-file-checks.yaml | 4 +-- README.md | 4 +-- docs/design.md | 2 +- docs/install.md | 2 +- docs/tutorials/barren_plateaus.ipynb | 6 ++--- docs/tutorials/gradients.ipynb | 6 ++--- docs/tutorials/hello_many_worlds.ipynb | 6 ++--- docs/tutorials/mnist.ipynb | 6 ++--- docs/tutorials/noise.ipynb | 6 ++--- docs/tutorials/qcnn.ipynb | 6 ++--- docs/tutorials/quantum_data.ipynb | 6 ++--- .../quantum_reinforcement_learning.ipynb | 6 ++--- docs/tutorials/research_tools.ipynb | 6 ++--- scripts/build_docs.py | 2 +- scripts/format_check.sh | 26 ++++++++++++------- 16 files changed, 52 insertions(+), 46 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index f69770ade..8ef670b10 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -15,7 +15,7 @@ on: pull_request: types: [opened, synchronize] branches: - - master + - main merge_group: types: @@ -23,7 +23,7 @@ on: push: branches: - - master + - main # Allow manual invocation, with options that can be useful for debugging. workflow_dispatch: diff --git a/.github/workflows/ci-file-checks.yaml b/.github/workflows/ci-file-checks.yaml index afac8f30b..8f64941f0 100644 --- a/.github/workflows/ci-file-checks.yaml +++ b/.github/workflows/ci-file-checks.yaml @@ -19,7 +19,7 @@ on: pull_request: types: [opened, synchronize] branches: - - master + - main merge_group: types: @@ -27,7 +27,7 @@ on: push: branches: - - master + - main # Allow manual invocation, with options that can be useful for debugging. workflow_dispatch: diff --git a/README.md b/README.md index 3aad6449f..431425d79 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ src="docs/images/logo/tf_quantum1.svg"> High-performance Python framework for hybrid quantum-classical machine learning [![Licensed under the Apache 2.0 -license](https://img.shields.io/badge/License-Apache%202.0-3c60b1.svg?logo=opensourceinitiative&logoColor=white&style=flat-square)](https://github.com/tensorflow/quantum/blob/master/LICENSE) +license](https://img.shields.io/badge/License-Apache%202.0-3c60b1.svg?logo=opensourceinitiative&logoColor=white&style=flat-square)](https://github.com/tensorflow/quantum/blob/main/LICENSE) [![Compatible with Python versions 3.10 and higher](https://img.shields.io/badge/Python-3.10+-fcbc2c.svg?style=flat-square&logo=python&logoColor=white)](https://www.python.org/downloads/) [![TensorFlow Quantum project on @@ -77,7 +77,7 @@ including tutorials and API documentation, can be found online at the TensorFlow.org web site. All of the examples can be found in GitHub in the form of [Python notebook -tutorials](https://github.com/tensorflow/quantum/tree/master/docs/tutorials) +tutorials](https://github.com/tensorflow/quantum/tree/main/docs/tutorials) ## Getting help diff --git a/docs/design.md b/docs/design.md index a82bc9716..b0679c637 100644 --- a/docs/design.md +++ b/docs/design.md @@ -76,7 +76,7 @@ with AVX2 and SSE instructions). Ops with identical functional signatures were created that use a physical quantum computer. Switching between a simulated and physical quantum computer is as easy as changing a single line of code. These ops are located in the -circuit_execution_ops.py. +circuit_execution_ops.py. ### Layers diff --git a/docs/install.md b/docs/install.md index 61338735c..1e495ba42 100644 --- a/docs/install.md +++ b/docs/install.md @@ -5,7 +5,7 @@ There are a few ways to set up your environment to use TensorFlow Quantum (TFQ): * The easiest way to learn and use TFQ requires no installation—run the [TensorFlow Quantum tutorials](./tutorials/hello_many_worlds.ipynb) directly in your browser using - [Google Colab](https://colab.research.google.com/github/tensorflow/quantum/blob/master/docs/tutorials/hello_many_worlds.ipynb). + [Google Colab](https://colab.research.google.com/github/tensorflow/quantum/blob/main/docs/tutorials/hello_many_worlds.ipynb). * To use TensorFlow Quantum on a local machine, install the TFQ package using Python's pip package manager. * Or build TensorFlow Quantum from source. diff --git a/docs/tutorials/barren_plateaus.ipynb b/docs/tutorials/barren_plateaus.ipynb index 345e910ec..15a4cbf2c 100644 --- a/docs/tutorials/barren_plateaus.ipynb +++ b/docs/tutorials/barren_plateaus.ipynb @@ -1,4 +1,4 @@ -{ +{ "cells": [ { "cell_type": "markdown", @@ -56,10 +56,10 @@ " View on TensorFlow.org\n", " \n", " \n", - " Run in Google Colab\n", + " Run in Google Colab\n", " \n", " \n", - " View source on GitHub\n", + " View source on GitHub\n", " \n", " \n", " Download notebook\n", diff --git a/docs/tutorials/gradients.ipynb b/docs/tutorials/gradients.ipynb index 166daf4cb..d1745520f 100644 --- a/docs/tutorials/gradients.ipynb +++ b/docs/tutorials/gradients.ipynb @@ -1,4 +1,4 @@ -{ +{ "cells": [ { "cell_type": "markdown", @@ -56,10 +56,10 @@ " View on TensorFlow.org\n", " \n", " \n", - " Run in Google Colab\n", + " Run in Google Colab\n", " \n", " \n", - " View source on GitHub\n", + " View source on GitHub\n", " \n", " \n", " Download notebook\n", diff --git a/docs/tutorials/hello_many_worlds.ipynb b/docs/tutorials/hello_many_worlds.ipynb index 759c8afaf..fe4ec9095 100644 --- a/docs/tutorials/hello_many_worlds.ipynb +++ b/docs/tutorials/hello_many_worlds.ipynb @@ -1,4 +1,4 @@ -{ +{ "cells": [ { "cell_type": "markdown", @@ -59,10 +59,10 @@ " View on TensorFlow.org\n", " \n", " \n", - " Run in Google Colab\n", + " Run in Google Colab\n", " \n", " \n", - " View source on GitHub\n", + " View source on GitHub\n", " \n", " \n", " Download notebook\n", diff --git a/docs/tutorials/mnist.ipynb b/docs/tutorials/mnist.ipynb index e3fc0f8aa..e62326230 100644 --- a/docs/tutorials/mnist.ipynb +++ b/docs/tutorials/mnist.ipynb @@ -1,4 +1,4 @@ -{ +{ "cells": [ { "cell_type": "markdown", @@ -56,10 +56,10 @@ " View on TensorFlow.org\n", " \n", " \n", - " Run in Google Colab\n", + " Run in Google Colab\n", " \n", " \n", - " View source on GitHub\n", + " View source on GitHub\n", " \n", " \n", " Download notebook\n", diff --git a/docs/tutorials/noise.ipynb b/docs/tutorials/noise.ipynb index 997b2a0ee..b3be8a4ef 100644 --- a/docs/tutorials/noise.ipynb +++ b/docs/tutorials/noise.ipynb @@ -1,4 +1,4 @@ -{ +{ "cells": [ { "cell_type": "markdown", @@ -51,10 +51,10 @@ " View on TensorFlow.org\n", " \n", " \n", - " Run in Google Colab\n", + " Run in Google Colab\n", " \n", " \n", - " View source on GitHub\n", + " View source on GitHub\n", " \n", " \n", " Download notebook\n", diff --git a/docs/tutorials/qcnn.ipynb b/docs/tutorials/qcnn.ipynb index f30bacce7..64623a2c7 100644 --- a/docs/tutorials/qcnn.ipynb +++ b/docs/tutorials/qcnn.ipynb @@ -1,4 +1,4 @@ -{ +{ "cells": [ { "cell_type": "markdown", @@ -59,10 +59,10 @@ " View on TensorFlow.org\n", " \n", " \n", - " Run in Google Colab\n", + " Run in Google Colab\n", " \n", " \n", - " View source on GitHub\n", + " View source on GitHub\n", " \n", " \n", " Download notebook\n", diff --git a/docs/tutorials/quantum_data.ipynb b/docs/tutorials/quantum_data.ipynb index 727f9384e..43baa7cf3 100644 --- a/docs/tutorials/quantum_data.ipynb +++ b/docs/tutorials/quantum_data.ipynb @@ -1,4 +1,4 @@ -{ +{ "cells": [ { "cell_type": "markdown", @@ -56,10 +56,10 @@ " View on TensorFlow.org\n", " \n", " \n", - " Run in Google Colab\n", + " Run in Google Colab\n", " \n", " \n", - " View source on GitHub\n", + " View source on GitHub\n", " \n", " \n", " Download notebook\n", diff --git a/docs/tutorials/quantum_reinforcement_learning.ipynb b/docs/tutorials/quantum_reinforcement_learning.ipynb index caf09c8fe..217c7fe7d 100644 --- a/docs/tutorials/quantum_reinforcement_learning.ipynb +++ b/docs/tutorials/quantum_reinforcement_learning.ipynb @@ -1,4 +1,4 @@ -{ +{ "cells": [ { "cell_type": "markdown", @@ -50,10 +50,10 @@ " View on TensorFlow.org\n", " \n", " \n", - " Run in Google Colab\n", + " Run in Google Colab\n", " \n", " \n", - " View source on GitHub\n", + " View source on GitHub\n", " \n", " \n", " Download notebook\n", diff --git a/docs/tutorials/research_tools.ipynb b/docs/tutorials/research_tools.ipynb index fcb39d3c4..176490e63 100644 --- a/docs/tutorials/research_tools.ipynb +++ b/docs/tutorials/research_tools.ipynb @@ -1,4 +1,4 @@ -{ +{ "cells": [ { "cell_type": "markdown", @@ -51,10 +51,10 @@ " View on TensorFlow.org\n", " \n", " \n", - " Run in Google Colab\n", + " Run in Google Colab\n", " \n", " \n", - " View source on GitHub\n", + " View source on GitHub\n", " \n", " \n", " Download notebook\n", diff --git a/scripts/build_docs.py b/scripts/build_docs.py index dc47df224..b1e3b0048 100644 --- a/scripts/build_docs.py +++ b/scripts/build_docs.py @@ -31,7 +31,7 @@ flags.DEFINE_string("output_dir", "/tmp/tfq_api", "Where to output the docs") flags.DEFINE_string("code_url_prefix", - ("https://github.com/tensorflow/quantum/tree/master/" + ("https://github.com/tensorflow/quantum/tree/main/" "tensorflow_quantum"), "The url prefix for links to code.") flags.DEFINE_bool("search_hints", True, diff --git a/scripts/format_check.sh b/scripts/format_check.sh index 1d91427e0..915820b30 100755 --- a/scripts/format_check.sh +++ b/scripts/format_check.sh @@ -21,9 +21,9 @@ echo "Checking python formatting..."; # The base git revision to compare against is chosen from the following defaults, # in order, until one exists: # -# 1. upstream/master -# 2. origin/master -# 3. master +# 1. upstream/main +# 2. origin/main +# 3. main # # If none exists, the script fails. ################################################################################ @@ -41,12 +41,18 @@ done # Figure out which branch to compare against. if [ -z "${rev}" ]; then - if [ "$(git cat-file -t upstream/master 2> /dev/null)" == "commit" ]; then - rev=upstream/master - elif [ "$(git cat-file -t origin/master 2> /dev/null)" == "commit" ]; then - rev=origin/master - elif [ "$(git cat-file -t master 2> /dev/null)" == "commit" ]; then - rev=master + if [ "$(git cat-file -t upstream/main 2> /dev/null)" == "commit" ]; then + rev=upstream/main + elif [ "$(git cat-file -t origin/main 2> /dev/null)" == "commit" ]; then + rev=origin/main + elif [ "$(git cat-file -t main 2> /dev/null)" == "commit" ]; then + rev=main + elif [ "$(git cat-file -t upstream/main 2> /dev/null)" == "commit" ]; then + rev=upstream/main + elif [ "$(git cat-file -t origin/main 2> /dev/null)" == "commit" ]; then + rev=origin/main + elif [ "$(git cat-file -t main 2> /dev/null)" == "commit" ]; then + rev=main else echo -e "\033[31mNo default revision found to compare against.\033[0m" >&2 exit 1 @@ -92,7 +98,7 @@ else fi echo "Checking C++ formatting..."; -formatting_outputs=$(find tensorflow_quantum/ -iname *.h -o -iname *.cc | xargs clang-format -style=google -output-replacements-xml); +formatting_outputs=$(find tensorflow_quantum/ -iname '*.h' -o -iname '*.cc' | xargs clang-format -style=google -output-replacements-xml); CFORMATCHECK=0 while read -r formatting_outputs; do if [ "$formatting_outputs" != "" ] && [ "$formatting_outputs" != "" ] && [ "$formatting_outputs" != "" ] && [ "$formatting_outputs" != " " ]; then From e8de79f0ce9408612f8251645d3e78ad1ee493f9 Mon Sep 17 00:00:00 2001 From: Aniket Singh Yadav Date: Wed, 18 Feb 2026 12:38:01 +0530 Subject: [PATCH 2/2] Complete migration from master to main across workflows and scripts --- scripts/format_check.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/format_check.sh b/scripts/format_check.sh index 915820b30..771769aa0 100755 --- a/scripts/format_check.sh +++ b/scripts/format_check.sh @@ -47,12 +47,6 @@ if [ -z "${rev}" ]; then rev=origin/main elif [ "$(git cat-file -t main 2> /dev/null)" == "commit" ]; then rev=main - elif [ "$(git cat-file -t upstream/main 2> /dev/null)" == "commit" ]; then - rev=upstream/main - elif [ "$(git cat-file -t origin/main 2> /dev/null)" == "commit" ]; then - rev=origin/main - elif [ "$(git cat-file -t main 2> /dev/null)" == "commit" ]; then - rev=main else echo -e "\033[31mNo default revision found to compare against.\033[0m" >&2 exit 1