Tensorflow-Quantum Module Import Error
Tried again using last night's nightly ... same exact error as above when trying to import TFQ.  Also, the quantum scripts (/scripts/test_all.sh) all failed  --- output is included below:

Testing All Bazel py_test and cc_tests.
Loading: 
Loading: 0 packages loaded
Analyzing: 130 targets (0 packages loaded, 0 targets configured)
WARNING: /root/.cache/bazel/_bazel_root/bcb09a07ff13a4e9505bab5f8eac883a/external/local_config_tf/BUILD:9259:8: target 'libtensorflow_framework.so' is both a rule and a file; please choose another name for the rule
WARNING: /root/.cache/bazel/_bazel_root/bcb09a07ff13a4e9505bab5f8eac883a/external/local_config_tf/BUILD:9269:8: target 'test_log_pb2.py' is both a rule and a file; please choose another name for the rule
DEBUG: Rule 'qsim' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "a975f83605bb5240b65cff20847b0e9173549951267f96d69b852c6bd941a676"
DEBUG: Repository qsim instantiated at:
  /content/quantum/WORKSPACE:35:13: in <toplevel>
Repository rule http_archive defined at:
  /root/.cache/bazel/_bazel_root/bcb09a07ff13a4e9505bab5f8eac883a/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
INFO: Analyzed 130 targets (0 packages loaded, 0 targets configured).
INFO: Found 83 targets and 47 test targets...
[2 / 17] [Prepa] BazelWorkspaceStatusAction stable-status.txt ... (7 actions, 3 running)
[10 / 25] Compiling tensorflow_quantum/core/ops/tfq_calculate_unitary_op.cc; 1s local ... (8 actions running)
[11 / 25] Compiling tensorflow_quantum/core/ops/tfq_calculate_unitary_op.cc; 3s local ... (8 actions, 7 running)
[17 / 28] Compiling tensorflow_quantum/core/ops/tfq_calculate_unitary_op.cc; 4s local ... (8 actions running)
[18 / 29] Compiling tensorflow_quantum/core/ops/tfq_calculate_unitary_op.cc; 10s local ... (8 actions, 7 running)
[18 / 29] Compiling tensorflow_quantum/core/ops/tfq_calculate_unitary_op.cc; 12s local ... (8 actions running)
[18 / 29] 1 / 47 tests; Compiling tensorflow_quantum/core/ops/tfq_calculate_unitary_op.cc; 15s local ... (8 actions running)
INFO: From Compiling tensorflow_quantum/core/ops/tfq_calculate_unitary_op.cc:
In file included from tensorflow_quantum/core/ops/tfq_calculate_unitary_op.cc:32:
./tensorflow_quantum/core/src/util_qsim.h:496:13: warning: 'void tfq::BalanceTrajectory(const int&, const int&, std::vector<std::vector<int> >*)' defined but not used [-Wunused-function]
  496 | static void BalanceTrajectory(const int& num_samples, const int& num_threads,
      |             ^~~~~~~~~~~~~~~~~
./tensorflow_quantum/core/src/util_qsim.h:450:13: warning: 'void tfq::BalanceTrajectory(const std::vector<std::vector<int> >&, const int&, std::vector<std::vector<int> >*)' defined but not used [-Wunused-function]
  450 | static void BalanceTrajectory(const std::vector<std::vector<int>>& num_samples,
      |             ^~~~~~~~~~~~~~~~~
[31 / 46] 2 / 47 tests; Compiling tensorflow_quantum/core/ops/tfq_adj_grad_op.cc; 18s local ... (8 actions, 7 running)
[32 / 46] 2 / 47 tests; Compiling tensorflow_quantum/core/ops/tfq_adj_grad_op.cc; 21s local ... (8 actions running)
INFO: From Compiling tensorflow_quantum/core/ops/tfq_simulate_samples_op.cc:
tensorflow_quantum/core/ops/tfq_simulate_samples_op.cc: In member function 'void tfq::TfqSimulateSamplesOp::ComputeLarge(const std::vector<int>&, int, int, const std::vector<std::vector<qsim::GateFused<qsim::Gate<float, qsim::Cirq::GateKind> > > >&, tensorflow::OpKernelContext*, tensorflow::TTypes<signed char, 3>::Tensor*)':
tensorflow_quantum/core/ops/tfq_simulate_samples_op.cc:157:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<qsim::GateFused<qsim::Gate<float, qsim::Cirq::GateKind> > > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  157 |     for (int i = 0; i < fused_circuits.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~
tensorflow_quantum/core/ops/tfq_simulate_samples_op.cc:166:25: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<qsim::GateFused<qsim::Gate<float, qsim::Cirq::GateKind> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  166 |       for (int j = 0; j < fused_circuits[i].size(); j++) {
      |                       ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
tensorflow_quantum/core/ops/tfq_simulate_samples_op.cc:175:22: warning: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  175 |         while (q_ind < nq) {
      |                ~~~~~~^~~~
tensorflow_quantum/core/ops/tfq_simulate_samples_op.cc:182:22: warning: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'const int' [-Wsign-compare]
  182 |         while (q_ind < max_num_qubits) {
      |                ~~~~~~^~~~~~~~~~~~~~~~
tensorflow_quantum/core/ops/tfq_simulate_samples_op.cc: In lambda function:
tensorflow_quantum/core/ops/tfq_simulate_samples_op.cc:222:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<qsim::GateFused<qsim::Gate<float, qsim::Cirq::GateKind> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  222 |         for (int j = 0; j < fused_circuits[i].size(); j++) {
      |                         ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
tensorflow_quantum/core/ops/tfq_simulate_samples_op.cc:231:24: warning: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  231 |           while (q_ind < nq) {
      |                  ~~~~~~^~~~
tensorflow_quantum/core/ops/tfq_simulate_samples_op.cc:238:24: warning: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'const int' [-Wsign-compare]
  238 |           while (q_ind < max_num_qubits) {
      |                  ~~~~~~^~~~~~~~~~~~~~~~
In file included from tensorflow_quantum/core/ops/tfq_simulate_samples_op.cc:38:
./tensorflow_quantum/core/src/util_qsim.h: At global scope:
./tensorflow_quantum/core/src/util_qsim.h:496:13: warning: 'void tfq::BalanceTrajectory(const int&, const int&, std::vector<std::vector<int> >*)' defined but not used [-Wunused-function]
  496 | static void BalanceTrajectory(const int& num_samples, const int& num_threads,
      |             ^~~~~~~~~~~~~~~~~
./tensorflow_quantum/core/src/util_qsim.h:450:13: warning: 'void tfq::BalanceTrajectory(const std::vector<std::vector<int> >&, const int&, std::vector<std::vector<int> >*)' defined but not used [-Wunused-function]
  450 | static void BalanceTrajectory(const std::vector<std::vector<int>>& num_samples,
      |             ^~~~~~~~~~~~~~~~~
INFO: From Compiling tensorflow_quantum/core/ops/tfq_simulate_state_op.cc:
In file included from tensorflow_quantum/core/ops/tfq_simulate_state_op.cc:33:
./tensorflow_quantum/core/src/util_qsim.h:496:13: warning: 'void tfq::BalanceTrajectory(const int&, const int&, std::vector<std::vector<int> >*)' defined but not used [-Wunused-function]
  496 | static void BalanceTrajectory(const int& num_samples, const int& num_threads,
      |             ^~~~~~~~~~~~~~~~~
./tensorflow_quantum/core/src/util_qsim.h:450:13: warning: 'void tfq::BalanceTrajectory(const std::vector<std::vector<int> >&, const int&, std::vector<std::vector<int> >*)' defined but not used [-Wunused-function]
  450 | static void BalanceTrajectory(const std::vector<std::vector<int>>& num_samples,
      |             ^~~~~~~~~~~~~~~~~
INFO: From Compiling tensorflow_quantum/core/ops/tfq_simulate_expectation_op.cc:
In file included from tensorflow_quantum/core/ops/tfq_simulate_expectation_op.cc:34:
./tensorflow_quantum/core/src/util_qsim.h:496:13: warning: 'void tfq::BalanceTrajectory(const int&, const int&, std::vector<std::vector<int> >*)' defined but not used [-Wunused-function]
  496 | static void BalanceTrajectory(const int& num_samples, const int& num_threads,
      |             ^~~~~~~~~~~~~~~~~
./tensorflow_quantum/core/src/util_qsim.h:450:13: warning: 'void tfq::BalanceTrajectory(const std::vector<std::vector<int> >&, const int&, std::vector<std::vector<int> >*)' defined but not used [-Wunused-function]
  450 | static void BalanceTrajectory(const std::vector<std::vector<int>>& num_samples,
      |             ^~~~~~~~~~~~~~~~~
INFO: From Compiling tensorflow_quantum/core/ops/tfq_simulate_sampled_expectation_op.cc:
tensorflow_quantum/core/ops/tfq_simulate_sampled_expectation_op.cc: In member function 'void tfq::TfqSimulateSampledExpectationOp::ComputeLarge(const std::vector<int>&, const std::vector<std::vector<qsim::GateFused<qsim::Gate<float, qsim::Cirq::GateKind> > > >&, const std::vector<std::vector<tfq::proto::PauliSum> >&, const std::vector<std::vector<int> >&, tensorflow::OpKernelContext*, tensorflow::TTypes<float, 1>::Matrix*)':
tensorflow_quantum/core/ops/tfq_simulate_sampled_expectation_op.cc:178:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<qsim::GateFused<qsim::Gate<float, qsim::Cirq::GateKind> > > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  178 |     for (int i = 0; i < fused_circuits.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~
tensorflow_quantum/core/ops/tfq_simulate_sampled_expectation_op.cc:191:25: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<qsim::GateFused<qsim::Gate<float, qsim::Cirq::GateKind> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  191 |       for (int j = 0; j < fused_circuits[i].size(); j++) {
      |                       ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
tensorflow_quantum/core/ops/tfq_simulate_sampled_expectation_op.cc:194:25: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<tfq::proto::PauliSum>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  194 |       for (int j = 0; j < pauli_sums[i].size(); j++) {
      |                       ~~^~~~~~~~~~~~~~~~~~~~~~
tensorflow_quantum/core/ops/tfq_simulate_sampled_expectation_op.cc: In lambda function:
tensorflow_quantum/core/ops/tfq_simulate_sampled_expectation_op.cc:276:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<qsim::GateFused<qsim::Gate<float, qsim::Cirq::GateKind> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  276 |           for (int j = 0; j < fused_circuits[cur_batch_index].size(); j++) {
      |                           ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tensorflow_quantum/core/ops/tfq_simulate_sampled_expectation_op.cc:37:
./tensorflow_quantum/core/src/util_qsim.h: At global scope:
./tensorflow_quantum/core/src/util_qsim.h:496:13: warning: 'void tfq::BalanceTrajectory(const int&, const int&, std::vector<std::vector<int> >*)' defined but not used [-Wunused-function]
  496 | static void BalanceTrajectory(const int& num_samples, const int& num_threads,
      |             ^~~~~~~~~~~~~~~~~
./tensorflow_quantum/core/src/util_qsim.h:450:13: warning: 'void tfq::BalanceTrajectory(const std::vector<std::vector<int> >&, const int&, std::vector<std::vector<int> >*)' defined but not used [-Wunused-function]
  450 | static void BalanceTrajectory(const std::vector<std::vector<int>>& num_samples,
      |             ^~~~~~~~~~~~~~~~~
[37 / 47] 2 / 47 tests; Compiling tensorflow_quantum/core/ops/tfq_adj_grad_op.cc; 24s local ... (8 actions running)
INFO: From Compiling tensorflow_quantum/core/ops/tfq_adj_grad_op.cc:
In file included from tensorflow_quantum/core/ops/tfq_adj_grad_op.cc:35:
./tensorflow_quantum/core/src/util_qsim.h:496:13: warning: 'void tfq::BalanceTrajectory(const int&, const int&, std::vector<std::vector<int> >*)' defined but not used [-Wunused-function]
  496 | static void BalanceTrajectory(const int& num_samples, const int& num_threads,
      |             ^~~~~~~~~~~~~~~~~
./tensorflow_quantum/core/src/util_qsim.h:450:13: warning: 'void tfq::BalanceTrajectory(const std::vector<std::vector<int> >&, const int&, std::vector<std::vector<int> >*)' defined but not used [-Wunused-function]
  450 | static void BalanceTrajectory(const std::vector<std::vector<int>>& num_samples,
      |             ^~~~~~~~~~~~~~~~~
FAIL: //tensorflow_quantum/python/layers/high_level:noisy_pqc_test (see /root/.cache/bazel/_bazel_root/bcb09a07ff13a4e9505bab5f8eac883a/execroot/__main__/bazel-out/k8-opt/testlogs/tensorflow_quantum/python/layers/high_level/noisy_pqc_test/test.log)
ERROR: /content/quantum/tensorflow_quantum/python/layers/high_level/BUILD:100:8: Testing //tensorflow_quantum/python/layers/high_level:noisy_pqc_test failed: Test failed, aborting
ERROR: Test failed, aborting
INFO: Elapsed time: 27.041s, Critical Path: 26.23s
INFO: 46 processes: 30 internal, 16 local.
INFO: Build completed, 1 test FAILED, 46 total actions
INFO: Build completed, 1 test FAILED, 46 total actions
Testing failed, please correct errors before proceeding.
{==================== Test output for //tensorflow_quantum/python/layers/high_level:noisy_pqc_test:
Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/bcb09a07ff13a4e9505bab5f8eac883a/execroot/__main__/bazel-out/k8-opt/bin/tensorflow_quantum/python/layers/high_level/noisy_pqc_test.runfiles/__main__/tensorflow_quantum/python/layers/high_level/noisy_pqc_test.py", line 30, in <module>
    from tensorflow_quantum.python.layers.high_level import noisy_pqc
  File "/root/.cache/bazel/_bazel_root/bcb09a07ff13a4e9505bab5f8eac883a/execroot/__main__/bazel-out/k8-opt/bin/tensorflow_quantum/python/layers/high_level/noisy_pqc_test.runfiles/__main__/tensorflow_quantum/python/layers/high_level/noisy_pqc.py", line 25, in <module>
    from tensorflow_quantum.python.layers.circuit_construction import elementary
  File "/root/.cache/bazel/_bazel_root/bcb09a07ff13a4e9505bab5f8eac883a/execroot/__main__/bazel-out/k8-opt/bin/tensorflow_quantum/python/layers/high_level/noisy_pqc_test.runfiles/__main__/tensorflow_quantum/python/layers/circuit_construction/elementary.py", line 24, in <module>
    class AddCircuit(tf.keras.layers.Layer):
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/util/lazy_loader.py", line 58, in __getattr__
    module = self._load()
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/util/lazy_loader.py", line 41, in _load
    module = importlib.import_module(self.__name__)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/local/lib/python3.10/dist-packages/keras/__init__.py", line 21, in <module>
    from keras import models
  File "/usr/local/lib/python3.10/dist-packages/keras/models/__init__.py", line 18, in <module>
    from keras.engine.functional import Functional
  File "/usr/local/lib/python3.10/dist-packages/keras/engine/functional.py", line 26, in <module>
    from keras import backend
  File "/usr/local/lib/python3.10/dist-packages/keras/backend.py", line 35, in <module>
    from keras.engine import keras_tensor
  File "/usr/local/lib/python3.10/dist-packages/keras/engine/keras_tensor.py", line 19, in <module>
    from keras.utils import object_identity
  File "/usr/local/lib/python3.10/dist-packages/keras/utils/__init__.py", line 53, in <module>
    from keras.utils.feature_space import FeatureSpace
  File "/usr/local/lib/python3.10/dist-packages/keras/utils/feature_space.py", line 20, in <module>
    from keras.engine import base_layer
  File "/usr/local/lib/python3.10/dist-packages/keras/engine/base_layer.py", line 44, in <module>
    from keras.saving.legacy.saved_model import layer_serialization
  File "/usr/local/lib/python3.10/dist-packages/keras/saving/legacy/saved_model/layer_serialization.py", line 23, in <module>
    from keras.saving.legacy.saved_model import save_impl
  File "/usr/local/lib/python3.10/dist-packages/keras/saving/legacy/saved_model/save_impl.py", line 34, in <module>
    from keras.saving.legacy.saved_model import load as keras_load
  File "/usr/local/lib/python3.10/dist-packages/keras/saving/legacy/saved_model/load.py", line 29, in <module>
    from keras.protobuf import saved_metadata_pb2
  File "/usr/local/lib/python3.10/dist-packages/keras/protobuf/saved_metadata_pb2.py", line 5, in <module>
    from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/usr/local/lib/python3.10/dist-packages/google/protobuf/internal/__init__.py)
================================================================================
//tensorflow_quantum/core/ops:batch_util_test                         NO STATUS
//tensorflow_quantum/core/ops:circuit_execution_ops_test              NO STATUS
//tensorflow_quantum/core/ops:cirq_ops_test                           NO STATUS
//tensorflow_quantum/core/ops:tfq_adj_grad_op_test                    NO STATUS
//tensorflow_quantum/core/ops:tfq_ps_util_ops_test                    NO STATUS
//tensorflow_quantum/core/ops:tfq_simulate_ops_gpu_test               NO STATUS
//tensorflow_quantum/core/ops:tfq_simulate_ops_test                   NO STATUS
//tensorflow_quantum/core/ops:tfq_unitary_op_test                     NO STATUS
//tensorflow_quantum/core/ops:tfq_utility_ops_test                    NO STATUS
//tensorflow_quantum/core/ops/math_ops:fidelity_op_test               NO STATUS
//tensorflow_quantum/core/ops/math_ops:inner_product_grad_test        NO STATUS
//tensorflow_quantum/core/ops/math_ops:inner_product_op_test          NO STATUS
//tensorflow_quantum/core/ops/math_ops:simulate_mps_test              NO STATUS
//tensorflow_quantum/core/ops/noise:noisy_expectation_op_test         NO STATUS
//tensorflow_quantum/core/ops/noise:noisy_sampled_expectation_op_test NO STATUS
//tensorflow_quantum/core/ops/noise:noisy_samples_op_test             NO STATUS
//tensorflow_quantum/core/serialize:op_serializer_test                NO STATUS
//tensorflow_quantum/core/serialize:serializable_gate_set_test        NO STATUS
//tensorflow_quantum/core/serialize:serializer_test                   NO STATUS
//tensorflow_quantum/core/src:adj_util_test                           NO STATUS
//tensorflow_quantum/core/src:circuit_parser_qsim_test                NO STATUS
//tensorflow_quantum/core/src:program_resolution_test                 NO STATUS
//tensorflow_quantum/core/src:util_qsim_test                          NO STATUS
//tensorflow_quantum/datasets:cluster_state_test                      NO STATUS
//tensorflow_quantum/datasets:spin_system_test                        NO STATUS
//tensorflow_quantum/python:util_test                                 NO STATUS
//tensorflow_quantum/python/differentiators:adjoint_test              NO STATUS
//tensorflow_quantum/python/differentiators:differentiator_test       NO STATUS
//tensorflow_quantum/python/differentiators:gradient_test             NO STATUS
//tensorflow_quantum/python/differentiators:linear_combination_test   NO STATUS
//tensorflow_quantum/python/differentiators:parameter_shift_test      NO STATUS
//tensorflow_quantum/python/differentiators:parameter_shift_util_test NO STATUS
//tensorflow_quantum/python/layers/circuit_construction:elementary_test NO STATUS
//tensorflow_quantum/python/layers/circuit_executors:expectation_test NO STATUS
//tensorflow_quantum/python/layers/circuit_executors:input_checks_test NO STATUS
//tensorflow_quantum/python/layers/circuit_executors:sample_test      NO STATUS
//tensorflow_quantum/python/layers/circuit_executors:sampled_expectation_test NO STATUS
//tensorflow_quantum/python/layers/circuit_executors:state_test       NO STATUS
//tensorflow_quantum/python/layers/circuit_executors:unitary_test     NO STATUS
//tensorflow_quantum/python/layers/high_level:controlled_pqc_test     NO STATUS
//tensorflow_quantum/python/layers/high_level:noisy_controlled_pqc_test NO STATUS
//tensorflow_quantum/python/layers/high_level:pqc_test                NO STATUS
//tensorflow_quantum/python/optimizers:rotosolve_minimizer_test       NO STATUS
//tensorflow_quantum/python/optimizers:spsa_minimizer_test            NO STATUS
//tensorflow_quantum/core/serialize:op_deserializer_test                 PASSED in 12.4s
//tensorflow_quantum/python:quantum_context_test                         PASSED in 5.9s
//tensorflow_quantum/python/layers/high_level:noisy_pqc_test             FAILED in 10.4s
  /root/.cache/bazel/_bazel_root/bcb09a07ff13a4e9505bab5f8eac883a/execroot/__main__/bazel-out/k8-opt/testlogs/tensorflow_quantum/python/layers/high_level/noisy_pqc_test/test.log

Executed 3 out of 47 tests: 2 tests pass, 1 fails locally and 44 were skipped.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.} Output from today's run using the most recent nightly build. I am just using CPU, no GPU due to the length of compile time, and I decided to try branch instead of master to see if that made a difference.  It did not, same error persisted.  Quantum smoke tests are all still failing, and the tfq import still bombs out with the same pauli error.  

See attached output
[061723_tfq_import_err_v2.11.0-0-gd5b57ca93e5.txt](https://github.com/tensorflow/tensorflow/files/11780212/061723_tfq_import_err_v2.11.0-0-gd5b57ca93e5.txt)
 Attempted nightly build using TF 2.12 and Python 3.9, but TFQ compile failed. I saved the colab to github for your review as the error was quite profound:

https://github.com/liv4unix/quantum/blob/master/TF12_TFQ_nightly_bld_061823_bazel-out_gcc-err.ipynb Hi @liv4unix! I  faced the  same issue as reported here. By any chance did you try to downgrade the TF version  and try to build TF Quantum? There are some version incompatibility related issues occurring it seems. Please have a look at this [doc](https://www.tensorflow.org/quantum/install) and let me know if that helps?
Thank you! Thank you for the response. I have attempted all steps, in each section of that tutorial using TF11 (and even tried TF12, just to see what would happen, yes, I know it's unsupported). None of the documented steps work, TFQ does not import in Colab any longer, as far as I can tell.  

The latest daily build from source is still compiling using Py 3.9, but I am including a link for the pip install for py3.8.  Here, you will see that TFQ will not import on the pip install in Colab: "no module named Cirq"

https://github.com/liv4unix/quantum/blob/master/TF11-TFQnightly-Py38_062023.ipynb @SuryanarayanaY I have replicated the issue on colab using TF [2.12](https://colab.research.google.com/gist/sushreebarsa/8f34148c7ed663110c278f75a10101fc/tf11-tfqnightly-py38_062023.ipynb#scrollTo=-rDlWfjzocwG) and [nightly](https://colab.research.google.com/gist/sushreebarsa/120780e30884cfa07e409dfe2e22551b/tf11-tfqnightly-py38_062023.ipynb#scrollTo=-rDlWfjzocwG), please find the attached gists for reference. 
Thank you! Last night's build from source, using 06202023_nightly image is complete and TFQ still does not import into my Colab [Pro+] environment:

1) tensorflow-quantum does NOT show up in "pip list" as an installed package
2) the same "cannot import name 'pauli_sum_pb2' from 'tensorflow_quantum.core.proto'" persists on the TFQ import
3) the TFQ/bazel installation confirmation scripts (./scripts/test_all.sh) continue to FAIL

All Colab job output is here:
https://github.com/liv4unix/quantum/blob/master/TF_TFQ_Build_from_Source_Nightly_06212023.ipynb

FYI:
This is a CPU TF/TFQ build. However, my QNN|ANN uses QPU|GPU|CPU so once we get TFQ import working for CPU, I will need to build from source using GPU so that I can test TFQ/import once more using GPU system.  The GPU|Cuda TF/TFQ build from source takes ~12 hours. Attempted to roll back to Python 3.7 but the TFQ requirements file bombs out. It appears python 3.8 is the min required version for TFQ contrary to the install guide:
https://www.tensorflow.org/quantum/install

Output from "Py 3.7, tf-nightly-2.11.0, and quantum.git" can be found here:
https://github.com/liv4unix/quantum/blob/master/TF_TFQ_Build_from_Source_Nightly_06222023.ipynb While I've tested the pip installs for TFQ many times, I've never actually uploaded the colab notebooks.  Both python 3.8 and 3.9 fail to import TFQ with an identical error:

ModuleNotFoundError: No module named 'tensorflow_quantum'

This is differentiated from the pauli error observed when attempting to import TFQ, when building from source.

Python 3.9:
https://github.com/liv4unix/quantum/blob/master/Pip_install_Py39_TF_TFQ_062423.ipynb
Python 3.8
https://github.com/liv4unix/quantum/blob/master/Pip_install_Py38_TF_TFQ_062423.ipynb Hi Michael,

Any ETA on when an update will be available?

Just tested latest [pip](Pip_install_Py38_TF211_TFQ073dev_070623.), nothing new ... and I won't bother testing nightlies until I hear from you as those builds hurt.

I was really hoping to submit this latest (year's worth of) Cirq|TFQ work to QCE23 Poster Committee, and they just extended the Poster deadline to July 20, so if there is any possible chance we could get some kind of a fix in place, so that I could finish my poster submission, well, that would be really-really great.  
https://qce.quantum.ieee.org/2023/home/authors/submission-deadlines/

This latest QNN work builds off last year's published work, which was also presented at QCE22 (where I met Alex).
https://ieeexplore.ieee.org/document/9951271

Would also be great to meet you at QCE23 this year (hint!hint!), otherwise, thanks to you and your team for all the incredible work on the TF|TFQ stack!


 After going through all my previous build jobs, the issue appears to be that bazel config is defaulting to Colab's built-in Python 10 - bazel is not using the version of Python in the activated environment (py 3.8) I cannot figure out how to override.   

I am attempting to once again hard-code the 3.8 python paths into the bazel config in the TF11 nightly build.  Will upload the output once the build is complete. I was able to getTF11 bazel config script to execute successfully when I entered the FQPN for the activated py38_quantum_env lib and bin paths 

However TFQ/nightly now bombs out with a new error on bazel build:


ERROR: /content/quantum/tensorflow_quantum/core/src/BUILD:123:11: Compiling tensorflow_quantum/core/src/program_resolution.cc failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 54 arguments skipped)
In file included from bazel-out/k8-opt/bin/external/local_config_tf/include/tensorflow/tsl/platform/status.h:37,
                 from bazel-out/k8-opt/bin/external/local_config_tf/include/tensorflow/core/platform/status.h:23,
                 from bazel-out/k8-opt/bin/external/local_config_tf/include/tensorflow/core/lib/core/status.h:19,
                 from ./tensorflow_quantum/core/src/program_resolution.h:25,
                 from tensorflow_quantum/core/src/program_resolution.cc:16:
bazel-out/k8-opt/bin/external/local_config_tf/include/tensorflow/tsl/protobuf/error_codes.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
   12 | #error This file was generated by a newer version of protoc which is
      |  ^~~~~
bazel-out/k8-opt/bin/external/local_config_tf/include/tensorflow/tsl/protobuf/error_codes.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
   13 | #error incompatible with your Protocol Buffer headers.


Full notebook is uploaded here:

https://github.com/liv4unix/quantum/blob/master/TF_TFQ_Build_from_Source_Nightly_070823.ipynb Is anyone even working on this?  

Is there any way for me to access Sycamore without using Colab?  I am desperate to continue my research guys. Please help.
<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

v2.11.0-0-gd5b57ca93e5 2.11.0

### Custom Code

Yes

### OS Platform and Distribution

Ubuntu 20.04.5 LTS

### Mobile device

_No response_

### Python version

3.8

### Bazel version

5.3.0

### GCC/Compiler version

gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

### CUDA/cuDNN version

Build cuda_11.8.r11.8/compiler.31833905_0

### GPU model and memory

A100 high-mem node

### Current Behaviour?

Still trying to get TFQ to work post-py 3.10 upgrade in colab ... the TF/TFQ nightly_build route seems to be getting me closer as I no longer receive "Module Not Found" when I try importing TFQ, however, I now receive the pauli error below.

### Standalone code to reproduce the issue

```shell
import tensorflow_quantum as tfq

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-80-0f5757594a36> in <cell line: 1>()
----> 1 import tensorflow_quantum as tfq

4 frames
/content/quantum/quantum/tensorflow_quantum/core/ops/cirq_ops.py in <module>
     23 
     24 from tensorflow_quantum.core.ops import batch_util
---> 25 from tensorflow_quantum.core.proto import pauli_sum_pb2
     26 from tensorflow_quantum.core.proto import program_pb2
     27 from tensorflow_quantum.core.serialize import serializer

ImportError: cannot import name 'pauli_sum_pb2' from 'tensorflow_quantum.core.proto' (/content/quantum/quantum/tensorflow_quantum/core/proto/__init__.py)
```


### Relevant log output

```shell
See above

FYI ... the compile from nightly takes >8 hours so getting you info may take +1 days turn around
Also, I have tried nightly_builds (for my Colab env) for several days and this is the only build where I have obtained a different error than "Module Not Found" upon attempting to import TFQ after installing the wheel.  

Are you guys trying to actually 'import tensorflow-quantum' after executing your quantum tests (./scripts/test_all.sh)? I ask because as far as I can tell, the import does not work even though the installation and smoke tests all complete successfully.

I have attempted every TF/TFQ install listed here:
https://www.tensorflow.org/quantum/install
and TFQ will not import any longer.

I cannot TFQ imported and functional ...
```
</details>