Skip to content

solve function signature don't match #2489

@Ericgig

Description

@Ericgig

Problem Description

Some the the ??solve functions inconsistent signature:
Almost all of them start with H, state0, tlist, the collapse if used, expectation, args and finally options.

But

  • For brmesolve, c_ops comes after e_ops.
  • For HEOM: the bath is between the Hamiltonian and the initial state.
  • Stochastic solver have e_ops options and args as keyword only.
  • ntraj is positional for mcsolve, but keyword only for stochastic solver.
  • Solver specific parameters are between e_ops and args for floquet, between args and options for bloch redfield and after sc_ops in stochastic.

Proposed Solution

Make e_ops, args, options and ntraj keyword only from 5.3, with a warning message from 5.1.

This would make is all signatures, except HEOM, match.

For HEOM, the bath and max_depth should be swapped for the state and tlist.

Alternate Solutions

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions