Skip to content

Commit 37bb440

Browse files
authored
docs: Fix small issues in docstrings (#256)
Changes: - Fix capitalization of Rabi and spelling of coordinate. - Remove mention of BLACK OPAL. - Improve consistency of export method docstrings.
1 parent a072bba commit 37bb440

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

qctrlopencontrols/driven_controls/driven_control.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def _qctrl_expanded_export_content(self, coordinates: str) -> dict[str, Any]:
383383
Parameters
384384
----------
385385
coordinates : str, optional
386-
Indicates the co-ordinate system requested. Must be
386+
Indicates the coordinate system requested. Must be
387387
'cylindrical'or 'cartesian'. Defaults to 'cylindrical'.
388388
389389
Returns
@@ -428,10 +428,10 @@ def _export_to_qctrl_expanded_format(
428428
filename : str
429429
Name and path of the file to save the control into.
430430
file_type : str, optional
431-
One of 'CSV' or 'JSON'; defaults to 'CSV'.
431+
One of 'CSV' or 'JSON'. Defaults to 'CSV'.
432432
coordinates : str, optional
433-
Indicates the co-ordinate system requested. Must be one of
434-
'cylindrical', 'cartesian'; defaults to 'cylindrical'
433+
Indicates the coordinate system requested. Must be one of
434+
'cylindrical' or 'cartesian'. Defaults to 'cylindrical'.
435435
"""
436436

437437
control_info = self._qctrl_expanded_export_content(coordinates=coordinates)

qctrlopencontrols/driven_controls/predefined.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _validate_rabi_parameters(rabi_rotation: float, maximum_rabi_rate: float) ->
3636
The total polar angle to be performed by the pulse.
3737
Defined in polar coordinates.
3838
maximum_rabi_rate : float
39-
The maximum rabi frequency for the pulse.
39+
The maximum Rabi frequency for the pulse.
4040
"""
4141

4242
check_arguments(

qctrlopencontrols/dynamic_decoupling_sequences/dynamic_decoupling_sequence.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class DynamicDecouplingSequence:
4747
offsets : np.ndarray
4848
The times offsets :math:`\{t_j\}` in seconds for the center of pulses.
4949
rabi_rotations : np.ndarray
50-
The rabi rotation :math:`\omega_j` at each time offset :math:`t_j`.
50+
The Rabi rotation :math:`\omega_j` at each time offset :math:`t_j`.
5151
azimuthal_angles : np.ndarray
5252
The azimuthal angle :math:`\phi_j` at each time offset :math:`t_j`.
5353
detuning_rotations : np.ndarray
@@ -235,18 +235,18 @@ def export_to_file(
235235
Name and path of the file to save the control into.
236236
file_format : str
237237
Specified file format for saving the control. Defaults to
238-
'Q-CTRL expanded'; Currently it does not support any other format.
238+
'Q-CTRL expanded'. Currently it does not support any other format.
239239
For detail of the `Q-CTRL Expanded Format` consult
240240
:py:meth:`DrivenControl.export_to_file`.
241241
file_type : str, optional
242242
One of 'CSV' or 'JSON'. Defaults to 'CSV'.
243243
coordinates : str, optional
244-
Indicates the co-ordinate system requested. Must be one of
245-
'cylindrical', 'cartesian'; defaults to 'cylindrical'
244+
Indicates the coordinate system requested. Must be one of
245+
'cylindrical' or 'cartesian'. Defaults to 'cylindrical'.
246246
maximum_rabi_rate : float, optional
247-
Maximum Rabi Rate; Defaults to :math:`2\pi`.
247+
Maximum Rabi rate. Defaults to :math:`2\pi`.
248248
maximum_detuning_rate : float, optional
249-
Maximum Detuning Rate; Defaults to :math:`2\pi`.
249+
Maximum detuning rate. Defaults to :math:`2\pi`.
250250
251251
Raises
252252
------
@@ -255,9 +255,8 @@ def export_to_file(
255255
256256
Notes
257257
-----
258-
The sequence is converted to a driven control using the maximum rabi and detuning
259-
rate. The driven control is then exported. This is done to facilitate a coherent
260-
integration with Q-CTRL BLACK OPAL's 1-Qubit workspace.
258+
The sequence is converted to a driven control using the maximum Rabi and detuning
259+
rate. The driven control is then exported.
261260
"""
262261

263262
convert_dds_to_driven_control(

tests/test_dynamical_decoupling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ def test_conversion_of_z_pi_2_pulses_at_extremities():
567567
def test_conversion_of_pulses_with_arbitrary_rabi_rotations():
568568
"""
569569
Tests if the method to convert a DDS to driven controls handles properly
570-
Y pulses with rabi rotations that assume arbitrary values between 0 and pi.
570+
Y pulses with Rabi rotations that assume arbitrary values between 0 and pi.
571571
"""
572572
_duration = 3.0
573573
_offsets = np.array([0.5, 1.5, 2.5])

0 commit comments

Comments
 (0)