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

Use new qiskit device as the base for remote #566

Merged
merged 40 commits into from
Jul 12, 2024

Conversation

austingmhuang
Copy link
Contributor

@austingmhuang austingmhuang commented Jun 21, 2024

Context
The new qiskit device is shaping up to look pretty good so it's time to update qiskit.remote so that it uses the new qiskit device api instead of the legacy device api.

Changes
This PR makes qiskit.remote inherit from the new qiskit device. Basically, we rename QiskitDevice2.py to QiskitDevice.py and the original QiskitDevice.py to QiskitDeviceLegacy.py. Tests are rewritten and imports are redefined accordingly.

Notes
For now, we still inherit from QiskitDeviceLegacy for qiskit.aer and qiskit.basicsim. We could, however, opt to make this change in this PR as well, although it seems like there is a significant amount of refactoring that will be needed to make this work. My personal opinion is that if we do this, we should do this in a separate PR since I think the changes are already a bit confusing as is.

@austingmhuang austingmhuang marked this pull request as draft June 21, 2024 16:38
@austingmhuang
Copy link
Contributor Author

[sc-54388]

Copy link

codecov bot commented Jun 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (19586e3) to head (daaa889).

Additional details and impacted files
@@                     Coverage Diff                     @@
##           new_device_feature_branch      #566   +/-   ##
===========================================================
  Coverage                     100.00%   100.00%           
===========================================================
  Files                              8         8           
  Lines                            795       796    +1     
===========================================================
+ Hits                             795       796    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@austingmhuang austingmhuang changed the title Use new qiskit device as the base for remote/basicsim/aer Use new qiskit device as the base for remote Jul 2, 2024
Copy link
Contributor Author

@austingmhuang austingmhuang Jul 2, 2024

Choose a reason for hiding this comment

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

Renamed from Qiskit_device to Qiskit_device_legacy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed from qiskit_device2 to qiskit_device

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing was changed in the original qiskit_device2 and all the changes in this file are just a result of the renaming.

Copy link
Contributor Author

@austingmhuang austingmhuang Jul 2, 2024

Choose a reason for hiding this comment

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

These are ONLY changes that result from changing the name QiskitDevice2 to QiskitDevice

Comment on lines -36 to -49
if Version(qiskit.__version__) < Version("1.0.0"):
pldevices = [("qiskit.aer", qiskit_aer.Aer), ("qiskit.basicaer", qiskit.BasicAer)]

def check_provider_backend_compatibility(pldevice, backend_name):
"""check compatibility of provided backend"""
dev_name, _ = pldevice
if (dev_name == "qiskit.aer" and "aer" not in backend_name) or (
dev_name == "qiskit.basicaer" and "aer" in backend_name
):
return (False, "Only the AerSimulator is supported on AerDevice")
return True, None

else:
from qiskit.providers.basic_provider import BasicProvider
Copy link
Contributor Author

@austingmhuang austingmhuang Jul 2, 2024

Choose a reason for hiding this comment

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

Although unrelated to this PR, it is deleted since we don't run below v1.0 anymore.

@@ -109,7 +109,7 @@ class TestSupportForV1andV2:
)
def test_v1_and_v2_mocked(self, dev_backend):
"""Test that device initializes with no error mocked"""
dev = qml.device("qiskit.remote", wires=10, backend=dev_backend, use_primitives=True)
dev = qml.device("qiskit.aer", wires=10, backend=dev_backend)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is just to keep code cov happy.

Comment on lines -102 to -104
"""Test that the qiskit.remote device loads correctly when passed a provider and a backend
name. This test is equivalent to `test_load_device` but on the qiskit.remote device instead
of specialized devices that expose more configuration options."""
Copy link
Contributor Author

@austingmhuang austingmhuang Jul 2, 2024

Choose a reason for hiding this comment

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

We delete this test since provider is no longer an accepted keyword argument. As in, since we only take in backend instances, there is no point in testing the ability to take in a provider + backend name.

Comment on lines -132 to -137
def test_remote_device_no_provider(self):
"""Test that the qiskit.remote device raises a ValueError if passed a backend
by name but no provider to look up the name on."""
with pytest.raises(ValueError, match=r"Must pass a provider"):
qml.device("qiskit.remote", wires=2, backend="aer_simulator_statevector")

Copy link
Contributor Author

@austingmhuang austingmhuang Jul 2, 2024

Choose a reason for hiding this comment

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

No more provider so this error message is gone as well. However, when passed a string for a backend, the error we get is a bit unclear (e.g. we get AttributeError: 'str' object has no attribute 'configuration'). Could be done in this PR or a separate one.

@austingmhuang austingmhuang marked this pull request as ready for review July 2, 2024 19:59
Copy link
Contributor

@lillian542 lillian542 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! 🚀

doc/requirements.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@obliviateandsurrender obliviateandsurrender left a comment

Choose a reason for hiding this comment

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

A couple of non-blocking questions otherwise, good to go!

tests/test_integration.py Outdated Show resolved Hide resolved
pennylane_qiskit/qiskit_device.py Outdated Show resolved Hide resolved
austingmhuang and others added 2 commits July 11, 2024 14:59
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
@austingmhuang austingmhuang merged commit b6c3989 into new_device_feature_branch Jul 12, 2024
9 checks passed
@austingmhuang austingmhuang deleted the use_new_qiskit_device branch July 12, 2024 13:16
austingmhuang added a commit that referenced this pull request Jul 25, 2024
* New Qiskit device prototype (#350)

* initial prototype device

* add use_primitives kwarg

* reorganize circuit conversion part 1

* move circuit translation out of device

* estimator execution

* some small improvements for codefactor

* allow circuits with mixed MP types

* move translation functions

* add support for broadcast_expand and session

* add kwargs for options

* tidy up options and session

* warn if using non-primitive measurements

* remove context manager for device session

* refactor handling of Options and kwargs

* cleaning up

* fix 'c register already exists' hardware error

* change Options update interface

* don't allow options to override shots

* don't use classical reg in estimator circuits

* update docstring

* add conversion tests

* add observable conversion test

* fix bug in PauliOps converter

* add more conversion test functions

* remove Adjoint from supported ops and tidy up

* tests and little fixes

* add tests and black formatting

* fix wire order bug for Estimator returns

* add tests

* remove error if device doesn't initialize

* try to get CI to run

* more CI stuff

* try a thing

* black formatting

* fix typo

* add missing skip-if-no-account

* update converter tests

* add mockers to allow tests to run in CI

* temporarily comment out integration tests

* get service from backend

* add mock service to mock backend

* mock calls to Session in unit testing

* uncomment the other tests again

* black formatting

* newer black formatting

* add mocked tests for main execute method

* add MockSession to mocked execution tests

* pylint

* add backend to MockSession calls

* mock tests for _execute methods

* black formatting

* mock transpile for execute_runtime_service

* add name to MockedBackend

* Apply suggestions from code review

Co-authored-by: Matthew Silverman <matthews@xanadu.ai>
Co-authored-by: Astral Cai <astralcai@gmail.com>

* Add barrier to ops list

* apply suggestion from code review

Co-authored-by: Astral Cai <astralcai@gmail.com>

* revert adding barrier for now

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Matthew Silverman <matthews@xanadu.ai>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Matthew Silverman <matthews@xanadu.ai>

* Small performance change

* Revert

* pin qiskit for now

* Pin qiskit-ibm-runtime

* Move function in init to update_kwargs

* Delete print statement lol

* fix for shot information

* name property change

* fixes

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Matthew Silverman <matthews@xanadu.ai>

* Edited docstrings

* Function signature

* Shots are now with context manager

* black reformat

* black reformat

* test changes

* tests

* fixed conflicts

* Change mp_to_pauli to accept mps that affect more than 1 qubit

* Revert to fix CI tests

* black reformat

* Update setup.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update requirements-ci.txt

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/converter.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/converter.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* tests

* Fixed a test

* maybe this works?

* placeholder settings

* fixed CI tests, bandaid fix

* gitignore for 1.0 qiskit versioning

* delete venv1

* tests, shots information, shot vector case, ibm_run_time compatibility

* woops

* docstring for operation_to_qiskit

* black

* appease codecov

* mock test

* Deleted comment

* remove some notebooks

* Update .gitignore

Co-authored-by: Astral Cai <astral.cai@xanadu.ai>

* tests and docstrings

---------

Co-authored-by: Matthew Silverman <matthews@xanadu.ai>
Co-authored-by: Astral Cai <astralcai@gmail.com>
Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com>
Co-authored-by: Austin Huang <gengminghuang@gmail.com>
Co-authored-by: Astral Cai <astral.cai@xanadu.ai>

* Add compile_backend kwarg (#398)

Adds the compile_backend kwarg to the Qiskit device. It is useful when you want to do circuit transpilation when using the old Qiskit API (e.g. use_primitives = False). 

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

---------

Co-authored-by: Austin Huang <gengminghuang@gmail.com>
Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Support both V1 and V2 (#399)

* add name to MockedBackend

* support both V1 and V2 syntax for retrieving backend name and num_qubits

* test relevant methods with both V1 and V2 MockBackends

* tests updated for old device api as per other PR

* tests

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Apply suggestions from code review

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* merge conf

---------

Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com>
Co-authored-by: Austin Huang <gengminghuang@gmail.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Scalar tests passing

* Change mp_to_pauli to be more general

* Hamiltonian testing

* tests

* Revert "tests"

This reverts commit 4f21e7ddf354cc36efee55c5d50e4f978c3d2729.

* Revert "Hamiltonian testing"

This reverts commit 17c3e674235709a7c5e1baf037ebf37b42f3efbf.

* Revert "Change mp_to_pauli to be more general"

This reverts commit a1ff60638f19d302a802f46a4d586a616e0be95c.

* revert

* Install PL dev intead of PL stable on CI (#516) (#518)

* install PL dev intead of PL stable on CI

* trigger ci

* also a couple of other places

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Delete ds store

* import change

* black

* some changes

* linters

* black

* pylinting

* black

* small change

* change conftest

* black linter

* fix

* Generalize mp_to_pauli so that it can work with any observable that has a Pauli Rep (#517)

* tests

* converter

* fixes to tests

* refactor

* delete print

* black

* pylint changes

* deleted tests/pylintrc

* one additional test

* black

* tests

* redo commits

* clean up

* black

* formatting

* black

* Update pennylane_qiskit/converter.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* rewrite tests to all manual cases

* [skip-ci] black

* single qubit operations

* value error for no pauli rep

* list comprehension

* removed one list comprehension

* ehh honestly this is fine too

* delete some useless lines

* [skip-ci] refactor

* [skip ci] accidentally deleted something...?

* Update tests/test_converter.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/converter.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* remove parametrize

* [skip ci] black

* [skip ci] docstring

* [skip ci] added assert statement

* [skip-ci] linear comb changes

* additional more complicated integration tests

* undo some formatting

* formats

* integration tests

* tests

* deleted unsupported observables

* remove sparsehamiltonian for now

* rollback pylint

* revert observable stopping condition

* black

* just a commit

* black

* fm

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* linter errors

* linter

* linter

* linters

* try finally block better?

* revert

* let's just do this...

* trailing whitespace

* linter

* black

* formats

* black

* black

* clean up commits

* reformatting fixed

* clean up commit

---------

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Use old _execute_runtime_service for observables that are not compatible with SPO representation (#525)

* Functionality

* syntax error

* additional test

* additional test cases

* edit comment

* comment

* additional comments

* added a warning

* added a warning

* delete print statement

* warning test

* delete a test

* black

* Minor adjustment to sort observables. Modified tests to accomodate. Doc strings edit

* Modified tests and warning

* edit

* fixes

* moved test to mocked

* mockedbackend update

* black

* changes

* test

* uncomment

* docstring

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* black

* fix

---------

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Move off of "ibmq_qasm_simulator" and towards using AerSimulator for qiskit tests (#521)

* import aersimulator

* commit

* black

* added functionality for local simulators when use_primitves = False

* [skip ci] changes to AerSim

* removal of ibm service

* tests

* woops

* temp fixes

* unfinished changes

* ignore tests due to version errors

* ignore tests due to version errors

* black

* cleanup

* delete comment

* revert a change

* replaced a test case

* shouldn't need to skip if no acc anymore

* added comments

* delete comment

* minor refactor

* Added additional comments

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* [skip ci] delete comment

* add comment

---------

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update reqs to 1.0 (#536)

* removed legacy ci

* Delete .github/workflows/tests.yml

* naming and 0.46 test

* rename

* update qiskit device

* dep warnings

* pylint

* removed devices

* pylint

* pylint

* docs fix

* setup.py changes

* delete

* revert

* reqs change

* setup

* change to reqs to match ci

* removed a test

* pylint

* put ibmq.rst back

* delete ibmq

* remove ibmq

* deletion

* codecov

* lint

* changes to tests

* Revert "Remove devices that will not be supported in the new release" (#544)

* changelogs

* Remove basicaer (#546)

* removed legacy ci

* Delete .github/workflows/tests.yml

* naming and 0.46 test

* rename

* update qiskit device

* dep warnings

* pylint

* removed devices

* pylint

* pylint

* docs fix

* setup.py changes

* delete

* revert

* reqs change

* setup

* change to reqs to match ci

* removed a test

* pylint

* put ibmq.rst back

* delete ibmq

* remove ibmq

* deletion

* codecov

* lint

* changes to tests

* Revert "Remove devices that will not be supported in the new release" (#544)

* docs

* remove basicaer

* reqs to build docs

* docs

* pylint

* tests fix

* path change

* Changelog and doc

* changelogs

* Update CHANGELOG.md

* deleted a test file

* removed error

* basic sim pylint

* Update CHANGELOG.md

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* remove ifelse block

* pylint

---------

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Remove use primitives and everything that depends on it (#538)

* removed legacy ci

* Delete .github/workflows/tests.yml

* Deleted use_primitives from tests

* remove use_primitive kwarg and things that depend on it

* fix tests and split_exec

* fixed test

* pylint

* naming and 0.46 test

* rename

* update qiskit device

* dep warnings

* pylint

* changes to tests

* removed backend.run() and _execute_runtime

* remove additional stuff

* linter

* docstring changes

* skip additional test

* docstrings

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

---------

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Remove ibmq devices (#550)

* Removing ibmq devices from the docs and relevant files

* missed something in docs

* Changelog updates

* Update CHANGELOG.md

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

---------

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Migrate to v2 primitives (#539)

* removed legacy ci

* Delete .github/workflows/tests.yml

* Deleted use_primitives from tests

* remove use_primitive kwarg and things that depend on it

* fix tests and split_exec

* fixed test

* pylint

* change to v2 prims, del Options

* del Options

* temp changes to options

* naming and 0.46 test

* rename

* update qiskit device

* dep warnings

* pylint

* changes to tests

* deleted options for now

* small changes

* access sampler results

* Sampler tests and functionality

* estimator multi measurement works

* estimator now gives variances

* comments

* removed backend.run() and _execute_runtime

* remove additional stuff

* linter

* docstring changes

* skip additional test

* [skip ci] format is correct, checks probs as well

* [skip ci] docstring

* docstrings

* un did confusing change that didnt do anything

* rerun ci

* Syntax changes due to version change

* Delete for codecov

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* docstrings

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* finishing touches

* comments

* [skip ci] formatting

* [skip ci] refactor

* deleting unused tests

* line change

* pylint

* yay

* docstring

* refactoring of estimator and sampler

* process_estimator_job tests

* comment for clarity

---------

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* pylint

* Process kwargs (#547)

* removed legacy ci

* Delete .github/workflows/tests.yml

* Deleted use_primitives from tests

* remove use_primitive kwarg and things that depend on it

* fix tests and split_exec

* fixed test

* pylint

* change to v2 prims, del Options

* del Options

* temp changes to options

* naming and 0.46 test

* rename

* update qiskit device

* dep warnings

* pylint

* changes to tests

* deleted options for now

* small changes

* access sampler results

* Sampler tests and functionality

* estimator multi measurement works

* estimator now gives variances

* comments

* removed backend.run() and _execute_runtime

* remove additional stuff

* linter

* docstring changes

* skip additional test

* [skip ci] format is correct, checks probs as well

* [skip ci] docstring

* docstrings

* We delete the Options Handling class because there are no more Options() to handle. Additionally, process_kwargs is left as a stub as a temporary measure while we figure out what to do with kwargs

* changed warnings due to difference in UI for setting shots between Qiskit and Pennylane. Tracking shots has also been updated due to estimatorV2 syntax change

* un did confusing change that didnt do anything

* rerun ci

* Syntax changes due to version change

* Delete for codecov

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* docstrings

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* finishing touches

* comments

* [skip ci] formatting

* [skip ci] refactor

* due to the fact that shots are not tracked in the estimator's metadata anymore, variances are calculated a different way using the precision instead

* black

* lint

* docstring changes

* backend options?

* deleting unused tests

* line change

* [skip ci] changed test to be more readable

* New tests for options functionality and edge case

* pylint

* We make sure that transpilation options are not passed to the primitive and that no errors are raised as a result

* Due to changing the signature of get_transpile_args(), we need to fix one of the tests

* warning message for default_shots was unclear. changed to be more clear

* add more comments

* yay

* docstring

* Testing to ensure that options and kwargs combine properly

* edit tests for pylint

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* edit test regex matching due to changes earlier

* refactoring of estimator and sampler

* generate samples tested

* process_estimator_job tests

* comment for clarity

* pylint

* pylint

* [skip ci] minor formatting

* Fix unintended additonal dimensionality and added test for res != 1 testcase

* fix to transpiles

* comments to explain some stuff

* merge conflicts

* docstring

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* clean up

* refactor

* pylint

* formatting of docstring

* revert to tuple(res)

* [skip ci] fix to dimensions of sampler

* docstrings

* some docstrings changes

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* black

* linter

---------

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Docstrings for converter functions and new qiskit device (#552)

* removed legacy ci

* Delete .github/workflows/tests.yml

* Deleted use_primitives from tests

* remove use_primitive kwarg and things that depend on it

* fix tests and split_exec

* fixed test

* pylint

* change to v2 prims, del Options

* del Options

* temp changes to options

* naming and 0.46 test

* rename

* update qiskit device

* dep warnings

* pylint

* changes to tests

* deleted options for now

* small changes

* access sampler results

* Sampler tests and functionality

* estimator multi measurement works

* estimator now gives variances

* comments

* removed backend.run() and _execute_runtime

* remove additional stuff

* linter

* docstring changes

* skip additional test

* [skip ci] format is correct, checks probs as well

* [skip ci] docstring

* docstrings

* We delete the Options Handling class because there are no more Options() to handle. Additionally, process_kwargs is left as a stub as a temporary measure while we figure out what to do with kwargs

* changed warnings due to difference in UI for setting shots between Qiskit and Pennylane. Tracking shots has also been updated due to estimatorV2 syntax change

* un did confusing change that didnt do anything

* rerun ci

* Syntax changes due to version change

* Delete for codecov

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* docstrings

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* finishing touches

* comments

* [skip ci] formatting

* [skip ci] refactor

* due to the fact that shots are not tracked in the estimator's metadata anymore, variances are calculated a different way using the precision instead

* black

* lint

* docstring changes

* backend options?

* deleting unused tests

* line change

* [skip ci] changed test to be more readable

* New tests for options functionality and edge case

* pylint

* We make sure that transpilation options are not passed to the primitive and that no errors are raised as a result

* Due to changing the signature of get_transpile_args(), we need to fix one of the tests

* warning message for default_shots was unclear. changed to be more clear

* add more comments

* yay

* docstring

* Testing to ensure that options and kwargs combine properly

* edit tests for pylint

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* edit test regex matching due to changes earlier

* refactoring of estimator and sampler

* generate samples tested

* process_estimator_job tests

* comment for clarity

* pylint

* pylint

* [skip ci] minor formatting

* [skip ci] docstrings for converter functions

* Fix unintended additonal dimensionality and added test for res != 1 testcase

* fix to transpiles

* comments to explain some stuff

* merge conflicts

* [skip ci] examples of QiskitDevice2 added to docstring

* docstring changes

* docstring

* more docstrings

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* clean up

* refactor

* pylint

* formatting of docstring

* docstrings

* docstrings

* formatting

* changes

* some examples

* Update pennylane_qiskit/converter.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* examples and links

* change inheritance for remote device

* build docs

* better docs

* fix docs a little

* remove redundant docstrings

* revert

* import fix

* build sphinx

* revert change to QiskitDev2

* Update pennylane_qiskit/remote.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* reformat to within 100 chars

---------

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Diagonalize gates (#558)

* removed legacy ci

* Delete .github/workflows/tests.yml

* Deleted use_primitives from tests

* remove use_primitive kwarg and things that depend on it

* fix tests and split_exec

* fixed test

* pylint

* change to v2 prims, del Options

* del Options

* temp changes to options

* naming and 0.46 test

* rename

* update qiskit device

* dep warnings

* pylint

* changes to tests

* deleted options for now

* small changes

* access sampler results

* Sampler tests and functionality

* estimator multi measurement works

* estimator now gives variances

* comments

* removed backend.run() and _execute_runtime

* remove additional stuff

* linter

* docstring changes

* skip additional test

* [skip ci] format is correct, checks probs as well

* [skip ci] docstring

* docstrings

* We delete the Options Handling class because there are no more Options() to handle. Additionally, process_kwargs is left as a stub as a temporary measure while we figure out what to do with kwargs

* changed warnings due to difference in UI for setting shots between Qiskit and Pennylane. Tracking shots has also been updated due to estimatorV2 syntax change

* un did confusing change that didnt do anything

* rerun ci

* Syntax changes due to version change

* Delete for codecov

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* docstrings

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* finishing touches

* comments

* [skip ci] formatting

* [skip ci] refactor

* due to the fact that shots are not tracked in the estimator's metadata anymore, variances are calculated a different way using the precision instead

* black

* lint

* docstring changes

* backend options?

* deleting unused tests

* line change

* [skip ci] changed test to be more readable

* New tests for options functionality and edge case

* pylint

* We make sure that transpilation options are not passed to the primitive and that no errors are raised as a result

* Due to changing the signature of get_transpile_args(), we need to fix one of the tests

* warning message for default_shots was unclear. changed to be more clear

* add more comments

* yay

* docstring

* Testing to ensure that options and kwargs combine properly

* edit tests for pylint

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* edit test regex matching due to changes earlier

* refactoring of estimator and sampler

* generate samples tested

* process_estimator_job tests

* comment for clarity

* pylint

* pylint

* [skip ci] minor formatting

* Fix unintended additonal dimensionality and added test for res != 1 testcase

* fix to transpiles

* comments to explain some stuff

* merge conflicts

* docstring

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* clean up

* refactor

* pylint

* formatting of docstring

* revert to tuple(res)

* [skip ci] fix to dimensions of sampler

* docstrings

* some docstrings changes

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* black

* [skip ci] import split_non_commuting

* diagonalize tests for Hadamard

* changed stopping condition to reflect reality of what's supported and added tests and changed tests to fit new stopping condition

* [skip ci] added comment about qml.var not providing matching answers

* some tests

* [skip ci] linter

* interesting changes

* linter

* split non commuting test cases

* sprod

* sampler tested as well

* linter

* black

* docstrings and comments

* docstrings and comments black

* comment regarding magic number

* todo

* add np

* more concise way of testing

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* fix black

* diagonalize for edge case

* linter

* pylint

* clean up

* fix docstring

---------

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Qiskit session (#551)

* functionality implemented

* minor adjustments to tests

* [skip-ci] Qiskit Sessions now test many warnings since you can set session options on device initialization and when using the session manager. We use the options in the device for things that are generally not updateable for the device e.g. backends; we use session options for everything else

* [skip-ci] tests that we are passing on kwargs to Qiskit's session constructor, and verifying that an error is raised due to such behavior

* [skip ci] pylint

* small comments

* Generalization of the session options

* delicious docstrings

* [skip ci] tests and clarification

* [skip ci] better session options

* comments for clarity

* changes to the tests & the warning message

* docstrings

* type error changes

* docstrings

* add qiskit_session to docs

* a little more consistency in comments

* for docs

* fix ci

* black

* revert

* revert

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Qiskit Session update

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* docstring update

---------

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Tests with fakehardware (#553)

* removed legacy ci

* Delete .github/workflows/tests.yml

* Deleted use_primitives from tests

* remove use_primitive kwarg and things that depend on it

* fix tests and split_exec

* fixed test

* pylint

* change to v2 prims, del Options

* del Options

* temp changes to options

* naming and 0.46 test

* rename

* update qiskit device

* dep warnings

* pylint

* changes to tests

* deleted options for now

* small changes

* access sampler results

* Sampler tests and functionality

* estimator multi measurement works

* estimator now gives variances

* comments

* removed backend.run() and _execute_runtime

* remove additional stuff

* linter

* docstring changes

* skip additional test

* [skip ci] format is correct, checks probs as well

* [skip ci] docstring

* docstrings

* We delete the Options Handling class because there are no more Options() to handle. Additionally, process_kwargs is left as a stub as a temporary measure while we figure out what to do with kwargs

* changed warnings due to difference in UI for setting shots between Qiskit and Pennylane. Tracking shots has also been updated due to estimatorV2 syntax change

* un did confusing change that didnt do anything

* rerun ci

* Syntax changes due to version change

* Delete for codecov

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* docstrings

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* finishing touches

* comments

* [skip ci] formatting

* [skip ci] refactor

* due to the fact that shots are not tracked in the estimator's metadata anymore, variances are calculated a different way using the precision instead

* black

* lint

* docstring changes

* backend options?

* deleting unused tests

* line change

* [skip ci] changed test to be more readable

* New tests for options functionality and edge case

* pylint

* We make sure that transpilation options are not passed to the primitive and that no errors are raised as a result

* Due to changing the signature of get_transpile_args(), we need to fix one of the tests

* warning message for default_shots was unclear. changed to be more clear

* add more comments

* yay

* docstring

* Testing to ensure that options and kwargs combine properly

* edit tests for pylint

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* edit test regex matching due to changes earlier

* refactoring of estimator and sampler

* generate samples tested

* process_estimator_job tests

* comment for clarity

* pylint

* pylint

* [skip ci] minor formatting

* Fix unintended additonal dimensionality and added test for res != 1 testcase

* fix to transpiles

* comments to explain some stuff

* merge conflicts

* docstring

* [skip ci] some tests with fakehardware

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* clean up

* refactor

* pylint

* formatting of docstring

* revert to tuple(res)

* [skip ci] fix to dimensions of sampler

* docstrings

* some docstrings changes

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* black

* [skip ci] import split_non_commuting

* diagonalize tests for Hadamard

* changed stopping condition to reflect reality of what's supported and added tests and changed tests to fit new stopping condition

* [skip ci] added comment about qml.var not providing matching answers

* some tests

* [skip ci] linter

* interesting changes

* linter

* split non commuting test cases

* sprod

* sampler tested as well

* linter

* black

* docstrings and comments

* docstrings and comments black

* comment regarding magic number

* todo

* add np

* more concise way of testing

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* fix black

* diagonalize for edge case

* linter

* pylint

* clean up

* fix docstring

* flaky

* flaky and fake

* rename bakcend to aer_backend

---------

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* fix merge conf

* fix setup.py

* reqs.txt

* changelog changes

* Use new qiskit device as the base for remote (#566)

* import changes

* Added TODOs for tests

* changes

* this should pass

* pylint

* circular import

* observables update

* remerge

* import from qiskitdevice2

* Delete unnecessary tests and mocks

* black/pylint

* Add tests back in for codecov.

* refactor tests

* delete legacy device only functionality

* change around imports

* add assertion

* fix

* fix

* fix setup

* clean up

* fix reqs.txt

* fix

* changelog changed

* maybe this works?

* a docstring?

* a docstring?

* reverts

* does this break

* revert

* fix

* fix

* attempt a doc fix

* Update tests/test_integration.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* some docstrings

---------

Co-authored-by: obliviateandsurrender <utkarshazad98@gmail.com>

* Plugin page update (#563)

* removed legacy ci

* Delete .github/workflows/tests.yml

* Deleted use_primitives from tests

* remove use_primitive kwarg and things that depend on it

* fix tests and split_exec

* fixed test

* pylint

* change to v2 prims, del Options

* del Options

* temp changes to options

* naming and 0.46 test

* rename

* update qiskit device

* dep warnings

* pylint

* changes to tests

* deleted options for now

* small changes

* access sampler results

* Sampler tests and functionality

* estimator multi measurement works

* estimator now gives variances

* comments

* removed backend.run() and _execute_runtime

* remove additional stuff

* linter

* docstring changes

* skip additional test

* [skip ci] format is correct, checks probs as well

* [skip ci] docstring

* docstrings

* We delete the Options Handling class because there are no more Options() to handle. Additionally, process_kwargs is left as a stub as a temporary measure while we figure out what to do with kwargs

* changed warnings due to difference in UI for setting shots between Qiskit and Pennylane. Tracking shots has also been updated due to estimatorV2 syntax change

* un did confusing change that didnt do anything

* rerun ci

* Syntax changes due to version change

* Delete for codecov

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* docstrings

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* finishing touches

* comments

* [skip ci] formatting

* [skip ci] refactor

* due to the fact that shots are not tracked in the estimator's metadata anymore, variances are calculated a different way using the precision instead

* black

* lint

* docstring changes

* backend options?

* deleting unused tests

* line change

* [skip ci] changed test to be more readable

* New tests for options functionality and edge case

* pylint

* We make sure that transpilation options are not passed to the primitive and that no errors are raised as a result

* Due to changing the signature of get_transpile_args(), we need to fix one of the tests

* warning message for default_shots was unclear. changed to be more clear

* add more comments

* yay

* docstring

* Testing to ensure that options and kwargs combine properly

* edit tests for pylint

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* edit test regex matching due to changes earlier

* refactoring of estimator and sampler

* generate samples tested

* process_estimator_job tests

* comment for clarity

* pylint

* pylint

* [skip ci] minor formatting

* [skip ci] docstrings for converter functions

* Fix unintended additonal dimensionality and added test for res != 1 testcase

* fix to transpiles

* comments to explain some stuff

* merge conflicts

* [skip ci] examples of QiskitDevice2 added to docstring

* docstring changes

* docstring

* more docstrings

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* clean up

* refactor

* pylint

* formatting of docstring

* docstrings

* docstrings

* formatting

* changes

* some examples

* Update pennylane_qiskit/converter.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* examples and links

* change inheritance for remote device

* build docs

* better docs

* fix docs a little

* remove redundant docstrings

* revert

* import fix

* prelim changes to aer

* changes to build sphinx

* revert change

* delete section on ibmq devices

* add examples for remote.rst

* plugin updates to the remote device and basicsim

* doc fixes for sphinx build

* docs

* small fi

* fix weird spacing

* [skip ci] small fix

* [skip ci] error in codeblock

* delete extra the

* [skip ci] changelog

* merge confs

* formatting

* black

* Update doc/devices/remote.rst

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update doc/devices/remote.rst

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update doc/devices/remote.rst

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update doc/devices/remote.rst

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update doc/devices/remote.rst

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* address comments

* undo

* readme

* plugin page fixes

* fixed documentation

* fix

* Update doc/index.rst

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* doc changes

* typo

* weird change didn't go through

* change to doc

* small change

* Update doc/devices/remote.rst

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update doc/devices/remote.rst

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* change name of iqp token

* small fix

---------

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Tracker functionality (#533)

* is this all?

* doc strings

* tests for tracker

* trackers

* trackers

* fixed tests

* removed legacy ci

* Delete .github/workflows/tests.yml

* Deleted use_primitives from tests

* remove use_primitive kwarg and things that depend on it

* fix tests and split_exec

* fixed test

* pylint

* change to v2 prims, del Options

* del Options

* temp changes to options

* naming and 0.46 test

* rename

* update qiskit device

* dep warnings

* pylint

* changes to tests

* deleted options for now

* small changes

* access sampler results

* Sampler tests and functionality

* estimator multi measurement works

* estimator now gives variances

* comments

* removed backend.run() and _execute_runtime

* remove additional stuff

* linter

* docstring changes

* skip additional test

* [skip ci] format is correct, checks probs as well

* [skip ci] docstring

* docstrings

* We delete the Options Handling class because there are no more Options() to handle. Additionally, process_kwargs is left as a stub as a temporary measure while we figure out what to do with kwargs

* changed warnings due to difference in UI for setting shots between Qiskit and Pennylane. Tracking shots has also been updated due to estimatorV2 syntax change

* un did confusing change that didnt do anything

* rerun ci

* Syntax changes due to version change

* Delete for codecov

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* docstrings

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* finishing touches

* comments

* [skip ci] formatting

* [skip ci] refactor

* due to the fact that shots are not tracked in the estimator's metadata anymore, variances are calculated a different way using the precision instead

* black

* lint

* docstring changes

* backend options?

* deleting unused tests

* line change

* [skip ci] changed test to be more readable

* New tests for options functionality and edge case

* pylint

* We make sure that transpilation options are not passed to the primitive and that no errors are raised as a result

* Due to changing the signature of get_transpile_args(), we need to fix one of the tests

* warning message for default_shots was unclear. changed to be more clear

* add more comments

* yay

* docstring

* Testing to ensure that options and kwargs combine properly

* edit tests for pylint

* woops

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update pennylane_qiskit/qiskit_device2.py

Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* edit test regex matching due to changes earlier

* print out some stuff for tests

* refactoring of estimator and sampler

* generate samples tested

* process_estimator_job tests

* comment for clarity

* pylint

* pylint

* [skip ci] temp

* [skip ci] There is a bug due to the post processing of results that is causing some of the assertion statements to fail. We can ignore these assertions for now and address how to rework reorder_fn to avoid this bug

* [skip ci]

* [skip ci] minor formatting

* Fix unintended additonal dimensionality and added test for res != 1 testcase

* fix to transpiles

* comments to explain some stuff

* merge conflicts

* pylint

* formatting

* tracker comments

* black

* comments about the tracker

* bet

* fix to imports

* black

* temp

* baller implementation

* increase shot number to reduce error

* edit function

* black

* better tests

* refactor

* black

* delete print statement

* refactor

* Delete unneeded import

* fix assertion

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* Update tests/test_base_device.py

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* new tests

* removed simulations keyword

* some xfails pending discussion

---------

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>

* Update CHANGELOG.md

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>

* CHANGELOG

---------

Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>
Co-authored-by: Matthew Silverman <matthews@xanadu.ai>
Co-authored-by: Astral Cai <astralcai@gmail.com>
Co-authored-by: Astral Cai <astral.cai@xanadu.ai>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
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.

3 participants