Skip to content

Commit

Permalink
Fix typos in docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxiLi committed Nov 9, 2021
1 parent 8e839d9 commit 2488892
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/qutip_qip/device/cavityqed.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ def load_circuit(self, qc, schedule_mode="ASAP", compiler=None):

class CavityQEDModel(Model):
"""
The physical model for a dispersive cavity-QED system.
The physical model for :obj:`.DispersiveCavityQED`.
Parameters
----------
num_qubits : int
The number of component systems.
The number of qubits.
num_levels : int, optional
The truncation level of the resonator.
**params :
Expand Down Expand Up @@ -201,7 +201,7 @@ def _old_index_label_map(self):

def _set_up_controls(self):
"""
Generate the Hamiltonians for the spinchain model and save them in the
Generate the Hamiltonians for the cavity-qed model and save them in the
attribute `ctrls`.
Parameters
Expand Down
4 changes: 2 additions & 2 deletions src/qutip_qip/device/circuitqed.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ def topology_map(self, qc):

class SCQubitsModel(Model):
"""
The physical model for superconducting qubits with fixed frequency.
The physical model for :obj:`.SCQubits`.
Parameters
----------
num_qubits: int
The number of component systems.
The number of qubits.
dims: list, optional
The dimension of each component system.
Default value is a qubit system of ``dim=[2,2,2,...,2]``.
Expand Down
2 changes: 1 addition & 1 deletion src/qutip_qip/device/modelprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ModelProcessor(Processor):
Parameters
----------
num_qubits: int, optional
The number of component systems.
The number of qubits.
It replaces the old API ``N``.
dims: list, optional
Expand Down
2 changes: 1 addition & 1 deletion src/qutip_qip/device/optpulseprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class OptPulseProcessor(Processor):
Parameters
----------
num_qubits : int
The number of component systems.
The number of qubits.
drift: `:class:`qutip.Qobj`
The drift Hamiltonian. The size must match the whole quantum system.
Expand Down
10 changes: 5 additions & 5 deletions src/qutip_qip/device/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Processor(object):
Parameters
----------
num_qubits : int, optional
The number of component systems.
The number of qubits.
It replaces the old API ``N``.
dims : list, optional
Expand Down Expand Up @@ -1208,8 +1208,8 @@ class Model:
Parameters
----------
num_qubits : int, optional
The number of component systems.
num_The number of qubits
The number of qubits.
dims : list, optional
The dimension of each component system.
Default value is a qubit system of ``dim=[2,2,2,...,2]``.
Expand All @@ -1218,8 +1218,8 @@ class Model:
Attributes
----------
num_qubits : int, optional
The number of component systems.
num_The number of qubits
The number of qubits.
dims : list, optional
The dimension of each component system.
params : dict
Expand Down
4 changes: 2 additions & 2 deletions src/qutip_qip/device/spinchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def topology_map(self, qc):

class SpinChainModel(Model):
"""
Physical model for a spin chain qubits system.
Physical model for :obj:`CircularSpinChain` and :obj`LinearSpinChain`.
Parameters
----------
num_qubits: int
The number of component systems.
The number of qubits.
setup : str
"linear" for an open end and "circular" for a closed end chain.
**params :
Expand Down
2 changes: 1 addition & 1 deletion src/qutip_qip/noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _T_to_list(self, T, N):
T: float or list
The relaxation time
N: int
The number of component systems.
The number of qubits.
Returns
-------
Expand Down
1 change: 1 addition & 0 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def test_define_model_in_processor():
with pytest.raises(TypeError):
processor.add_noise("non-noise-object")


def test_change_parameters_in_processor():
processor = LinearSpinChain(0, sx=0.1)
assert(all(processor.params["sx"] == [0.1]))

0 comments on commit 2488892

Please sign in to comment.