Skip to content

Update study params to allow Scalar, not just float #5282

@daxfohl

Description

@daxfohl

Summarize the task

Complex-valued params were added in #5089 to allow for parameterizing things like phase. This required casts in two functions that explicitly expected float return values from parameter evaluation. We should determine whether those places should allow complex values and update their signatures, or otherwise do a runtime check to fail if any complex values are passed into the functions.

Acceptance criteria - when is the task considered done?

The casts circuit_params = cast(Dict[str, float], param_resolver.param_dict) in observable_measurement.py and flat_params = [cast(Dict[str, float], pr.param_dict) for pr in study.to_resolvers(params)] in sampler.py should no longer need to be there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/taskA task that's part of a larger effort

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions