From 9760f5f797e72d22746e6e0d743cf1a74028f090 Mon Sep 17 00:00:00 2001 From: sankalp Date: Fri, 8 Sep 2023 10:18:44 -0400 Subject: [PATCH] fixing more pydantic errors --- covalent/_shared_files/qinfo.py | 2 +- covalent/quantum/qserver/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/covalent/_shared_files/qinfo.py b/covalent/_shared_files/qinfo.py index 2fd78a8f3..f04935ef0 100644 --- a/covalent/_shared_files/qinfo.py +++ b/covalent/_shared_files/qinfo.py @@ -55,7 +55,7 @@ class QElectronInfo(BaseModel): """ name: str - description: str = None + description: Optional[str] = None device_name: str # name of the original device, e.g. "default.qubit" device_import_path: str # used to inherit type converters and other methods device_shots: Union[ diff --git a/covalent/quantum/qserver/utils.py b/covalent/quantum/qserver/utils.py index f9aecacdd..15708910a 100644 --- a/covalent/quantum/qserver/utils.py +++ b/covalent/quantum/qserver/utils.py @@ -21,7 +21,7 @@ import datetime import importlib from functools import lru_cache -from typing import Any, Dict, List, Union +from typing import Any, Dict, List, Optional, Union import orjson from pydantic import BaseModel @@ -37,7 +37,7 @@ class CircuitInfo(BaseModel): electron_node_id: int = None dispatch_id: str = None circuit_name: str = None - circuit_description: str = None + circuit_description: Optional[str] = None circuit_diagram: str = None qnode_specs: Union[Dict[str, Any], QNodeSpecs] = None qexecutor: BaseQExecutor = None