Skip to content

Releases: tequilahub/tequila

v.1.9.5

05 Apr 11:50
a395e3b
Compare
Choose a tag to compare

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 [email protected]

v.1.9.4

29 Feb 10:10
c57ad61
Compare
Choose a tag to compare
  • fixing syntax issue in post_init of dataclass (#327)
  • phoenics dropped due to maintenance resources
  • more convenient randomization initialization for OO, avoiding numpy warnings

v.1.9.3

12 Feb 12:37
54d43ff
Compare
Choose a tag to compare

fixing issues with qubit encodings and orbital optimizations (#325)
Orbital optimizer was setting transformation in the molecule back to the default (JordanWigner)

v.1.9.2

06 Feb 09:51
934e060
Compare
Choose a tag to compare

Minor changes

  • changed circuit init in adapt class (#319)
  • added molecule_arguments explicitly to orbital_optimizer (#321)
  • PR Silence PySCF (#322)

Co-authored-by: Davide Bincoletto [email protected]

v.1.9.1

17 Nov 15:39
87625bd
Compare
Choose a tag to compare
  • Minor Bug Fixes

  • Update pyscf_interface.py

  • no irreps in c1 (#314) (thanks @nysler)
  • fixing issues with gradient printing in spsa (#316) (thanks @dariavh)
  • fixing bug associated to qubit excitations with added controls (#317) (thanks Silvia Riera Villapun)

v.1.9.0

06 Oct 07:34
c7c00d8
Compare
Choose a tag to compare

Example:

import tequila as tq

mol = tq.Molecule(geometry="H 0.0 0.0 1.0\nH 0.0 0.0 2.0\nH 0.0 0.0 3.0\nH 0.0 0.0 4.0")
U = mol.make_ansatz(name="HCB-SPA")

opt = tq.chemistry.optimize_orbitals(mol, U, use_hcb=True)
  • Structures for F3 circuit optimizations (#303)

  • Adding linear depth F3 circuit

  • Adding trotter error feature along testing data (#292)

  • Adding trotter error feature along testing data

  • iSWAP gate and Givens gate (#304)

  • Implement iSWAP gate.

  • Implement Givens gate and bugfix tests iSWAP.

  • Remove iSWAP from Cirq simulator.

  • Refactor GeneralizedRotation to generators with (possible) nullspace. (#306)

  • Migrate shifted_gates method from QubitExcitation to GeneralizedRotation.

  • Bugfix: list of GeneralizedRotationImpl.

  • Bugfix: target order matters in QubitExcitation.

  • Add check for p0 in GeneralizedRotation.

  • SWAP gate initialization updated to follow conventions

  • Refactor mapped_qubits to avoid duplicate code.

  • added GenRot shortcut

  • Bugfix: change API to modularized cirq package. (#308)

  • Refactor circuit build to cirq_google module.

  • Add check for cirq_google, add test.

  • Update ci_backends.yml

  • Some BugFixes (#311)

  • UpCCGSD mix_sd fixed


Co-authored-by: Praveen Jayakumar [email protected]
Co-authored-by: Praveen Jayakumar [email protected]
Co-authored-by: lamq317 [email protected]
Co-authored-by: Daria Van Hende [email protected]
Co-authored-by: JdelArco98 [email protected]

v.1.8.9

03 Aug 20:30
eebb1cf
Compare
Choose a tag to compare
  • better messages for madtequila (#291)

  • qubit encodings consistency (#294)

  • more consistency in HCB approximation and SPA wavefunctions (#295)

  • more consistency in HCB approximation and SPA wavefunctions

  • keeping up to date with pyscf and setting parse_arg=False in mol constructor (mainly blocks pytest commands)

  • added plot2cube support to madness interface (#296)

  • Update madness_interface.py

  • dropping noisy simulation support in qulacs -- no longer maintained

  • fixing small issue in tests regarding scipy 1.11 release

  • adding args/kwargs to psi4.compute_rdms function

  • adding return to call of base class in psi4.compute_rdms function

# create cube files form madness orbitals
mol = tq.Molecule(geometry="myfile.xyz")
mol.plot2cube(orbital=2) # plots active orbital 2 to a cube file
  • preparing for hcb merge (#293)
    mol.compute_rdms(use_hcb=True) is now enabled for spin-free matrices. Allows to compute RDMs with half the qubits (given that the circuit is in HCB encoding).
  • Implementing HCB rdm on general compute_rdms()
  • consistency in rdm computation with hcb for reordered transformations
  • fixes hcb_rdms and Tests rdms_hcb

Co-authored-by: Javier del Arco [email protected]
Co-authored-by: J. S. Kottmann [email protected]

  • enabled HCB in orbital optimization, can be done via tq.chemistry.opt… (#297)
  • enabled HCB in orbital optimization, can be done via tq.chemistry.optimize_orbitals(...,use_hcb=True)
# orbital optimization with hardcore-boson circuits
U = mol.make_ansatz("HCB-UpCCD")
opt = tq.chemistry.optimize_orbitals(circuit=U, molecule=mol, initial_guess=guess, use_hcb=True)
  • small issue in consistency test, silenced unnecesarry warning
  • QASM string parsing bug (#298)

Co-authored-by: Praveen Jayakumar [email protected]

  • Update requirements.txt
  • Fix NumPy float and int (#301)

Co-authored-by: JdelArco98 [email protected]
Co-authored-by: Javier del Arco [email protected]
Co-authored-by: Praveen Jayakumar [email protected]
Co-authored-by: Praveen Jayakumar [email protected]
Co-authored-by: Erik Kjellgren [email protected]

v.1.8.8

25 May 07:44
Compare
Choose a tag to compare

Improvement on Measurement Optimization (Seonghoon Choi @schoi839 & Aranya Chakraborty @Aranya3003 ):
Addition of techniques from https://doi.org/10.22331/q-2023-01-03-889 (Izmaylov Group)
PR authored by: Seonghoon Choi and Aranya Chakraborty

  • Completed SVD (commit on behalf of Aranya Chakraborty).

  • Completed FFF (commit on behalf of Aranya Chakraborty).

  • Improved the efficiency of F3.

  • Truncated CISD containing only a few slater determinant terms is usedinstead of the full CISD.

  • F3 is performed only on a few large variance fragments.

  • Safer choice of minimum meas_alloc (1e-6) to avoid issues with allocating 0 shots.

  • Addressing minor comments.

  • Adding tests for Fermionic measurement optimization schemes.

  • Returning rotated (cartan form) obt and tbts after F3.

  • Changed OSI to ICS for consistency.

  • Circuit for fermionic measurement techniques:

  • Added circuit implementations of orbital rotations

  • Added test for orbital rotations.

  • Proper handling of non-symmetric fermionic Hamiltonian (happens when one obtains it from reverse_jordan_wigner of a qubit Hamiltonian).

  • Handling options in compile_groups to better deal with exceptions and
    default options.

  • get_fermionic_wise now correctly returns QubitHamiltonian rather than
    openfermion QubitOperator.

  • If suggested samples = 0, at least 1 sample (shot) is allocated for
    that measurable fragment.


  • Update psi4_interface.py
    removed compute_x_body_integral functions as this migrated to qc_base
  • Update ci_pyquil.yml
    deactivating for now, issues with forest-sdk docker file
  • Update pyscf_interface.py
    allow charged molecules in pyscf backend

  • allow molecule construction with basis= along with basis_set= as this was a common issue

  • adding repr method to Variables class for easier serialization and evaluation

  • made autograd the default in requirements -- less issues on M1/M2 chips and windows
  • provided more information in autograd_imports

allow qpic export from circuit without having to specify the filename keyword explicitly

Co-authored-by: Aranya Chakraborty [email protected]
Co-authored-by: Seonghoon Choi [email protected]
Co-authored-by: J. S. Kottmann [email protected]

v.1.8.7

17 Mar 08:29
c7b9cfd
Compare
Choose a tag to compare

removing deprecated tensorflow interface (#275)

Tests fail since a while due to new versions of tensorflow. I don't have time to maintain the module and it seems unused.
If you want to revive it, just let me know or make a PR with working tests.

v.1.8.6

16 Mar 10:12
24e86ba
Compare
Choose a tag to compare

Update madness_interface.py (#273)
fixing a bug that appears when n_pno is set manually and is smaller than the number of electron pairs. Example N2 with n_pno=3 (triple bond only). Maxrank was then set to zero. Prevent this from happening by forcing maxrank to be at least 1 when auto-assigned.

Autograd usage:

  • changing float_power to power in pow operators to allow for more convenience when using jax instead of autograd (affects mostly osx-arm64 and win systems)

Minor updates:

  • little more convenience in mol.UR and mol.UC in accordance with arXiv:2207.12421