Skip to content

Commit

Permalink
Merge pull request #258 from CQCL/release/1.21.0
Browse files Browse the repository at this point in the history
Release/1.21.0
  • Loading branch information
cqc-melf authored Oct 17, 2023
2 parents 3a184d7 + 837d022 commit a65545e
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion _metadata.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__extension_version__ = "0.24.0"
__extension_version__ = "0.25.0"
__extension_name__ = "pytket-quantinuum"
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
~~~~~~~~~

0.25.0 (October 2023)
---------------------

* Updated pytket version requirement to 1.21.

0.24.0 (October 2023)
---------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/intro.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ The passes applied by different levels of optimisation are specified in the tabl
- `auto_squash_pass [4] <https://cqcl.github.io/tket/pytket/api/passes.html#pytket.passes.auto_rebase.auto_squash_pass>`_
* -
- `auto_squash_pass [4] <https://cqcl.github.io/tket/pytket/api/passes.html#pytket.passes.auto_rebase.auto_squash_pass>`_
* -
- `FlattenRelabelRegistersPass <https://cqcl.github.io/tket/pytket/api/passes.html#pytket.passes.FlattenRelabelRegistersPass>`_
* -
- `FlattenRelabelRegistersPass <https://cqcl.github.io/tket/pytket/api/passes.html#pytket.passes.FlattenRelabelRegistersPass>`_
-


* [1] If no value is specified then ``optimisation_level`` defaults to a value of 2.

* [2] ``self.rebase_pass`` is a rebase that converts the circuit to the Quantinuum native gate set (e.g. {Rz, PhasedX, ZZMax, ZZPhase}).
Expand Down
8 changes: 4 additions & 4 deletions pytket/extensions/quantinuum/backends/api_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ def __init__(
self._cred_store = token_store

if __user_name is not None:
self.config.username = __user_name # type: ignore
if self.config.username is not None and __pwd is not None: # type: ignore
self._cred_store._save_login_credential(self.config.username, __pwd) # type: ignore
self.config.username = __user_name
if self.config.username is not None and __pwd is not None:
self._cred_store._save_login_credential(self.config.username, __pwd)

self.api_version = api_version
self.use_websocket = use_websocket
Expand Down Expand Up @@ -244,7 +244,7 @@ def _refresh_id_token(self, refresh_token: str) -> None:

def _get_credentials(self) -> Tuple[str, str]:
"""Method to ask for user's credentials"""
user_name = self._cred_store._user_name or self.config.username # type: ignore
user_name = self._cred_store._user_name or self.config.username
if not user_name:
user_name = input("Enter your Quantinuum email: ")
pwd = self._cred_store._password
Expand Down
2 changes: 1 addition & 1 deletion pytket/extensions/quantinuum/backends/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ def set_quantinuum_config(username: Optional[str]) -> None:
"""Set default value for Quantinuum username.
Can be overriden in backend construction."""
hconfig = QuantinuumConfig.from_default_config_file()
hconfig.username = username # type: ignore
hconfig.username = username
hconfig.update_default_config_file()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
packages=find_namespace_packages(include=["pytket.*"]),
include_package_data=True,
install_requires=[
"pytket ~= 1.20",
"pytket ~= 1.21",
"requests >= 2.2",
"types-requests",
"websockets >= 7.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def fixture_mock_quum_api_handler(
api_handler = QuantinuumAPI()

# Add the credential storage seperately in line with fixture parameters
api_handler.config.username = username # type: ignore
api_handler.config.username = username
api_handler._cred_store = cred_store
api_handler.login()

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/backend_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ def test_wasm_multivalue(
authenticated_quum_backend: QuantinuumBackend, language: Language
) -> None:
wasfile = WasmFileHandler(
str(Path(__file__).parent.parent / "wasm" / "multivalue2.wasm")
str(Path(__file__).parent.parent / "wasm" / "multivalue.wasm")
)
c = Circuit(8)
a = c.add_c_register("a", 4) # measurement results
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_full_login(

api_handler = QuantinuumAPI()
# emulate no pytket config stored email address
api_handler.config.username = None # type: ignore
api_handler.config.username = None
api_handler.full_login()

assert api_handler._cred_store.id_token == mock_token
Expand Down

0 comments on commit a65545e

Please sign in to comment.