pennylane
pennylane copied to clipboard
Add Fast Approximate BLock-Encodings (FABLE) template
Feature details
⚠️ This issue is part of an internal assignment and not meant for external contributors.
The Fast Approximate BLock-Encodings (FABLE) algorithm is an efficient method to block encode arbitrary matrices. Adding the qml.FABLE template to PennyLane complements the existing block-encoding functionalities.
The template can be used in a quantum circuit, similar to qml.BlockEncode, as
A = np.random.random((4, 4))
dev = qml.device('default.qubit')
@qml.qnode(dev)
def circuit():
qml.FABLE(A, tol = 0.1)
return qml.state()
Implementation
This demo provides details to construct the FABLE block encoding circuit.
The qml.FABLE operation should be implemented as a template and added to the subroutines module.
Requirements
- The
qml.FABLEoperation should correctly block-encode a matrix. - The
qml.FABLEoperation should accept a user-defined tolerance for adjusting the approximation level. - The differentiability of the workflow should be tested wrt the matrix elements with at least one framework, e.g., autograd, JAX.
Hi. I have implemented FABLE as a template, but I am a little confused on what you mean when it comes to testing the "differentiability of the workflow". Is the intention to test how changes to the matrix elements change the output of the FABLE algorithm?
Also, as of right now the FABLE template does not support non-square matrices and matrices that have imaginary values. I saw originally in the paper they account for imaginary values as well as implement some form of subnormalization factor. Should that be implemented as well?
Hi. I have implemented FABLE as a template, but I am a little confused on what you mean when it comes to testing the "differentiability of the workflow". Is the intention to test how changes to the matrix elements change the output of the FABLE algorithm?
Also, as of right now the FABLE template does not support non-square matrices and matrices that have imaginary values. I saw originally in the paper they account for imaginary values as well as implement some form of subnormalization factor. Should that be implemented as well?
Thanks @austingmhuang Will answer these in the PR.