Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.
Closed
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
7 changes: 5 additions & 2 deletions qiskit/providers/ibmq/runtime/program/program_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ def main(backend: ProgramBackend, user_messenger: UserMessenger, **kwargs):
backend: Backend for the circuits to run on.
user_messenger: Used to communicate with the program user.
kwargs: User inputs.

Returns:
The final result of the runtime program.
"""
# Massage the input if necessary.
result = program(backend, user_messenger, **kwargs)
# UserMessenger can be used to publish final results.
user_messenger.publish(result, final=True)
# final results can be directly returned
return result