Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.