|
5 | 5 | A_op = a+a' |
6 | 6 | spectra(x) = (x>0) * 0.5 |
7 | 7 | for sec_cutoff in [0, 0.1, 1, 3, -1] |
8 | | - R = bloch_redfield_tensor(H, [(A_op, spectra)], [a^2], sec_cutoff = sec_cutoff, fock_basis = true) |
9 | | - R_eig, evecs = bloch_redfield_tensor(H, [(A_op, spectra)], [a^2], sec_cutoff = sec_cutoff, fock_basis = false) |
| 8 | + R = bloch_redfield_tensor(H, ((A_op, spectra), ), [a^2], sec_cutoff = sec_cutoff, fock_basis = Val(true)) |
| 9 | + R_eig, evecs = bloch_redfield_tensor(H, ((A_op, spectra), ), [a^2], sec_cutoff = sec_cutoff, fock_basis = Val(false)) |
10 | 10 | @test isa(R, QuantumObject) |
11 | 11 | @test isa(R_eig, QuantumObject) |
12 | 12 | @test isa(evecs, QuantumObject) |
|
27 | 27 |
|
28 | 28 | # this test applies for limited cutoff |
29 | 29 | lindblad = lindblad_dissipator(a) |
30 | | - computation = brterm(H, A_op, spectra, sec_cutoff = 1.5, fock_basis = true) |
| 30 | + computation = brterm(H, A_op, spectra, sec_cutoff = 1.5, fock_basis = Val(true)) |
31 | 31 | @test isapprox(lindblad, computation, atol = 1e-15) |
32 | 32 | end |
33 | 33 |
|
|
38 | 38 | A_op = a+a' |
39 | 39 | spectra(x) = x>0 |
40 | 40 | for sec_cutoff in [0, 0.1, 1, 3, -1] |
41 | | - R = brterm(H, A_op, spectra, sec_cutoff = sec_cutoff, fock_basis = true) |
42 | | - R_eig, evecs = brterm(H, A_op, spectra, sec_cutoff = sec_cutoff, fock_basis = false) |
| 41 | + R = brterm(H, A_op, spectra, sec_cutoff = sec_cutoff, fock_basis = Val(true)) |
| 42 | + R_eig, evecs = brterm(H, A_op, spectra, sec_cutoff = sec_cutoff, fock_basis = Val(false)) |
43 | 43 | @test isa(R, QuantumObject) |
44 | 44 | @test isa(R_eig, QuantumObject) |
45 | 45 | @test isa(evecs, QuantumObject) |
|
76 | 76 | a = destroy(N) + destroy(N)^2/2 |
77 | 77 | A_op = a+a' |
78 | 78 | for spectra in spectra_list |
79 | | - R = brterm(H, A_op, spectra, sec_cutoff = 0.1, fock_basis = true) |
80 | | - R_eig, evecs = brterm(H, A_op, spectra, sec_cutoff = 0.1, fock_basis = false) |
| 79 | + R = brterm(H, A_op, spectra, sec_cutoff = 0.1, fock_basis = Val(true)) |
| 80 | + R_eig, evecs = brterm(H, A_op, spectra, sec_cutoff = 0.1, fock_basis = Val(false)) |
81 | 81 | @test isa(R, QuantumObject) |
82 | 82 | @test isa(R_eig, QuantumObject) |
83 | 83 | @test isa(evecs, QuantumObject) |
|
112 | 112 |
|
113 | 113 | @test all(me.expect .== brme.expect) |
114 | 114 | end |
115 | | -end; |
| 115 | +end |
0 commit comments