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 | |
import Base: start, next, done | |
abstract QuPropagatorMethod | |
abstract QuantumEquation | |
immutable SE{H<:QuBase.AbstractQuMatrix} <: QuantumEquation | |
hamiltonian::H |
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 | |
import Base: start, next, done | |
abstract QuPropagatorMethod | |
abstract QuantumEquation | |
immutable SE{H<:QuBase.AbstractQuMatrix, V<:QuBase.AbstractQuVector} <: QuantumEquation | |
hamiltonian::H |
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 Compat | |
using Docile | |
using ODE | |
import Base: start, next, done | |
abstract QuPropagatorMethod | |
immutable QuPropagator{QPM<:QuPropagatorMethod} |
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 Docile | |
using ODE | |
using Compat | |
import Base: start, next, done | |
abstract QuPropagatorMethod | |
immutable QuPropagator{QPM<:QuPropagatorMethod} |
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 Docile | |
using ODE | |
import Base: start, next, done | |
abstract QuPropagatorMethod | |
immutable QuPropagator{QPM<:QuPropagatorMethod} | |
hamiltonian |
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 ODE | |
immutable QuODE45 <: QuPropagatorMethod | |
end | |
function propagate(prob::QuODE45, op, t, current_t, current_qustate) | |
next_state = ODE.ode45((t,y)->coeffs(op)*y, coeffs(current_qustate), [current_t, t], points=:specified)[2][2] | |
return QuArray(next_state) | |
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
function propagate(prob::QuKrylov, op, dt, current_qustate) | |
basis_size = prob.options[:NC] | |
N = min(basis_size, length(current_qustate)) | |
v = Array(typeof(current_qustate),0) | |
push!(v,zeros(current_qustate)) | |
push!(v,current_qustate) | |
# w = Array(typeof(current_qustate),0) | |
w = Array(typeof(current_qustate),1) | |
alpha = Array(Complex{Float64},0) | |
beta = Array(Complex{Float64},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
using QuBase | |
using Docile | |
import Base: start, next, done | |
abstract QuPropagatorMethod | |
immutable QuPropagator{QPM<:QuPropagatorMethod} | |
hamiltonian | |
init_state::QuVector |
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 Docile | |
import Base: start, next, done | |
abstract QuPropagatorMethod | |
immutable QuPropagator{QPM<:QuPropagatorMethod} | |
hamiltonian | |
init_state::QuVector |
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 Docile | |
import Base: start, next, done | |
abstract QuantumPropagator{B<:AbstractBasis,T,A} | |
type StepPropagator{B<:AbstractBasis,T,A} <: QuantumPropagator{B,T,A} | |
hamiltonian::QuMatrix{B,T,A} | |
init_state::QuVector |