Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion azure-quantum/azure/quantum/target/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def __repr__(self):

@classmethod
def from_target_status(
cls, workspace: "Workspace", status: TargetStatus, **kwargs
cls, workspace: "Workspace", provider_id: str, status: TargetStatus, **kwargs
):
"""Create a Target instance from a given workspace and target status.

Expand All @@ -131,6 +131,7 @@ def from_target_status(
return cls(
workspace=workspace,
name=status.id,
provider_id=provider_id,
average_queue_time=status.average_queue_time,
current_availability=status.current_availability,
**kwargs
Expand Down
6 changes: 1 addition & 5 deletions azure-quantum/azure/quantum/target/target_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ def _target_cls(self, provider_id: str, name: str):
if provider_id.lower() in self._default_targets:
return self._default_targets[provider_id.lower()]

warnings.warn(
f"No default target specified for provider {provider_id}. \
Please check the provider name and try again or create an issue here: \
https://github.com/microsoft/qdk-python/issues.")
return Target

def create_target(
Expand Down Expand Up @@ -105,7 +101,7 @@ def from_target_status(
):
cls = self._target_cls(provider_id, status.id)
if hasattr(cls, "from_target_status"):
return cls.from_target_status(self._workspace, status, **kwargs)
return cls.from_target_status(self._workspace, provider_id, status, **kwargs)
elif cls is not None:
return cls(name=status.id, **kwargs)

Expand Down
Loading