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

Fast forward experimental-0.2 #1432

Merged
merged 88 commits into from
Feb 27, 2024
Merged

Conversation

jyu00
Copy link
Collaborator

@jyu00 jyu00 commented Feb 27, 2024

Summary

Fast forward experimental-0.2

Details and comments

Fixes #

ElePT and others added 30 commits November 16, 2023 12:07
)

* Migrate fake provider

* fix lint

* Only migrate backends and fake_provider file to minimize duplication

* Add reno

* Update snippet to use runtime service

---------

Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
* try/except raw result truncation

* catch typeError

* revert try/except, use response.text

* update unit test
* Clean up/fix integration test

* Update test case

* Fix black
* Added deprecation warning when using qiskitrc file

* Fixed bug whereby deprecation warnings cause failure for all 'qiskit*' modules. Changed warning to deprecation warning.

* Release note

* Small grammer fix

* black

---------

Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
* update session.from_id()

* add deprecation warning

* add reno
* Revert "Update session.from_id() (Qiskit#1163)"

This reverts commit 8fa0472.

* add reno
* initial removal

* cleanup more files

* move result_decoder

* fix lint

* update unit tests

* update integration tests

* more docs changes

* release note

* fix path

---------

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
* Make sessions thread safe.

The lock prevents other threads from sending new jobs to the service
only if the session hasnot been setup yet. I.e.: when sending the
first "session starter job", or root job. After this happens, the code
is left unlocked to allow threads to access the service concurrently.

Error handling is needed to ensure the lock is always released.

* Allow multiple sessions to execute simultaneously

* Make session test more deterministic

---------

Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
* compare cloud instance with channel strategy

* fix unit tests

* error wording

---------

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
* release notes

* fix release
* Add job.properties() method

* add reno
This is the same as Qiskit/qiskit#11352. Now that qiskit.org/ecosystem/ibm-runtime redirects to docs.quantum.ibm.com, we can simplify the docs. 

See the PR description in Qiskit/qiskit#11352 for details on the motivation for each change. The only difference from Qiskit is that we still keep the tutorials around because learning.quantum.ibm.com uses them.

I used a script with `ripgrep` to confirm that none of the images were in use.
* Error if backend not in instance

* add reno

* update reno

* docs build

* fix docs again

* docs formatting :/

* add integration test

* Update test/integration/test_backend.py

Co-authored-by: merav-aharoni <merav@il.ibm.com>

* Update test/integration/test_backend.py

Co-authored-by: merav-aharoni <merav@il.ibm.com>

---------

Co-authored-by: merav-aharoni <merav@il.ibm.com>
* The transpilation tutorial has been updated to use the new runtime transpilation passes, and Batch

* Fix style checker

* Updated names

* Updated section names for transpiled tutorial

* Updated grover

* Fixed consistency

* Final updates

---------

Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
* add pointer to qiskit/documentation issues

* Update .github/ISSUE_TEMPLATE/config.yml

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>

* Update CONTRIBUTING.md

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>

---------

Co-authored-by: Kevin Tian <kt474@cornell.edu>
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
* wip debug wrong instance test

* enable integration test

* use backend names instead of obj
* don't block if backend not selected

* add reno

* add test
* add activated_at to session.details()

* add reno
…skit#1267)

* Revert "Don't block for the first job in a session (Qiskit#1170)"

This reverts commit f2e24e4.

* keep test
mtreinish and others added 24 commits February 5, 2024 15:27
…skit#1377)

* Handle qpy serialization across versions and delete vendored fork

For the next qiskit-ibm-runtime release it is desired to have it support
both Qiskit 0.45.x/0.46.x and Qiskit 1.0.0. To do this with QPY it means
we need to emit a fixed qpy version of 10 as that's currently the
maximum version the server side can parse. The easiest way to manage
this across versions is actually to rely on Qiskit's qpy module again.
Starting in Qiskit 1.0.0 the qiskit.qpy.dump() function a new kwarg,
version exists to specify the version of qpy emitted. We can use this
to control the rollout of QPY format versions as the server side is
updated. For right now this is fixed to version 10 which is the same as
the QPY format version emitted by 0.45.x and 0.46.0. Because the
versions are the same we can just use qiskit's qpy module moving forward
as either we're on qiskit 0.45.x/0.46.x and will emit version 10 (as there
is no option) or we're on >=1.0.0 and we explicitly set the qpy version
to one that's compatible with the server side.

The qpy internals usage to serialize parameters and parameter
expressions are left in place (although expanded on to include Qiskit#1355 for
parameter expressions) as an alternative needs to be considered for
this. It is not a good idea to rely on qpy internals and explicitly
private functions to do partial serialization.

This commit also deletes the vendored fork as it's never been included
in a released version of qiskit-ibm-runtime and nothing is using it
anymore.

Related to: Qiskit#1375

* Fix lint

* Fix lint again
* Prepare release 0.19

* add reno stating compatibility
…ons.from_backend` for both `Backend versions` (Qiskit#1383)

* porting qiskit-ibm-provider/pull/787

* porting qiskit-ibm-provider/pull/787

* black

* oops

* monkey patch Qiskit/qiskit#11727

* black lynt

* mypy

---------

Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
* Cast use_symengine input to a bool

This commit works around a bug in Qiskit 0.45.x, 0.46.0, and 1.0.0rc1
with the `use_symengine` flag on `qpy.dump()`. The dump function has a
bug when it receives a truthy value instead of a bool literal that it
will generate a corrupt qpy because of a mismatch between how the
encoding was processed (the encoding is incorrectly set to sympy in the
file header but uses symengine encoding in the actual body of the
circuit.  This is being fixed in Qiskit/qiskit#11730 for 1.0.0, and will
be backported to 0.46.1. But to ensure compatibility with 0.45.x, 0.46.0,
and 1.0.0rc1 while waiting for those releases we can workaround this by
just casting the value to a boolean.

* Fix mypy failures

* Mypy fixes again
* Add transpiler tests

* Named barrier to select dd intervals

* reno

* consistent pad arguments in PadDelay

* Decouple single_pulse option

* fix docsting

* Add test

* Fix for PadDelay

* format

* line too long

---------

Co-authored-by: kevin-tian <kevin.tian@ibm.com>
* Remove remaining qiskit.org links

* Update qiskit_ibm_runtime/provider_session.py

Co-authored-by: Kevin Tian <kt474@cornell.edu>

---------

Co-authored-by: Kevin Tian <kt474@cornell.edu>
* Support Python 3.12

* update requirments

* update requirements
* add deprecation file

* update guide

* fix wording

Co-authored-by: Kevin Tian <kt474@cornell.edu>

---------

Co-authored-by: Kevin Tian <kt474@cornell.edu>
…ions (Qiskit#1378)

* Map indices for durations in inner block

* Add test

* Reno

* Fix docs

* Missing docstring

---------

Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
* Add abstract circuit warning

* add reno

* use correct Sequence import

* unit tests
* fix docs build

* Replace qiskit.tools
* wip use post sessions

* address comments

* fix mypy & lint

* use private method

* Add reno

* attempt fix unit tests

* unit tests

* add logic to work with IQP

* remove todo

* Update releasenotes/notes/session-modes-5c22b68620f8d690.yaml

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Update docstrings, passing mode into payload

* Update unit tests

* address comments

* Pass max_time to /sessions

* unit tests

* integration test

---------

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
* Use POST /sessions in backend.run sessions

* Add reno

* update tests

* add test_run_after_cancel back

* remove max_time arg from Session

* Add max_time
* check coupling map

* restore stack level

* mypy

* remove layout check

* check width

* allow pulse gates

* add release note
* bug fix w retrieving fake backend

* Move test
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8070006510

Details

  • -31 of 91 (65.93%) changed or added relevant lines in 16 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+1.4%) to 82.293%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_ibm_runtime/api/clients/runtime.py 1 2 50.0%
qiskit_ibm_runtime/utils/utils.py 8 9 88.89%
qiskit_ibm_runtime/batch.py 6 8 75.0%
qiskit_ibm_runtime/ibm_backend.py 3 5 60.0%
qiskit_ibm_runtime/utils/backend_decoder.py 1 10 10.0%
qiskit_ibm_runtime/api/rest/runtime_session.py 2 18 11.11%
Files with Coverage Reduction New Missed Lines %
qiskit_ibm_runtime/session.py 1 81.55%
Totals Coverage Status
Change from base Build 8056812041: 1.4%
Covered Lines: 5484
Relevant Lines: 6664

💛 - Coveralls

@jyu00 jyu00 marked this pull request as ready for review February 27, 2024 19:37
@jyu00 jyu00 merged commit 7b303aa into Qiskit:experimental-0.2 Feb 27, 2024
20 checks passed
@jyu00 jyu00 deleted the ff-experimental branch February 27, 2024 19:38
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.