Singlet excitations

Hi Catalina

I am working on singlet excitations. The excitations would be a linear combinations. The fermionic excitation would look like this

0.5 * a⁺(6) a(0)
+ 0.5 * a⁺(7) a(1)
+ -0.5 * a⁺(0) a(6)
+ -0.5 * a⁺(1) a(7)

Say I wanted to implement this excitation into qml.FermionicSingleExcitation (qml.FermionicSingleExcitation — PennyLane 0.43.0 documentation). The input into wires will be minimum 2 numbers. Since I have a linear combination, I am unable to input this excitation into qml.FermionicSingleExcitation. Do you have any idea ?

Here is qml.about() output 

Name: pennylane
Version: 0.42.3
Summary: PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
Home-page: 
Author: 
Author-email: 
License-Expression: Apache-2.0
Location: /Users/srivathsanpoyyapakkamsundar/miniconda3/envs/an/lib/python3.10/site-packages
Requires: appdirs, autograd, autoray, cachetools, diastatic-malt, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, tomlkit, typing_extensions
Required-by: pennylane_lightning

Platform info:           macOS-15.4.1-arm64-arm-64bit
Python version:          3.10.15
Numpy version:           2.2.6
Scipy version:           1.15.2
Installed devices:
- lightning.qubit (pennylane_lightning-0.42.0)
- default.clifford (pennylane-0.42.3)
- default.gaussian (pennylane-0.42.3)
- default.mixed (pennylane-0.42.3)
- default.qubit (pennylane-0.42.3)
- default.qutrit (pennylane-0.42.3)
- default.qutrit.mixed (pennylane-0.42.3)
- default.tensor (pennylane-0.42.3)
- null.qubit (pennylane-0.42.3)
- reference.qubit (pennylane-0.42.3)

Thanks

Hi @Srivathsan_Sundar ,

Can you please share a minimal reproducible example, and your full error traceback?
Also, note that you’re not using the latest PennyLane version. Are you able to upgrade to v0.43?

Hi @Srivathsan_Sundar ,

I just wanted to let you know that one of my colleagues may be able to share some example code or some guidance in case you’re still interested in this.

Hi @CatalinaAlbornoz

Thanks for your message. I resolved the issue. The solution is instead of using qml.FermionicDoubleexcitation or FermionicSingleExcitation. I started using qml.exp function. I learnt from the tutorial written by Diksha Dhawan. Apologies for not writing this reply earlier.

Thanks

Srivathsan

Hi @Srivathsan_Sundar ,

No worries, thanks for sharing the solution you found! I’m glad to hear you found a tutorial that helped. I’m assuming it was the one on Mapping Fermionic Hamiltonians to qubit Hamiltonians. I’m sharing it here in case it can help others in the future!

1 Like