Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b4a1185
Start refactoring indexing; basics seem to work
david-pl Dec 17, 2024
0211b6c
Start implementing sums
david-pl Dec 17, 2024
944cc40
Continue with sums
david-pl Dec 18, 2024
606823a
Draft new indexed cnumbers implementation
david-pl Jan 7, 2025
73ada0e
Properly handle CNumber sums and nested sums
david-pl Jan 16, 2025
1548b60
Deprecate IndexedVariable -- tests pass up to actual example
david-pl Jan 16, 2025
f0b5cee
Deprecate IndexedVariable with two indices as well
david-pl Jan 17, 2025
e7f0d7b
Use i!=j instead of (1 - i==j) in indexed transition products
david-pl Jan 17, 2025
70c99d4
Start working on actual meanfield derivation
david-pl Jan 18, 2025
93c6b7a
Make IndexedParameter and CSum actual functions rather than symbolic …
david-pl Jan 18, 2025
428d988
Meanfield derivation works without actual errors in the code
david-pl Jan 18, 2025
a9051b2
Printing for sums and indexed parameters
david-pl Jan 18, 2025
9d0bc75
Move printing.jl to end of files included in main
david-pl Jan 18, 2025
400aebf
Sort indices in nested sums
david-pl Jan 18, 2025
1e0a4a1
Add test for many-atom laser example
david-pl Jan 18, 2025
165f73d
Implement find_missing for indexed variables
david-pl Jan 25, 2025
a3c4a2c
Completion works
david-pl Jan 27, 2025
cf40f69
Brute force solution to substitute terms to 0 by looping over find_mi…
david-pl Jan 27, 2025
8489bdc
Add rule to simplify products of indices
david-pl Jan 28, 2025
cc9c117
Implement some more simplifications for sums
david-pl Jan 28, 2025
36591b1
Implement index evaluation -- can almost solve numerically now
david-pl Jan 28, 2025
c865fd4
Properly set shape for IndexedParameter when substituting ranges -- t…
david-pl Jan 30, 2025
eb4a4b7
Fix commutators for integer indexes -- solve now works
david-pl Jan 31, 2025
6968809
Add missing + method
david-pl Jan 31, 2025
010baa5
Fix some bugs -- solution is now actually correct!
david-pl Jan 31, 2025
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
34 changes: 20 additions & 14 deletions src/QuantumCumulants.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module QuantumCumulants

import SymbolicUtils
import SymbolicUtils: substitute, BasicSymbolic
using SymbolicUtils: @rule

import Symbolics
import TermInterface
Expand All @@ -15,6 +16,8 @@ const MTK = ModelingToolkit
using Combinatorics: partitions, combinations, levicivita
using LinearAlgebra

using UUIDs

using QuantumOpticsBase
import QuantumOpticsBase: ⊗, tensor

Expand All @@ -33,13 +36,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, evaluate,
# 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 +68,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