Skip to content

Commit

Permalink
fix: Update coefficient keys in Experiment class to remove unnecessar…
Browse files Browse the repository at this point in the history
…y '/2' suffix
  • Loading branch information
Akinori Machino committed Dec 27, 2024
1 parent 8b01329 commit b5ef4ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qubex/experiment/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6484,17 +6484,17 @@ def cr_hamiltonian_tomography(
)
coeffs = dict(
zip(
["IX/2", "IY/2", "IZ/2", "ZX/2", "ZY/2", "ZZ/2"],
["IX", "IY", "IZ", "ZX", "ZY", "ZZ"],
Omega / (2 * np.pi), # GHz
)
)

for key, value in coeffs.items():
print(f"{key}: {value * 1e3:+.6f} MHz")

cr_phase_est = -np.arctan2(coeffs["ZY/2"], coeffs["ZX/2"])
cr_phase_est = -np.arctan2(coeffs["ZY"], coeffs["ZX"])

cancel_pulse = -(coeffs["IX/2"] + 1j * coeffs["IY/2"])
cancel_pulse = -(coeffs["IX"] + 1j * coeffs["IY"])
cancel_amplitude_est = np.abs(cancel_pulse)
cancel_phase_est = np.angle(cancel_pulse)
cancel_amplitude_est = self.calc_control_amplitudes(
Expand Down

0 comments on commit b5ef4ea

Please sign in to comment.