forked from qojulia/QuantumOptics.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix rounding tolerance bug for entropy_vn * Update entropy_vn and REQUIRE * Implement some predefined states (qojulia#215) * Implement thermal state * Implement different states * Fix semiclassical stochastics commit bc1d96d Author: david-pl <[email protected]> Date: Mon May 28 09:54:48 2018 +0200 Make default noise in-place commit cc6c7f0 Author: david-pl <[email protected]> Date: Thu May 24 16:57:45 2018 +0200 Minor changes commit 986f10a Author: david-pl <[email protected]> Date: Wed May 23 16:58:32 2018 +0200 Add tests commit c3c1452 Author: david-pl <[email protected]> Date: Wed May 23 11:16:13 2018 +0200 Update REQUIRE commit 3f2ff9f Author: David Plankensteiner <[email protected]> Date: Wed May 23 08:52:20 2018 +0200 Update docstrings commit ee4d967 Author: david-pl <[email protected]> Date: Tue May 22 14:49:39 2018 +0200 Fix bug for Euler algs with scalar noise commit 046955d Author: david-pl <[email protected]> Date: Tue May 22 10:35:30 2018 +0200 Fix alg default value commit ce310dd Author: david-pl <[email protected]> Date: Tue May 22 10:17:33 2018 +0200 Change noise_rate_prototype syntax commit 92f59a6 Author: David Plankensteiner <[email protected]> Date: Sat May 19 20:08:30 2018 +0200 Update stochastic schroedinger commit a4fdf7d Author: David Plankensteiner <[email protected]> Date: Sat May 19 19:16:45 2018 +0200 Stochastic semiclassical tests pass commit 56d2276 Author: david-pl <[email protected]> Date: Fri May 18 17:02:28 2018 +0200 Fix combination of quantum and classical noise in schroedinger * Fix bug for classical nondiagonal noise * Change sparse diagonalization and implement conj commit cadef00 Author: david-pl <[email protected]> Date: Tue May 29 16:21:14 2018 +0200 Make non-hermitian warning inline commit 732574b Author: david-pl <[email protected]> Date: Tue May 29 15:42:37 2018 +0200 Add n back to sparse diagonalization commit af810ff Author: david-pl <[email protected]> Date: Tue May 29 15:30:04 2018 +0200 Add test commit 5d3c7ae Author: david-pl <[email protected]> Date: Tue May 29 15:27:34 2018 +0200 Fix diagonalization and conjugate issues * Add option to normalize stochastic schroedinger commit e0a2b50 Author: david-pl <[email protected]> Date: Thu Jun 21 13:02:16 2018 +0200 Make semiclassical normalization more efficient commit d19673d Author: david-pl <[email protected]> Date: Thu Jun 21 12:05:59 2018 +0200 Fix schroedinger tests commit 241243a Author: david-pl <[email protected]> Date: Thu Jun 21 11:48:20 2018 +0200 Fix semiclassical schroedinger normalization commit 40ace6b Author: david-pl <[email protected]> Date: Thu Jun 21 09:26:53 2018 +0200 Update REQUIRE to new StochasticDiffEq commit d9503a3 Author: david-pl <[email protected]> Date: Wed Jun 20 17:23:35 2018 +0200 Add option to renormalize state in schroedinger commit e6a7331 Author: david-pl <[email protected]> Date: Wed Jun 20 17:23:16 2018 +0200 Change default algorithm * Update to DiffEq with better callbacks for MCWF * Fix typo in docstring * Better recasting for master * Implement sparse superoperator - sparse multiplication * Implemented faster expect function for Kets with DenseOperators and SparseOperators. Should be much faster, at least for SparseOperators. * Remove unnecessary term from stochastic master * Implement coherent spin states (qojulia#222) * Change stochastic master and implement homodyne CM scheme * Add info message to slow sparse diagonalization commit ba5ebec Author: David Plankensteiner <[email protected]> Date: Mon Jul 9 17:15:00 2018 +0200 Suppress info in tests commit e36f652 Author: David Plankensteiner <[email protected]> Date: Mon Jul 9 17:13:44 2018 +0200 Print info when sparse diagonalization is used * Fix typo in Carmichael docstring
- Loading branch information
1 parent
b571452
commit 614f390
Showing
30 changed files
with
596 additions
and
932 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
julia 0.6 | ||
Compat 0.52.0 | ||
OrdinaryDiffEq 3.8.0 | ||
DiffEqCallbacks 1.0 | ||
StochasticDiffEq 4.2.4 | ||
Compat 0.64.0 | ||
OrdinaryDiffEq 3.19.1 | ||
DiffEqCallbacks 1.1 | ||
StochasticDiffEq 4.4.5 | ||
RecursiveArrayTools |
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
module state_definitions | ||
|
||
export randstate, randoperator, thermalstate, coherentthermalstate, phase_average, passive_state | ||
|
||
using ..bases, ..states, ..operators, ..operators_dense, ..fock | ||
|
||
|
||
""" | ||
randstate(basis) | ||
Calculate a random normalized ket state. | ||
""" | ||
function randstate(b::Basis) | ||
psi = Ket(b, rand(Complex128, length(b))) | ||
normalize!(psi) | ||
psi | ||
end | ||
|
||
""" | ||
randoperator(b1[, b2]) | ||
Calculate a random unnormalized dense operator. | ||
""" | ||
randoperator(b1::Basis, b2::Basis) = DenseOperator(b1, b2, rand(Complex128, length(b1), length(b2))) | ||
randoperator(b::Basis) = randoperator(b, b) | ||
|
||
""" | ||
thermalstate(H,T) | ||
Thermal state ``exp(-H/T)/Tr[exp(-H/T)]``. | ||
""" | ||
function thermalstate(H::Operator,T::Real) | ||
return normalize(expm(-full(H)/T)) | ||
end | ||
|
||
""" | ||
coherentthermalstate(basis::FockBasis,H,T,alpha) | ||
Coherent thermal state ``D(α)exp(-H/T)/Tr[exp(-H/T)]D^†(α)``. | ||
""" | ||
function coherentthermalstate(basis::FockBasis,H::Operator,T::Real,alpha::Number) | ||
return displace(basis,alpha)*thermalstate(H,T)*dagger(displace(basis,alpha)) | ||
end | ||
|
||
""" | ||
phase_average(rho) | ||
Returns the phase-average of ``ρ`` containing only the diagonal elements. | ||
""" | ||
function phase_average(rho::DenseOperator) | ||
return DenseOperator(basis(rho),diagm(diag(rho.data))) | ||
end | ||
|
||
""" | ||
passive_state(rho,IncreasingEigenenergies::Bool=true) | ||
Passive state ``π`` of ``ρ``. IncreasingEigenenergies=true means that higher indices correspond to higher energies. | ||
""" | ||
function passive_state(rho::DenseOperator,IncreasingEigenenergies::Bool=true) | ||
return DenseOperator(basis(rho),diagm(sort(abs.(eigvals(rho.data)),rev=IncreasingEigenenergies))) | ||
end | ||
|
||
end #module | ||
|
Oops, something went wrong.