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
[OpRefactor] Rename wires as wire_order in heisenberg ops #2051
Merged
Conversation
This file contains 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
Codecov Report
@@ Coverage Diff @@
## op-refactor #2051 +/- ##
============================================
Coverage 99.18% 99.18%
============================================
Files 225 225
Lines 17188 17188
============================================
Hits 17048 17048
Misses 140 140
Continue to review full report at Codecov.
|
josh146
approved these changes
Dec 21, 2021
mariaschuld
added a commit
that referenced
this pull request
Feb 16, 2022
* remove string_for_inverse * fix accidental push * [OpRefractor] remove `string_for_inverse` (#2021) * remove string_for_inverse * remove string_for_inverse for device * black * Update doc/releases/changelog-dev.md * [OpRefactor] add temporary hyperparameter attribute (#2017) * add test and attribute * black * fix coverage * polish * changelog * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Apply suggestions from code review Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Christina Lee <christina@xanadu.ai> * [OpRefactor] Move diagonalizing_gates method to Operator (#1985) * move method and update docstrings in evals * black * revert to NotImplementedError * fix queuing issue * polish * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Josh Izaac <josh146@gmail.com> * Update the `Operation.generator` property (#2030) * more * more * more * more * fixes * fixes * all tests passing * fix * more * Apply suggestions from code review * add to changelog * [OpRefactor] Add static compute_diagonalizing_gates method (#1993) * move method and update docstrings in evals * black * revert to NotImplementedError * fix queuing issue * add compute_diag_gates method * backup * add test and attribute * black * polish * polish signatures * black * fix docstring * fix signature * polish * make wires an arg * fix coverage * Update pennylane/operation.py Co-authored-by: Christina Lee <christina@xanadu.ai> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * change signatures * improve docstring * small fix * Apply suggestions from code review * better docstrings * add examples everywhere * more docstring polish * add docstring for identity * hermitian better example * black * suggestions code review Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> * [OpRefactor] Fix dev branch after merging master (#2047) * use get_generator func * add a lot of pylints * fix failing test * move pylints * black Co-authored-by: Josh Izaac <josh146@gmail.com> * [OpRefactor] Upgrade matrix methods (#1996) * change matrix methods * clean up basic methods * changed matrix to matrix() * black * fix test * fix Hadamard gate * changelog * fix some more small issues * some more fixes * make (almost) all _matrix methods static * backup * add test and attribute * black * fix coverage * polish * changelog * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * blackup * wrote up new usage * correct changelog * add some tests for expand-matrix * black * fix some tests * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * replace expand logic in get_unitary * fix multirz inverse * fix minor pauli_eigs error * fix qft error * resolve conflict * fix all test but the BIG ISSUE * change signature, part 1 * finish dosctrings * black * all minor problems cleared again * polish * more polish and black * fix docstrings, fix ControlledQubitUNitary * changelog polish * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * backup * implement suggestions josh * black * redesigned ControlledQubitUnitary * backup * revert to NotImplementedErrors * typo * black * delete superfluous matrix methods * delete superfluous arg * fix tests * black * hopefully fix failing test * fix codecoverage * fix last coverage issue * backup * add hyperparameters and pylints * black * Update pennylane/operation.py Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Christina Lee <christina@xanadu.ai> * [OpRefactor] Add terms and compute_terms (#2036) * black and changelog * fix typo * fixed fermionic terms * black * backup * fix * simpler implementation * minor updates * fix some tests * fix tests * polishing * add test * fix docstring formatting * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * suggestions josh * Update pennylane/ops/qubit/hamiltonian.py Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Josh Izaac <josh146@gmail.com> * add pylints (#2052) * [OpRefactor] Rename wires as wire_order in heisenberg ops (#2051) * rename * update changelog * [OpRefactor] Update eigenvalue representations (#2048) * fix tests * black * increase codecov * black * josh suggestions * move default to eigvals() and make everything static * apply suggestions josh * Apply suggestions from code review * [OpRefactor] Add sparse_matrix and compute_sparse_matrix methods (#2050) * basic changes * black * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * josh suggestions Co-authored-by: Josh Izaac <josh146@gmail.com> * [OpRefactor] Update kraus representations (#2055) * rename * dicstrings * fix docstring * minor fix to test * Update doc/releases/changelog-dev.md * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * black Co-authored-by: Josh Izaac <josh146@gmail.com> * [OpRefactor] `decomposition` and `compute_decomposition` methods in `Operator` base class (#2024) * decomposition and compute decomposition methods * adding some more ops * more consistent across qubit ops, return as tuple * start adding templates * move hyperparameters defintions * update templates in a later PR * tests * fixing tests * more test fixes * final test fix! * docstrings, interface device tests * black, tests for coverage * changelog and docstrings * docstrings * more child class docstrings * Update doc/releases/changelog-dev.md Co-authored-by: Josh Izaac <josh146@gmail.com> * nodecompositionerror, test new docstrings * docstring fixes * merge conflict * docstring fixes and minor updates * barrier doc change * test fixing, parametric op docstrings * final docstrings, black * qft docstring * black, fix test * remove unused import * black, fix multicontrolledx * fix tests, black * fixing more tests * hopefully the last breaking tests * enhance code coverage * fix some problems from merging * pin sphinx Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca> Co-authored-by: Maria Schuld <mariaschuld@gmail.com> * [OpRefactor] Update the generator to raise an exception if not defined (#2061) * Update the generator to raise an exception if not defined * fixes * fixes * fixes * fix * [OpRefactor] Add custom errors when representations are undefined (#2064) * add errors and tests, use errors * small fix * change one more None to Error * delete obsolete line * fix tests * black * update changelog * [OpRefactor] fix codefactor (#2067) * fix codefactor * restore lines * delete again * `Tensor.matrix`: Warnings for partial wires overlaps and unsorted wire repetition (#2013) * implement sorting before grouping and check partial wires overlaps. * changelog * black * tests * tiny * reduce PR to warnings * lint * old python sum * black * code review * black * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * restructure warning logic * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Josh Izaac <josh146@gmail.com> * changes applied * Apply suggestions from code review * black * one more test fixed * [OpRefactor] Update dev guide to explain the new operator abstraction (#2066) * add previous changes * add graphic * rewrite architecture overview * rewrite op guide * add differentiation * fomatting * polish * polish * polish * black * formatting * fix sphinx? * some dashes * josh comments * major polish * minor details * minor improvement * more polishing * fix link * fix qasm precision * changing qasm tests back * Update doc/development/adding_operators.rst Co-authored-by: Josh Izaac <josh146@gmail.com> * suggestions Josh 1 * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * backup * minor improvements * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: DSGuala <67476785+DSGuala@users.noreply.github.com> * Update doc/development/guide/architecture.rst * Update doc/development/adding_operators.rst * change images, fix link Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: DSGuala <67476785+DSGuala@users.noreply.github.com> * Update Operation call signatures to match doc string (#1976) * Updated parameteric_ops to match docs call signature * finished updating all of the ops * Added wires arg to SparseHamiltonian * updating some of cv ops * updating call signature for more ops * updated callsigns * updated changelog * disable too many args error for code factor * replaced lam with delta * Removed Sphinx Override * fixed bug with TensorN observable * Update doc/releases/changelog-dev.md Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: antalszava <antalszava@gmail.com> Co-authored-by: David Ittah <dime10@users.noreply.github.com> * [OpRefactor] Use decomposition in templates (#2053) * decomposition and compute decomposition methods * adding some more ops * more consistent across qubit ops, return as tuple * start adding templates * move hyperparameters defintions * update templates in a later PR * tests * fixing tests * more test fixes * final test fix! * docstrings, interface device tests * black, tests for coverage * changelog and docstrings * docstrings * more child class docstrings * Update doc/releases/changelog-dev.md Co-authored-by: Josh Izaac <josh146@gmail.com> * nodecompositionerror, test new docstrings * docstring fixes * merge conflict * docstring fixes and minor updates * barrier doc change * test fixing, parametric op docstrings * final docstrings, black * qft docstring * black, fix test * embeddings started to refactor * embeddings done * backup * layers done * statepreps done * backup * done subroutines * backup * fix tests except grover, timeevol, commuting * black * fix last three tests * black * black * fix tests * mottonnen fixed * update changelog * fixes, including sphinx * backup * Fix tape expand tests (#2065) * fixes * more * more * more * more * more * more * black * delete faulty import * improve codecoverage * improve coverage by one line * port one bug fix from other branch * backup * suggestions Josh 1 * redo changes in reset files * rewrite op_list extension * black * fix tests * change ttn * make pylint happy * black * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca> * black * black * revert * adapt isingzz eval function * backup * fix all tests except from the batch one * upgraded version of black and blackened again * [OpRefactor] Final clean-up of operator subclasses (#2131) * dummy change to open pr * clean docstrings * backup * port some changes from operation.py PR * clean docstrings of classes * black * minor sphinx fix * make docstrings similar * more cleaning, and revert BasisStatePrep for test passing * black * upgraded version of black and blackened again * fix * fix * fix bug * merge master * linting * remove print label * [WIP] Renaming (#2189) * more * more * more * more * more * more * more * rename eigvals to get_eigvals() * black * update eigvals in tests * tensor eigvals * fix * more * Update pennylane/operation.py Co-authored-by: Maria Schuld <mariaschuld@gmail.com> * update deprecation warning * more * add deprecation tests Co-authored-by: Maria Schuld <mariaschuld@gmail.com> * coverage Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Maria Schuld <mariaschuld@gmail.com> Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca> Co-authored-by: David Wierichs <davidwierichs@gmail.com> Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: DSGuala <67476785+DSGuala@users.noreply.github.com> Co-authored-by: antalszava <antalszava@gmail.com>
dwierichs
added a commit
that referenced
this pull request
Feb 17, 2022
* remove string_for_inverse * fix accidental push * [OpRefractor] remove `string_for_inverse` (#2021) * remove string_for_inverse * remove string_for_inverse for device * black * Update doc/releases/changelog-dev.md * [OpRefactor] add temporary hyperparameter attribute (#2017) * add test and attribute * black * fix coverage * polish * changelog * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Apply suggestions from code review Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Christina Lee <christina@xanadu.ai> * [OpRefactor] Move diagonalizing_gates method to Operator (#1985) * move method and update docstrings in evals * black * revert to NotImplementedError * fix queuing issue * polish * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Josh Izaac <josh146@gmail.com> * Update the `Operation.generator` property (#2030) * more * more * more * more * fixes * fixes * all tests passing * fix * more * Apply suggestions from code review * add to changelog * [OpRefactor] Add static compute_diagonalizing_gates method (#1993) * move method and update docstrings in evals * black * revert to NotImplementedError * fix queuing issue * add compute_diag_gates method * backup * add test and attribute * black * polish * polish signatures * black * fix docstring * fix signature * polish * make wires an arg * fix coverage * Update pennylane/operation.py Co-authored-by: Christina Lee <christina@xanadu.ai> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * change signatures * improve docstring * small fix * Apply suggestions from code review * better docstrings * add examples everywhere * more docstring polish * add docstring for identity * hermitian better example * black * suggestions code review Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> * [OpRefactor] Fix dev branch after merging master (#2047) * use get_generator func * add a lot of pylints * fix failing test * move pylints * black Co-authored-by: Josh Izaac <josh146@gmail.com> * [OpRefactor] Upgrade matrix methods (#1996) * change matrix methods * clean up basic methods * changed matrix to matrix() * black * fix test * fix Hadamard gate * changelog * fix some more small issues * some more fixes * make (almost) all _matrix methods static * backup * add test and attribute * black * fix coverage * polish * changelog * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * blackup * wrote up new usage * correct changelog * add some tests for expand-matrix * black * fix some tests * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * replace expand logic in get_unitary * fix multirz inverse * fix minor pauli_eigs error * fix qft error * resolve conflict * fix all test but the BIG ISSUE * change signature, part 1 * finish dosctrings * black * all minor problems cleared again * polish * more polish and black * fix docstrings, fix ControlledQubitUNitary * changelog polish * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * backup * implement suggestions josh * black * redesigned ControlledQubitUnitary * backup * revert to NotImplementedErrors * typo * black * delete superfluous matrix methods * delete superfluous arg * fix tests * black * hopefully fix failing test * fix codecoverage * fix last coverage issue * backup * add hyperparameters and pylints * black * Update pennylane/operation.py Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Christina Lee <christina@xanadu.ai> * [OpRefactor] Add terms and compute_terms (#2036) * black and changelog * fix typo * fixed fermionic terms * black * backup * fix * simpler implementation * minor updates * fix some tests * fix tests * polishing * add test * fix docstring formatting * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * suggestions josh * Update pennylane/ops/qubit/hamiltonian.py Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Josh Izaac <josh146@gmail.com> * add pylints (#2052) * [OpRefactor] Rename wires as wire_order in heisenberg ops (#2051) * rename * update changelog * [OpRefactor] Update eigenvalue representations (#2048) * fix tests * black * increase codecov * black * josh suggestions * move default to eigvals() and make everything static * apply suggestions josh * Apply suggestions from code review * [OpRefactor] Add sparse_matrix and compute_sparse_matrix methods (#2050) * basic changes * black * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * josh suggestions Co-authored-by: Josh Izaac <josh146@gmail.com> * [OpRefactor] Update kraus representations (#2055) * rename * dicstrings * fix docstring * minor fix to test * Update doc/releases/changelog-dev.md * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * black Co-authored-by: Josh Izaac <josh146@gmail.com> * [OpRefactor] `decomposition` and `compute_decomposition` methods in `Operator` base class (#2024) * decomposition and compute decomposition methods * adding some more ops * more consistent across qubit ops, return as tuple * start adding templates * move hyperparameters defintions * update templates in a later PR * tests * fixing tests * more test fixes * final test fix! * docstrings, interface device tests * black, tests for coverage * changelog and docstrings * docstrings * more child class docstrings * Update doc/releases/changelog-dev.md Co-authored-by: Josh Izaac <josh146@gmail.com> * nodecompositionerror, test new docstrings * docstring fixes * merge conflict * docstring fixes and minor updates * barrier doc change * test fixing, parametric op docstrings * final docstrings, black * qft docstring * black, fix test * remove unused import * black, fix multicontrolledx * fix tests, black * fixing more tests * hopefully the last breaking tests * enhance code coverage * fix some problems from merging * pin sphinx Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca> Co-authored-by: Maria Schuld <mariaschuld@gmail.com> * [OpRefactor] Update the generator to raise an exception if not defined (#2061) * Update the generator to raise an exception if not defined * fixes * fixes * fixes * fix * [OpRefactor] Add custom errors when representations are undefined (#2064) * add errors and tests, use errors * small fix * change one more None to Error * delete obsolete line * fix tests * black * update changelog * [OpRefactor] fix codefactor (#2067) * fix codefactor * restore lines * delete again * `Tensor.matrix`: Warnings for partial wires overlaps and unsorted wire repetition (#2013) * implement sorting before grouping and check partial wires overlaps. * changelog * black * tests * tiny * reduce PR to warnings * lint * old python sum * black * code review * black * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * restructure warning logic * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Josh Izaac <josh146@gmail.com> * changes applied * Apply suggestions from code review * black * one more test fixed * [OpRefactor] Update dev guide to explain the new operator abstraction (#2066) * add previous changes * add graphic * rewrite architecture overview * rewrite op guide * add differentiation * fomatting * polish * polish * polish * black * formatting * fix sphinx? * some dashes * josh comments * major polish * minor details * minor improvement * more polishing * fix link * fix qasm precision * changing qasm tests back * Update doc/development/adding_operators.rst Co-authored-by: Josh Izaac <josh146@gmail.com> * suggestions Josh 1 * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * backup * minor improvements * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: DSGuala <67476785+DSGuala@users.noreply.github.com> * Update doc/development/guide/architecture.rst * Update doc/development/adding_operators.rst * change images, fix link Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: DSGuala <67476785+DSGuala@users.noreply.github.com> * Update Operation call signatures to match doc string (#1976) * Updated parameteric_ops to match docs call signature * finished updating all of the ops * Added wires arg to SparseHamiltonian * updating some of cv ops * updating call signature for more ops * updated callsigns * updated changelog * disable too many args error for code factor * replaced lam with delta * Removed Sphinx Override * fixed bug with TensorN observable * Update doc/releases/changelog-dev.md Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: antalszava <antalszava@gmail.com> Co-authored-by: David Ittah <dime10@users.noreply.github.com> * [OpRefactor] Use decomposition in templates (#2053) * decomposition and compute decomposition methods * adding some more ops * more consistent across qubit ops, return as tuple * start adding templates * move hyperparameters defintions * update templates in a later PR * tests * fixing tests * more test fixes * final test fix! * docstrings, interface device tests * black, tests for coverage * changelog and docstrings * docstrings * more child class docstrings * Update doc/releases/changelog-dev.md Co-authored-by: Josh Izaac <josh146@gmail.com> * nodecompositionerror, test new docstrings * docstring fixes * merge conflict * docstring fixes and minor updates * barrier doc change * test fixing, parametric op docstrings * final docstrings, black * qft docstring * black, fix test * embeddings started to refactor * embeddings done * backup * layers done * statepreps done * backup * done subroutines * backup * fix tests except grover, timeevol, commuting * black * fix last three tests * black * black * fix tests * mottonnen fixed * update changelog * fixes, including sphinx * backup * Fix tape expand tests (#2065) * fixes * more * more * more * more * more * more * black * delete faulty import * improve codecoverage * improve coverage by one line * port one bug fix from other branch * backup * suggestions Josh 1 * redo changes in reset files * rewrite op_list extension * black * fix tests * change ttn * make pylint happy * black * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca> * black * black * revert * adapt isingzz eval function * backup * fix all tests except from the batch one * upgraded version of black and blackened again * [OpRefactor] Final clean-up of operator subclasses (#2131) * dummy change to open pr * clean docstrings * backup * port some changes from operation.py PR * clean docstrings of classes * black * minor sphinx fix * make docstrings similar * more cleaning, and revert BasisStatePrep for test passing * black * upgraded version of black and blackened again * first step * reduce step * undo has_gen * tests * changelog * restore grad_recipe * black * fix orbitalrotation gradient * docstring * lint * add gradient bug fix for OrbitalRotaiton to changelog * fix * tests for parameter frequencies * test coverage * copy JacobianTape methods to parameter_shift.py * fix * Revert "copy JacobianTape methods to parameter_shift.py" This reverts commit 3be9806. * use parameter_frequencies for shift rule. adapt tests. add parameter_frequencies to operation.grad_method * black * changelog * whitespace * debugging * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * add eight-term rule to OrbitalRotation * formatting of frequencies * orbital * doc * make frequencies a property * test * adapt tests to frequencies being property * adapt to parameter_frequencies as property * adapt more tests * more * more * simplify util functions a bit * fix bug * merge master * linting * remove print label * [WIP] Renaming (#2189) * more * more * more * more * more * more * more * rename eigvals to get_eigvals() * black * update eigvals in tests * tensor eigvals * fix * more * Update pennylane/operation.py Co-authored-by: Maria Schuld <mariaschuld@gmail.com> * update deprecation warning * more * add deprecation tests Co-authored-by: Maria Schuld <mariaschuld@gmail.com> * test coverage * lint * lint abstractmethod * coverage * tests for default grad_method * remove old prints * test coverage * black * undo move of JacobianTape methods * pointless statement is not pointless * black * some linting * print reintroduce * wrong local pylint * more fiddling with pylint * docstring shifts * test_draw * test_draw_1 * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * drawing tests * make _process_shifts public * rename no_duplicates to check_duplicates * remove unnecessary lint disable * black * merge master Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Maria Schuld <mariaschuld@gmail.com> Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca> Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: DSGuala <67476785+DSGuala@users.noreply.github.com> Co-authored-by: antalszava <antalszava@gmail.com>
dwierichs
added a commit
that referenced
this pull request
Feb 17, 2022
* remove string_for_inverse * fix accidental push * [OpRefractor] remove `string_for_inverse` (#2021) * remove string_for_inverse * remove string_for_inverse for device * black * Update doc/releases/changelog-dev.md * [OpRefactor] add temporary hyperparameter attribute (#2017) * add test and attribute * black * fix coverage * polish * changelog * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Apply suggestions from code review Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Christina Lee <christina@xanadu.ai> * [OpRefactor] Move diagonalizing_gates method to Operator (#1985) * move method and update docstrings in evals * black * revert to NotImplementedError * fix queuing issue * polish * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Josh Izaac <josh146@gmail.com> * Update the `Operation.generator` property (#2030) * more * more * more * more * fixes * fixes * all tests passing * fix * more * Apply suggestions from code review * add to changelog * [OpRefactor] Add static compute_diagonalizing_gates method (#1993) * move method and update docstrings in evals * black * revert to NotImplementedError * fix queuing issue * add compute_diag_gates method * backup * add test and attribute * black * polish * polish signatures * black * fix docstring * fix signature * polish * make wires an arg * fix coverage * Update pennylane/operation.py Co-authored-by: Christina Lee <christina@xanadu.ai> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * change signatures * improve docstring * small fix * Apply suggestions from code review * better docstrings * add examples everywhere * more docstring polish * add docstring for identity * hermitian better example * black * suggestions code review Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> * [OpRefactor] Fix dev branch after merging master (#2047) * use get_generator func * add a lot of pylints * fix failing test * move pylints * black Co-authored-by: Josh Izaac <josh146@gmail.com> * [OpRefactor] Upgrade matrix methods (#1996) * change matrix methods * clean up basic methods * changed matrix to matrix() * black * fix test * fix Hadamard gate * changelog * fix some more small issues * some more fixes * make (almost) all _matrix methods static * backup * add test and attribute * black * fix coverage * polish * changelog * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * blackup * wrote up new usage * correct changelog * add some tests for expand-matrix * black * fix some tests * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * replace expand logic in get_unitary * fix multirz inverse * fix minor pauli_eigs error * fix qft error * resolve conflict * fix all test but the BIG ISSUE * change signature, part 1 * finish dosctrings * black * all minor problems cleared again * polish * more polish and black * fix docstrings, fix ControlledQubitUNitary * changelog polish * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * backup * implement suggestions josh * black * redesigned ControlledQubitUnitary * backup * revert to NotImplementedErrors * typo * black * delete superfluous matrix methods * delete superfluous arg * fix tests * black * hopefully fix failing test * fix codecoverage * fix last coverage issue * backup * add hyperparameters and pylints * black * Update pennylane/operation.py Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Christina Lee <christina@xanadu.ai> * [OpRefactor] Add terms and compute_terms (#2036) * black and changelog * fix typo * fixed fermionic terms * black * backup * fix * simpler implementation * minor updates * fix some tests * fix tests * polishing * add test * fix docstring formatting * Update pennylane/operation.py Co-authored-by: Josh Izaac <josh146@gmail.com> * suggestions josh * Update pennylane/ops/qubit/hamiltonian.py Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Josh Izaac <josh146@gmail.com> * add pylints (#2052) * [OpRefactor] Rename wires as wire_order in heisenberg ops (#2051) * rename * update changelog * [OpRefactor] Update eigenvalue representations (#2048) * fix tests * black * increase codecov * black * josh suggestions * move default to eigvals() and make everything static * apply suggestions josh * Apply suggestions from code review * [OpRefactor] Add sparse_matrix and compute_sparse_matrix methods (#2050) * basic changes * black * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * josh suggestions Co-authored-by: Josh Izaac <josh146@gmail.com> * [OpRefactor] Update kraus representations (#2055) * rename * dicstrings * fix docstring * minor fix to test * Update doc/releases/changelog-dev.md * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * black Co-authored-by: Josh Izaac <josh146@gmail.com> * [OpRefactor] `decomposition` and `compute_decomposition` methods in `Operator` base class (#2024) * decomposition and compute decomposition methods * adding some more ops * more consistent across qubit ops, return as tuple * start adding templates * move hyperparameters defintions * update templates in a later PR * tests * fixing tests * more test fixes * final test fix! * docstrings, interface device tests * black, tests for coverage * changelog and docstrings * docstrings * more child class docstrings * Update doc/releases/changelog-dev.md Co-authored-by: Josh Izaac <josh146@gmail.com> * nodecompositionerror, test new docstrings * docstring fixes * merge conflict * docstring fixes and minor updates * barrier doc change * test fixing, parametric op docstrings * final docstrings, black * qft docstring * black, fix test * remove unused import * black, fix multicontrolledx * fix tests, black * fixing more tests * hopefully the last breaking tests * enhance code coverage * fix some problems from merging * pin sphinx Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca> Co-authored-by: Maria Schuld <mariaschuld@gmail.com> * [OpRefactor] Update the generator to raise an exception if not defined (#2061) * Update the generator to raise an exception if not defined * fixes * fixes * fixes * fix * [OpRefactor] Add custom errors when representations are undefined (#2064) * add errors and tests, use errors * small fix * change one more None to Error * delete obsolete line * fix tests * black * update changelog * [OpRefactor] fix codefactor (#2067) * fix codefactor * restore lines * delete again * `Tensor.matrix`: Warnings for partial wires overlaps and unsorted wire repetition (#2013) * implement sorting before grouping and check partial wires overlaps. * changelog * black * tests * tiny * reduce PR to warnings * lint * old python sum * black * code review * black * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * restructure warning logic * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Josh Izaac <josh146@gmail.com> * changes applied * Apply suggestions from code review * black * one more test fixed * [OpRefactor] Update dev guide to explain the new operator abstraction (#2066) * add previous changes * add graphic * rewrite architecture overview * rewrite op guide * add differentiation * fomatting * polish * polish * polish * black * formatting * fix sphinx? * some dashes * josh comments * major polish * minor details * minor improvement * more polishing * fix link * fix qasm precision * changing qasm tests back * Update doc/development/adding_operators.rst Co-authored-by: Josh Izaac <josh146@gmail.com> * suggestions Josh 1 * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * backup * minor improvements * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: DSGuala <67476785+DSGuala@users.noreply.github.com> * Update doc/development/guide/architecture.rst * Update doc/development/adding_operators.rst * change images, fix link Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: DSGuala <67476785+DSGuala@users.noreply.github.com> * Update Operation call signatures to match doc string (#1976) * Updated parameteric_ops to match docs call signature * finished updating all of the ops * Added wires arg to SparseHamiltonian * updating some of cv ops * updating call signature for more ops * updated callsigns * updated changelog * disable too many args error for code factor * replaced lam with delta * Removed Sphinx Override * fixed bug with TensorN observable * Update doc/releases/changelog-dev.md Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: antalszava <antalszava@gmail.com> Co-authored-by: David Ittah <dime10@users.noreply.github.com> * [OpRefactor] Use decomposition in templates (#2053) * decomposition and compute decomposition methods * adding some more ops * more consistent across qubit ops, return as tuple * start adding templates * move hyperparameters defintions * update templates in a later PR * tests * fixing tests * more test fixes * final test fix! * docstrings, interface device tests * black, tests for coverage * changelog and docstrings * docstrings * more child class docstrings * Update doc/releases/changelog-dev.md Co-authored-by: Josh Izaac <josh146@gmail.com> * nodecompositionerror, test new docstrings * docstring fixes * merge conflict * docstring fixes and minor updates * barrier doc change * test fixing, parametric op docstrings * final docstrings, black * qft docstring * black, fix test * embeddings started to refactor * embeddings done * backup * layers done * statepreps done * backup * done subroutines * backup * fix tests except grover, timeevol, commuting * black * fix last three tests * black * black * fix tests * mottonnen fixed * update changelog * fixes, including sphinx * backup * Fix tape expand tests (#2065) * fixes * more * more * more * more * more * more * black * delete faulty import * improve codecoverage * improve coverage by one line * port one bug fix from other branch * backup * suggestions Josh 1 * redo changes in reset files * rewrite op_list extension * black * fix tests * change ttn * make pylint happy * black * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca> * black * black * revert * adapt isingzz eval function * backup * fix all tests except from the batch one * upgraded version of black and blackened again * [OpRefactor] Final clean-up of operator subclasses (#2131) * dummy change to open pr * clean docstrings * backup * port some changes from operation.py PR * clean docstrings of classes * black * minor sphinx fix * make docstrings similar * more cleaning, and revert BasisStatePrep for test passing * black * upgraded version of black and blackened again * first step * reduce step * undo has_gen * tests * changelog * restore grad_recipe * black * fix orbitalrotation gradient * docstring * lint * add gradient bug fix for OrbitalRotaiton to changelog * fix * tests for parameter frequencies * test coverage * copy JacobianTape methods to parameter_shift.py * fix * Revert "copy JacobianTape methods to parameter_shift.py" This reverts commit 3be9806. * use parameter_frequencies for shift rule. adapt tests. add parameter_frequencies to operation.grad_method * black * changelog * whitespace * debugging * Apply suggestions from code review Co-authored-by: Josh Izaac <josh146@gmail.com> * add eight-term rule to OrbitalRotation * formatting of frequencies * orbital * doc * make frequencies a property * test * adapt tests to frequencies being property * adapt to parameter_frequencies as property * adapt more tests * more * more * simplify util functions a bit * fix bug * merge master * linting * remove print label * [WIP] Renaming (#2189) * more * more * more * more * more * more * more * rename eigvals to get_eigvals() * black * update eigvals in tests * tensor eigvals * fix * more * Update pennylane/operation.py Co-authored-by: Maria Schuld <mariaschuld@gmail.com> * update deprecation warning * more * add deprecation tests Co-authored-by: Maria Schuld <mariaschuld@gmail.com> * test coverage * lint * lint abstractmethod * coverage * tests for default grad_method * remove old prints * test coverage * black * undo move of JacobianTape methods * pointless statement is not pointless * black * some linting * print reintroduce * wrong local pylint * more fiddling with pylint * docstring shifts * move methods away from JacobianTape to gradients module * black * also use moved methods for finite diff * remove old print * make methods public Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Maria Schuld <mariaschuld@gmail.com> Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca> Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: DSGuala <67476785+DSGuala@users.noreply.github.com> Co-authored-by: antalszava <antalszava@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a small change that should not affect users, but which makes the representation methods consistent with the
matrix
methods.