There is a newer version of the record available.

Published April 5, 2024 | Version v.1.9.5
Software Open

Tequila: A platform for rapid development of quantum algorithms

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

If you use tequila, please cite our release paper https://iopscience.iop.org/article/10.1088/2058-9565/abe567 alongside with references to used dependencies (e.g. the employed simulators like qulacs). If methods developed after 2020 were used, consider citing the aricles describing these methods to acknowledge the contributors (see the tequila github page for a list).

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