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
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d3bae16
import changes
austingmhuang Jun 21, 2024
736f7a3
Added TODOs for tests
austingmhuang Jun 21, 2024
e1154e4
changes
austingmhuang Jun 21, 2024
50022b0
this should pass
austingmhuang Jun 21, 2024
1d30fb8
merge confs
austingmhuang Jul 2, 2024
39e50c7
pylint
austingmhuang Jul 2, 2024
e907588
circular import
austingmhuang Jul 2, 2024
b4abc71
observables update
austingmhuang Jul 2, 2024
af5bfa4
remerge
austingmhuang Jul 2, 2024
61d057d
import from qiskitdevice2
austingmhuang Jul 2, 2024
d8cbc03
Delete unnecessary tests and mocks
austingmhuang Jul 2, 2024
5d10756
black/pylint
austingmhuang Jul 2, 2024
07be9e6
Add tests back in for codecov.
austingmhuang Jul 2, 2024
4ec53d9
refactor tests
austingmhuang Jul 2, 2024
b0b5a8a
delete legacy device only functionality
austingmhuang Jul 2, 2024
8606376
change around imports
austingmhuang Jul 4, 2024
9777375
add assertion
austingmhuang Jul 5, 2024
991beae
merge conflicts
austingmhuang Jul 8, 2024
aedb433
fix
austingmhuang Jul 8, 2024
c798126
fix
austingmhuang Jul 8, 2024
211e575
Merge branch 'new_device_feature_branch' into use_new_qiskit_device
austingmhuang Jul 9, 2024
d0285ad
fix setup
austingmhuang Jul 9, 2024
5eb2438
Merge branch 'new_device_feature_branch' into use_new_qiskit_device
austingmhuang Jul 9, 2024
8c35d83
clean up
austingmhuang Jul 9, 2024
d3eedd3
fix reqs.txt
austingmhuang Jul 9, 2024
2e4685e
Merge branch 'new_device_feature_branch' into use_new_qiskit_device
austingmhuang Jul 9, 2024
d5d8545
fix
austingmhuang Jul 9, 2024
761958c
changelog changed
austingmhuang Jul 9, 2024
cc82285
merg conf
austingmhuang Jul 9, 2024
44a595b
maybe this works?
austingmhuang Jul 9, 2024
c015f29
a docstring?
austingmhuang Jul 9, 2024
e4df301
a docstring?
austingmhuang Jul 9, 2024
04cb4bf
reverts
austingmhuang Jul 9, 2024
8c8555f
does this break
austingmhuang Jul 9, 2024
f55f82c
revert
austingmhuang Jul 9, 2024
bb4933f
fix
austingmhuang Jul 9, 2024
e6794ce
fix
austingmhuang Jul 9, 2024
394ac48
attempt a doc fix
obliviateandsurrender Jul 10, 2024
58d30a5
Update tests/test_integration.py
austingmhuang Jul 11, 2024
daaa889
some docstrings
austingmhuang Jul 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pennylane_qiskit/aer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"""
import qiskit_aer

from .qiskit_device import QiskitDevice
from .qiskit_device_legacy import QiskitDeviceLegacy


class AerDevice(QiskitDevice):
class AerDevice(QiskitDeviceLegacy):
"""A PennyLane device for the C++ Qiskit Aer simulator.

Please refer to the `Qiskit documentation <https://qiskit.org/documentation/>`_ for
Expand Down
4 changes: 2 additions & 2 deletions pennylane_qiskit/basic_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
using PennyLane.
"""
from qiskit.providers.basic_provider import BasicProvider
from .qiskit_device import QiskitDevice
from .qiskit_device_legacy import QiskitDeviceLegacy


class BasicSimulatorDevice(QiskitDevice):
class BasicSimulatorDevice(QiskitDeviceLegacy):
"""A PennyLane device for the native Python Qiskit simulator.

For more information on the ``BasicSimulator`` backend options and transpile options, please visit the
Expand Down
2 changes: 1 addition & 1 deletion pennylane_qiskit/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import pennylane as qml
import pennylane.ops as pennylane_ops
from pennylane.tape.tape import rotations_and_diagonal_measurements
from pennylane_qiskit.qiskit_device import QISKIT_OPERATION_MAP
from pennylane_qiskit.qiskit_device_legacy import QISKIT_OPERATION_MAP
Copy link
Contributor

Choose a reason for hiding this comment

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

since QISKIT_OPERATION_MAP isn't really a "legacy" object but will be used by the new device and conversion going forward, should we move it to either the new qiskit_device folder or to converter, and update imports accordingly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm I personally lean towards moving it to converter (to me it seems more like a utility thing?) so that, suppose in 5 years we have a new new device, this import doesn't need to change. Plus it just makes sense intuitively to import the QISKIT_OPERATION_MAP from the file where it is actually defined.


inv_map = {v.__name__: k for k, v in QISKIT_OPERATION_MAP.items()}

Expand Down
Loading
Loading