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

Add PennyLane IO entry point for loading Qiskit operators #453

Merged
merged 27 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a4c59d3
save draft of SparsePauliOp conversion
lillian542 Feb 5, 2024
09cdefe
Merge branch 'master' into sparse_pauli_op
lillian542 Feb 14, 2024
1b021d3
Add docstring to `convert_sparse_pauli_op_to_pl()`
Mandrenkov Feb 21, 2024
1891c48
Add tests for `convert_sparse_pauli_op_to_pl()`
Mandrenkov Feb 21, 2024
8cbe0e7
Synchronize `qiskit` and `qiskit-terra` requirements
Mandrenkov Feb 21, 2024
717f169
Merge branch 'master' into sparse_pauli_op
Mandrenkov Feb 21, 2024
53fe08d
Remove unused requirement `tweedledum`
Mandrenkov Feb 22, 2024
3c66e1a
Add `wires` argument to `convert_sparse_pauli_op_to_pl()`
Mandrenkov Feb 22, 2024
16269f8
Swap order of `params` and `wires` arguments
Mandrenkov Feb 22, 2024
531e845
Merge branch 'master' into sparse_pauli_op
Mandrenkov Feb 22, 2024
e47512b
Pass `coeffs` by keyword argument in docstring example
Mandrenkov Feb 22, 2024
3d494bb
Pass `params` by keyword argument in example
Mandrenkov Feb 22, 2024
abe6782
Add comment about wire ordering to Qiskit term `for` loop
Mandrenkov Feb 22, 2024
c528969
Rename function to `convert_sparse_pauli_op()`
Mandrenkov Feb 22, 2024
ad1e351
Reword note according to PR suggestion
Mandrenkov Feb 22, 2024
38b96e2
Add 'Usage Details' section to docstring
Mandrenkov Feb 22, 2024
51f6f71
Rename function to `load_pauli_op()`
Mandrenkov Feb 22, 2024
867024b
Rename `sparse_op` to `pauli_op`
Mandrenkov Feb 22, 2024
f3f745c
Merge branch 'master' into sparse_pauli_op
Mandrenkov Feb 22, 2024
22c02b9
Fix import ordering
Mandrenkov Feb 22, 2024
b3f229f
Add PennyLane entry point for loading Qiskit operators
Mandrenkov Feb 22, 2024
22d0782
Merge branch 'master' into sc-56187-from-qiskit-op-entry-point
Mandrenkov Feb 22, 2024
d11e202
Add `SparsePauliOp` notes to changelog
Mandrenkov Feb 23, 2024
122c599
Merge branch 'master' into sc-56187-from-qiskit-op-entry-point
Mandrenkov Feb 23, 2024
3ed49ba
Add missing check for `pauli_op` type
Mandrenkov Feb 23, 2024
91664b7
Synchronize docstrings between PennyLane and plugin
Mandrenkov Feb 23, 2024
28b41d0
Tag PR in existing changelog note
Mandrenkov Feb 23, 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
42 changes: 25 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

### Improvements 🛠

* The UI for passing parameters to a ``qfunc`` generated when loading a Qiskit ``QuantumCircuit``
into PennyLane is updated to allow passing parameters as args or kwargs, rather than as
* The UI for passing parameters to a ``qfunc`` generated when loading a Qiskit ``QuantumCircuit``
into PennyLane is updated to allow passing parameters as args or kwargs, rather than as
a dictionary. The old dictionary UI continues to be supported.
[(#406)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/406)
[(#428)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/428)

* Measurement operations are now added to the PennyLane template when a ``QuantumCircuit``
is converted using `load`. Additionally, one can override any existing terminal
measurements by providing a list of PennyLane
measurements by providing a list of PennyLane
`measurements <https://docs.pennylane.ai/en/stable/introduction/measurements.html>`_ themselves.
[(#405)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/405)

Expand All @@ -29,6 +29,13 @@
``Barrier``, ``CYGate``, ``CHGate``, ``CPhase``, ``CCZGate``, ``ECRGate``, and ``GlobalPhaseGate``.
[(#449)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/449)

* Added the ability to convert a Qiskit `SparsePauliOp` instance into a PennyLane `Operator`.
[(#401)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/401)

* Added a `pennylane.io` entry point for converting Qiskit operators.
[(#453)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/453)


### Breaking changes 💔

### Deprecations 👋
Expand All @@ -41,6 +48,7 @@

This release contains contributions from (in alphabetical order):

Mikhail Andrenkov
Utkarsh Azad
Lillian Frederiksen

Expand All @@ -49,18 +57,18 @@ Lillian Frederiksen

### Bug fixes 🐛

* The kwargs `job_tags` and `session_id` are passed to the correct arguments in the
`circuit_runner` device so that they will be used in the Qiskit backend; these
* The kwargs `job_tags` and `session_id` are passed to the correct arguments in the
`circuit_runner` device so that they will be used in the Qiskit backend; these
were previously ignored.
[(#358)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/358)

* The `generate_samples` method for the `IBMQSamplerDevice` is updated to get counts
from the nearest probability distribution rather than the quasi-distribution (which
may contain negative probabilities and therefore raise errors).
* The `generate_samples` method for the `IBMQSamplerDevice` is updated to get counts
from the nearest probability distribution rather than the quasi-distribution (which
may contain negative probabilities and therefore raise errors).
[(#357)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/357)
* The `generate_samples` method for the `IBMQSamplerDevice` now avoids raising an
indexing error when some states are not populated, and labels states according to

* The `generate_samples` method for the `IBMQSamplerDevice` now avoids raising an
indexing error when some states are not populated, and labels states according to
the Pennylane convention instead of Qiskit convention.
[(#357)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/357)

Expand All @@ -83,7 +91,7 @@ Francesco Scala

### Bug fixes 🐛

* Update conversion of PennyLane to Qiskit operators to accommodate
* Update conversion of PennyLane to Qiskit operators to accommodate
the addition of Singleton classes in the newest version of Qiskit.
[(#347)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/347)

Expand Down Expand Up @@ -315,26 +323,26 @@ Mikhail Andrenkov, Christina Lee, Romain Moyard, Antal Száva

* Fix runtime sampler due to changes on Qiskit side.
[(#201)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/201)

* Pin `jinja2` to 3.0.3 because of sphinx incompatibility.
[(#207)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/207)

### Contributors

This release contains contributions from (in alphabetical order):

Samuel Banning, Romain Moyard

---

# Release 0.22.0

### Improvements

* Changed a validation check such that it handles qubit numbers represented as
strings.
[(#184)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/184)

* Changed the VQE callback function for SciPy optimizers.
[(#187)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/187)

Expand All @@ -346,7 +354,7 @@ Samuel Banning, Romain Moyard

* Changed the access to Hamiltonian terms `hamiltonian.terms()` as a method.
[(#190)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/190)

### Contributors

This release contains contributions from (in alphabetical order):
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
],
'pennylane.io': [
'qiskit = pennylane_qiskit:load',
'qiskit_op = pennylane_qiskit:load_pauli_op',
'qasm = pennylane_qiskit:load_qasm',
'qasm_file = pennylane_qiskit:load_qasm_from_file',
],
Expand Down
Loading