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

Allow users to indicate they are done submitting jobs to a session #1139

Merged
merged 13 commits into from
Oct 18, 2023

Conversation

kt474
Copy link
Member

@kt474 kt474 commented Oct 9, 2023

Summary

  • Re-purposed session.close() to indicate one is done submitting to the session by using accepting_jobs = false.
  • New method session.cancel() terminates all jobs inside a session (this is the old close method, still calls /close).
  • session.close() is called upon exiting session in context manager
  • Removed the session.close() in docs and docstrings since it is no longer necessary/recommended
  • Added rest/base.py and rest/runtime_session.py back to this repo since we are merging qiskit-ibm-provider into here soon anyway (done in separate PR)
  • Removed qiskit_runtime_service/runtime_session.py, unused file

Details and comments

Fixes #1008

I'd like to test this a bit more and add tests, it just takes a while since I need to run on real devices

Comment on lines +91 to +93
When the context manager exits or when `session.close()` is explicitly called, the session won't accept any more jobs. Any queued jobs will run until completion or until the max time expires.

.. warning::
Close a session only after all session jobs **complete**, rather than immediately after they have all been submitted. Session jobs that are not completed will fail.
When a session that is not accepting jobs has run out of jobs to run, it is immediately closed.
Copy link
Member Author

Choose a reason for hiding this comment

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

@beckykd - sorry for tagging you twice (closed the first pr)

should docs updates be in a separate PR? I'll probably need help with the wording on a lot of these - it will also be a bit tricky since once this is released, older versions of qiskit-ibm-runtime will behave differently

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should add session.cancel() behavior as well

qiskit_ibm_runtime/session.py Outdated Show resolved Hide resolved
@kt474 kt474 added the Changelog: New Feature Include in the Added section of the changelog label Oct 9, 2023
docs/how_to/backends.rst Outdated Show resolved Hide resolved
docs/how_to/run_session.rst Outdated Show resolved Hide resolved
qiskit_ibm_runtime/session.py Outdated Show resolved Hide resolved
Comment on lines +91 to +93
When the context manager exits or when `session.close()` is explicitly called, the session won't accept any more jobs. Any queued jobs will run until completion or until the max time expires.

.. warning::
Close a session only after all session jobs **complete**, rather than immediately after they have all been submitted. Session jobs that are not completed will fail.
When a session that is not accepting jobs has run out of jobs to run, it is immediately closed.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should add session.cancel() behavior as well

qiskit_ibm_runtime/session.py Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Oct 10, 2023

Pull Request Test Coverage Report for Build 6549334093

  • 11 of 20 (55.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+1.4%) to 75.459%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_ibm_runtime/api/clients/runtime.py 2 3 66.67%
qiskit_ibm_runtime/api/rest/runtime_session.py 4 12 33.33%
Files with Coverage Reduction New Missed Lines %
qiskit_ibm_runtime/api/clients/runtime.py 1 54.67%
Totals Coverage Status
Change from base Build 6549163888: 1.4%
Covered Lines: 2546
Relevant Lines: 3374

💛 - Coveralls

Copy link
Contributor

@merav-aharoni merav-aharoni left a comment

Choose a reason for hiding this comment

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

It generally looks okay to me, but I am not sure I understand it well enough to approve. Better wait for other reviewers.

test/unit/test_estimator.py Outdated Show resolved Hide resolved
@kt474 kt474 added the on hold label Oct 11, 2023
qiskit_ibm_runtime/session.py Outdated Show resolved Hide resolved
qiskit_ibm_runtime/session.py Show resolved Hide resolved
Copy link
Contributor

@mriedem mriedem left a comment

Choose a reason for hiding this comment

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

Just a question inline about versioning when this is released.

qiskit_ibm_runtime/session.py Show resolved Hide resolved
@mriedem
Copy link
Contributor

mriedem commented Oct 14, 2023

I'd like to test this a bit more and add tests, it just takes a while since I need to run on real devices

@kt474 ping me next week and we can get you into a hub that has access to fake_backend1 which is essentially a simulator but not a simulator, it just doesn't run jobs on a real backend but the API flow is all the same.

@jyu00
Copy link
Collaborator

jyu00 commented Oct 16, 2023

New method session.cancel() terminates all jobs inside a session (this is the old close method, still calls /close).

@mriedem If a session job is already running, does this fail the running job?

@kt474 kt474 removed the on hold label Oct 17, 2023
@kt474 kt474 added the on hold label Oct 17, 2023
@jyu00
Copy link
Collaborator

jyu00 commented Oct 17, 2023

New method session.cancel() terminates all jobs inside a session (this is the old close method, still calls /close).

@mriedem If a session job is already running, does this fail the running job?

ok Matt confirmed the running job wouldn't fail. Nothing in the docstring says otherwise, so I think we are good.

@kt474
Copy link
Member Author

kt474 commented Oct 17, 2023

ok Matt confirmed the running job wouldn't fail. Nothing in the docstring says otherwise, so I think we are good.

Still blocked by IQP, closing sessions doesn't seem to work at all after their most recent prod deploy
Opened issue 693 in sw-api-iqp

@kt474 kt474 merged commit 0ddaee0 into Qiskit:main Oct 18, 2023
14 checks passed
@kt474 kt474 deleted the new-session-accepting-jobs branch October 18, 2023 20:53
jyu00 added a commit that referenced this pull request Oct 31, 2023
* Remove min execution time check (#1065)

* Remove min execution time check

* update unit test

* remove integration test

* Update `max_execution_time` docstrings (#1059)

* Update max_execution_time docstrings

* add commas

* Update qiskit_ibm_runtime/options/options.py

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

* Update qiskit_ibm_runtime/options/options.py

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

* Update qiskit_ibm_runtime/runtime_options.py

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

* Update releasenotes/notes/max-execution-time-definition-196cb6297693c0f2.yaml

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

---------

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

* Removed remaining code related to Schedules (#1068)

Co-authored-by: Kevin Tian <[email protected]>

* Enable datetime parameter for backend properties (#1070)

* enable datetime param for backend properties

* add test & reno

* improve test

* Update default resilience options (#1062)

* remove default resilience options

* add reno

* add logic to override default

* add test

* purge None values from options

* fix test (#1074)

* Prepare release 0.12.1 (#1075)

* Update main branch veresion 0.12.2 (#1076)

* use ibmq_qasm_simulator (#1078)

* Add reason code to error message (#1072)

* Add reason code to error message

* add reno

* Remove importing PauliSumOp, which is deprecated. (#1079)

---------

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>

* Adjusts default value for optimization_level (#1082)

* add instance info (#1083)

* add instance info

* Add cloud note

* Update README.md

Co-authored-by: Kevin Tian <[email protected]>

---------

Co-authored-by: Kevin Tian <[email protected]>

* Fix links to options in README.md (#1084)

* Remove auth parameter (#1077)

* Removed auth parameter

* Removed calls to migrate()

* black and lint

---------

Co-authored-by: Kevin Tian <[email protected]>

* Remove opflow and algorithms from serialization tests (#1085)

* Remove opflow from tests

* Re-add test for PauliSumOp

* Fix lint

* Fix black

---------

Co-authored-by: Kevin Tian <[email protected]>

* RuntimeJobTimeoutError should inherit from JobTimeoutError (#1090)

* RuntimeJobTimeoutError inherits from JobTimeoutError

* black

---------

Co-authored-by: Kevin Tian <[email protected]>

* Allow user to define a default account as an environment variable (#1018)

* Allow user to define a default account as an environment variable

* Fixed test

* Fixed mistaken paste

* Cleaned up test

* Moved test to TestAccountManager

* Added ability to define default channel in save_account

* Cleaned up code, fixed bugs

* Changed name of parameter

* Added test. Cleaned up code surrounding preferences of channel selection

* black and lint

* Fixed bug when json file was empty

* Code cleanup and documentation

* Documentation

* Removed channel from condition, because unnecessary

* changed default_channel to default_account

* Changed saving and getting default channel to default account

* black

* Documentation

* Release notes

* Reverted diff that was unnecessary

---------

Co-authored-by: Kevin Tian <[email protected]>

* Skip test_job_logs (#1094)

* Update session max_time docstring (#1089)

* Update session max_time docstring

* Update qiskit_ibm_runtime/session.py

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

---------

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

* Fix unit tests against qiskit/main (#1099)

* Add measurements to sampler

* Remove observables from sampler run

---------

Co-authored-by: Kevin Tian <[email protected]>

* fix iqp link (#1096)

Co-authored-by: Kevin Tian <[email protected]>

* Only return channel strategy supported backends  (#1095)

* Q-CTRL Backend filters

* add reno

* fix unit tests

* Attempt to fix terra unit tests (#1102)

* Attempt to fix terra unit tests

* test on my fork

* revert coder_qc change

* Making account code more generic  (#1060)

* Making account code more generic by defining subclasses for channel types

* Removed channel parameter from _assert_valid_instance

* mypy, lint and black

* Changed order of decorators

* Code cleanup

* Documentation fixes

* black

---------

Co-authored-by: Kevin Tian <[email protected]>

* Remove old deprecations (#1106)

* removing old deprecations

* update unit tests

* Open plan updates (#1105)

* Initial edits

* edit

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

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

* Jessie comments

* Update docs/faqs/max_execution_time.rst

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

* Update docs/faqs/max_execution_time.rst

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

* Update docs/sessions.rst

* Update docs/faqs/max_execution_time.rst

---------

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

* New method to create a new Session object with a given id (#1101)

* Added the Session.from_id method

* release notes

* Added integration test

---------

Co-authored-by: Kevin Tian <[email protected]>

* fix test_session_from_id (#1110)

* Warn users if job submitted will exceed quota (#1100)

* Warn users if job will exceed quota

* update reno

* update reno again

* Removed support for backend as session parameter (#1091)

Co-authored-by: Kevin Tian <[email protected]>

* Fix minor todos (#1112)

* Change qpu complex wording (#1109)

* Don't use QPU complex

* don't use the word 'limit'

* Update docs/faqs/max_execution_time.rst

* Update qiskit_ibm_runtime/options/options.py

* Update qiskit_ibm_runtime/runtime_job.py

* Update releasenotes/notes/0.11/job-cost-estimation-d0ba83dbc95c3f67.yaml

* Clarify usage

* reclarify reset time

* rogue comma

* fix whitespace & formatting

* job -> system execution time

---------

Co-authored-by: Kevin Tian <[email protected]>

* Add IBM Cloud channel (#1113)

* Changes for #1806

* Update docs/faqs/max_execution_time.rst

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

---------

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

* Prepare release 0.12.2 (#1115)

* Update main branch 0.13.0 (#1116)

* remove error message test (#1125)

* Exceptions should inherit from Terra where suitable (#1120)

* Changed RuntimeJobFailureError to inherit from JobError

* Changed error type

---------

Co-authored-by: Kevin Tian <[email protected]>

* update docstring & remove max_time (#1137)

* Expose new session details  (#1119)

* add session details method

* add reno

* support iqp urls

* update details mehotd, add status()

* update status() to use enum

* revert previous change, wait for impl details

* update fields returned

* update status method

* update docstring & reno

* update docstrings for both methods

* fix docs build

* address comments

* fix docs build

* fix typo

* docs build again

* fix indent

* fix indent again

* fix indent 3rd time

* Support only LocalFoldingAmplifier as noise_amplifier option (#1093)

* Removed support for all noise_amplifier options other than LocalFoldingAmplifier. Removed deprecation warning.

* Removed tests that covered deprecation. Updated documentation

---------

Co-authored-by: Kevin Tian <[email protected]>

* Fix target_history date bug  (#1143)

* fix target_history datetime bug

* add reno

* add test

* Fixed bug when defining shots as int64 (#1151)

* Log instance on initialization and when running a job (#1150)

* log instances

* add _default_instance & fix lint

* add test

* change var name to current_instance

* Move methods into class pages for docs (#1144)

* Fix link to `Close a session` (#1152)

[1] links to [2] but doesn't go directly to the target section.

[1] https://qiskit.org/ecosystem/ibm-runtime/sessions.html#what-happens-when-a-session-ends
[2] https://qiskit.org/ecosystem/ibm-runtime/how_to/run_session.html#close-a-session

Co-authored-by: Kevin Tian <[email protected]>

* logging instance test is IQP channel only (#1154)

* Update deploy yml (#1148)

* Allow users to indicate they are done submitting jobs to a session (#1139)

* copy changes over

* clean up branch again

* address comments, update docstrings

* catch appropriate error code

* update status code to 404

* Update qiskit_ibm_runtime/session.py

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

* set self._active & remove runtime_session

* Update releasenotes/notes/session-accepting-jobs-d7ef6b60c0f5527b.yaml

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

---------

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

* Prepare release 0.13 (#1157)

* Update main branch 0.13.1 (#1158)

* Update Sphinx theme (#1156)

Co-authored-by: Kevin Tian <[email protected]>

* Added IBM Quantum logo (#1164)

* sessions changes (#1169)

* sessions changes

* add more ticks

* fix link

* fix links

* Update docs/sessions.rst

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

* Update docs/sessions.rst

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

---------

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

* Disallow unsupported options (#1108)

* Disallow unsupported options

* Moved checking of unsupported options to 'flexible' decorator

* Modified the test to give TypeError where needed

* Removed empty newline

* Moved tests from test_ibm_primitives to test_options, because they don't require a primitive

* typo

* Release note

* black and lint

* black again

* Fixed test failing in CI

* Removed _flexible decorator. Moved _post_init into Options class

* lint

* lint

* Fixed bug

* lint

---------

Co-authored-by: Kevin Tian <[email protected]>

* fix merge issues

* black

* lint

---------

Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: Rebecca Dimock <[email protected]>
Co-authored-by: merav-aharoni <[email protected]>
Co-authored-by: Luciano Bello <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Esteban Ginez <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: mberna <[email protected]>
Co-authored-by: Elena Peña Tapia <[email protected]>
Co-authored-by: Arnau Casau <[email protected]>
Co-authored-by: Matt Riedemann <[email protected]>
Co-authored-by: abbycross <[email protected]>
jyu00 added a commit that referenced this pull request Nov 16, 2023
* Add experimental options (#1067)

* add options

* fix mypy

* rename meas err mit

* Add additional resilience options

* Add additional execution options for twirling

* A twirling strategy option and validation

* handle default resilience options

* add _experimental

* Update default resilience options (#1062)

* remove default resilience options

* add reno

* add logic to override default

* add test

* purge None values from options

(cherry picked from commit 76603f2)

* add finalize options

* add tests

* Update qiskit_ibm_runtime/options/resilience_options.py

* add validation

* lint

* lint again

* lint again

* Allow None values for specific options to be passed through

* Fix parameter validation, allow computational basis

* black

* Fix ZneExtrapolatorType validation

* lint

* lint again

* fix mypy

* Fix ZNE extrapolator default option

* fix level options

* black

* use _isreal

* Disable gate twirling for default lvl 1 opts

* Support for legacy options

---------

Co-authored-by: Christopher J. Wood <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: mberna <[email protected]>
Co-authored-by: Mariana C Bernagozzi <[email protected]>

* fix merge issues

* add pydantic

* black

* lint

* Fast forward experimental to latest main (#1178)

* Remove min execution time check (#1065)

* Remove min execution time check

* update unit test

* remove integration test

* Update `max_execution_time` docstrings (#1059)

* Update max_execution_time docstrings

* add commas

* Update qiskit_ibm_runtime/options/options.py

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

* Update qiskit_ibm_runtime/options/options.py

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

* Update qiskit_ibm_runtime/runtime_options.py

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

* Update releasenotes/notes/max-execution-time-definition-196cb6297693c0f2.yaml

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

---------

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

* Removed remaining code related to Schedules (#1068)

Co-authored-by: Kevin Tian <[email protected]>

* Enable datetime parameter for backend properties (#1070)

* enable datetime param for backend properties

* add test & reno

* improve test

* Update default resilience options (#1062)

* remove default resilience options

* add reno

* add logic to override default

* add test

* purge None values from options

* fix test (#1074)

* Prepare release 0.12.1 (#1075)

* Update main branch veresion 0.12.2 (#1076)

* use ibmq_qasm_simulator (#1078)

* Add reason code to error message (#1072)

* Add reason code to error message

* add reno

* Remove importing PauliSumOp, which is deprecated. (#1079)

---------

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>

* Adjusts default value for optimization_level (#1082)

* add instance info (#1083)

* add instance info

* Add cloud note

* Update README.md

Co-authored-by: Kevin Tian <[email protected]>

---------

Co-authored-by: Kevin Tian <[email protected]>

* Fix links to options in README.md (#1084)

* Remove auth parameter (#1077)

* Removed auth parameter

* Removed calls to migrate()

* black and lint

---------

Co-authored-by: Kevin Tian <[email protected]>

* Remove opflow and algorithms from serialization tests (#1085)

* Remove opflow from tests

* Re-add test for PauliSumOp

* Fix lint

* Fix black

---------

Co-authored-by: Kevin Tian <[email protected]>

* RuntimeJobTimeoutError should inherit from JobTimeoutError (#1090)

* RuntimeJobTimeoutError inherits from JobTimeoutError

* black

---------

Co-authored-by: Kevin Tian <[email protected]>

* Allow user to define a default account as an environment variable (#1018)

* Allow user to define a default account as an environment variable

* Fixed test

* Fixed mistaken paste

* Cleaned up test

* Moved test to TestAccountManager

* Added ability to define default channel in save_account

* Cleaned up code, fixed bugs

* Changed name of parameter

* Added test. Cleaned up code surrounding preferences of channel selection

* black and lint

* Fixed bug when json file was empty

* Code cleanup and documentation

* Documentation

* Removed channel from condition, because unnecessary

* changed default_channel to default_account

* Changed saving and getting default channel to default account

* black

* Documentation

* Release notes

* Reverted diff that was unnecessary

---------

Co-authored-by: Kevin Tian <[email protected]>

* Skip test_job_logs (#1094)

* Update session max_time docstring (#1089)

* Update session max_time docstring

* Update qiskit_ibm_runtime/session.py

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

---------

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

* Fix unit tests against qiskit/main (#1099)

* Add measurements to sampler

* Remove observables from sampler run

---------

Co-authored-by: Kevin Tian <[email protected]>

* fix iqp link (#1096)

Co-authored-by: Kevin Tian <[email protected]>

* Only return channel strategy supported backends  (#1095)

* Q-CTRL Backend filters

* add reno

* fix unit tests

* Attempt to fix terra unit tests (#1102)

* Attempt to fix terra unit tests

* test on my fork

* revert coder_qc change

* Making account code more generic  (#1060)

* Making account code more generic by defining subclasses for channel types

* Removed channel parameter from _assert_valid_instance

* mypy, lint and black

* Changed order of decorators

* Code cleanup

* Documentation fixes

* black

---------

Co-authored-by: Kevin Tian <[email protected]>

* Remove old deprecations (#1106)

* removing old deprecations

* update unit tests

* Open plan updates (#1105)

* Initial edits

* edit

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

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

* Jessie comments

* Update docs/faqs/max_execution_time.rst

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

* Update docs/faqs/max_execution_time.rst

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

* Update docs/sessions.rst

* Update docs/faqs/max_execution_time.rst

---------

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

* New method to create a new Session object with a given id (#1101)

* Added the Session.from_id method

* release notes

* Added integration test

---------

Co-authored-by: Kevin Tian <[email protected]>

* fix test_session_from_id (#1110)

* Warn users if job submitted will exceed quota (#1100)

* Warn users if job will exceed quota

* update reno

* update reno again

* Removed support for backend as session parameter (#1091)

Co-authored-by: Kevin Tian <[email protected]>

* Fix minor todos (#1112)

* Change qpu complex wording (#1109)

* Don't use QPU complex

* don't use the word 'limit'

* Update docs/faqs/max_execution_time.rst

* Update qiskit_ibm_runtime/options/options.py

* Update qiskit_ibm_runtime/runtime_job.py

* Update releasenotes/notes/0.11/job-cost-estimation-d0ba83dbc95c3f67.yaml

* Clarify usage

* reclarify reset time

* rogue comma

* fix whitespace & formatting

* job -> system execution time

---------

Co-authored-by: Kevin Tian <[email protected]>

* Add IBM Cloud channel (#1113)

* Changes for #1806

* Update docs/faqs/max_execution_time.rst

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

---------

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

* Prepare release 0.12.2 (#1115)

* Update main branch 0.13.0 (#1116)

* remove error message test (#1125)

* Exceptions should inherit from Terra where suitable (#1120)

* Changed RuntimeJobFailureError to inherit from JobError

* Changed error type

---------

Co-authored-by: Kevin Tian <[email protected]>

* update docstring & remove max_time (#1137)

* Expose new session details  (#1119)

* add session details method

* add reno

* support iqp urls

* update details mehotd, add status()

* update status() to use enum

* revert previous change, wait for impl details

* update fields returned

* update status method

* update docstring & reno

* update docstrings for both methods

* fix docs build

* address comments

* fix docs build

* fix typo

* docs build again

* fix indent

* fix indent again

* fix indent 3rd time

* Support only LocalFoldingAmplifier as noise_amplifier option (#1093)

* Removed support for all noise_amplifier options other than LocalFoldingAmplifier. Removed deprecation warning.

* Removed tests that covered deprecation. Updated documentation

---------

Co-authored-by: Kevin Tian <[email protected]>

* Fix target_history date bug  (#1143)

* fix target_history datetime bug

* add reno

* add test

* Fixed bug when defining shots as int64 (#1151)

* Log instance on initialization and when running a job (#1150)

* log instances

* add _default_instance & fix lint

* add test

* change var name to current_instance

* Move methods into class pages for docs (#1144)

* Fix link to `Close a session` (#1152)

[1] links to [2] but doesn't go directly to the target section.

[1] https://qiskit.org/ecosystem/ibm-runtime/sessions.html#what-happens-when-a-session-ends
[2] https://qiskit.org/ecosystem/ibm-runtime/how_to/run_session.html#close-a-session

Co-authored-by: Kevin Tian <[email protected]>

* logging instance test is IQP channel only (#1154)

* Update deploy yml (#1148)

* Allow users to indicate they are done submitting jobs to a session (#1139)

* copy changes over

* clean up branch again

* address comments, update docstrings

* catch appropriate error code

* update status code to 404

* Update qiskit_ibm_runtime/session.py

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

* set self._active & remove runtime_session

* Update releasenotes/notes/session-accepting-jobs-d7ef6b60c0f5527b.yaml

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

---------

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

* Prepare release 0.13 (#1157)

* Update main branch 0.13.1 (#1158)

* Update Sphinx theme (#1156)

Co-authored-by: Kevin Tian <[email protected]>

* Added IBM Quantum logo (#1164)

* sessions changes (#1169)

* sessions changes

* add more ticks

* fix link

* fix links

* Update docs/sessions.rst

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

* Update docs/sessions.rst

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

---------

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

* Disallow unsupported options (#1108)

* Disallow unsupported options

* Moved checking of unsupported options to 'flexible' decorator

* Modified the test to give TypeError where needed

* Removed empty newline

* Moved tests from test_ibm_primitives to test_options, because they don't require a primitive

* typo

* Release note

* black and lint

* black again

* Fixed test failing in CI

* Removed _flexible decorator. Moved _post_init into Options class

* lint

* lint

* Fixed bug

* lint

---------

Co-authored-by: Kevin Tian <[email protected]>

* fix merge issues

* black

* lint

---------

Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: Rebecca Dimock <[email protected]>
Co-authored-by: merav-aharoni <[email protected]>
Co-authored-by: Luciano Bello <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Esteban Ginez <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: mberna <[email protected]>
Co-authored-by: Elena Peña Tapia <[email protected]>
Co-authored-by: Arnau Casau <[email protected]>
Co-authored-by: Matt Riedemann <[email protected]>
Co-authored-by: abbycross <[email protected]>

* v2 options

* estimator options

* update test

* lint

* fix merge issues

* black

* fix noise model type

* lint again

* fix header

* fix mypy

* use v2 as default

* cleanup terra options

* black

* options need not be callable

* fix doc

* fix tests

* fix version

* freeze constants

* remove is_simulator

* make image work

* fix tests

* lint

---------

Co-authored-by: Christopher J. Wood <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: mberna <[email protected]>
Co-authored-by: Mariana C Bernagozzi <[email protected]>
Co-authored-by: Rebecca Dimock <[email protected]>
Co-authored-by: merav-aharoni <[email protected]>
Co-authored-by: Luciano Bello <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Esteban Ginez <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: Elena Peña Tapia <[email protected]>
Co-authored-by: Arnau Casau <[email protected]>
Co-authored-by: Matt Riedemann <[email protected]>
Co-authored-by: abbycross <[email protected]>
jyu00 added a commit that referenced this pull request Nov 16, 2023
* Add experimental options (#1067)

* add options

* fix mypy

* rename meas err mit

* Add additional resilience options

* Add additional execution options for twirling

* A twirling strategy option and validation

* handle default resilience options

* add _experimental

* Update default resilience options (#1062)

* remove default resilience options

* add reno

* add logic to override default

* add test

* purge None values from options

(cherry picked from commit 76603f2)

* add finalize options

* add tests

* Update qiskit_ibm_runtime/options/resilience_options.py

* add validation

* lint

* lint again

* lint again

* Allow None values for specific options to be passed through

* Fix parameter validation, allow computational basis

* black

* Fix ZneExtrapolatorType validation

* lint

* lint again

* fix mypy

* Fix ZNE extrapolator default option

* fix level options

* black

* use _isreal

* Disable gate twirling for default lvl 1 opts

* Support for legacy options

---------

Co-authored-by: Christopher J. Wood <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: mberna <[email protected]>
Co-authored-by: Mariana C Bernagozzi <[email protected]>

* fix merge issues

* add pydantic

* black

* lint

* Fast forward experimental to latest main (#1178)

* Remove min execution time check (#1065)

* Remove min execution time check

* update unit test

* remove integration test

* Update `max_execution_time` docstrings (#1059)

* Update max_execution_time docstrings

* add commas

* Update qiskit_ibm_runtime/options/options.py

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

* Update qiskit_ibm_runtime/options/options.py

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

* Update qiskit_ibm_runtime/runtime_options.py

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

* Update releasenotes/notes/max-execution-time-definition-196cb6297693c0f2.yaml

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

---------

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

* Removed remaining code related to Schedules (#1068)

Co-authored-by: Kevin Tian <[email protected]>

* Enable datetime parameter for backend properties (#1070)

* enable datetime param for backend properties

* add test & reno

* improve test

* Update default resilience options (#1062)

* remove default resilience options

* add reno

* add logic to override default

* add test

* purge None values from options

* fix test (#1074)

* Prepare release 0.12.1 (#1075)

* Update main branch veresion 0.12.2 (#1076)

* use ibmq_qasm_simulator (#1078)

* Add reason code to error message (#1072)

* Add reason code to error message

* add reno

* Remove importing PauliSumOp, which is deprecated. (#1079)

---------

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>

* Adjusts default value for optimization_level (#1082)

* add instance info (#1083)

* add instance info

* Add cloud note

* Update README.md

Co-authored-by: Kevin Tian <[email protected]>

---------

Co-authored-by: Kevin Tian <[email protected]>

* Fix links to options in README.md (#1084)

* Remove auth parameter (#1077)

* Removed auth parameter

* Removed calls to migrate()

* black and lint

---------

Co-authored-by: Kevin Tian <[email protected]>

* Remove opflow and algorithms from serialization tests (#1085)

* Remove opflow from tests

* Re-add test for PauliSumOp

* Fix lint

* Fix black

---------

Co-authored-by: Kevin Tian <[email protected]>

* RuntimeJobTimeoutError should inherit from JobTimeoutError (#1090)

* RuntimeJobTimeoutError inherits from JobTimeoutError

* black

---------

Co-authored-by: Kevin Tian <[email protected]>

* Allow user to define a default account as an environment variable (#1018)

* Allow user to define a default account as an environment variable

* Fixed test

* Fixed mistaken paste

* Cleaned up test

* Moved test to TestAccountManager

* Added ability to define default channel in save_account

* Cleaned up code, fixed bugs

* Changed name of parameter

* Added test. Cleaned up code surrounding preferences of channel selection

* black and lint

* Fixed bug when json file was empty

* Code cleanup and documentation

* Documentation

* Removed channel from condition, because unnecessary

* changed default_channel to default_account

* Changed saving and getting default channel to default account

* black

* Documentation

* Release notes

* Reverted diff that was unnecessary

---------

Co-authored-by: Kevin Tian <[email protected]>

* Skip test_job_logs (#1094)

* Update session max_time docstring (#1089)

* Update session max_time docstring

* Update qiskit_ibm_runtime/session.py

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

---------

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

* Fix unit tests against qiskit/main (#1099)

* Add measurements to sampler

* Remove observables from sampler run

---------

Co-authored-by: Kevin Tian <[email protected]>

* fix iqp link (#1096)

Co-authored-by: Kevin Tian <[email protected]>

* Only return channel strategy supported backends  (#1095)

* Q-CTRL Backend filters

* add reno

* fix unit tests

* Attempt to fix terra unit tests (#1102)

* Attempt to fix terra unit tests

* test on my fork

* revert coder_qc change

* Making account code more generic  (#1060)

* Making account code more generic by defining subclasses for channel types

* Removed channel parameter from _assert_valid_instance

* mypy, lint and black

* Changed order of decorators

* Code cleanup

* Documentation fixes

* black

---------

Co-authored-by: Kevin Tian <[email protected]>

* Remove old deprecations (#1106)

* removing old deprecations

* update unit tests

* Open plan updates (#1105)

* Initial edits

* edit

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

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

* Jessie comments

* Update docs/faqs/max_execution_time.rst

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

* Update docs/faqs/max_execution_time.rst

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

* Update docs/sessions.rst

* Update docs/faqs/max_execution_time.rst

---------

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

* New method to create a new Session object with a given id (#1101)

* Added the Session.from_id method

* release notes

* Added integration test

---------

Co-authored-by: Kevin Tian <[email protected]>

* fix test_session_from_id (#1110)

* Warn users if job submitted will exceed quota (#1100)

* Warn users if job will exceed quota

* update reno

* update reno again

* Removed support for backend as session parameter (#1091)

Co-authored-by: Kevin Tian <[email protected]>

* Fix minor todos (#1112)

* Change qpu complex wording (#1109)

* Don't use QPU complex

* don't use the word 'limit'

* Update docs/faqs/max_execution_time.rst

* Update qiskit_ibm_runtime/options/options.py

* Update qiskit_ibm_runtime/runtime_job.py

* Update releasenotes/notes/0.11/job-cost-estimation-d0ba83dbc95c3f67.yaml

* Clarify usage

* reclarify reset time

* rogue comma

* fix whitespace & formatting

* job -> system execution time

---------

Co-authored-by: Kevin Tian <[email protected]>

* Add IBM Cloud channel (#1113)

* Changes for #1806

* Update docs/faqs/max_execution_time.rst

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

---------

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

* Prepare release 0.12.2 (#1115)

* Update main branch 0.13.0 (#1116)

* remove error message test (#1125)

* Exceptions should inherit from Terra where suitable (#1120)

* Changed RuntimeJobFailureError to inherit from JobError

* Changed error type

---------

Co-authored-by: Kevin Tian <[email protected]>

* update docstring & remove max_time (#1137)

* Expose new session details  (#1119)

* add session details method

* add reno

* support iqp urls

* update details mehotd, add status()

* update status() to use enum

* revert previous change, wait for impl details

* update fields returned

* update status method

* update docstring & reno

* update docstrings for both methods

* fix docs build

* address comments

* fix docs build

* fix typo

* docs build again

* fix indent

* fix indent again

* fix indent 3rd time

* Support only LocalFoldingAmplifier as noise_amplifier option (#1093)

* Removed support for all noise_amplifier options other than LocalFoldingAmplifier. Removed deprecation warning.

* Removed tests that covered deprecation. Updated documentation

---------

Co-authored-by: Kevin Tian <[email protected]>

* Fix target_history date bug  (#1143)

* fix target_history datetime bug

* add reno

* add test

* Fixed bug when defining shots as int64 (#1151)

* Log instance on initialization and when running a job (#1150)

* log instances

* add _default_instance & fix lint

* add test

* change var name to current_instance

* Move methods into class pages for docs (#1144)

* Fix link to `Close a session` (#1152)

[1] links to [2] but doesn't go directly to the target section.

[1] https://qiskit.org/ecosystem/ibm-runtime/sessions.html#what-happens-when-a-session-ends
[2] https://qiskit.org/ecosystem/ibm-runtime/how_to/run_session.html#close-a-session

Co-authored-by: Kevin Tian <[email protected]>

* logging instance test is IQP channel only (#1154)

* Update deploy yml (#1148)

* Allow users to indicate they are done submitting jobs to a session (#1139)

* copy changes over

* clean up branch again

* address comments, update docstrings

* catch appropriate error code

* update status code to 404

* Update qiskit_ibm_runtime/session.py

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

* set self._active & remove runtime_session

* Update releasenotes/notes/session-accepting-jobs-d7ef6b60c0f5527b.yaml

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

---------

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

* Prepare release 0.13 (#1157)

* Update main branch 0.13.1 (#1158)

* Update Sphinx theme (#1156)

Co-authored-by: Kevin Tian <[email protected]>

* Added IBM Quantum logo (#1164)

* sessions changes (#1169)

* sessions changes

* add more ticks

* fix link

* fix links

* Update docs/sessions.rst

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

* Update docs/sessions.rst

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

---------

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

* Disallow unsupported options (#1108)

* Disallow unsupported options

* Moved checking of unsupported options to 'flexible' decorator

* Modified the test to give TypeError where needed

* Removed empty newline

* Moved tests from test_ibm_primitives to test_options, because they don't require a primitive

* typo

* Release note

* black and lint

* black again

* Fixed test failing in CI

* Removed _flexible decorator. Moved _post_init into Options class

* lint

* lint

* Fixed bug

* lint

---------

Co-authored-by: Kevin Tian <[email protected]>

* fix merge issues

* black

* lint

---------

Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: Rebecca Dimock <[email protected]>
Co-authored-by: merav-aharoni <[email protected]>
Co-authored-by: Luciano Bello <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Esteban Ginez <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: mberna <[email protected]>
Co-authored-by: Elena Peña Tapia <[email protected]>
Co-authored-by: Arnau Casau <[email protected]>
Co-authored-by: Matt Riedemann <[email protected]>
Co-authored-by: abbycross <[email protected]>

* v2 options

* estimator options

* update test

* lint

* fix merge issues

* black

* fix noise model type

* lint again

* fix header

* fix mypy

* use v2 as default

* cleanup terra options

* black

* options need not be callable

* fix doc

* fix tests

* fix version

* add sampler option

* lint

* freeze constants

* freeze constants

* remove is_simulator

* make image work

* fix merge issues

* fix tests

* fix tests

* lint

* add seed_estimator

* resolve merge issues

---------

Co-authored-by: Christopher J. Wood <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: mberna <[email protected]>
Co-authored-by: Mariana C Bernagozzi <[email protected]>
Co-authored-by: Rebecca Dimock <[email protected]>
Co-authored-by: merav-aharoni <[email protected]>
Co-authored-by: Luciano Bello <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Esteban Ginez <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: Elena Peña Tapia <[email protected]>
Co-authored-by: Arnau Casau <[email protected]>
Co-authored-by: Matt Riedemann <[email protected]>
Co-authored-by: abbycross <[email protected]>
jyu00 added a commit that referenced this pull request Nov 29, 2023
* Add experimental options (#1067)

* add options

* fix mypy

* rename meas err mit

* Add additional resilience options

* Add additional execution options for twirling

* A twirling strategy option and validation

* handle default resilience options

* add _experimental

* Update default resilience options (#1062)

* remove default resilience options

* add reno

* add logic to override default

* add test

* purge None values from options

(cherry picked from commit 76603f2)

* add finalize options

* add tests

* Update qiskit_ibm_runtime/options/resilience_options.py

* add validation

* lint

* lint again

* lint again

* Allow None values for specific options to be passed through

* Fix parameter validation, allow computational basis

* black

* Fix ZneExtrapolatorType validation

* lint

* lint again

* fix mypy

* Fix ZNE extrapolator default option

* fix level options

* black

* use _isreal

* Disable gate twirling for default lvl 1 opts

* Support for legacy options

---------

Co-authored-by: Christopher J. Wood <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: mberna <[email protected]>
Co-authored-by: Mariana C Bernagozzi <[email protected]>

* fix merge issues

* add pydantic

* black

* lint

* Fast forward experimental to latest main (#1178)

* Remove min execution time check (#1065)

* Remove min execution time check

* update unit test

* remove integration test

* Update `max_execution_time` docstrings (#1059)

* Update max_execution_time docstrings

* add commas

* Update qiskit_ibm_runtime/options/options.py

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

* Update qiskit_ibm_runtime/options/options.py

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

* Update qiskit_ibm_runtime/runtime_options.py

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

* Update releasenotes/notes/max-execution-time-definition-196cb6297693c0f2.yaml

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

---------

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

* Removed remaining code related to Schedules (#1068)

Co-authored-by: Kevin Tian <[email protected]>

* Enable datetime parameter for backend properties (#1070)

* enable datetime param for backend properties

* add test & reno

* improve test

* Update default resilience options (#1062)

* remove default resilience options

* add reno

* add logic to override default

* add test

* purge None values from options

* fix test (#1074)

* Prepare release 0.12.1 (#1075)

* Update main branch veresion 0.12.2 (#1076)

* use ibmq_qasm_simulator (#1078)

* Add reason code to error message (#1072)

* Add reason code to error message

* add reno

* Remove importing PauliSumOp, which is deprecated. (#1079)

---------

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>

* Adjusts default value for optimization_level (#1082)

* add instance info (#1083)

* add instance info

* Add cloud note

* Update README.md

Co-authored-by: Kevin Tian <[email protected]>

---------

Co-authored-by: Kevin Tian <[email protected]>

* Fix links to options in README.md (#1084)

* Remove auth parameter (#1077)

* Removed auth parameter

* Removed calls to migrate()

* black and lint

---------

Co-authored-by: Kevin Tian <[email protected]>

* Remove opflow and algorithms from serialization tests (#1085)

* Remove opflow from tests

* Re-add test for PauliSumOp

* Fix lint

* Fix black

---------

Co-authored-by: Kevin Tian <[email protected]>

* RuntimeJobTimeoutError should inherit from JobTimeoutError (#1090)

* RuntimeJobTimeoutError inherits from JobTimeoutError

* black

---------

Co-authored-by: Kevin Tian <[email protected]>

* Allow user to define a default account as an environment variable (#1018)

* Allow user to define a default account as an environment variable

* Fixed test

* Fixed mistaken paste

* Cleaned up test

* Moved test to TestAccountManager

* Added ability to define default channel in save_account

* Cleaned up code, fixed bugs

* Changed name of parameter

* Added test. Cleaned up code surrounding preferences of channel selection

* black and lint

* Fixed bug when json file was empty

* Code cleanup and documentation

* Documentation

* Removed channel from condition, because unnecessary

* changed default_channel to default_account

* Changed saving and getting default channel to default account

* black

* Documentation

* Release notes

* Reverted diff that was unnecessary

---------

Co-authored-by: Kevin Tian <[email protected]>

* Skip test_job_logs (#1094)

* Update session max_time docstring (#1089)

* Update session max_time docstring

* Update qiskit_ibm_runtime/session.py

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

---------

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

* Fix unit tests against qiskit/main (#1099)

* Add measurements to sampler

* Remove observables from sampler run

---------

Co-authored-by: Kevin Tian <[email protected]>

* fix iqp link (#1096)

Co-authored-by: Kevin Tian <[email protected]>

* Only return channel strategy supported backends  (#1095)

* Q-CTRL Backend filters

* add reno

* fix unit tests

* Attempt to fix terra unit tests (#1102)

* Attempt to fix terra unit tests

* test on my fork

* revert coder_qc change

* Making account code more generic  (#1060)

* Making account code more generic by defining subclasses for channel types

* Removed channel parameter from _assert_valid_instance

* mypy, lint and black

* Changed order of decorators

* Code cleanup

* Documentation fixes

* black

---------

Co-authored-by: Kevin Tian <[email protected]>

* Remove old deprecations (#1106)

* removing old deprecations

* update unit tests

* Open plan updates (#1105)

* Initial edits

* edit

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

* Update docs/faqs/max_execution_time.rst

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

* Jessie comments

* Update docs/faqs/max_execution_time.rst

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

* Update docs/faqs/max_execution_time.rst

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

* Update docs/sessions.rst

* Update docs/faqs/max_execution_time.rst

---------

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

* New method to create a new Session object with a given id (#1101)

* Added the Session.from_id method

* release notes

* Added integration test

---------

Co-authored-by: Kevin Tian <[email protected]>

* fix test_session_from_id (#1110)

* Warn users if job submitted will exceed quota (#1100)

* Warn users if job will exceed quota

* update reno

* update reno again

* Removed support for backend as session parameter (#1091)

Co-authored-by: Kevin Tian <[email protected]>

* Fix minor todos (#1112)

* Change qpu complex wording (#1109)

* Don't use QPU complex

* don't use the word 'limit'

* Update docs/faqs/max_execution_time.rst

* Update qiskit_ibm_runtime/options/options.py

* Update qiskit_ibm_runtime/runtime_job.py

* Update releasenotes/notes/0.11/job-cost-estimation-d0ba83dbc95c3f67.yaml

* Clarify usage

* reclarify reset time

* rogue comma

* fix whitespace & formatting

* job -> system execution time

---------

Co-authored-by: Kevin Tian <[email protected]>

* Add IBM Cloud channel (#1113)

* Changes for #1806

* Update docs/faqs/max_execution_time.rst

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

---------

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

* Prepare release 0.12.2 (#1115)

* Update main branch 0.13.0 (#1116)

* remove error message test (#1125)

* Exceptions should inherit from Terra where suitable (#1120)

* Changed RuntimeJobFailureError to inherit from JobError

* Changed error type

---------

Co-authored-by: Kevin Tian <[email protected]>

* update docstring & remove max_time (#1137)

* Expose new session details  (#1119)

* add session details method

* add reno

* support iqp urls

* update details mehotd, add status()

* update status() to use enum

* revert previous change, wait for impl details

* update fields returned

* update status method

* update docstring & reno

* update docstrings for both methods

* fix docs build

* address comments

* fix docs build

* fix typo

* docs build again

* fix indent

* fix indent again

* fix indent 3rd time

* Support only LocalFoldingAmplifier as noise_amplifier option (#1093)

* Removed support for all noise_amplifier options other than LocalFoldingAmplifier. Removed deprecation warning.

* Removed tests that covered deprecation. Updated documentation

---------

Co-authored-by: Kevin Tian <[email protected]>

* Fix target_history date bug  (#1143)

* fix target_history datetime bug

* add reno

* add test

* Fixed bug when defining shots as int64 (#1151)

* Log instance on initialization and when running a job (#1150)

* log instances

* add _default_instance & fix lint

* add test

* change var name to current_instance

* Move methods into class pages for docs (#1144)

* Fix link to `Close a session` (#1152)

[1] links to [2] but doesn't go directly to the target section.

[1] https://qiskit.org/ecosystem/ibm-runtime/sessions.html#what-happens-when-a-session-ends
[2] https://qiskit.org/ecosystem/ibm-runtime/how_to/run_session.html#close-a-session

Co-authored-by: Kevin Tian <[email protected]>

* logging instance test is IQP channel only (#1154)

* Update deploy yml (#1148)

* Allow users to indicate they are done submitting jobs to a session (#1139)

* copy changes over

* clean up branch again

* address comments, update docstrings

* catch appropriate error code

* update status code to 404

* Update qiskit_ibm_runtime/session.py

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

* set self._active & remove runtime_session

* Update releasenotes/notes/session-accepting-jobs-d7ef6b60c0f5527b.yaml

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

---------

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

* Prepare release 0.13 (#1157)

* Update main branch 0.13.1 (#1158)

* Update Sphinx theme (#1156)

Co-authored-by: Kevin Tian <[email protected]>

* Added IBM Quantum logo (#1164)

* sessions changes (#1169)

* sessions changes

* add more ticks

* fix link

* fix links

* Update docs/sessions.rst

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

* Update docs/sessions.rst

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

---------

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

* Disallow unsupported options (#1108)

* Disallow unsupported options

* Moved checking of unsupported options to 'flexible' decorator

* Modified the test to give TypeError where needed

* Removed empty newline

* Moved tests from test_ibm_primitives to test_options, because they don't require a primitive

* typo

* Release note

* black and lint

* black again

* Fixed test failing in CI

* Removed _flexible decorator. Moved _post_init into Options class

* lint

* lint

* Fixed bug

* lint

---------

Co-authored-by: Kevin Tian <[email protected]>

* fix merge issues

* black

* lint

---------

Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: Rebecca Dimock <[email protected]>
Co-authored-by: merav-aharoni <[email protected]>
Co-authored-by: Luciano Bello <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Esteban Ginez <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: mberna <[email protected]>
Co-authored-by: Elena Peña Tapia <[email protected]>
Co-authored-by: Arnau Casau <[email protected]>
Co-authored-by: Matt Riedemann <[email protected]>
Co-authored-by: abbycross <[email protected]>

* v2 options

* estimator options

* update test

* lint

* fix merge issues

* black

* fix noise model type

* lint again

* fix header

* fix mypy

* use v2 as default

* cleanup terra options

* black

* options need not be callable

* fix doc

* fix tests

* fix version

* add sampler option

* lint

* freeze constants

* freeze constants

* remove is_simulator

* make image work

* fix merge issues

* fix tests

* use base classes

* lint

* clean up unused code

* fix tests

* lint

* add seed_estimator

* resolve merge issues

* update docstring

* lint

* 3.8 mapping

* v2 result

* estimator result version

* line

* 3.8 support

* also 3.8 support

* fix tests with no inputs

* fix version passing

* fix decoder param

* disable samplerv2

* disable samplerv2 tests

* lint

---------

Co-authored-by: Christopher J. Wood <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: mberna <[email protected]>
Co-authored-by: Mariana C Bernagozzi <[email protected]>
Co-authored-by: Rebecca Dimock <[email protected]>
Co-authored-by: merav-aharoni <[email protected]>
Co-authored-by: Luciano Bello <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Esteban Ginez <[email protected]>
Co-authored-by: Kevin Tian <[email protected]>
Co-authored-by: Elena Peña Tapia <[email protected]>
Co-authored-by: Arnau Casau <[email protected]>
Co-authored-by: Matt Riedemann <[email protected]>
Co-authored-by: abbycross <[email protected]>
garrison added a commit to Qiskit/qiskit-addon-cutting that referenced this pull request Mar 11, 2024
garrison added a commit to Qiskit/qiskit-addon-cutting that referenced this pull request Mar 25, 2024
* Remove explicit `session.close()` calls inside context manager

These `close` calls are redundant since
Qiskit/qiskit-ibm-runtime#1139.

* Demonstrate transpiling circuits before sending to Runtime

... in cutting tutorials 1 and 3

* Update tutorial 2 (cutting for depth)

* Remove a comma

* black

* Rename `pm` -> `pass_manager` for clarity
mergify bot pushed a commit to Qiskit/qiskit-addon-cutting that referenced this pull request Mar 25, 2024
* Remove explicit `session.close()` calls inside context manager

These `close` calls are redundant since
Qiskit/qiskit-ibm-runtime#1139.

* Demonstrate transpiling circuits before sending to Runtime

... in cutting tutorials 1 and 3

* Update tutorial 2 (cutting for depth)

* Remove a comma

* black

* Rename `pm` -> `pass_manager` for clarity

(cherry picked from commit bf82d2d)
garrison added a commit to Qiskit/qiskit-addon-cutting that referenced this pull request Mar 25, 2024
#512)

* Remove explicit `session.close()` calls inside context manager

These `close` calls are redundant since
Qiskit/qiskit-ibm-runtime#1139.

* Demonstrate transpiling circuits before sending to Runtime

... in cutting tutorials 1 and 3

* Update tutorial 2 (cutting for depth)

* Remove a comma

* black

* Rename `pm` -> `pass_manager` for clarity

(cherry picked from commit bf82d2d)

Co-authored-by: Jim Garrison <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the Added section of the changelog on hold
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow users to indicate they are done submitting jobs to a session
6 participants