laboneq.workflow.handles

Module that defines acquisition handle formatters for LabOneQ experiments.

ACTIVE_RESET_PREFIX = 'active_reset' module-attribute

CALIBRATION_TRACE_PREFIX = 'cal_trace' module-attribute

RESULT_PREFIX = 'result' module-attribute

active_reset_calibration_trace_handle(qubit_name, state, prefix=ACTIVE_RESET_PREFIX, suffix=None)

Return the acquisition handle for an active reset.

The equivalent of "active_reset/{qubit_name}/{tag}".format(qubit_name=qubit_name, tag=tag).

Parameters:

Name Type Description Default
qubit_name str

The name of the qubit.

required
state str

The state of the qubit.

required
prefix str

The prefix to use for the handle.

ACTIVE_RESET_PREFIX
suffix str | None

The suffix of the active reset handle.

None

Returns:

Type Description
str

The acquisition handle for the active reset for the given qubit and tag.

Example
state = "0"
handle = active_reset_handle(q0, state)

active_reset_handle(qubit_name, prefix=ACTIVE_RESET_PREFIX, suffix=None)

Return the acquisition handle for an active reset.

The equivalent of "active_reset/{qubit_name}/{tag}".format(qubit_name=qubit_name, tag=tag).

Parameters:

Name Type Description Default
qubit_name str

The name of the qubit.

required
suffix str | None

The suffix of the active reset handle.

None
prefix str

The prefix to use for the handle.

ACTIVE_RESET_PREFIX

Returns:

Type Description
str

The acquisition handle for the active reset for the given qubit and tag.

Example
suffix = "0"
handle = active_reset_handle(q0, suffix=suffix)

calibration_trace_handle(qubit_name, state=None, prefix=CALIBRATION_TRACE_PREFIX)

Return the acquisition handle for a calibration trace.

The equivalent of "cal_trace/{qubit_name}/{state}".format(qubit_name=qubit_name, state=state).

Parameters:

Name Type Description Default
qubit_name str

The name of the qubit.

required
state str | None

The state of the qubit.

None
prefix str

The prefix to use for the handle.

CALIBRATION_TRACE_PREFIX

Returns:

Type Description
str

The acquisition handle for the calibration trace for the given qubit and state.

Example
qubit_name = "q0"
state = "e"
handle = trace_handle(qubit_name, state)

result_handle(qubit_name, prefix=RESULT_PREFIX, suffix=None)

Return the acquisition handle for the main sweep result.

The equivalent of "result_{qubit_name}".format(qubit_name=qubit_name).

Parameters:

Name Type Description Default
qubit_name str

The name of the qubit.

required
prefix str

The prefix to use for the handle.

RESULT_PREFIX
suffix str | None

The suffix to use for the handle.

None

Returns:

Type Description
str

The acquisition handle for the main sweep result for the given qubit.

Example
qubit_name = "q0"
handle = result_handle(qubit_name)