Skip to content

Commit

Permalink
vectorise rho
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgpitch committed Oct 6, 2018
1 parent 541bda8 commit d8b14f5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ctrl_pulse_optim-example-Lindbladian-compare_map_dm_evo.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@
# and that the fidelity error, i.e. distance from the target, is give
# by the trace of the difference between the target and evolved operators

result_s = cpo.optimize_pulse(drift, ctrls, rho0, rho_targ, n_ts, evo_time,
result_s = cpo.optimize_pulse(drift, ctrls, rho0_vec, rho_targ_vec,
n_ts, evo_time,
fid_err_targ=fid_err_targ, min_grad=min_grad,
max_iter=max_iter, max_wall_time=max_wall_time,
amp_lbound=-0.5, amp_ubound=0.5,
Expand All @@ -204,7 +205,7 @@
result_s.stats.report()

print("Final evolution\n{}\n".format(result_s.evo_full_final))
print("********* Summary *****************")
print("********* Summary - state optim *******")
print("Initial fidelity error {}".format(result_s.initial_fid_err))
print("Final fidelity error {}".format(result_s.fid_err))
print("unit gate fidelity {}".format(np.sqrt(1- result_s.fid_err)))
Expand Down Expand Up @@ -252,7 +253,7 @@
print("Stats follow:")
result_s.stats.report()
print("Final evolution\n{}\n".format(result_m.evo_full_final))
print("####### Summary #######")
print("######## Summary - map optim ########")
print("Initial fidelity error {}".format(result_m.initial_fid_err))
print("Final fidelity error {}".format(result_m.fid_err))
print("unit gate fidelity {}".format(np.sqrt(1- result_m.fid_err)))
Expand Down

0 comments on commit d8b14f5

Please sign in to comment.