Skip to content

Commit

Permalink
OrdinaryDiffEq-v6, test coherentspinstate (#329)
Browse files Browse the repository at this point in the history
* OrdinaryDiffEq-v6, test coherentspinstate

* Update Project.toml
  • Loading branch information
ChristophHotter committed Apr 4, 2022
1 parent 871183f commit b2618ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "QuantumOptics"
uuid = "6e0679c1-51ea-5a7c-ac74-d61b76210b0c"
version = "v1.0.3"
version = "v1.0.4"

[deps]
Arpack = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97"
Expand All @@ -24,7 +24,7 @@ DiffEqCallbacks = "2"
FFTW = "1"
IterativeSolvers = "0.9"
LinearMaps = "3"
OrdinaryDiffEq = "5"
OrdinaryDiffEq = "5, 6"
QuantumOpticsBase = "0.3"
RecursiveArrayTools = "2"
Reexport = "0.2, 1.0"
Expand Down
5 changes: 2 additions & 3 deletions test/test_phasespace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,13 @@ css = coherentspinstate(b,theta,phi)
css0 = coherentspinstate(b,0,0)
css2 = exp(-0.5im * phi * dense(sigmaz(b))) * exp(-0.5im * theta * dense(sigmay(b))) * css0
@test norm(css - css2) < 1e-12
b_big = SpinBasis(10000) # > 2000 overflows recursive binomial un-moderated with α^n
b_big = SpinBasis(1000) # > 2000 overflows recursive binomial un-moderated with α^n
css_big = coherentspinstate(b_big,theta,phi)
@test abs(1.0 - norm(css_big)) < 1e-12
# we can go bigger than 10000 without overflowing (≈21000 is the limit), but
# at some point we lose more precision to floating-point errors than we'd
# normally want tolerate.
@test abs(1 - norm(coherentspinstate(SpinBasis(21000),theta,phi))) < 1e-10

# @test abs(1 - norm(coherentspinstate(SpinBasis(10000),theta,phi))) < 1e-10

########### YLM test #############
res = 1000
Expand Down

2 comments on commit b2618ee

@ChristophHotter
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/57946

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.4 -m "<description of version>" b2618ee33c9639617bcba11add5484052efa552b
git push origin v1.0.4

Please sign in to comment.