Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor indexing #230

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
TermInterface = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[compat]
Combinatorics = "1"
Expand All @@ -27,6 +28,7 @@ SciMLBase = "1, 2"
SymbolicUtils = "3.6.0"
Symbolics = "6"
TermInterface = "2"
UUIDs = "1"
julia = "1.6"

[extras]
Expand Down
33 changes: 19 additions & 14 deletions src/QuantumCumulants.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const MTK = ModelingToolkit
using Combinatorics: partitions, combinations, levicivita
using LinearAlgebra

using UUIDs

using QuantumOpticsBase
import QuantumOpticsBase: ⊗, tensor

Expand All @@ -33,13 +35,14 @@ export HilbertSpace, ProductSpace, ⊗, tensor,
ClusterSpace,
scale,
transition_superscript,
Index, reorder, IndexedOperator, SingleSum, IndexedVariable, DoubleIndexedVariable,
DoubleSum, indexed_complete, IndexedCorrelationFunction, scale_term,
scaleME, evalME, indexed_complete!, indexed_meanfield, subst_reds, AvgSums, plotME,
IndexedAverageSum, IndexedAverageDoubleSum, SpecialIndexedTerm, find_missing_sums, Σ, ∑,
evaluate, value_map, NumberedOperator, change_index, order_by_index, split_sums, insert_index, eval_term,
MeanfieldNoiseEquations,
IndexedMeanfieldNoiseEquations#, indexed_arithmetic, indexed_noise, simplified_indexed_complete!
Index, reorder, IndexedOperator, IndexedVariable, DoubleIndexedVariable, IndexedParameter,
Sum, Σ, ∑, change_index, has_index,
# DoubleSum, indexed_complete, IndexedCorrelationFunction, scale_term,
# scaleME, evalME, indexed_complete!, indexed_meanfield, subst_reds, AvgSums, plotME,
# IndexedAverageSum, IndexedAverageDoubleSum, SpecialIndexedTerm, find_missing_sums, Σ, ∑,
# evaluate, value_map, NumberedOperator, change_index, order_by_index, split_sums, insert_index, eval_term,
MeanfieldNoiseEquations
# IndexedMeanfieldNoiseEquations#, indexed_arithmetic, indexed_noise, simplified_indexed_complete!


const NO_METADATA = SymbolicUtils.NO_METADATA
Expand All @@ -64,14 +67,16 @@ include("scale.jl")
include("measurement_backaction.jl")
include("measurement_backaction_indices.jl")
include("latexify_recipes.jl")
include("printing.jl")
include("indexing.jl")
include("index_double_sums.jl")
include("index_average.jl")
include("index_meanfield.jl")
include("index_scale.jl")
include("index_correlation.jl")
include("index_utils.jl")
include("indexing_sums.jl")
include("indexing_utils.jl")
include("printing.jl")
# include("index_double_sums.jl")
# include("index_average.jl")
# include("index_meanfield.jl")
# include("index_scale.jl")
# include("index_correlation.jl")
# include("index_utils.jl")


@deprecate heisenberg(args...; kwargs...) meanfield(args...; kwargs...)
Expand Down
2 changes: 0 additions & 2 deletions src/average.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ function cumulant_expansion(x::SymbolicUtils.Symbolic,order::Integer;simplify=tr
cumulants = [cumulant_expansion(arg,order;kwargs...) for arg in args]
return f(cumulants...)
end
elseif x isa AvgSums
return _cumulant_expansion(x,order;simplify,kwargs...) # basically just another cumulant_expansion dispatch
else
return x
end
Expand Down
Loading
Loading