Open prateekchawla168 opened 3 months ago
I would prefer to keep them as optional dependencies instead of direct dependencies. Ideally we would organize the code as a package extension: https://pkgdocs.julialang.org/v1/creating-packages/#Conditional-loading-of-code-in-packages-(Extensions).
Motivation:
I wanted to tomograph and reconstruct a state from the output from a quantum circuit I had implemented in PastaQ, but I kept getting
Error: 'empirical_probabilities' is not defined
. This led me to explore the project code, and I ended up making the functionality work. I have added my changes as a PR.Small changes to some files in the project, I have added a list here:
.vscode
to.gitignore
. This is mainly for cleanup. :)fulltomography.jl
in the module.]
to go into package mode, is formatted as code instead of regular text)fulltomography.jl
into the module proper, removed the requirement for optionalSCS
andConvex
, and made them as required dependencies.fulltomography.jl
now importsSCS
,Convex
, andMathOptInterface
separately. The earlier importconst MOI = SCS.MathOptInterface
would throw an error.fulltomography.jl
had some inconsistent implementations for the maximum likelihood keyword, fixed everything to be consistent.runtests.jl
to use afilter
, not an explicit list of tests. This can later be upgraded to broadcast the logical&&
operation on the array returned fromreaddir()
, but requires >=Julia v1.7.test_fulltomography.jl
to use the new keyword for maximum likelihood.test_gpu.jl
to add Phase damping noise as well, and create a newtestset
for depolarizing noise. This takes care of the fact that even ifeltype
isnothing
, the output ofruncircuit
in case of depolarizing noise is aComplexF64
, not aFloat64
.test_io.jl
to write test output data to adata/
subdirectory in thetests
folder, so output of testing can be kept separately, keeping the code directory clean. Currently, this directory is added in the .gitignore, but can be removed in case test outputs are needed here.