Skip to content

Conversation

coruscating
Copy link
Collaborator

@coruscating coruscating commented May 23, 2023

Summary

This PR adds a device_components field to the experiment metadata that is a list of qubits used in the experiment by default. Experiments that use custom components need to override this metadata field (just ResonatorSpectroscopy so far). It also exposes device components in the documentation and updates the custom experiment tutorial. #1163 depends on this PR to add the metadata so that non-qubit components can be correctly identified for figure names.

Copy link
Collaborator

@nkanazawa1989 nkanazawa1989 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a nice update. However, base experiment class returns just an index list of physical qubits, rather than list of device component Qubit. To unify metadata, I think we should also add "device_component" to the base experiment with Qubit instance.

and expose component index
@coruscating
Copy link
Collaborator Author

That's a good suggestion @nkanazawa1989, I've made device_components populated by Qubits by default in BaseExperiment. I also exposed index in DeviceComponent subclasses as per @wshanks's feedback.

Copy link
Collaborator

@wshanks wshanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I wonder if we want to make it easier to define a custom device component (maybe a generic component that just serializes to a string without needing a class?), but we don't have to worry about that here.

@coruscating coruscating enabled auto-merge May 25, 2023 15:10
@coruscating coruscating added this pull request to the merge queue May 25, 2023
Merged via the queue into qiskit-community:main with commit e291248 May 25, 2023
@coruscating coruscating deleted the device-component-metadata branch May 25, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants