Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update device noise model to use gate_length #352

Merged
merged 2 commits into from
Sep 23, 2019

Conversation

chriseclectic
Copy link
Member

Summary

(Most) Devices now return gate timing information in their properties under the key "gate_length". Previously the device noise model was looking for "gate_time" key. This updates the device noise model to use the correct name.

It also renames the kwarg for adding custom gate times to gate_lengths and adds a deprecation warning if someone uses the old gate_times kwarg

Closes #336

Details and comments

Copy link
Member

@atilag atilag left a comment

Choose a reason for hiding this comment

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

Just left a comment.
Will merge soon.

@@ -96,7 +97,8 @@ def gate_time_values(properties):
name = gate.gate
qubits = gate.qubits
value = None # default value
params = _check_for_item(gate.parameters, 'gate_time')
params = _check_for_item(gate.parameters, 'gate_time') # deprecated
Copy link
Member

Choose a reason for hiding this comment

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

This is useless, right? The line behind will always overwrite params

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah you're right, should be a different variable name

Copy link
Member Author

Choose a reason for hiding this comment

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

Since this wasn't actually used in old version of backends I'll just remove it

@atilag atilag merged commit cd2d38f into Qiskit:master Sep 23, 2019
@chriseclectic chriseclectic deleted the update-device-noise-model branch October 4, 2019 15:27
dcmckayibm pushed a commit to dcmckayibm/qiskit-aer that referenced this pull request Nov 3, 2019
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.

gate_time_values fails to get correct gate times
2 participants