Skip to content

Add logging option when inserting DDD sequences #2882

@natestemen

Description

@natestemen

When applying DDD, it's currently difficult for users to tell whether the pass actually inserted any decoupling sequences. There are several ways DDD can silently "do nothing". For example, if there are no idle windows available, no DDD sequences are inserted and the user receives no indication that this happened.

It would be helpful to provide some form of optional logging, warnings, or structured return information so users can confirm whether DDD ran as expected. Even minimal feedback (e.g., number of idle windows found, number of sequences inserted, or a note when nothing is applied) would improve usability and reduce confusion.

Two ideas:

transformed_circuit, ddd_info = ddd.construct_circuit(circuit, return_info=True)

print(ddd_info.num_idle_windows)
print(ddd_info.num_sequences_inserted)
ddd.construct_circuit(circuit, verbose=True)
# prints:
# "DDD: found 5 idle windows; inserted 5 sequences"

Metadata

Metadata

Assignees

No one assigned

    Labels

    dddDigital Dynamical Decouplingfeature-requestA request for a feature, tool, or workflow in Mitiq.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions