-
Notifications
You must be signed in to change notification settings - Fork 71
Added V2 and ISA support #197
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
146 commits
Select commit
Hold shift + click to select a range
634dc69
Added TODO
tnemoz ecee0c6
Started to adapt to V2 primitives
tnemoz 529c5da
Modified phase estimators to work with V2 primitives and ISA circuits
tnemoz e390037
Merge branch 'main' into main
woodsp-ibm da40425
Changed PassManager to more generic transpiler
tnemoz d83408c
Changed custom types to support Python 3.8
tnemoz 0e6e6f0
Added transpiler to .pylintdict
tnemoz 0e8ac74
Adapted Grover to V2 primitives
tnemoz 3d79bb5
Changed custom types using __future__ annotations
tnemoz eae6cff
Adapated VQD to V2 primitives
tnemoz df69ea7
Adapted tests for Grover
tnemoz 111188b
Fixed styling
tnemoz 4b46931
Merge branch 'main' into main
tnemoz c03c3a1
Merge branch 'min_eigen' into dev
93af774
removed useless comments in vqe and changed SamplingVQE to match v2 p…
63332e9
changed AdaptVQE
1b58074
changed diagonal_estimators from v1 to v2 primitives
b48c66d
updated TODO
1cd76ff
changed qaoa to match v2 and isa
4f734d9
modified all associated tests for min_eigen classes
d7b671f
changed todo
d2bc2db
ComputeUncompute done
tnemoz cae37b2
QNSPSA done
tnemoz 84128a8
Restored SPSA test to previous values
tnemoz b3c32a3
Refactored test for transpilers, make linter happy, test_vqd not passing
tnemoz dc075d0
Updated TODO
tnemoz 0790c53
PVQD done
tnemoz 7ff3ab6
Slight modifications of VQD, still isn't working
tnemoz bf6a931
Adapted PVQD to EstimatorV2
tnemoz dea4bd0
Adapted Trotter QRTE to EstimatorV2
tnemoz 8d9a54c
Trotter QRTE
tnemoz 8c87b8d
Time evolvers
tnemoz e3150cf
Merge branch 'main' into main
tnemoz 3fcc265
Fixed linting and VQD test
tnemoz a1171dc
Updated TODO
tnemoz 82f7ced
Merge branch 'main' into main
woodsp-ibm d45c9ad
started mlae.py, not finished
cefd334
finished mlae file
4b95ced
updated todo andneed to continue fae and addtranspilation to mlae and…
9eab51a
modified gradient base
3af5a57
started changes into gradients
fb4dcc6
finished finite-diff gradient
950b24e
Updated gradients test
tnemoz 6fbd45e
updated reverse gradients
af1c097
updated lin_comb files, missing transpilation added to the TODO list …
c5a46b3
updated spsa estimator gradient
b4fcadb
finished spsa sampler
8fa65ce
finished lin comb
004e28c
started changes for tests
48e63f9
Amplitude estimators, tests failing but no errors
tnemoz b63a36e
Almost done, weird bug on transpiler test on mlae
tnemoz 4299816
Amplitude estimatorsd done
tnemoz 2c21f99
Updated TODO
tnemoz 73fbb5d
Estimator gradients working
tnemoz 2e78525
QGT working
tnemoz ee0597e
QFI working
tnemoz 0610b7c
Sampler gradients working
tnemoz c9f823d
Started working on _DiagonalEstimator
tnemoz 188c5ae
Continued working on _DiagonalEstimator
tnemoz dd53643
Continued working on _DiagonalEstimator #2, _call method todo
tnemoz d0e7203
Continued working on _DiagonalEstimator #3, test sampling_vqe todo
tnemoz cf84ba6
_DiagonalEstimator supposedly done, test with QNSPSA fails for now
tnemoz 25f1c55
_DiagonalEstimator done
tnemoz 941043b
SamplingVQE done
tnemoz 207f365
Working QAOA
tnemoz 822e204
Removed TODO and added more shots for the QAOA test
tnemoz 757a277
Changed initial point in QAOA test to be able to seed
tnemoz 6f39d76
Updated VQE tutorials
tnemoz fb47a1b
VQE working
tnemoz 8c402ad
Most tutorials updated. QAOA to be checked, tweedldum to be removed f…
tnemoz bf2d326
Replaced test for transpiler
tnemoz aff31d8
Added pVQD to docs
tnemoz 4ff895f
All tests passing
tnemoz 75cc776
Removed aliases
tnemoz 64b8352
Fixed time evolvers
tnemoz 303bcb4
Added future imports annotations for Python 3.9
tnemoz 47c22fb
Added copyrights
tnemoz d89db0b
Linting done, spelling to fix
tnemoz 6d8a705
Spell checked
tnemoz e6db4f2
Rollback RealAmplitudes and EfficientSU2
tnemoz 9ab842c
Additional copyrights and linting
tnemoz fb9c417
Removed strict=True in zip
tnemoz fc17c5d
Lowered precision of VQD test
tnemoz ba0c35d
Correct wrong import and line too long
tnemoz e33745b
Added tweedledum to dictionnary and added missing copyright
tnemoz 515bc54
Corrected spelling in optional
tnemoz bceaf06
Seeded StatevectorSampler in gradients test
tnemoz 924d2f3
black formatting
tnemoz f4dd0e6
Added _circuit_key
tnemoz 3ec9df7
lback formatting circuit_key
tnemoz 8d83580
Accessed _op_start_times private attribute
tnemoz 077052d
Removed last instance of Estimator and changed ClassicalRegister impo…
tnemoz 6afadc4
Changed Copyright for test_optimizers_scikitquant
tnemoz 54e7bf0
Changed requirements
tnemoz 6a1e92c
Added simplify in adaptVQE
tnemoz 2eac1eb
Changed copyright of adaptvqe
tnemoz d6e1911
Merge branch 'main' into main
tnemoz 6920f89
Not accessing private attribute of QuantumCircuit in circuit_key
tnemoz 37788ba
Added precision on AdaptVQE fix
tnemoz 7e5e9d4
Added TODOs
tnemoz afcb415
First five tutorials done
tnemoz 66d9448
Updated QAOA test
tnemoz 7395d61
First Grover tutorial OK
tnemoz 8b45ffc
Tutorials normally done except second Grover, check transpilation
tnemoz e73a02d
Small corrections
tnemoz 651ba86
Checks
tnemoz dfee1cf
Move transpiler of iae as keyword-argument only
tnemoz 9271786
Checked transpilation_options is never required
tnemoz 4550229
Fixded second Grover tutorial
tnemoz 42af3dc
Changed nbsphinx timeout
tnemoz 1d3f78f
Removed Qiskit 2.1 from requirements-dev.txt
tnemoz 4d4f442
Updated docstrings
tnemoz ea45f05
Restricted to Qiskit !=2.1.* in requirements
tnemoz 0fdef58
Changed restriction of Qiskit to requirements-dev
tnemoz 7a45dd4
Merge branch 'main' into main
tnemoz 3579fd2
Changed initial point in QAOA tutorial
tnemoz 634b46d
Reran QAOA tutorial with scipy 1.16
tnemoz c9348f1
Reduced number of iterations of COBYLA on VQD callback test
tnemoz 116001a
Removed unused imports in VQD test
tnemoz 8968bd3
Make linters happy
tnemoz 617d1ba
Removed unused import in Grover tutorial
tnemoz 96d7b0a
Added release note
tnemoz ef58900
Updated release note and removed mention of Qiskit 2.0 not being supp…
tnemoz d227738
Corrected typo in release note
tnemoz c2e4bf8
Added transpilation option to VQE and VQD and modified their tests
tnemoz f883f99
Added transpilation to gradients, tests still to be written
tnemoz 03489ad
Make black happy
tnemoz ec3e400
Linting on VQE and VQD
tnemoz 11300d1
Added transpilation with tests to gradients
tnemoz d3efacf
Slightly changed transpilation of QGT
tnemoz 232bff0
Removed transpilation option from QFI since no operation is performed…
tnemoz 09757a1
Added transpilation to PVQD
tnemoz 2f24ef2
Added transpilation to VarQRTE and VarQITE
tnemoz 1a6f6b5
Linting after adding transpilation
tnemoz e0a6b12
Updated Intro tutorial to showcase transpilation
tnemoz 44a7f2e
Changed ansatz docstring
tnemoz 6e2bf6c
Black formatting of tutorial
tnemoz 69c7c00
Modified docstrings
tnemoz 39cfe4e
Testing running tests in Qiskit 2.1.1
tnemoz 5bf8641
Handled nil observables in observables_evaluators.py
tnemoz bd8946d
Removed unnecessary TODOs
tnemoz 723103c
Fixing transpilation of VQE inside AdaptVQE
tnemoz 8288daf
Added run_estimator_job to take care of nil observables
tnemoz 94e00ee
Corrected spelling
tnemoz d24930c
Uncomment forwards euler solver
tnemoz 36f795d
Merge branch 'main' into main
woodsp-ibm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This code is part of a Qiskit project. | ||
# | ||
# (C) Copyright IBM 2024. | ||
# | ||
# This code is licensed under the Apache License, Version 2.0. You may | ||
# obtain a copy of this license in the LICENSE.txt file in the root directory | ||
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# Any modifications or derivative works of this code must retain this | ||
# copyright notice, and modified files need to carry a notice indicating | ||
# that they have been altered from the originals. | ||
|
||
"""Types used by the qiskit-algorithms package.""" | ||
|
||
from typing import Any, List, Protocol, Union | ||
|
||
from qiskit import QuantumCircuit | ||
|
||
_Circuits = Union[List[QuantumCircuit], QuantumCircuit] | ||
|
||
|
||
class Transpiler(Protocol): | ||
"""A Generic type to represent a transpiler.""" | ||
|
||
def run(self, circuits: _Circuits, **options: Any) -> _Circuits: | ||
"""Transpile a circuit or a list of quantum circuits.""" | ||
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.