quantum icon indicating copy to clipboard operation
quantum copied to clipboard

Error in tfq_simulate_ops

Open VishuKalier2003 opened this issue 1 year ago • 3 comments

I tried to open and extract the files using tfq_simulate_ops but it didnt work. Can someone please provide me with more insights.

VishuKalier2003 avatar Apr 04 '23 12:04 VishuKalier2003

What are you trying to do that you are encountering this? Install from source ?

lockwo avatar Apr 04 '23 15:04 lockwo

Could you please guide us where the error happens?

QuantumJaeYoo avatar Apr 14 '23 02:04 QuantumJaeYoo

Hi @VishuKalier2003 ,

I installed tensorflow quantum from scratch based on the newly updated https://github.com/jaeyoo/quantum/blob/master/docs/install.md#4-build-tensorflow-from-source. Please pay attention to the TF build line with the explanations:

Build the TensorFlow package (Since TF v2.8, _GLIBCXX_USE_CXX11_ABI is set to 1, and the c++ codes are all compiled with -std=c++17):

Because we are bumping up to TF v2.11.0, your old TF with ABI=0 will give you the error message like tfq_simulate_ops load_library failure.

Please, please rebuild TF and install it in your "NEW" python venv from scratch.

  bazel build -c opt --cxxopt="-O3" --cxxopt="-march=native" --cxxopt="-std=c++17" --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" //tensorflow/tools/pip_package:build_pip_package

As you can see, ABI is changed from 0 to 1, and std is upgraded to c++17.

jaeyoo avatar Apr 14 '23 22:04 jaeyoo