Hey! Sorry if I am misunderstanding your intentions.
QuantumOptics.jl is a so called package. It is meant to be installed via the package manager. In particular, a package defines its external dependencies and the package manager will resolve them for you.
Since the package is filed in Julia’s package registry, issuing ] add QuantumOptics from the REPL is enough to install it. Note that there is no need to manually clone or download the files from GitHub.
After installation has finished, using QuantumOptics will make the functionality available in the running Julia session. This will essentially load the package by executing the file src/QuantumOptics.jl – not master.jl like you tried. When trying to run master.jl first, a lot of code that should have been loaded first hasn’t, and hence the error you got.
If you are looking to use the functionality the package offers e.g as demonstrated in the docs Tutorial · QuantumOptics.jl, there is nothing more to do.
If you want to dig into the source and potentially make changes or extend it, I would recommend using the package manager to “develope” the package: ] dev QuantumOptics will clone from GitHub, resolve dependencies and make the source files available under ~/.julia/dev/QuantumOptics, although you are free to change that path.
So you could now open that folder in VSCode, start a Julia REPL, and load the package as above with using QuantumOptics while browsing around the source and changing things.
In all of this, it is usually wise to keep separate environments for different projects. It helps to reduce potential dependency clashes massively. Maybe you are familiar with virtual environments in Python. Julia has a similar mechanism. It is detailed in the Pkg manual linked above and a very recommended read.
Thank you so much for the quick reply. I followed your steps and got through the installation. After installation I hit delete (on Mac) to go back to julia> and executed using QuantumOptics but when I type in src/QuantumOptics.jl afterwards, I get the following error:
ERROR: UndefVarError: jl not defined
 getproperty(x::Module, f::Symbol)
@ Base ./Base.jl:35
 top-level scope
I’m trying to open some of their examples to test them out myself. I ended up installing a dozen packages (as they were suggested in the errors), so after all that, trying to run QuantumOptics.jl I get the following error: