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

[WIP] Add resource methods to some templates (TrotterProduct, Exp, StatePrep, QPE) #6677

Open
wants to merge 569 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
569 commits
Select commit Hold shift + click to select a range
4d43c39
formatting
willjmax Nov 20, 2024
60ae243
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 20, 2024
2d153db
add CRY to init
willjmax Nov 20, 2024
ffc2e91
Merge branch 'resource_controlled_gates' of github.com:PennyLaneAI/pe…
willjmax Nov 20, 2024
cbc2fec
adding resource methods
willjmax Nov 20, 2024
93c86e9
raise resources not implemented
willjmax Nov 20, 2024
75cc679
Merge branch 'resource_multi_qubit' into resource_symbolic_ops
willjmax Nov 20, 2024
19791b8
Merge branch 'master' into resource_single_qubit
willjmax Nov 20, 2024
142b7b2
Merge branch 'resource_single_qubit' of github.com:PennyLaneAI/pennyl…
willjmax Nov 20, 2024
8adc1b4
merge
willjmax Nov 20, 2024
5c242c2
merge
willjmax Nov 20, 2024
905c210
revert changes from merge conflict
willjmax Nov 20, 2024
86dd9e5
more merge conflict issues
willjmax Nov 20, 2024
a616fa5
final revert
willjmax Nov 20, 2024
be1498f
formatting
willjmax Nov 20, 2024
6161f91
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Nov 20, 2024
dcea65b
formatting
willjmax Nov 20, 2024
fb15a83
Merge
willjmax Nov 20, 2024
216f9f2
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Nov 20, 2024
f739a14
Merge branch 'master' into resource_tracking
Jaybsoni Nov 21, 2024
4f182e3
unused argument
willjmax Nov 21, 2024
d28eb18
Merge branch 'resource_controlled_gates' of github.com:PennyLaneAI/pe…
willjmax Nov 21, 2024
9e42ab8
fixing merge error
willjmax Nov 21, 2024
9c0f999
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Nov 21, 2024
e562813
docstring
willjmax Nov 21, 2024
5d7fe42
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Nov 21, 2024
7ad4e2a
formatting and syntax error
willjmax Nov 21, 2024
02658cb
double excitation
willjmax Nov 21, 2024
836c866
Merge branch 'master' into resource_controlled_gates
willjmax Nov 21, 2024
ceab03c
add ResourceCY to init
willjmax Nov 21, 2024
b3cd555
Merge branch 'resource_controlled_gates' of github.com:PennyLaneAI/pe…
willjmax Nov 21, 2024
c532bea
tests for parametric_ops_multi_qubit
willjmax Nov 21, 2024
7a94752
qchem tests and formatting
willjmax Nov 21, 2024
c789e95
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Nov 21, 2024
fc0b865
formatting and doc fixes for CI
willjmax Nov 21, 2024
c616158
merge
willjmax Nov 21, 2024
4956bc2
filled in TODOs from resource_multi_qubit
willjmax Nov 21, 2024
15cd778
add global phase to FermionicSWAP
willjmax Nov 21, 2024
f92d17e
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Nov 21, 2024
e4a7331
update multiX
willjmax Nov 22, 2024
54b6636
Merge branch 'resource_controlled_gates' of github.com:PennyLaneAI/pe…
willjmax Nov 22, 2024
8ef2c3d
add multix to init
willjmax Nov 22, 2024
cfd2902
merge
willjmax Nov 22, 2024
43f9891
merge
willjmax Nov 22, 2024
4c9bc44
Merge branch 'resource_controlled_gates' into resource_multi_qubit
willjmax Nov 22, 2024
861509c
resource decomps for nested adjoints and pows, some fixes for controlled
willjmax Nov 25, 2024
66b49d5
nested controlled operations
willjmax Nov 25, 2024
d5ae48a
adding some resource methods
willjmax Nov 25, 2024
6adb131
Merge branch 'master' into resource_tracking
Jaybsoni Nov 25, 2024
54d2e9c
Merge branch 'master' into resource_controlled_gates
Jaybsoni Nov 25, 2024
cef11ed
adjoint resource methods for RX,RY,RZ
willjmax Nov 25, 2024
6902315
Merge branch 'resource_controlled_gates' into resource_multi_qubit
Jaybsoni Nov 25, 2024
92dbe72
merge master
Jaybsoni Nov 25, 2024
d7e1dbb
add CH to init
willjmax Nov 26, 2024
50385db
merge
willjmax Nov 26, 2024
d4e5a1a
merged master
Jaybsoni Nov 26, 2024
3699385
Merge branch 'resource_controlled_gates' into resource_multi_qubit
Jaybsoni Nov 26, 2024
a664175
merged base
Jaybsoni Nov 26, 2024
1269e11
add cswap to init
willjmax Nov 26, 2024
66dba38
Merge branch 'resource_controlled_gates' of github.com:PennyLaneAI/pe…
willjmax Nov 26, 2024
9c22b30
merge
willjmax Nov 26, 2024
99faf1a
Merge branch 'resource_controlled_gates' of github.com:PennyLaneAI/pe…
willjmax Nov 26, 2024
c643656
add ccz to init
willjmax Nov 26, 2024
b793798
merge
willjmax Nov 26, 2024
756e4c9
adjoint/control methods for non parametric ops
willjmax Nov 26, 2024
0f733aa
add crx,crz to init
willjmax Nov 26, 2024
67f7f3e
merge
willjmax Nov 26, 2024
195f489
add CRot to init
willjmax Nov 26, 2024
6b70bb9
Merge branch 'resource_controlled_gates' of github.com:PennyLaneAI/pe…
willjmax Nov 26, 2024
854b822
controlled/adjoint resources methods for parametric ops
willjmax Nov 26, 2024
ffb4c8c
formatting
willjmax Nov 26, 2024
f2ab502
merge
willjmax Nov 26, 2024
fb27854
merge
willjmax Nov 26, 2024
54dd010
type annotations
willjmax Nov 26, 2024
321ff0f
Merge branch 'resource_multi_qubit' into resource_symbolic_ops
willjmax Nov 26, 2024
d8f8fba
add accidentally removed part of dcostring
willjmax Nov 26, 2024
68536bb
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 26, 2024
dea8747
add tracking_name static method and update tests
willjmax Nov 26, 2024
3769f8a
formatting
willjmax Nov 26, 2024
88a6af0
documentation updates
willjmax Nov 27, 2024
dfecfc6
update documentation
willjmax Nov 27, 2024
078464b
more resource methods
willjmax Nov 27, 2024
60c08e2
more resource methods
willjmax Nov 27, 2024
e2b98b0
tests for cnot
willjmax Nov 28, 2024
6177e54
tests for resource decomps
willjmax Nov 28, 2024
5723ae4
update controlled decomps
willjmax Nov 28, 2024
0a7ca0e
revert identity
willjmax Nov 28, 2024
854d9e5
revert identity changes
willjmax Nov 28, 2024
f58da1d
for rebasing
willjmax Nov 28, 2024
0c2d237
revert identity
willjmax Nov 28, 2024
c7d5ca1
undo
willjmax Nov 28, 2024
6d61b19
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 28, 2024
877da46
trying again
willjmax Nov 28, 2024
24e65f2
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 28, 2024
8c640f1
revert again
willjmax Nov 28, 2024
fb3b14e
again
willjmax Nov 28, 2024
e6b10d9
identity
willjmax Nov 28, 2024
eaed86b
Merge branch 'resource_symbolic_ops' into resource_symbolic_decomps
willjmax Nov 28, 2024
f7c1ac6
move changes
willjmax Nov 28, 2024
0201f0f
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Nov 28, 2024
5843551
reverting qubit
willjmax Nov 28, 2024
7093c5e
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 28, 2024
220dfd9
moving qubit changes
willjmax Nov 28, 2024
0f6563a
revert change
willjmax Nov 28, 2024
f3773b0
revert test changes
willjmax Nov 28, 2024
f30236f
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 28, 2024
35e7f11
move tests
willjmax Nov 28, 2024
2984553
remove controlled_ops
willjmax Nov 28, 2024
743d15e
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 28, 2024
9b3a486
add controlled ops
willjmax Nov 28, 2024
d8e36a2
move controlled tests
willjmax Nov 28, 2024
af8fb92
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 28, 2024
c7585b5
move controlled tests
willjmax Nov 28, 2024
20f348d
update nested symbolic ops
willjmax Nov 28, 2024
8d24077
remove unused import
willjmax Nov 28, 2024
046c02e
remove nested tests
willjmax Nov 28, 2024
4866a63
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 28, 2024
e266b89
add nested tests
willjmax Nov 28, 2024
af89ccc
add docstrings back
willjmax Nov 28, 2024
d35d063
formatting
willjmax Nov 28, 2024
eb0a13e
formatting
willjmax Nov 28, 2024
0bce904
tracking name test
willjmax Nov 29, 2024
b2882c6
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 29, 2024
1882649
Apply suggestions from code review
Jaybsoni Nov 29, 2024
6ea2b70
Merge branch 'master' into resource_tracking
Jaybsoni Nov 29, 2024
3acd1fe
fix ctrl_values
willjmax Nov 29, 2024
052c39f
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 29, 2024
ee4b59a
code review comments
Jaybsoni Nov 29, 2024
fe1a247
add kwargs
willjmax Nov 29, 2024
ecacf47
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 29, 2024
6081471
fix docs + format
Jaybsoni Nov 29, 2024
8a40ecc
fix failing tests after ctrl value change
willjmax Nov 29, 2024
9071111
fixed comments
Jaybsoni Nov 29, 2024
a8aac38
Merge branch 'master' into resource_tracking
willjmax Nov 29, 2024
b1a8711
remove resource config and DefaultGateSet from docs
Jaybsoni Nov 29, 2024
45613b1
Merge branch 'master' into resource_tracking
Jaybsoni Nov 29, 2024
9e03409
Merge branch 'resource_tracking' into resource_controlled_gates
Jaybsoni Nov 29, 2024
e305474
redo control decomposition logic
willjmax Nov 29, 2024
114cbcd
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 29, 2024
dcf2630
formatting
willjmax Nov 29, 2024
6cc4003
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 29, 2024
9a199c8
fix control value error
willjmax Nov 29, 2024
87d9a8e
Merge branch 'resource_controlled_gates' of github.com:PennyLaneAI/pe…
willjmax Nov 29, 2024
6e17ff5
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Nov 29, 2024
1a10660
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Nov 29, 2024
1ac7191
Merge branch 'master' into resource_controlled_gates
Jaybsoni Nov 29, 2024
27b436c
update CY
willjmax Nov 29, 2024
a00b55c
Added tests and docs
Jaybsoni Nov 30, 2024
5e78717
changelog
Jaybsoni Nov 30, 2024
29b9cb2
Update pennylane/ops/op_math/controlled_ops.py
Jaybsoni Nov 30, 2024
b299cc0
Merge branch 'master' into resource_controlled_gates
Jaybsoni Nov 30, 2024
ca9df50
format
Jaybsoni Nov 30, 2024
7189792
Merge branch 'resource_controlled_gates' of github.com:PennyLaneAI/pe…
willjmax Dec 2, 2024
9ef2304
merge
willjmax Dec 2, 2024
83f1dff
Apply suggestions from code review
Jaybsoni Dec 2, 2024
ce84834
Format
Jaybsoni Dec 2, 2024
725f8b8
fix tests
willjmax Dec 2, 2024
a0e73f9
fix test
willjmax Dec 2, 2024
c181add
update docstring and foramt
Jaybsoni Dec 2, 2024
8fbf724
Merge branch 'master' into resource_controlled_gates
Jaybsoni Dec 2, 2024
5d79d3b
Apply suggestions from code review
Jaybsoni Dec 2, 2024
27adf31
fix docs
Jaybsoni Dec 2, 2024
1f0e85b
fix formatting
Jaybsoni Dec 2, 2024
5f0df95
some updates
willjmax Dec 2, 2024
512b9c1
fixing some tests
willjmax Dec 2, 2024
edca839
Merge branch 'resource_controlled_gates' of github.com:PennyLaneAI/pe…
willjmax Dec 2, 2024
debf812
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Dec 2, 2024
097e7bf
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Dec 2, 2024
922a89e
__repr__ returns tracking name
willjmax Dec 2, 2024
cfbb28a
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Dec 2, 2024
1766820
update tests
willjmax Dec 2, 2024
b79b903
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Dec 2, 2024
8ed270c
Merge branch 'master' of github.com:PennyLaneAI/pennylane into resour…
willjmax Dec 2, 2024
7684deb
remove TODOs
willjmax Dec 2, 2024
66f0ba7
merge
willjmax Dec 2, 2024
036e114
merge
willjmax Dec 2, 2024
79ccec6
remove tests
willjmax Dec 2, 2024
70b92aa
more merge stuff
willjmax Dec 2, 2024
19798e9
remove orbital
willjmax Dec 2, 2024
7c3bfec
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Dec 2, 2024
6f80147
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Dec 2, 2024
226b70e
fix tests after merge
willjmax Dec 2, 2024
66e6384
fix another test
willjmax Dec 2, 2024
81286ed
remove orbital
willjmax Dec 2, 2024
364b5cc
remove orbit test
willjmax Dec 2, 2024
f8b3b58
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Dec 2, 2024
2c6c8e7
add orbital stuff
willjmax Dec 2, 2024
76b9fce
review changes
willjmax Dec 2, 2024
bbc0a84
adding circuit diagrams to docstrings
willjmax Dec 3, 2024
5cb4155
remove trailing whitespace
willjmax Dec 3, 2024
1a1bd4d
doc fixes
willjmax Dec 3, 2024
94d5ebf
Merge branch 'master' into resource_multi_qubit
willjmax Dec 3, 2024
5e9af77
changelog
willjmax Dec 3, 2024
978f864
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Dec 3, 2024
8ef340c
Apply suggestions from code review
willjmax Dec 3, 2024
3418df7
Merge branch 'resource_multi_qubit' of github.com:PennyLaneAI/pennyla…
willjmax Dec 3, 2024
907aac4
remove tests from qchem
willjmax Dec 3, 2024
b75f4cf
merge
willjmax Dec 3, 2024
ae6fb97
some review changes
willjmax Dec 3, 2024
e170b6f
formatting
willjmax Dec 3, 2024
5268cd3
add tracking_name_from_op
willjmax Dec 3, 2024
4624819
tests
willjmax Dec 3, 2024
3018ddc
pylint
willjmax Dec 3, 2024
42e3bf1
Merge branch 'resource_symbolic_ops' into resource_symbolic_decomps
willjmax Dec 3, 2024
8484026
one more test
willjmax Dec 3, 2024
851aa91
chagelog
willjmax Dec 3, 2024
82a9269
Merge branch 'resource_symbolic_ops' of github.com:PennyLaneAI/pennyl…
willjmax Dec 3, 2024
46ba719
formatting
willjmax Dec 3, 2024
c39ffe1
controlled S and T
willjmax Dec 4, 2024
34c2a20
fix tests
willjmax Dec 4, 2024
f00d911
clean up resources
Jaybsoni Dec 5, 2024
3dbe71d
merge
willjmax Dec 6, 2024
b6a0e35
Merge branch 'master' into resource_symbolic_decomps
Jaybsoni Dec 9, 2024
2294a6e
fixing resource methods
Jaybsoni Dec 10, 2024
990cfaa
format
Jaybsoni Dec 10, 2024
17da0d0
fix globalphase decomp
Jaybsoni Dec 10, 2024
13efda9
modified resources
Jaybsoni Dec 12, 2024
f4d013f
Merge branch 'master' into resource_symbolic_decomps
Jaybsoni Dec 12, 2024
c7b8a41
fix qchem ops
Jaybsoni Dec 12, 2024
af3e755
added tests for identity and controlled ops
Jaybsoni Dec 13, 2024
c3a5425
finish tests for controlled
Jaybsoni Dec 13, 2024
1f88813
Merge branch 'master' into resource_symbolic_decomps
Jaybsoni Dec 13, 2024
b49aecb
Merge branch 'master' into resource_symbolic_decomps
Jaybsoni Dec 13, 2024
772a2d3
Merge branch 'resource_symbolic_decomps' into trotter_resources
Jaybsoni Dec 15, 2024
cab45a8
Merge branch 'master' into resource_symbolic_decomps
Jaybsoni Dec 16, 2024
416e8df
fixing up the single qubit parameteric ops and tests
Jaybsoni Dec 18, 2024
da61e3a
added multi-control decomps for non-parameteric ops and tests
Jaybsoni Dec 18, 2024
51115aa
fixed docstrings
Jaybsoni Dec 18, 2024
40b693d
finished adding tests
Jaybsoni Dec 19, 2024
25d2f4a
Merge branch 'master' into resource_symbolic_decomps
Jaybsoni Dec 19, 2024
79ed9ed
address comments
Jaybsoni Dec 19, 2024
8e38d39
Merge branch 'resource_symbolic_decomps' into trotter_resources
Jaybsoni Dec 19, 2024
aa6a3cb
Updated trotter add basis rotation
Jaybsoni Dec 19, 2024
01c403f
small fixes
Jaybsoni Dec 19, 2024
808cde8
Added more resource methods for templates
Jaybsoni Dec 20, 2024
7607977
Merge branch 'master' into resource_symbolic_decomps
Jaybsoni Jan 2, 2025
1ff11b2
lint
Jaybsoni Jan 2, 2025
b08c0e3
Merge branch 'resource_symbolic_decomps' into trotter_resources
Jaybsoni Jan 2, 2025
bcef130
Apply suggestions from code review
Jaybsoni Jan 2, 2025
ab50f7a
Merge branch 'master' into resource_symbolic_decomps
Jaybsoni Jan 3, 2025
08761ff
Merge branch 'master' into resource_symbolic_decomps
Jaybsoni Jan 3, 2025
b532468
clean ResourceTrotterProduct implementation
Jaybsoni Jan 3, 2025
7d83cd5
removed explict calls to CompressedResourceOp
Jaybsoni Jan 3, 2025
c73cf38
lint
Jaybsoni Jan 3, 2025
64fac4a
Merge branch 'master' into resource_symbolic_decomps
Jaybsoni Jan 6, 2025
5bf947b
fixed exp to match other symbolic ops
Jaybsoni Jan 6, 2025
cac678b
Merge branch 'resource_symbolic_decomps' into trotter_resources
Jaybsoni Jan 7, 2025
9fbdbb1
fix trotter product resource params
Jaybsoni Jan 9, 2025
27024b4
lint
Jaybsoni Jan 10, 2025
058b1f0
Merge branch 'master' into trotter_resources
Jaybsoni Jan 13, 2025
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
6 changes: 6 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ added `binary_mapping()` function to map `BoseWord` and `BoseSentence` to qubit
* Added native `ResourceOperator` subclasses for each of the controlled operators.
[(#6579)](https://github.com/PennyLaneAI/pennylane/pull/6579)

* Added native `ResourceOperator` subclasses for each of the multi qubit operators.
[(#6538)](https://github.com/PennyLaneAI/pennylane/pull/6538)

* Added native `ResourceOperator` subclasses for Adjoint, Controlled, and Pow.
[(#6592)](https://github.com/PennyLaneAI/pennylane/pull/6592)

<h3>Breaking changes 💔</h3>

* `qml.fourier.qnode_spectrum` no longer automatically converts pure numpy parameters to the
Expand Down
42 changes: 42 additions & 0 deletions pennylane/labs/resource_estimation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@
.. autosummary::
:toctree: api

~ResourceAdjoint
~ResourceCCZ
~ResourceCH
~ResourceCNOT
~ResourceControlled
~ResourceControlledPhaseShift
~ResourceCRot
~ResourceCRX
Expand All @@ -61,16 +63,33 @@
~ResourceCSWAP
~ResourceCY
~ResourceCZ
~ResourceDoubleExcitation
~ResourceDoubleExcitationMinus
~ResourceDoubleExcitationPlus
~ResourceFermionicSWAP
~ResourceGlobalPhase
~ResourceHadamard
~ResourceIdentity
~ResourceIsingXX
~ResourceIsingXY
~ResourceIsingYY
~ResourceIsingZZ
~ResourceMultiControlledX
~ResourceMultiRZ
~ResourceMultiControlledX
~ResourceOrbitalRotation
~ResourcePauliRot
~ResourcePhaseShift
~ResourcePow
~ResourcePSWAP
~ResourceRot
~ResourceRX
~ResourceRY
~ResourceRZ
~ResourceS
~ResourceSingleExcitation
~ResourceSingleExcitationMinus
~ResourceSingleExcitationPlus
~ResourceSWAP
~ResourceT
~ResourceToffoli
Expand Down Expand Up @@ -117,9 +136,11 @@
)

from .ops import (
ResourceAdjoint,
ResourceCCZ,
ResourceCH,
ResourceCNOT,
ResourceControlled,
ResourceControlledPhaseShift,
ResourceCRot,
ResourceCRX,
Expand All @@ -128,16 +149,33 @@
ResourceCSWAP,
ResourceCY,
ResourceCZ,
ResourceDoubleExcitation,
ResourceDoubleExcitationMinus,
ResourceDoubleExcitationPlus,
ResourceExp,
ResourceFermionicSWAP,
ResourceGlobalPhase,
ResourceHadamard,
ResourceIdentity,
ResourceIsingXX,
ResourceIsingXY,
ResourceIsingYY,
ResourceIsingZZ,
ResourceMultiControlledX,
ResourceMultiRZ,
ResourceOrbitalRotation,
ResourcePauliRot,
ResourcePow,
ResourcePSWAP,
ResourcePhaseShift,
ResourceRot,
ResourceRX,
ResourceRY,
ResourceRZ,
ResourceS,
ResourceSingleExcitation,
ResourceSingleExcitationMinus,
ResourceSingleExcitationPlus,
ResourceSWAP,
ResourceT,
ResourceToffoli,
Expand All @@ -148,4 +186,8 @@

from .templates import (
ResourceQFT,
ResourceQuantumPhaseEstimation,
ResourceStatePrep,
ResourceTrotterProduct,
resource_trotterize,
)
21 changes: 20 additions & 1 deletion pennylane/labs/resource_estimation/ops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,28 @@
)

from .qubit import (
ResourceDoubleExcitation,
ResourceDoubleExcitationMinus,
ResourceDoubleExcitationPlus,
ResourceFermionicSWAP,
ResourceHadamard,
ResourceIsingXX,
ResourceIsingXY,
ResourceIsingYY,
ResourceIsingZZ,
ResourceMultiRZ,
ResourceOrbitalRotation,
ResourcePauliRot,
ResourcePhaseShift,
ResourcePSWAP,
ResourceRot,
ResourceRX,
ResourceRY,
ResourceRZ,
ResourcePhaseShift,
ResourceS,
ResourceSingleExcitation,
ResourceSingleExcitationMinus,
ResourceSingleExcitationPlus,
ResourceSWAP,
ResourceT,
ResourceX,
Expand All @@ -34,6 +49,7 @@
)

from .op_math import (
ResourceAdjoint,
ResourceCY,
ResourceCH,
ResourceCZ,
Expand All @@ -43,8 +59,11 @@
ResourceCRX,
ResourceCRY,
ResourceCRZ,
ResourceExp,
ResourceToffoli,
ResourceMultiControlledX,
ResourceCNOT,
ResourceControlled,
ResourceControlledPhaseShift,
ResourcePow,
)
24 changes: 24 additions & 0 deletions pennylane/labs/resource_estimation/ops/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ def resource_params(self) -> dict:
def resource_rep(cls, **kwargs) -> re.CompressedResourceOp:
return re.CompressedResourceOp(cls, {})

@staticmethod
def adjoint_resource_decomp() -> Dict[re.CompressedResourceOp, int]:
return {}

@staticmethod
def controlled_resource_decomp() -> Dict[re.CompressedResourceOp, int]:
return {}

@staticmethod
def pow_resource_decomp() -> Dict[re.CompressedResourceOp, int]:
return {}


class ResourceGlobalPhase(qml.GlobalPhase, re.ResourceOperator):
"""Resource class for the GlobalPhase gate."""
Expand All @@ -48,3 +60,15 @@ def resource_params(self) -> dict:
@classmethod
def resource_rep(cls, **kwargs) -> re.CompressedResourceOp:
return re.CompressedResourceOp(cls, {})

@staticmethod
def adjoint_resource_decomp() -> Dict[re.CompressedResourceOp, int]:
return {}

@staticmethod
def controlled_resource_decomp() -> Dict[re.CompressedResourceOp, int]:
return {}

@staticmethod
def pow_resource_decomp() -> Dict[re.CompressedResourceOp, int]:
return {}
1 change: 1 addition & 0 deletions pennylane/labs/resource_estimation/ops/op_math/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
r"""This module contains experimental resource estimation functionality. """

from .controlled_ops import *
from .symbolic import *
Loading
Loading