Skip to content

Integration of some functions to use Pennylane Dataset with Qiskit

License

Notifications You must be signed in to change notification settings

Fra-Gri/PennylaneToQiskit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

PennylaneToQiskit

Integration of some functions to use Pennylane Dataset with Qiskit.

Pennylane datasets

Pennylane has a library of quantum dataset for various molecules here, that include the hamiltonian ready for Pennylane circuit. For example, you can download the dataset for the H2 molecule:

H2dataset = qml.data.load("qchem", molname="H2", bondlength=0.742, basis="STO-3G")[0]

Hamiltonian

You can access the pannylane hamiltonian:

pennylane_hamiltonian = H2dataset.hamiltonian

And you can convert it to a Qiskit hamiltonian simply

qiskit_hamiltonian = to_qiskit_pauli_hamiltonian(pennylane_hamiltonian)

The Qiskit hamiltonian can be directly used as observable for the Estimator Primitive.

This function can be used only with Pauli Hamiltonian, like the ones in the Quantum Dataset

About

Integration of some functions to use Pennylane Dataset with Qiskit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages