Skip to content

Unify experiment constuctor signature #465

@nkanazawa1989

Description

@nkanazawa1989

What is the expected behavior?

In #462 backend arg is added to the all experiment constructors. Thus now all experiments have qubits and backend as common arguments.

If all experiments have good initial experimental parameters, we should be able to run experiment with

data = Experiment([0, 1], my_backend).run()

This pattern can be often seen in Qiskit, for example

assemble(circuits, backend)
transpile(circuits, backend)
schedule(scheds, backend)

etc...

thus is would be great if all experiments can give default parameters except for qubits. Probably we can create a default configuration file to give default values to these experiments while keeping some flexibility. For example, superconducting qubits and spin qubits may have different T1 value, so default decays parameter (currently this is req'd arg) of T1 experiment may depend on target backend. I think giving reasonable (still configurable) default options will make the tool more user friendly because non-experienced user doesn't need to be annoyed from finding good parameters.

Note that backend is an optional argument because the backend object cannot be serialized and we cannot initialize experiment when we load it from db. When we load the experiment, we keep backend empty and later set it via the setter method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions