Skip to content

Commit

Permalink
Move solve_input to first non optional parameter and fix wording
Browse files Browse the repository at this point in the history
  • Loading branch information
donsano33 committed Dec 15, 2023
1 parent 2b0767d commit 6888999
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
11 changes: 3 additions & 8 deletions qiskit_dynamics/backend/dynamics_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,20 +344,15 @@ def _set_solver(self, solver):

def solve(
self,
solve_input: List[Union[QuantumCircuit, Schedule, ScheduleBlock]],
t_span: Array,
y0: Optional[Union[Array, QuantumState, BaseOperator]] = None,
solve_input: Optional[
Union[
List[QuantumCircuit],
List[Union[Schedule, ScheduleBlock]],
]
] = None,
convert_results: Optional[bool] = True,
validate: Optional[bool] = True,
) -> Union[OdeResult, List[OdeResult]]:
"""Simulate a list of :class:`~qiskit.circuit.QuantumCircuit`,
:class:`~qiskit.pulse.Schedule`, or :class:`~qiskit.pulse.ScheduleBlock` instances and
return the ``OdeResult``.
:class:`~qiskit.pulse.Schedule`, or :class:`~qiskit.pulse.ScheduleBlock` instances and
return the ``OdeResult``.
This method is analogous to :meth:`.Solver.solve`, however it additionally utilizes
transpilation and the backend configuration to convert
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
features:
- |
Adds the :meth:`.DynamicsBackend.solve` function for ODE simulations with arbitrary input types
`y0` (`Statevector`, `Operator`, ..), corresponding to the :meth:`.Solver.solve` function of the
backends preconfigured :class:`.Solver` member.
Adds the :meth:`.DynamicsBackend.solve` method for running simulations of circuits and schedules
for arbitrary input types, and returning the ODE simulation results.

0 comments on commit 6888999

Please sign in to comment.