This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
immutable QuMCWF <: QuPropagatorMethod | |
end | |
type QuMCWFEnsemble{QA<:QuBase.AbstractQuArray} | |
ntraj | |
rho::QA | |
decomp | |
QuMCWFEnsemble(ntraj, rho, decomp) = new(1:1:ntraj, rho, decomp) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
immutable QuLindbladMasterEq{H<:QuBase.AbstractQuMatrix, V<:QuBase.AbstractQuArray} <: QuEquation | |
hamiltonian::H | |
collapse_ops::Vector{V} | |
QuLindbladMasterEq(hamiltonian, collapse_ops) = new(hamiltonian, collapse_ops) | |
end | |
QuLindbladMasterEq{H<:QuBase.AbstractQuMatrix, V<:QuBase.AbstractQuArray}(hamiltonian::H, collapse_ops::Vector{V}) = QuLindbladMasterEq{H,V}(hamiltonian, collapse_ops) | |
function lindblad_op(hamiltonian::QuBase.AbstractQuMatrix, collapse_ops::Vector) | |
nb = size(coeffs(hamiltonian), 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lindblad_op(hamiltonian::QuBase.AbstractQuMatrix, collapse_ops::Vector) | |
nb = size(coeffs(hamiltonian), 1) | |
nlop = length(collapse_ops) | |
heff = zeros(typeof(im*one(eltype(hamiltonian))), size(coeffs(hamiltonian))) | |
for l=1:nlop | |
heff = heff + 0.5*coeffs(collapse_ops[l])'*coeffs(collapse_ops[l]) | |
end | |
SI = Array(Int,0) | |
SJ = Array(Int,0) | |
Lvals = Array(typeof(im*one(eltype(hamiltonian))),0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lindblad_op(hamiltonian::QuBase.AbstractQuMatrix, collapse_ops::Vector) | |
nb = size(coeffs(hamiltonian), 1) | |
nlop = length(collapse_ops) | |
heff = zeros(typeof(im*one(eltype(hamiltonian))), size(coeffs(hamiltonian))) | |
for l=1:nlop | |
heff = heff + 0.5*coeffs(collapse_ops[l])'*coeffs(collapse_ops[l]) | |
end | |
SI = Array(Int,0) | |
SJ = Array(Int,0) | |
Lvals = Array(typeof(im*one(eltype(hamiltonian))),0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
immutable QuLindbladMasterEq{H<:QuBase.AbstractQuMatrix, V<:QuBase.AbstractQuArray} <: QuEquation | |
hamitonian::H | |
collapse_ops::Array{V} | |
QuLindbladMasterEq(hamiltonian, collapse_ops) = new(hamiltonian, collapse_ops) | |
end | |
QuLindbladMasterEq{H<:QuBase.AbstractQuMatrix, V<:QuBase.AbstractQuArray}(hamiltonian::H, collapse_ops::Array{V}) = lindblad(hamiltonian, collapse_ops) | |
function lindblad(hamiltonian::QuBase.AbstractQuMatrix, collapse_ops::Vector{QuBase.AbstractQuMatrix}) | |
nb = size(coeffs(hamiltonian), 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################## | |
##### ##### | |
##### propexpmsolvers.jl ##### | |
##### ##### | |
################################################## | |
abstract QuExponential <: QuPropagatorMethod | |
immutable QuExpokit <: QuExponential | |
options::Dict{Symbol, Any} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################## | |
##### ##### | |
##### propodesolvers.jl ##### | |
##### ##### | |
################################################## | |
abstract QuODESolvers <: QuPropagatorMethod | |
const type_to_method_ode = @compat Dict{Any, Any}(:QuODE45 => ODE.ode45, :QuODE78 => ODE.ode78, :QuODE23s => ODE.ode23s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################## | |
##### ##### | |
##### propstepsolvers.jl ##### | |
##### ##### | |
################################################## | |
immutable QuEuler <: QuPropagatorMethod | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################## | |
##### ##### | |
##### propmachinery.jl ##### | |
##### ##### | |
################################################## | |
abstract QuPropagatorMethod | |
abstract QuEquation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuBase | |
using Expokit | |
import Base: start, next, done | |
abstract QuPropagatorMethod | |
abstract QuantumEquation | |
immutable SchrodingerEquation{H<:QuBase.AbstractQuMatrix} <: QuantumEquation | |
hamiltonian::H |