@@ -103,11 +103,8 @@ final_state([0], 100)
103
103
# Define state function for automatic differentiation
104
104
state(p) = final_state(p, 2000)
105
105
106
- # Prepare the jacobian computation using finite differences
107
- prep = DifferentiationInterface.prepare_jacobian(state, AutoFiniteDiff(), [0.0])
108
-
109
106
# Compute both the state and its derivative
110
- ρ, dρ = DifferentiationInterface.value_and_jacobian(state, prep, AutoFiniteDiff(), [0.0])
107
+ ρ, dρ = DifferentiationInterface.value_and_jacobian(state, AutoFiniteDiff(), [0.0])
111
108
112
109
# Reshape the derivative back to matrix form
113
110
dρ = QuantumToolbox.vec2mat(vec(dρ))
@@ -126,7 +123,7 @@ ts = range(0, 2000, 100)
126
123
127
124
QFI_t = map(ts) do t
128
125
state(p) = final_state(p, t)
129
- ρ, dρ = DifferentiationInterface.value_and_jacobian(state, prep, AutoFiniteDiff(), [0.0])
126
+ ρ, dρ = DifferentiationInterface.value_and_jacobian(state, AutoFiniteDiff(), [0.0])
130
127
dρ = QuantumToolbox.vec2mat(vec(dρ))
131
128
compute_fisher_information(ρ, dρ)
132
129
end
0 commit comments