Skip to content

Commit

Permalink
feat: Add Protocol for API objects
Browse files Browse the repository at this point in the history
Fixes some type errors that have been seen by users and in other
internal code. Also makes some methods public that were being used by
QuantinuumBackend and fixes some mismatched types.
  • Loading branch information
johnchildren committed Apr 26, 2024
1 parent 6a1b25d commit 0558e2a
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions pytket/extensions/quantinuum/backends/api_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,39 @@ class QuantinuumAPIProtocol(Protocol):

def override_timeouts(
self, timeout: Optional[int] = None, retry_timeout: Optional[int] = None
) -> _OverrideManager: ...
) -> _OverrideManager:
...

def full_login(self) -> None: ...
def full_login(self) -> None:
...

def login(self) -> str: ...
def login(self) -> str:
...

def delete_authentication(self) -> None: ...
def delete_authentication(self) -> None:
...

def submit_job(self, body: Dict) -> Response: ...
def submit_job(self, body: Dict) -> Response:
...

def retrieve_job_status(
self, job_id: str, use_websocket: Optional[bool] = None
) -> Optional[Dict]: ...
) -> Optional[Dict]:
...

def retrieve_job(
self, job_id: str, use_websocket: Optional[bool] = None
) -> Optional[Dict]: ...
) -> Optional[Dict]:
...

def status(self, machine: str) -> str: ...
def status(self, machine: str) -> str:
...

def cancel(self, job_id: str) -> dict: ...
def cancel(self, job_id: str) -> dict:
...

def get_calendar(self, start_date: str, end_date: str) -> List[Dict[str, str]]: ...
def get_calendar(self, start_date: str, end_date: str) -> List[Dict[str, str]]:
...


class QuantinuumAPI(QuantinuumAPIProtocol):
Expand Down

0 comments on commit 0558e2a

Please sign in to comment.