Skip to content

Commit

Permalink
rename missed run_id
Browse files Browse the repository at this point in the history
  • Loading branch information
basvanberckel committed Oct 23, 2023
1 parent 226cf5f commit 72c48b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions examples/hqca_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def finalize(list_of_measurements: Dict[int, List[Any]]) -> Dict[str, Any]:
algorithm.read_file(Path(__file__))

local_backend = LocalBackend()
run_id = local_backend.run(algorithm, 0)
results = local_backend.get_results(run_id)
job_id = local_backend.run(algorithm, 0)
results = local_backend.get_results(job_id)

print("=== Execute ===\n", results)
12 changes: 6 additions & 6 deletions quantuminspire/cli/command_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ def upload_files(
backend = RemoteBackend()
program = HybridAlgorithm(platform_name="spin-2", program_name=name)
program.read_file(Path(name))
run_id = backend.run(program, backend_type_id=backend_type_id)
job_id = backend.run(program, backend_type_id=backend_type_id)
typer.echo(f"Upload file with name: {name}")
typer.echo(f"run_id {run_id}")
typer.echo(f"job_id {job_id}")


@files_app.command("run")
Expand All @@ -262,19 +262,19 @@ def run_file(
algorithm.read_file(Path(name))

local_backend = LocalBackend()
run_id = local_backend.run(algorithm, 0)
results = local_backend.get_results(run_id)
job_id = local_backend.run(algorithm, 0)
results = local_backend.get_results(job_id)
typer.echo(f"{results}")


@results_app.command("get")
def get_results(run_id: int = typer.Argument(..., help="The id of the run")) -> None:
def get_results(job_id: int = typer.Argument(..., help="The id of the run")) -> None:
"""Retrieve the results for a run.
Takes the id as returned by upload_files and retrieves the results for that run, if it's finished.
"""
backend = RemoteBackend()
results = backend.get_results(run_id)
results = backend.get_results(job_id)

if results is None:
typer.echo("No results.")
Expand Down

0 comments on commit 72c48b9

Please sign in to comment.