qctrl-commons 25.3.0__tar.gz → 25.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/PKG-INFO +1 -1
  2. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/pyproject.toml +1 -1
  3. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/__init__.py +1 -1
  4. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/simulation_types.py +12 -9
  5. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/LICENSE +0 -0
  6. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/README.md +0 -0
  7. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/constants.py +0 -0
  8. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/core_exceptions.py +0 -0
  9. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/data_types.py +0 -0
  10. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/exceptions.py +0 -0
  11. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/graph.py +0 -0
  12. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/node/__init__.py +0 -0
  13. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/node/base.py +0 -0
  14. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/node/wrapper.py +0 -0
  15. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/pauli_operations.py +0 -0
  16. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/preconditions.py +0 -0
  17. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/pytest_plugin.py +0 -0
  18. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/run_options.py +0 -0
  19. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/serializers.py +0 -0
  20. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/sparse_occ_op.py +0 -0
  21. {qctrl_commons-25.3.0 → qctrl_commons-25.4.0}/qctrlcommons/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qctrl-commons
3
- Version: 25.3.0
3
+ Version: 25.4.0
4
4
  Summary: Q-CTRL Commons
5
5
  License-File: LICENSE
6
6
  Keywords: black opal,boulder opal,fire opal,nisq,open controls,q control,q ctrl,q-control,q-ctrl,qcontrol,qctrl,quantum,quantum algorithms,quantum circuits,quantum coding,quantum coding software,quantum computing,quantum control,quantum control software,quantum control theory,quantum engineering,quantum error correction,quantum firmware,quantum fundamentals,quantum sensing,qubit,qudit
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "qctrl-commons"
3
- version = "25.3.0"
3
+ version = "25.4.0"
4
4
  description = "Q-CTRL Commons"
5
5
  license-files = ["LICENSE"]
6
6
  requires-python = ">=3.10, <3.14"
@@ -13,5 +13,5 @@
13
13
 
14
14
  """qctrlcommons - a collection of common libraries for the Python language"""
15
15
 
16
- __version__ = "25.3.0"
16
+ __version__ = "25.4.0"
17
17
  __author__ = "Q-CTRL <support@q-ctrl.com>"
@@ -30,11 +30,11 @@ class ModelType:
30
30
 
31
31
  Parameters
32
32
  ----------
33
- hopping_amplitude : list[float]
33
+ hopping_amplitude : float or list[float]
34
34
  Hopping amplitude between sites.
35
- on_site_interaction : list[float]
35
+ on_site_interaction : float or list[float]
36
36
  On-site interaction strength.
37
- chemical_potential : list[float]
37
+ chemical_potential : float or list[float]
38
38
  Chemical potential at each site.
39
39
  name : str, optional
40
40
  Name of the model (for example, `"Fermi-Hubbard"`). Defaults to "Fermi-Hubbard".
@@ -47,9 +47,9 @@ class ModelType:
47
47
  If any field has an invalid type or value.
48
48
  """
49
49
 
50
- hopping_amplitude: list[float]
51
- on_site_interaction: list[float]
52
- chemical_potential: list[float]
50
+ hopping_amplitude: list[float] | float
51
+ on_site_interaction: list[float] | float
52
+ chemical_potential: list[float] | float
53
53
  name: Literal["Fermi-Hubbard"] = "Fermi-Hubbard"
54
54
  lattice_type: Literal["1D"] = "1D"
55
55
 
@@ -75,11 +75,14 @@ class ModelType:
75
75
  ("chemical_potential", self.chemical_potential),
76
76
  ):
77
77
  if not (
78
- isinstance(term_value, list)
79
- and all(isinstance(item, int | float) for item in term_value)
78
+ isinstance(term_value, int | float)
79
+ or (
80
+ isinstance(term_value, list)
81
+ and all(isinstance(item, int | float) for item in term_value)
82
+ )
80
83
  ):
81
84
  raise QctrlArgumentsValueError(
82
- f"The model {term_name} must be a list of real numbers.",
85
+ f"The model {term_name} must be a real number or a list of real numbers.",
83
86
  {term_name: term_value},
84
87
  )
85
88
 
File without changes
File without changes