Skip to content

Commit

Permalink
removing old use of copy
Browse files Browse the repository at this point in the history
  • Loading branch information
DanPuzzuoli committed Feb 28, 2024
1 parent 8f39062 commit 299c94a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions qiskit_dynamics/models/rotating_wave_approximation.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,19 @@ def function_with_rwa(t):
.. code-block:: python
rwa_model, signal_map = rotating_wave_approximation(model,
cutoff_freq,
return_signal_map=True)
rwa_model, signal_map = rotating_wave_approximation(
model,
cutoff_freq,
return_signal_map=True
)
The following function **is** JAX-transformable:
.. code-block:: python
def jax_transformable_func(t):
rwa_model_copy = rwa_model.copy()
rwa_model_copy.signals = signal_map(new_signals)
return rwa_model_copy(t)
rwa_model.signals = signal_map(new_signals)
return rwa_model(t)
In this way, the outputs of ``rotating_wave_approximation`` can be used in JAX-transformable
functions, however ``rotating_wave_approximation`` itself cannot.
Expand Down

0 comments on commit 299c94a

Please sign in to comment.