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

Make it possible to obtain the expressions used to convert qiskit parameters to quimb parameters #27

Open
garrison opened this issue Feb 19, 2025 · 0 comments

Comments

@garrison
Copy link
Member

There is something potentially problematic with the way qiskit-addon-aqc-tensor uses qiskit-quimb. Currently, it is assumed that the parameter of a Qiskit gate matches the parameter passed to the quimb.tensor.Gate constructor. However, it is not guaranteed this is always the case. For instance, there might be multiplicative factors or offsets:

"GIVENS2", params=[0.5 * theta, beta + 0.5 * math.pi], qubits=qubits, **kwargs

This specific line is likely to no longer exhibit this problem in a future release. However, it is always possible that a future version of qiskit-quimb might add a different gate which does not pass the parameter exactly, and if this happens, qiskit-addon-aqc-tensor will not be able to reason about the gradient with respect to such parameters correctly.

In general, if there are n parameters for a gate, then the map between qiskit parameters and quimb parameters is given by a n-by-n constant matrix for any given gate. It should be possible for a user to query this matrix. It'd be even better if it is somehow specified only once (DRY philosophy), or if the test cases are able to ensure that each one is correctly specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant