mirror of
https://github.com/vale981/two_qubit_model
synced 2025-03-05 09:41:41 -05:00
add an adapter to the qubitmodelmultibath
This commit is contained in:
parent
329a586836
commit
37f426fcdf
2 changed files with 19 additions and 3 deletions
|
@ -37,7 +37,7 @@ class Model(ABC):
|
|||
__base_version__: int = 1
|
||||
"""The version of the model base."""
|
||||
|
||||
__version__: int = 1
|
||||
__version__: Union[int, list[int]] = 1
|
||||
"""
|
||||
The version of the model implementation. It is increased for
|
||||
breaking changes.
|
||||
|
|
|
@ -36,7 +36,7 @@ class OttoEngine(Model):
|
|||
All attributes can be changed after initialization.
|
||||
"""
|
||||
|
||||
__version__: int = 2
|
||||
__version__: list[int] = [1, QubitModelMutliBath.__version__]
|
||||
|
||||
δ: list[SupportsFloat] = field(default_factory=lambda: [0.1] * 2)
|
||||
"""The bath coupling factors."""
|
||||
|
@ -229,7 +229,23 @@ class OttoEngine(Model):
|
|||
def qubit_model(self) -> QubitModelMutliBath:
|
||||
"""Returns the underlying Qubit model."""
|
||||
|
||||
return QubitModelMutliBath()
|
||||
return QubitModelMutliBath(
|
||||
δ=self.δ,
|
||||
ω_c=self.ω_c,
|
||||
ω_s=self.ω_s,
|
||||
t=self.t,
|
||||
ψ_0=self.ψ_0,
|
||||
description=f"The qubit model underlying the otto cycle with description: {self.description}.",
|
||||
truncation_scheme="simplex",
|
||||
k_max=self.k_max,
|
||||
bcf_terms=self.bcf_terms,
|
||||
driving_process_tolerances=self.driving_process_tolerances,
|
||||
thermal_process_tolerances=self.thermal_process_tolerances,
|
||||
T=self.T,
|
||||
L=self.L,
|
||||
H=self.H,
|
||||
therm_methods=self.therm_methods,
|
||||
)
|
||||
|
||||
|
||||
def normalize_hamiltonian(hamiltonian: np.ndarray) -> np.ndarray:
|
||||
|
|
Loading…
Add table
Reference in a new issue