Open babcockt18 opened 8 months ago
Thanks @babcockt18! Yes this sounds like a nice idea and should be achievable for sums/products of the standard observables like X
, Y
, Z
, etc. We could initially restrict to operators that are Pauli sentences (linear combinations of tensor products of Paulis) to make things easier.
Also, this partial_trace
doesn't need to be the same one as in the math
module. We could place it in op_math
and also consider importing at top level.
Is this something you'd be interested to take on?
@trbromley Awesome! definitely want to take this on! Thanks for asking! if you could assign it to me that would be great!
Sorry @babcockt18, I lost track of replying to this. Would you still be interested on working on this feature?
@trbromley All good! Still interested!
Great! @babcockt18, please don't hesitate to reach out if you have any questions. We'll be happy to assist with the code review once a pull request is ready.
Feature details
As the title suggests, this feature would extend
qml.math.partial_trace
functionality to handle PennyLane operators. The public facing function already exists. This issue is part of an optional enhancement that was proposed by @Qottmann but was closed before the latter portion of the issue was implemented.Implementation
doc/releases/changelog-dev.md
tests/math/test_matrix_manipulation.py
ensuring inputs and outputs of the function are correct (in particular checking the supported dtypesfloat
andcomplex
and the supported interfacesjax
,torch
,autograd
,tensorflow
)tests/math/test_matrix_manipulation.py
and in particular should cover instances ofSProd
,Sum
andProd
classes (pennylane operator classes)How important would you say this feature is?
1: Not important. Would be nice to have.
Additional information
No response