Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.
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
2 changes: 1 addition & 1 deletion qiskit_ibm/api/clients/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def program_run(
program_id: str,
credentials: Credentials,
backend_name: str,
params: str,
params: Dict,
image: str
) -> Dict:
"""Run the specified program.
Expand Down
5 changes: 3 additions & 2 deletions qiskit_ibm/api/rest/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from .base import RestAdapterBase
from ..session import RetrySession
from ...runtime.utils import RuntimeEncoder

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -104,7 +105,7 @@ def program_run(
group: str,
project: str,
backend_name: str,
params: str,
params: Dict,
image: str
) -> Dict:
"""Execute the program.
Expand All @@ -131,7 +132,7 @@ def program_run(
'params': [params],
'runtime': image
}
data = json.dumps(payload)
data = json.dumps(payload, cls=RuntimeEncoder)
return self.session.post(url, data=data).json()

def jobs_get(self, limit: int = None, skip: int = None, pending: bool = None) -> Dict:
Expand Down
5 changes: 2 additions & 3 deletions qiskit_ibm/runtime/ibm_runtime_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from .runtime_job import RuntimeJob
from .runtime_program import RuntimeProgram, ParameterNamespace
from .utils import RuntimeEncoder, RuntimeDecoder, to_base64_string
from .utils import RuntimeDecoder, to_base64_string
from .exceptions import (QiskitRuntimeError, RuntimeDuplicateProgramError, RuntimeProgramNotFound,
RuntimeJobNotFound)
from .program.result_decoder import ResultDecoder
Expand Down Expand Up @@ -250,12 +250,11 @@ def run(
raise IBMInputValueError('"image" needs to be in form of image_name:tag')

backend_name = options['backend_name']
params_str = json.dumps(inputs, cls=RuntimeEncoder)
result_decoder = result_decoder or ResultDecoder
response = self._api_client.program_run(program_id=program_id,
credentials=self._provider.credentials,
backend_name=backend_name,
params=params_str,
params=inputs,
image=image)

backend = self._provider.get_backend(backend_name)
Expand Down