Closed erlebach closed 1 year ago
Hi Prof. Erlebacher:
Thank you very much for your comment! Here is my point-by-point reply:
PyPlot cannot be installed. Use Plots.heatmap to plot an array: Reply: Yes, we need to have the python package Matplotlib installed before installing PyPlot and I forgot to mention this. In the revised Readme.md, I will point this out.
_I added "../src" to LOADPATH to make the example work: Reply: I tried the code on three devices: Linux, Mac intel, and Mac M1. It seems that they all work well. First, I use these four command lines to build the working env:
$ git clone https://github.com/LWKJJONAK/Quantum_Neural_Network_Classifiers
$ cd Quantum_Neural_Network_Classifiers
$ julia --project=amplitude_encode -e "using Pkg; Pkg.instantiate()"
$ julia --project=block_encode -e "using Pkg; Pkg.instantiate()"
Then I can run all the tutorial codes in the .ipynb files (e.g. https://github.com/LWKJJONAK/Quantum_Neural_Network_Classifiers/blob/main/amplitude_encode/an_example_code_for_the_whole_training_procedure.ipynb). I don't know what exactly the problem is (did you follow the four command lines to install the packages? On our Mac M1 device, we made it work without adding "../src" to LOAD_PATH). We also write "using Quantum_Neural_Network_Classifiers: ent_cx, params_layer, acc_loss_evaluation" into a .jl file and use the command line "julia --project=amplitude_encode a.jl" to successfully run it.
In case you have a dark background, change the line and text color of YaoPlots.plot:
CircuitStyles.textcolor[]="yellow"
CircuitStyles.linecolor[]="yellow"
Reply: Thank you for this suggestion, and I will put these codes in the revised Readme.md.
Thanks for the detailed reply. I admit I did not read the README.md file carefully. I am at fault. Sorry about that.
Gordon.
Hi,
Your code has multiple issues preventing it from running on the Mac M1 on Big Sur with Julia 1.8.2 . Below is a version that runs correctly: Issues:
In case you have a dark background, change the line and text color of YaoPlots.plot:
Cheers,
Gordon
Working code