From 4571cb6c0a9ea8a7be8627a97cd2c8c541b01cbd Mon Sep 17 00:00:00 2001 From: obliviateandsurrender Date: Fri, 7 Jun 2024 14:43:00 -0400 Subject: [PATCH 01/11] initial update --- doc/releases/changelog-dev.md | 4 +++ pennylane/qchem/basis_data.py | 37 +++++++++++++++++--------- pennylane/qchem/basis_set.py | 9 +++++++ pennylane/qchem/openfermion_pyscf.py | 5 +--- tests/qchem/of_tests/test_dipole_of.py | 2 +- tests/qchem/test_basis_set.py | 6 +++++ tests/qchem/test_molecule.py | 2 +- 7 files changed, 47 insertions(+), 18 deletions(-) diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 65578cf7017..acbb222fff6 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -77,6 +77,9 @@ * The qchem module has dedicated functions for calling `pyscf` and `openfermion` backends. [(#5553)](https://github.com/PennyLaneAI/pennylane/pull/5553) +* Molecules and Hamiltonians can be constructed for elements present in the periodic table. + [(#)](https://github.com/PennyLaneAI/pennylane/pull/) +

Mid-circuit measurements and dynamic circuits

* Rationalize MCM tests, removing most end-to-end tests from the native MCM test file, @@ -359,6 +362,7 @@ This release contains contributions from (in alphabetical order): Guillermo Alonso-Linaje, +Utkarsh Azad Lillian M. A. Frederiksen, Gabriel Bottrill, Astral Cai, diff --git a/pennylane/qchem/basis_data.py b/pennylane/qchem/basis_data.py index eac4f8cdae6..9bbea6d7d46 100644 --- a/pennylane/qchem/basis_data.py +++ b/pennylane/qchem/basis_data.py @@ -20,18 +20,28 @@ import itertools +# fmt: off atomic_numbers = { - "H": 1, - "He": 2, - "Li": 3, - "Be": 4, - "B": 5, - "C": 6, - "N": 7, - "O": 8, - "F": 9, - "Ne": 10, + 'H': 1, 'He': 2, # Period 1 + 'Li': 3, 'Be': 4, 'B': 5, 'C': 6, 'N': 7, 'O': 8, 'F': 9, 'Ne': 10, # Period 2 + 'Na': 11, 'Mg': 12, 'Al': 13, 'Si': 14, 'P': 15, 'S': 16, 'Cl': 17, 'Ar': 18, # Period 3 + 'K': 19, 'Ca': 20, 'Sc': 21, 'Ti': 22, 'V': 23, 'Cr': 24, 'Mn': 25, 'Fe': 26, 'Co': 27, # Period 4 + 'Ni': 28, 'Cu': 29, 'Zn': 30, 'Ga': 31, 'Ge': 32, 'As': 33, 'Se': 34, 'Br': 35, 'Kr': 36, + 'Rb': 37, 'Sr': 38, 'Y': 39, 'Zr': 40, 'Nb': 41, 'Mo': 42, 'Tc': 43, 'Ru': 44, 'Rh': 45, # Period 5 + 'Pd': 46, 'Ag': 47, 'Cd': 48, 'In': 49, 'Sn': 50, 'Sb': 51, 'Te': 52, 'I': 53, 'Xe': 54, + 'Cs': 55, 'Ba': 56, # Period 6 + 'La': 57, 'Ce': 58, 'Pr': 59, 'Nd': 60, 'Pm': 61, 'Sm': 62, 'Eu': 63, 'Gd': 64, 'Tb': 65, # Lanthanides + 'Dy': 66, 'Ho': 67, 'Er': 68, 'Tm': 69, 'Yb': 70, 'Lu': 71, + 'Hf': 72, 'Ta': 73, 'W': 74, 'Re': 75, 'Os': 76, 'Ir': 77, 'Pt': 78, 'Au': 79, 'Hg': 80, # Period 6 + 'Tl': 81, 'Pb': 82, 'Bi': 83, 'Po': 84, 'At': 85, 'Rn': 86, + 'Fr': 87, 'Ra': 88, # Period 7 + 'Ac': 89, 'Th': 90, 'Pa': 91, 'U': 92, 'Np': 93, 'Pu': 94, 'Am': 95, 'Cm': 96, 'Bk': 97, # Actinides + 'Cf': 98, 'Es': 99, 'Fm': 100, 'Md': 101, 'No': 102, 'Lr': 103, + 'Rf': 104, 'Db': 105, 'Sg': 106, 'Bh': 107, 'Hs': 108, 'Mt': 109, 'Ds': 110, 'Rg': 111, # Period 7 + 'Cn': 112, 'Nh': 113, 'Fl': 114, 'Mc': 115, 'Lv': 116, 'Ts': 117, 'Og': 118 } +# fmt: on + STO3G = { "H": { @@ -797,11 +807,14 @@ def load_basisset(basis, element): "[3]": "F", "[4]": "G", "[5]": "H", + "[6]": "I", } - element = str(atomic_numbers[element]) + atomic_number = atomic_numbers.get(element, None) + if element is None: + raise ValueError(f"Requested element {element} doesn't exist in the periodic table.") - data = bse.get_basis(basis)["elements"][element]["electron_shells"] + data = bse.get_basis(basis)["elements"][str(atomic_number)]["electron_shells"] orbitals = [] exponents = [] diff --git a/pennylane/qchem/basis_set.py b/pennylane/qchem/basis_set.py index 6afac08f166..f40d93f7f59 100644 --- a/pennylane/qchem/basis_set.py +++ b/pennylane/qchem/basis_set.py @@ -100,6 +100,15 @@ def atom_basis_data(name, atom, load_data=False): if load_data: basis = load_basisset(name, atom) else: + basis = basis_sets[name].get(atom, None) + if basis is None: + raise ValueError( + "Currently, internally supported basis sets: 'sto-3g', '6-31g', '6-311g' and " + "'cc-pvdz', support only first- or second-row elements of the periodic table. " + "Please consider using `load_data=True` to download an extended version of " + f"{basis_sets[name]} from an external library that can be installed with: " + "pip install basis-set-exchange." + ) basis = basis_sets[name][atom] params = [] diff --git a/pennylane/qchem/openfermion_pyscf.py b/pennylane/qchem/openfermion_pyscf.py index 91d2faf8bc3..44a3b256e74 100644 --- a/pennylane/qchem/openfermion_pyscf.py +++ b/pennylane/qchem/openfermion_pyscf.py @@ -609,10 +609,7 @@ def dipole_of( for i in symbols: if i not in atomic_numbers: - raise ValueError( - f"Currently, only first- or second-row elements of the periodic table are supported;" - f" got element {i}" - ) + raise ValueError(f"Requested element {i} doesn't exist in the periodic table") hf_file = qml.qchem.meanfield(symbols, coordinates, name, charge, mult, basis, package, outpath) diff --git a/tests/qchem/of_tests/test_dipole_of.py b/tests/qchem/of_tests/test_dipole_of.py index e3e9acdb9c8..af6f68819ba 100644 --- a/tests/qchem/of_tests/test_dipole_of.py +++ b/tests/qchem/of_tests/test_dipole_of.py @@ -273,7 +273,7 @@ def circuit(hf_state, obs): ("symbols", "coords", "mult", "msg_match"), [ (["H", "H"], x_h2, 2, "this functionality is constrained to Hartree-Fock states"), - (["H", "Ca"], x_h2, 1, "only first- or second-row elements of the periodic table"), + (["H", "Cx"], x_h2, 1, "Requested element Cx doesn't exist in the periodic table"), ], ) @pytest.mark.usefixtures("skip_if_no_openfermion_support") diff --git a/tests/qchem/test_basis_set.py b/tests/qchem/test_basis_set.py index 435f947d3b0..7cf3958d10c 100644 --- a/tests/qchem/test_basis_set.py +++ b/tests/qchem/test_basis_set.py @@ -477,6 +477,12 @@ def test_mol_basis_data(self, basis_data): assert np.allclose(params, params_ref) + def test_mol_basis_data_error(self): + """Test that correct error is raised if the element is not present in the internal basis-sets""" + + with pytest.raises(ValueError, match="Currently, internally supported basis sets"): + qchem.basis_set.atom_basis_data(name="sto-3g", atom="Os") + class TestLoadBasis: """Tests for loading data from external libraries.""" diff --git a/tests/qchem/test_molecule.py b/tests/qchem/test_molecule.py index b4e797e5687..ea0195647ff 100644 --- a/tests/qchem/test_molecule.py +++ b/tests/qchem/test_molecule.py @@ -49,7 +49,7 @@ def test_basis_error(self, symbols, geometry): @pytest.mark.parametrize( ("symbols", "geometry"), [ - (["H", "Og"], np.array([[0.0, 0.0, 0.0], [0.0, 0.0, 1.0]])), + (["H", "Ox"], np.array([[0.0, 0.0, 0.0], [0.0, 0.0, 1.0]])), ], ) def test_symbol_error(self, symbols, geometry): From 4cc50c6837fd07cb2c79832d2d5eb07201178036 Mon Sep 17 00:00:00 2001 From: obliviateandsurrender Date: Fri, 7 Jun 2024 16:29:24 -0400 Subject: [PATCH 02/11] add a `unittest` --- doc/releases/changelog-dev.md | 2 +- pennylane/qchem/basis_data.py | 4 ++-- tests/qchem/test_basis_set.py | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index acbb222fff6..7090f1a086d 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -78,7 +78,7 @@ [(#5553)](https://github.com/PennyLaneAI/pennylane/pull/5553) * Molecules and Hamiltonians can be constructed for elements present in the periodic table. - [(#)](https://github.com/PennyLaneAI/pennylane/pull/) + [(#5821)](https://github.com/PennyLaneAI/pennylane/pull/5821)

Mid-circuit measurements and dynamic circuits

diff --git a/pennylane/qchem/basis_data.py b/pennylane/qchem/basis_data.py index 9bbea6d7d46..c11cb062ccf 100644 --- a/pennylane/qchem/basis_data.py +++ b/pennylane/qchem/basis_data.py @@ -26,7 +26,7 @@ 'Li': 3, 'Be': 4, 'B': 5, 'C': 6, 'N': 7, 'O': 8, 'F': 9, 'Ne': 10, # Period 2 'Na': 11, 'Mg': 12, 'Al': 13, 'Si': 14, 'P': 15, 'S': 16, 'Cl': 17, 'Ar': 18, # Period 3 'K': 19, 'Ca': 20, 'Sc': 21, 'Ti': 22, 'V': 23, 'Cr': 24, 'Mn': 25, 'Fe': 26, 'Co': 27, # Period 4 - 'Ni': 28, 'Cu': 29, 'Zn': 30, 'Ga': 31, 'Ge': 32, 'As': 33, 'Se': 34, 'Br': 35, 'Kr': 36, + 'Ni': 28, 'Cu': 29, 'Zn': 30, 'Ga': 31, 'Ge': 32, 'As': 33, 'Se': 34, 'Br': 35, 'Kr': 36, 'Rb': 37, 'Sr': 38, 'Y': 39, 'Zr': 40, 'Nb': 41, 'Mo': 42, 'Tc': 43, 'Ru': 44, 'Rh': 45, # Period 5 'Pd': 46, 'Ag': 47, 'Cd': 48, 'In': 49, 'Sn': 50, 'Sb': 51, 'Te': 52, 'I': 53, 'Xe': 54, 'Cs': 55, 'Ba': 56, # Period 6 @@ -811,7 +811,7 @@ def load_basisset(basis, element): } atomic_number = atomic_numbers.get(element, None) - if element is None: + if atomic_number is None: raise ValueError(f"Requested element {element} doesn't exist in the periodic table.") data = bse.get_basis(basis)["elements"][str(atomic_number)]["electron_shells"] diff --git a/tests/qchem/test_basis_set.py b/tests/qchem/test_basis_set.py index 7cf3958d10c..d1320e91497 100644 --- a/tests/qchem/test_basis_set.py +++ b/tests/qchem/test_basis_set.py @@ -483,6 +483,9 @@ def test_mol_basis_data_error(self): with pytest.raises(ValueError, match="Currently, internally supported basis sets"): qchem.basis_set.atom_basis_data(name="sto-3g", atom="Os") + with pytest.raises(ValueError, match="doesn't exist in the periodic table"): + qchem.basis_data.load_basisset(basis="sto-3g", element="Ox") + class TestLoadBasis: """Tests for loading data from external libraries.""" From ac176cf70fc782e3c3b696d8747f313df013fc8d Mon Sep 17 00:00:00 2001 From: Utkarsh Date: Fri, 14 Jun 2024 11:09:25 -0400 Subject: [PATCH 03/11] Update doc/releases/changelog-dev.md --- doc/releases/changelog-dev.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 7090f1a086d..6f4328a33f1 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -77,7 +77,7 @@ * The qchem module has dedicated functions for calling `pyscf` and `openfermion` backends. [(#5553)](https://github.com/PennyLaneAI/pennylane/pull/5553) -* Molecules and Hamiltonians can be constructed for elements present in the periodic table. +* Molecules and Hamiltonians can now be constructed for all the elements present in the periodic table. [(#5821)](https://github.com/PennyLaneAI/pennylane/pull/5821)

Mid-circuit measurements and dynamic circuits

From bdbdb65b768048f13f6019125225ddc7ea402b34 Mon Sep 17 00:00:00 2001 From: obliviateandsurrender Date: Mon, 17 Jun 2024 12:03:28 -0400 Subject: [PATCH 04/11] add suggestions --- pennylane/qchem/basis_set.py | 2 +- pennylane/qchem/openfermion_pyscf.py | 2 +- tests/qchem/test_basis_set.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pennylane/qchem/basis_set.py b/pennylane/qchem/basis_set.py index f40d93f7f59..f13ff7bccf9 100644 --- a/pennylane/qchem/basis_set.py +++ b/pennylane/qchem/basis_set.py @@ -106,7 +106,7 @@ def atom_basis_data(name, atom, load_data=False): "Currently, internally supported basis sets: 'sto-3g', '6-31g', '6-311g' and " "'cc-pvdz', support only first- or second-row elements of the periodic table. " "Please consider using `load_data=True` to download an extended version of " - f"{basis_sets[name]} from an external library that can be installed with: " + f"{name} from an external library that can be installed with: " "pip install basis-set-exchange." ) basis = basis_sets[name][atom] diff --git a/pennylane/qchem/openfermion_pyscf.py b/pennylane/qchem/openfermion_pyscf.py index 44a3b256e74..029f57e7419 100644 --- a/pennylane/qchem/openfermion_pyscf.py +++ b/pennylane/qchem/openfermion_pyscf.py @@ -609,7 +609,7 @@ def dipole_of( for i in symbols: if i not in atomic_numbers: - raise ValueError(f"Requested element {i} doesn't exist in the periodic table") + raise ValueError(f"Requested element {i} doesn't exist") hf_file = qml.qchem.meanfield(symbols, coordinates, name, charge, mult, basis, package, outpath) diff --git a/tests/qchem/test_basis_set.py b/tests/qchem/test_basis_set.py index d1320e91497..e6083fee6a6 100644 --- a/tests/qchem/test_basis_set.py +++ b/tests/qchem/test_basis_set.py @@ -483,7 +483,7 @@ def test_mol_basis_data_error(self): with pytest.raises(ValueError, match="Currently, internally supported basis sets"): qchem.basis_set.atom_basis_data(name="sto-3g", atom="Os") - with pytest.raises(ValueError, match="doesn't exist in the periodic table"): + with pytest.raises(ValueError, match="Requested element Ox doesn't exist"): qchem.basis_data.load_basisset(basis="sto-3g", element="Ox") From 333e90f1c49bb17c05ef19bff7bdb0cce7aef4fd Mon Sep 17 00:00:00 2001 From: obliviateandsurrender Date: Tue, 18 Jun 2024 12:11:06 -0400 Subject: [PATCH 05/11] minor test tweak --- tests/qchem/of_tests/test_dipole_of.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qchem/of_tests/test_dipole_of.py b/tests/qchem/of_tests/test_dipole_of.py index af6f68819ba..7520ac6542f 100644 --- a/tests/qchem/of_tests/test_dipole_of.py +++ b/tests/qchem/of_tests/test_dipole_of.py @@ -273,7 +273,7 @@ def circuit(hf_state, obs): ("symbols", "coords", "mult", "msg_match"), [ (["H", "H"], x_h2, 2, "this functionality is constrained to Hartree-Fock states"), - (["H", "Cx"], x_h2, 1, "Requested element Cx doesn't exist in the periodic table"), + (["H", "Cx"], x_h2, 1, "Requested element Cx doesn't exist"), ], ) @pytest.mark.usefixtures("skip_if_no_openfermion_support") From ff53e0c63e448979f2111df73e91ee2fb3a5763d Mon Sep 17 00:00:00 2001 From: obliviateandsurrender Date: Wed, 17 Jul 2024 12:38:46 -0400 Subject: [PATCH 06/11] apply suggestions --- pennylane/qchem/basis_data.py | 1 + pennylane/qchem/basis_set.py | 7 +++---- tests/qchem/test_basis_set.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pennylane/qchem/basis_data.py b/pennylane/qchem/basis_data.py index c11cb062ccf..17f07f8a659 100644 --- a/pennylane/qchem/basis_data.py +++ b/pennylane/qchem/basis_data.py @@ -21,6 +21,7 @@ import itertools # fmt: off +# IUPAC Periodic Table of the Elements: https://iupac.org/what-we-do/periodic-table-of-elements/ atomic_numbers = { 'H': 1, 'He': 2, # Period 1 'Li': 3, 'Be': 4, 'B': 5, 'C': 6, 'N': 7, 'O': 8, 'F': 9, 'Ne': 10, # Period 2 diff --git a/pennylane/qchem/basis_set.py b/pennylane/qchem/basis_set.py index f13ff7bccf9..88a38a7a69b 100644 --- a/pennylane/qchem/basis_set.py +++ b/pennylane/qchem/basis_set.py @@ -103,10 +103,9 @@ def atom_basis_data(name, atom, load_data=False): basis = basis_sets[name].get(atom, None) if basis is None: raise ValueError( - "Currently, internally supported basis sets: 'sto-3g', '6-31g', '6-311g' and " - "'cc-pvdz', support only first- or second-row elements of the periodic table. " - "Please consider using `load_data=True` to download an extended version of " - f"{name} from an external library that can be installed with: " + f"The requested basis set is not available for {name}. " + "Please consider using `load_data=True` to download the basis set" + "from the external library basis-set-exchange that can be installed with: " "pip install basis-set-exchange." ) basis = basis_sets[name][atom] diff --git a/tests/qchem/test_basis_set.py b/tests/qchem/test_basis_set.py index e6083fee6a6..09538ef9fe0 100644 --- a/tests/qchem/test_basis_set.py +++ b/tests/qchem/test_basis_set.py @@ -480,7 +480,7 @@ def test_mol_basis_data(self, basis_data): def test_mol_basis_data_error(self): """Test that correct error is raised if the element is not present in the internal basis-sets""" - with pytest.raises(ValueError, match="Currently, internally supported basis sets"): + with pytest.raises(ValueError, match="The requested basis set is not available for"): qchem.basis_set.atom_basis_data(name="sto-3g", atom="Os") with pytest.raises(ValueError, match="Requested element Ox doesn't exist"): From c6246d9a6061b3bae2329d174d99e34533c2bed2 Mon Sep 17 00:00:00 2001 From: obliviateandsurrender Date: Wed, 17 Jul 2024 14:30:00 -0400 Subject: [PATCH 07/11] marker note --- pennylane/qchem/basis_data.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pennylane/qchem/basis_data.py b/pennylane/qchem/basis_data.py index 17f07f8a659..f108b86b5fc 100644 --- a/pennylane/qchem/basis_data.py +++ b/pennylane/qchem/basis_data.py @@ -20,6 +20,7 @@ import itertools +# Note: Below marker are added to prevent reformatting of this dictionary by black # fmt: off # IUPAC Periodic Table of the Elements: https://iupac.org/what-we-do/periodic-table-of-elements/ atomic_numbers = { From 3424891b823f87f86b9ae60fdf2517c0636ac07f Mon Sep 17 00:00:00 2001 From: obliviateandsurrender Date: Wed, 17 Jul 2024 14:32:40 -0400 Subject: [PATCH 08/11] error message tweak --- pennylane/qchem/basis_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane/qchem/basis_set.py b/pennylane/qchem/basis_set.py index 88a38a7a69b..ebbcc9ea8cb 100644 --- a/pennylane/qchem/basis_set.py +++ b/pennylane/qchem/basis_set.py @@ -103,7 +103,7 @@ def atom_basis_data(name, atom, load_data=False): basis = basis_sets[name].get(atom, None) if basis is None: raise ValueError( - f"The requested basis set is not available for {name}. " + f"The requested basis set is not available for {atom}. " "Please consider using `load_data=True` to download the basis set" "from the external library basis-set-exchange that can be installed with: " "pip install basis-set-exchange." From c39ec488ae7bfdbb3a222d5a11db57ee9556ca1f Mon Sep 17 00:00:00 2001 From: obliviateandsurrender Date: Wed, 17 Jul 2024 14:33:59 -0400 Subject: [PATCH 09/11] update error message --- pennylane/qchem/basis_set.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pennylane/qchem/basis_set.py b/pennylane/qchem/basis_set.py index ebbcc9ea8cb..cba7da0cf54 100644 --- a/pennylane/qchem/basis_set.py +++ b/pennylane/qchem/basis_set.py @@ -108,7 +108,6 @@ def atom_basis_data(name, atom, load_data=False): "from the external library basis-set-exchange that can be installed with: " "pip install basis-set-exchange." ) - basis = basis_sets[name][atom] params = [] sp_count = 0 From ae7483189460bf8a637009769cd57a4aa2be8498 Mon Sep 17 00:00:00 2001 From: obliviateandsurrender Date: Wed, 17 Jul 2024 16:34:50 -0400 Subject: [PATCH 10/11] typo --- pennylane/qchem/basis_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane/qchem/basis_data.py b/pennylane/qchem/basis_data.py index f108b86b5fc..5dc381dc0f7 100644 --- a/pennylane/qchem/basis_data.py +++ b/pennylane/qchem/basis_data.py @@ -20,7 +20,7 @@ import itertools -# Note: Below marker are added to prevent reformatting of this dictionary by black +# Note: Below markers are added to prevent reformatting of this dictionary by black # fmt: off # IUPAC Periodic Table of the Elements: https://iupac.org/what-we-do/periodic-table-of-elements/ atomic_numbers = { From a0f282a71e5b356098263672a4268942f3f4e6da Mon Sep 17 00:00:00 2001 From: obliviateandsurrender Date: Wed, 17 Jul 2024 23:45:10 -0400 Subject: [PATCH 11/11] update message --- pennylane/qchem/basis_set.py | 4 ++-- tests/qchem/test_basis_set.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pennylane/qchem/basis_set.py b/pennylane/qchem/basis_set.py index cba7da0cf54..3e8fe2633cc 100644 --- a/pennylane/qchem/basis_set.py +++ b/pennylane/qchem/basis_set.py @@ -103,8 +103,8 @@ def atom_basis_data(name, atom, load_data=False): basis = basis_sets[name].get(atom, None) if basis is None: raise ValueError( - f"The requested basis set is not available for {atom}. " - "Please consider using `load_data=True` to download the basis set" + f"The requested basis set data is not available for {atom}. " + "Please consider using `load_data=True` to download the basis set " "from the external library basis-set-exchange that can be installed with: " "pip install basis-set-exchange." ) diff --git a/tests/qchem/test_basis_set.py b/tests/qchem/test_basis_set.py index 09538ef9fe0..35df4301342 100644 --- a/tests/qchem/test_basis_set.py +++ b/tests/qchem/test_basis_set.py @@ -480,7 +480,7 @@ def test_mol_basis_data(self, basis_data): def test_mol_basis_data_error(self): """Test that correct error is raised if the element is not present in the internal basis-sets""" - with pytest.raises(ValueError, match="The requested basis set is not available for"): + with pytest.raises(ValueError, match="The requested basis set data is not available for"): qchem.basis_set.atom_basis_data(name="sto-3g", atom="Os") with pytest.raises(ValueError, match="Requested element Ox doesn't exist"):