Tequila: A platform for rapid development of quantum algorithms
Authors/Creators
-
Kottmann, Jakob S.
-
Alperin-Lea, Sumner
- Tamayo-Mendoza, Teresa
- Cervera-Lierta, Alba
- Lavigne, Cyrille
- Tzu-Ching, Yen
- Verteletsky, Vladislav
- Schleich, Philipp
- Degroote, Matthias
- Chaney, Skylar
- Kesibo, Maha
- Curnow, Naomi G.
- Solo, Brandon
- Tsilimigkounakis, Georgios
- Zendejas-Morales, Claudia
- Izmaylov, Artur
- Aspuru-Guzik, Alan
- Scala, Francesco
- Saxena, Gaurav
Description
Tequila Version 1.9.5
- orbital names are better tracked through transformations (#338)
- keep basis info when re-initializing with mol.from_tequila
Example (Gaussian Basis Set)
needs
pip install pyscf
geom = "H 0.0 0.0 0.0\nH 0.0 0.0 1.5"
mol = tq.Molecule(geometry=geom, basis_set="sto-3g")
mol.print_basis_info()
gives
basis_name : sto-3g
orbital_type : hf
orthogonal basis : False
basis functions : 2
active orbitals : [0, 1]
reference : [0]
Current Orbitals
{idx_total:0, idx:0}
coefficients: [0.63074567 0.63074567]
{idx_total:1, idx:1}
coefficients: [ 0.82021585 -0.82021585]
change to "native orbitals", meaning in this case orthonormalized atomics
mol = mol.use_native_orbitals()
mol.print_basis_info()
gives
basis_name : sto-3g
orbital_type : orthonormalized-sto-3g-basis
orthogonal basis : False
basis functions : 2
active orbitals : [0, 1]
reference : [0]
Current Orbitals
{idx_total:0, idx:0}
coefficients: [ 1.02598473 -0.13397565]
{idx_total:1, idx:1}
coefficients: [-0.13397565 1.02598473]
Using the orbital optimization routine will now set the orbital coefficients w.r.t the original basis
U = mol.make_ansatz(name="SPA", edges=[(0,1)])
opt = tq.chemistry.optimize_orbitals(molecule=mol, circuit=U)
mol2 = opt.molecule
mol2.print_basis_info()
basis_name : sto-3g
orbital_type : optimized
orthogonal basis : False
basis functions : 2
active orbitals : [0, 1]
reference : [0]
Current Orbitals
{idx_total:0, idx:0}
coefficients: [-0.63074597 -0.63074537]
{idx_total:1, idx:1}
coefficients: [ 0.82021562 -0.82021608]
Example MRA-PNOs
MRA-PNOs from the madness module, need
pip install pyscf
conda install madtequila -c kottmann
geom = "H 0.0 0.0 0.0\nH 0.0 0.0 1.5"
mol = tq.Molecule(geometry=geom)
mol.print_basis_info()
basis_name : mra
orbital_type : pno
orthogonal basis : True
basis functions : 2
active orbitals : [0, 1]
reference : [0]
Current Orbitals
{idx_total:0, idx:0, occ:2.0, pair:(0, 0)}
coefficients: [1. 0.]
{idx_total:1, idx:1, occ:0.0425791, pair:(0, 0)}
coefficients: [0. 1.]
MRA-PNOs are the native basis, so mol.use_native_basis() has no effect here. After calling the orbital-optimizer, coefficients of the optimized molecule are w.r.t the MRA-PNOs.
fixing syntax issue in post_init of dataclass (#327)
Support for phoenics optimizer dropped (dependency not maintained anymore and problems with downstream dependencies are piling up)
more convenient randomization initialization for orbital optimizer (e.g
initial_guess="near_zero")Update qasm.py (#334, #335) Fixes issue #332
added methods to create annihilation, creation, sz, sp, sm and s2 operators in qubit representation (#336)
ak = mol.make_annihilation_op(k) # spin-orbital k
ck = mol.make_creation_op(k)
ck = ak.dagger()
S = mol.make_s2_op() # total-spin operator
Sz = mol.make_sz_op() # spin-polarization
Nk = mol.make_number_op(k)
Co-authored-by: davibinco 59845652+davibinco@users.noreply.github.com
Notes
Files
tequilahub/tequila-v.1.9.5.zip
Files
(16.3 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:ff8611e21d1ccbac393169a58677bc4d
|
16.3 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/tequilahub/tequila/tree/v.1.9.5 (URL)