File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -805,6 +805,7 @@ function get_nsteps(basis::CompositeBasis)
805805 return get_nsteps (b)
806806 end
807807 end
808+ return 0
808809end
809810
810811"""
@@ -818,14 +819,15 @@ function get_dt(basis::WaveguideBasis)
818819 basis. dt
819820end
820821function get_dt (basis:: Basis )
821- 0
822+ 0.0
822823end
823824function get_dt (basis:: CompositeBasis )
824825 for b in basis. bases
825- if get_dt (b) != 0
826+ if get_dt (b) != 0.0
826827 return get_dt (b)
827828 end
828829 end
830+ return 0.0
829831end
830832
831833"""
Original file line number Diff line number Diff line change 108108See documentation for [`waveguide_evolution`](@ref) on how to define `fout`. J should be a list of collapse operators following documentation of [`timeevolution.mcwf_dynamic`](https://docs.qojulia.org/api/#QuantumOptics.timeevolution.mcwf_dynamic).
109109"""
110110function fast_unitary (times_eval,psi,H;order= 2 ,fout= nothing )
111- if fout != = nothing
112- fout_type = QuantumOptics. pure_inference (fout)
113- output_container = Array {fout_type} (undef,length (times_eval))
114- end
115111 isapprox (norm (psi),1 ,rtol= 10 ^ (- 6 )) || @warn " Initial waveguidestate is not normalized. Consider passing norm=true to the state generation function."
116112 dt = get_dt (H. basis_l)
117113 U = generate_unitary (H,dt,order)
Original file line number Diff line number Diff line change 1- using WaveguideQED, JET
2-
3- using JET: ReportPass, BasicPass, InferenceErrorReport, UncaughtExceptionReport
4-
5- # Custom report pass that ignores `UncaughtExceptionReport`
6- # Too coarse currently, but it serves to ignore the various
7- # "may throw" messages for runtime errors we raise on purpose
8- # (mostly on malformed user input)
9- struct MayThrowIsOk <: ReportPass end
10-
11- # ignores `UncaughtExceptionReport` analyzed by `JETAnalyzer`
12- (:: MayThrowIsOk )(:: Type{UncaughtExceptionReport} , @nospecialize (_... )) = return
13-
14- # forward to `BasicPass` for everything else
15- function (:: MayThrowIsOk )(report_type:: Type{<:InferenceErrorReport} , @nospecialize (args... ))
16- BasicPass ()(report_type, args... )
17- end
18-
19- rep = report_package (" WaveguideQED" ;
20- report_pass= MayThrowIsOk (), # TODO have something more fine grained than a generic "do not care about thrown errors"
21- ignored_modules= (
22- ))
23-
24- @show rep
25- @test_broken length (JET. get_reports (rep)) == 0 # TODO JET reports issues
1+ @testset " JET checks" begin
2+ using JET
3+ using Test
4+ using WaveguideQED
5+
6+ rep = JET. report_package (WaveguideQED, target_defined_modules = true )
7+ println (rep)
8+ @testset length (JET. get_reports (rep)) <= 10
9+ @test_broken length (JET. get_reports (rep)) == 0
10+ end
You can’t perform that action at this time.
0 commit comments