Closed Fe-r-oz closed 3 months ago
Good catch. We should not have testing which depends on random seed, which is what we currently have here. We can adjust this to guarantee convergence in some short number of iterations, by setting a_guess
kwarg of the problem template to fill(π / 2,T) / T / Δt
. This should correspond to starting the problem close to an X rotation, so that all the control needs to do is smooth over the pulse.
Testing due to recent commits, there is another error that occur locally: It has to do with embedded_operators_test.jl
file
EXIT: Maximum Number of Iterations Exceeded.
ERROR: LoadError: KeyError: key :CZ not found
Stacktrace:
[1] getindex(h::Dict{Symbol, Matrix{ComplexF64}}, key::Symbol)
@ Base ./dict.jl:498
[2] top-level scope
@ ~/Desktop/New/quantumcollocation/4/QuantumCollocation.jl/test/embedded_operators_test.jl:90
[3] eval
@ ./boot.jl:385 [inlined]
[4] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
@ Base ./loading.jl:2076
[5] include_string(m::Module, txt::String, fname::String)
@ Base ./loading.jl:2086
[6] #invokelatest#2
@ ./essentials.jl:892 [inlined]
[7] invokelatest
@ ./essentials.jl:889 [inlined]
[8] #3
@ ~/.julia/packages/TestItemRunner/uEMJE/src/TestItemRunner.jl:102 [inlined]
[9] withpath(f::TestItemRunner.var"#3#4"{String, String, Module}, path::String)
@ TestItemRunner ~/.julia/packages/TestItemRunner/uEMJE/src/vendored_code.jl:7
[10] run_testitem(filepath::String, use_default_usings::Bool, setups::Vector{Symbol}, package_name::String, original_code::String, line::Int64, column::Int64, test_setup_module_set::TestItemRunner.TestSetupModuleSet)
@ TestItemRunner ~/.julia/packages/TestItemRunner/uEMJE/src/TestItemRunner.jl:101
[11] run_tests(path::String; filter::Nothing, verbose::Bool)
@ TestItemRunner ~/.julia/packages/TestItemRunner/uEMJE/src/TestItemRunner.jl:185
[12] run_tests(path::String)
@ TestItemRunner ~/.julia/packages/TestItemRunner/uEMJE/src/TestItemRunner.jl:106
[13] top-level scope
@ ~/Desktop/New/quantumcollocation/4/QuantumCollocation.jl/test/runtests.jl:24
[14] include(fname::String)
@ Base.MainInclude ./client.jl:489
[15] top-level scope
@ none:6
in expression starting at /home/Transcendence/Desktop/New/quantumcollocation/4/QuantumCollocation.jl/test/embedded_operators_test.jl:90
in expression starting at /home/Transcendence/Desktop/New/quantumcollocation/4/QuantumCollocation.jl/test/runtests.jl:24
ERROR: Package QuantumCollocation errored during testing
The recent error was because not pulling the recent commits, it's solved.
Test Summary: | Pass Fail Total Time
Package | 218 2 220 3m20.4s
test/direct_sums_test.jl | 44 44 55.6s
test/quantum_utils_test.jl | 71 71 9.6s
test/rollouts_test.jl | 18 18 7.2s
test/problems_test.jl | 1 1 4.5s
src/problem_templates/unitary_minimum_time_problem.jl | 3 3 49.3s
test/quantum_system_utils_test.jl | 15 15 4.8s
src/problem_templates/unitary_robustness_problem.jl | 3 2 5 57.4s
Robust and Subspace Templates | 3 2 5 57.4s
src/problem_templates/unitary_smooth_pulse_problem.jl | 1 1 5.3s
test/losses_test.jl | 21 21 0.7s
test/embedded_operators_test.jl | 28 28 1.2s
src/problem_templates/unitary_direct_sum_problem.jl | 13 13 4.8s
ERROR: LoadError: Some tests did not pass: 218 passed, 2 failed, 0 errored, 0 broken.
What happened?
A bug happened! It's not a bug per se but it seems that probability assertion error which causes one test to fail when testing locally. That ends up in one test failing as shown below.
Output attached below.
Version
main branch
What does this bug affect?
Other information
Julia Version:1.10.2+0.x64.linux.gnu