qudit_sim.apps.gates.pi_pulse

qudit_sim.apps.gates.pi_pulse(hgen, qudit_id, level, duration=unit_time * 160, sigma=unit_time * 40, log_level=logging.WARNING)

Find the \(\pi\) pulse for the given level of the given qudit by numerical optimization.

This function finds a DRAG pulse with the specified duration and sigma that minimizes the Euclidean difference between the components array of the final state and the ideal \(\pi\) gate. The target array is zero everywhere except for the single component corresponding to the “X” that excites level of the qudit_id to level+1. The final state is allowed to have arbitrary phase shifts in the unaddressed subspace.

Parameters
  • hgen (HamiltonianBuilder) – Hamiltonian of the system.

  • qudit_id (Hashable) – ID of the qudit to find the \(\pi\) pulse for.

  • level (int) – Index of the lower level in the transition.

  • duration (float) – DRAG pulse duration.

  • sigma (int) – DRAG pulse sigma.

  • log_level (int) – Logging level.

Return type

Tuple[float, Drag]

Returns

The frequency of the drive and the DRAG pulse that implements the \(\pi\) pulse.