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

Delay unit conversion #1357

Closed
wants to merge 57 commits into from

Conversation

dieris
Copy link
Contributor

@dieris dieris commented Jan 31, 2024

Summary

Mirror of Qiskit/qiskit-ibm-provider#787

Requires qiskit 1.0

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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
* compare cloud instance with channel strategy

* fix unit tests

* error wording

---------

Co-authored-by: Jessie Yu <[email protected]>
* 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 <[email protected]>

* Update test/integration/test_backend.py

Co-authored-by: merav-aharoni <[email protected]>

---------

Co-authored-by: merav-aharoni <[email protected]>
* 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 <[email protected]>
* add pointer to qiskit/documentation issues

* Update .github/ISSUE_TEMPLATE/config.yml

Co-authored-by: Eric Arellano <[email protected]>

* Update CONTRIBUTING.md

Co-authored-by: Eric Arellano <[email protected]>

---------

Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: Eric Arellano <[email protected]>
* 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
kt474 and others added 20 commits January 2, 2024 15:30
* Add dynamic circuits backend filter

* add reno
Updates the sphinx documentation build to use KaTeX instead of MathJax because the final docs build uses KaTeX. The same change was made in Qiskit in Qiskit/qiskit#11435.
* exclude params on job retrieval by default

* add reno

* add test
We got source links working in API docs on docs.quantum.ibm.com! See Qiskit/documentation#620. To do this, we need to active `sphinx.ext.viewcode`.

Note that we still plan to improve this implementation in the future to have more precise links by using `sphinx.ext.linkcode`, tracked by Qiskit/documentation#517. This PR is to unblock the first iteration of this source links mechanism.
Calling `pip install` multiple times can (deeply unfortunately) allow an
environment to become out-of-sync; `pip` doesn't "remember" the
constraints of previous installation commands.

One of the largest effects here is that doing `pip install -e .`
_followed_ by `pip install git+<qiskit>@main` installs `qiskit-terra`
from the initial installation (via `qiskit==0.45.2`), then installs
`qiskit==1.0.0.dev0` from Git, which is an incompatible environment.
Doing the whole environment resolution in a single `pip install` command
fixes this, as the `qiskit` dependency is correctly resolved to be
_only_ the `1.0.0.dev0` version.

Co-authored-by: Kevin Tian <[email protected]>
This is being removed from Qiskit 1.0, and the IBM Provider is (until
deprecated) taking over brokering the IBM-Runtime-internal events.

Co-authored-by: Kevin Tian <[email protected]>
* Add transpiler tests

* remove qiskittestcase
* replace qiskit.test.ReferenceCircuits

* replace BaseQiskitTest

* Update qiskit_ibm_runtime/qiskit_runtime_service.py

Co-authored-by: Jessie Yu <[email protected]>

* Update qiskit_ibm_runtime/sampler.py

Co-authored-by: Jessie Yu <[email protected]>

* Update qiskit_ibm_runtime/session.py

Co-authored-by: Jessie Yu <[email protected]>

* Update test/utils.py

Co-authored-by: Jessie Yu <[email protected]>

---------

Co-authored-by: Jessie Yu <[email protected]>
### Summary
The documentation from the `transpile` and `fake_provider` modules does not appear in the rendered docs in qiskit.org/documentation or docs.quantum-computing.ibm.com.


### Details and comments

Fixes [Qiskit Docs Issue Qiskit#238](Qiskit/documentation#238)

Replaces PR Qiskit#1330.

Transpiler Doc files added:

 - qiskit_ibm_runtime.transpiler.passes.html
- qiskit_ibm_provider.transpiler.passes.basis.html
- qiskit_ibm_provider.transpiler.passes.scheduling.ALAPScheduleAnalysis.html
- qiskit_ibm_provider.transpiler.passes.scheduling.ASAPScheduleAnalysis.html
- qiskit_ibm_provider.transpiler.passes.scheduling.BlockBasePadder.html
- qiskit_ibm_provider.transpiler.passes.scheduling.DynamicCircuitInstructionDurations.html
- qiskit_ibm_provider.transpiler.passes.scheduling.html
- qiskit_ibm_provider.transpiler.passes.scheduling.PadDelay.html
- qiskit_ibm_provider.transpiler.passes.scheduling.PadDynamicalDecoupling.html

<details>
<summary> Fake Provider Docs added: </summary>

- qiskit_ibm_runtime.fake_provider.FakeAlmaden.html
- qiskit_ibm_runtime.fake_provider.FakeAlmadenV2.html
- qiskit_ibm_runtime.fake_provider.FakeArmonk.html
- qiskit_ibm_runtime.fake_provider.FakeArmonkV2.html
- qiskit_ibm_runtime.fake_provider.FakeAthens.html
- qiskit_ibm_runtime.fake_provider.FakeAthensV2.html
- qiskit_ibm_runtime.fake_provider.FakeAuckland.html
- qiskit_ibm_runtime.fake_provider.FakeBelem.html
- qiskit_ibm_runtime.fake_provider.FakeBelemV2.html
- qiskit_ibm_runtime.fake_provider.FakeBoeblingen.html
- qiskit_ibm_runtime.fake_provider.FakeBoeblingenV2.html
- qiskit_ibm_runtime.fake_provider.FakeBogota.html
- qiskit_ibm_runtime.fake_provider.FakeBogotaV2.html
- qiskit_ibm_runtime.fake_provider.FakeBrooklyn.html
- qiskit_ibm_runtime.fake_provider.FakeBrooklynV2.html
- qiskit_ibm_runtime.fake_provider.FakeBurlington.html
- qiskit_ibm_runtime.fake_provider.FakeBurlingtonV2.html
- qiskit_ibm_runtime.fake_provider.FakeCairo.html
- qiskit_ibm_runtime.fake_provider.FakeCairoV2.html
- qiskit_ibm_runtime.fake_provider.FakeCambridge.html
- qiskit_ibm_runtime.fake_provider.FakeCambridgeV2.html
- qiskit_ibm_runtime.fake_provider.FakeCasablanca.html
- qiskit_ibm_runtime.fake_provider.FakeCasablancaV2.html
- qiskit_ibm_runtime.fake_provider.FakeEssex.html
- qiskit_ibm_runtime.fake_provider.FakeEssexV2.html
- qiskit_ibm_runtime.fake_provider.FakeGeneva.html
- qiskit_ibm_runtime.fake_provider.FakeGuadalupe.html
- qiskit_ibm_runtime.fake_provider.FakeGuadalupeV2.html
- qiskit_ibm_runtime.fake_provider.FakeHanoi.html
- qiskit_ibm_runtime.fake_provider.FakeHanoiV2.html
- qiskit_ibm_runtime.fake_provider.FakeJakarta.html
- qiskit_ibm_runtime.fake_provider.FakeJakartaV2.html
- qiskit_ibm_runtime.fake_provider.FakeJohannesburg.html
- qiskit_ibm_runtime.fake_provider.FakeJohannesburgV2.html
- qiskit_ibm_runtime.fake_provider.FakeKolkata.html
- qiskit_ibm_runtime.fake_provider.FakeKolkataV2.html
- qiskit_ibm_runtime.fake_provider.FakeLagos.html
- qiskit_ibm_runtime.fake_provider.FakeLagosV2.html
- qiskit_ibm_runtime.fake_provider.FakeLima.html
- qiskit_ibm_runtime.fake_provider.FakeLimaV2.html
- qiskit_ibm_runtime.fake_provider.FakeLondon.html
- qiskit_ibm_runtime.fake_provider.FakeLondonV2.html
- qiskit_ibm_runtime.fake_provider.FakeManhattan.html
- qiskit_ibm_runtime.fake_provider.FakeManhattanV2.html
- qiskit_ibm_runtime.fake_provider.FakeManila.html
- qiskit_ibm_runtime.fake_provider.FakeManilaV2.html
- qiskit_ibm_runtime.fake_provider.FakeMelbourne.html
- qiskit_ibm_runtime.fake_provider.FakeMelbourneV2.html
- qiskit_ibm_runtime.fake_provider.FakeMontreal.html
- qiskit_ibm_runtime.fake_provider.FakeMontrealV2.html
- qiskit_ibm_runtime.fake_provider.FakeMumbai.html
- qiskit_ibm_runtime.fake_provider.FakeMumbaiV2.html
- qiskit_ibm_runtime.fake_provider.FakeNairobi.html
- qiskit_ibm_runtime.fake_provider.FakeNairobiV2.html
- qiskit_ibm_runtime.fake_provider.FakeOslo.html
- qiskit_ibm_runtime.fake_provider.FakeOurense.html
- qiskit_ibm_runtime.fake_provider.FakeOurenseV2.html
- qiskit_ibm_runtime.fake_provider.FakeParis.html
- qiskit_ibm_runtime.fake_provider.FakeParisV2.html
- qiskit_ibm_runtime.fake_provider.FakePerth.html
- qiskit_ibm_runtime.fake_provider.FakePoughkeepsie.html
- qiskit_ibm_runtime.fake_provider.FakePoughkeepsieV2.html
- qiskit_ibm_runtime.fake_provider.FakePrague.html
- qiskit_ibm_runtime.fake_provider.FakeProviderForBackendV2.html
- qiskit_ibm_runtime.fake_provider.FakeProvider.html
- qiskit_ibm_runtime.fake_provider.FakeQuito.html
- qiskit_ibm_runtime.fake_provider.FakeQuitoV2.html
- qiskit_ibm_runtime.fake_provider.FakeRochester.html
- qiskit_ibm_runtime.fake_provider.FakeRochesterV2.html
- qiskit_ibm_runtime.fake_provider.FakeRome.html
- qiskit_ibm_runtime.fake_provider.FakeRomeV2.html
- qiskit_ibm_runtime.fake_provider.FakeRueschlikon.html
- qiskit_ibm_runtime.fake_provider.FakeSantiago.html
- qiskit_ibm_runtime.fake_provider.FakeSantiagoV2.html
- qiskit_ibm_runtime.fake_provider.FakeSherbrooke.html
- qiskit_ibm_runtime.fake_provider.FakeSingapore.html
- qiskit_ibm_runtime.fake_provider.FakeSingaporeV2.html
- qiskit_ibm_runtime.fake_provider.FakeSydney.html
- qiskit_ibm_runtime.fake_provider.FakeSydneyV2.html
- qiskit_ibm_runtime.fake_provider.FakeTenerife.html
- qiskit_ibm_runtime.fake_provider.FakeTokyo.html
- qiskit_ibm_runtime.fake_provider.FakeToronto.html
- qiskit_ibm_runtime.fake_provider.FakeTorontoV2.html
- qiskit_ibm_runtime.fake_provider.FakeValencia.html
- qiskit_ibm_runtime.fake_provider.FakeValenciaV2.html
- qiskit_ibm_runtime.fake_provider.FakeVigo.html
- qiskit_ibm_runtime.fake_provider.FakeVigoV2.html
- qiskit_ibm_runtime.fake_provider.FakeWashington.html
- qiskit_ibm_runtime.fake_provider.FakeWashingtonV2.html
- qiskit_ibm_runtime.fake_provider.FakeYorktown.html
- qiskit_ibm_runtime.fake_provider.FakeYorktownV2.html

</details>

Co-authored-by: Rebecca Dimock <[email protected]>
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@dieris dieris closed this Jan 31, 2024
@dieris
Copy link
Contributor Author

dieris commented Jan 31, 2024

will reopen after #1348

@dieris
Copy link
Contributor Author

dieris commented Jan 31, 2024

@kt474 here's the copy of Qiskit/qiskit-ibm-provider#787. I wasn't sure where to point the PR to, given that experimental-02 (depending on qiskit 1.0 to my understanding) is behind main

@dieris
Copy link
Contributor Author

dieris commented Feb 6, 2024

Duplicate

@dieris dieris closed this Feb 6, 2024
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.