Skip to content

Commit

Permalink
feat: raise error when not connected
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros11 committed Nov 27, 2024
1 parent e11e0d0 commit e46b12c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/qibolab/instruments/qm/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ def execute_program(self, program):
Args:
program: QUA program.
"""
if self.manager is None:
raise RuntimeError(
"Quantum Machines are not connected. Please use ``platform.connect()``."
)
machine = self.manager.open_qm(self.config.__dict__)
return machine.execute(program)

Expand Down

0 comments on commit e46b12c

Please sign in to comment.