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 backend snapshots with new conf or defs #4897

Merged
merged 1 commit into from
Aug 10, 2020

Conversation

mtreinish
Copy link
Member

Summary

In #4728 how we handle the difference between the object units and the
serialization format. However the snapshot update didn't actually save
the correct values in the json and this is causing issues for tutorials
that rely on this. This commit updates the backend snapshots for
backends by rerunning the update script to correct this issue.

Details and comments

In Qiskit#4728 how we handle the difference between the object units and the
serialization format. However the snapshot update didn't actually save
the correct values in the json and this is causing issues for tutorials
that rely on this. This commit updates the backend snapshots for
backends by rerunning the update script to correct this issue.
@mtreinish mtreinish added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Aug 10, 2020
@mtreinish mtreinish requested a review from DanPuzzuoli August 10, 2020 14:25
@mtreinish mtreinish requested a review from a team as a code owner August 10, 2020 14:25
@mtreinish
Copy link
Member Author

This is at least partially fixing the CI failure on tutorials which is blocking the qiskit 0.20.0 metapackage release. The dt units in the json were wrong which was breaking the pulse simulation in https://github.com/Qiskit/qiskit-tutorials/blob/master/tutorials/pulse/8_pulse_simulator_backend_model.ipynb see: https://travis-ci.com/github/Qiskit/qiskit/jobs/370264840#L777

With this applied that error is fixed, although the simulation results are different (the oscillations are twice as fast) from in older versions. This looks to be caused by other differences in the payload snapshot for the hamiltonian. But this is just what the backends are returning now so there isn't a way to fix that in this PR.

Copy link
Contributor

@DanPuzzuoli DanPuzzuoli left a comment

Choose a reason for hiding this comment

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

Just double checked the Hamiltonian in the armonk config and it looks good to me (assuming the units are in GHz and ns).

We discussed this separately but just to record it here: the rabi oscillation change observed in the tutorial is due to the inclusion of a 3rd energy level in the Hamiltonian, but the anharmonicity is set to 0 (I assume following the convention that unreported parameters are set to 0). Testing things out locally, things return to normal when either (1) the system is truncated to 2 levels or (2) a "reasonable" value for the anharmonicity is inserted (hence validating to some extent the 2 level approximation).

Copy link
Contributor

@taalexander taalexander left a comment

Choose a reason for hiding this comment

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

This looks good to me. The problem with 2x oscillation is a result of a bug in the backend causing a 2x stronger than reality Rabi to be reported. This has been fixed but the code has yet to be deployed.

@mergify mergify bot merged commit 0f7673e into Qiskit:master Aug 10, 2020
mergify bot pushed a commit that referenced this pull request Aug 10, 2020
In #4728 how we handle the difference between the object units and the
serialization format. However the snapshot update didn't actually save
the correct values in the json and this is causing issues for tutorials
that rely on this. This commit updates the backend snapshots for
backends by rerunning the update script to correct this issue.

(cherry picked from commit 0f7673e)
@mtreinish mtreinish deleted the update-snapshots-for-dt branch August 10, 2020 15:39
@mtreinish mtreinish added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Aug 10, 2020
mergify bot added a commit that referenced this pull request Aug 10, 2020
In #4728 how we handle the difference between the object units and the
serialization format. However the snapshot update didn't actually save
the correct values in the json and this is causing issues for tutorials
that rely on this. This commit updates the backend snapshots for
backends by rerunning the update script to correct this issue.

(cherry picked from commit 0f7673e)

Co-authored-by: Matthew Treinish <[email protected]>
lcapelluto pushed a commit to lcapelluto/qiskit-terra that referenced this pull request Aug 12, 2020
In Qiskit#4728 how we handle the difference between the object units and the
serialization format. However the snapshot update didn't actually save
the correct values in the json and this is causing issues for tutorials
that rely on this. This commit updates the backend snapshots for
backends by rerunning the update script to correct this issue.
mergify bot added a commit that referenced this pull request Aug 21, 2020
* Update the qobj schema to support pulse gate calibrations.

* Fixup qobj classes: add docstrings, call out to super

* Move pulse library to top level. Fill in more details in qasm_qobj.py

* Fix mistake in schema: the pulse_library definition already contains the 'array' requirement

* Move pulse library to top level in qasm_qobj.py as well

* Add GateCalibration to qobj/__init__.py

* Fixup some implementation errors: gates contains a list of dict items, which needed to be fixed in both the schema and the py files

* Put gate calibrations into calibrations.gates to leave room for adding other metadata in the future. Make a qobj.common file to allow qobj.qasm to use features of qobj.pulse

* Add an example json

* Schema version should be referenced not hardcoded a second time

* Pretty print example file

* Check if calibrations is present when doing to from dict

* Fixup qobj test

* Update the qobj schema to support pulse gate calibrations.

* Fixup qobj classes: add docstrings, call out to super

* Move pulse library to top level. Fill in more details in qasm_qobj.py

* Fix mistake in schema: the pulse_library definition already contains the 'array' requirement

* Move pulse library to top level in qasm_qobj.py as well

* Add GateCalibration to qobj/__init__.py

* Fixup some implementation errors: gates contains a list of dict items, which needed to be fixed in both the schema and the py files

* Put gate calibrations into calibrations.gates to leave room for adding other metadata in the future. Make a qobj.common file to allow qobj.qasm to use features of qobj.pulse

* Add an example json

* Schema version should be referenced not hardcoded a second time

* Pretty print example file

* Update backend snapshots with new conf or defs (#4897)

In #4728 how we handle the difference between the object units and the
serialization format. However the snapshot update didn't actually save
the correct values in the json and this is causing issues for tutorials
that rely on this. This commit updates the backend snapshots for
backends by rerunning the update script to correct this issue.

* One reference to get_sample_pulse is raising deprecation warnings from the assembler (#4903)

* Check if calibrations is present when doing to from dict

* Fixup qobj test

* Add qobj.config.calibrations for common cals

* style

* Move recent qasm qobj changes to the new qobj.common file

* Update schema with qobj level and experiment level calibrations

* Add schema test

* Apply suggestions from code review

Co-authored-by: SooluThomas <[email protected]>

* Fix encoding for validation of new pulse library field in qasm qobj. Add qobj test

Co-authored-by: Matthew Treinish <[email protected]>
Co-authored-by: SooluThomas <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants