Skip to content

Commit

Permalink
Making qelectron import within try except. (#1954)
Browse files Browse the repository at this point in the history
* moving supression of import error to try to deal with other errors until we update pennylane for qelectron

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* updated changelog

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: kessler-frost <[email protected]>
  • Loading branch information
3 people authored Jun 10, 2024
1 parent c08d2a9 commit 4ab39bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

### Fixed

- Ignoring all errors when importing qelectrons instead of only `ImportError`

## [0.235.0-rc.0] - 2024-05-29

### Authors
Expand Down
3 changes: 2 additions & 1 deletion covalent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
from ._workflow.electron import wait # nopycln: import
from .executor.utils import get_context # nopycln: import

with contextlib.suppress(ImportError):
with contextlib.suppress(Exception):
# try to load qelectron modules
from ._workflow.qelectron import qelectron # nopycln: import
from .quantum import QCluster # nopycln: import

Expand Down

0 comments on commit 4ab39bf

Please sign in to comment.