laboneq_applications.tasks.parameter_updating
¶
This module defines the task for updating setup parameters.
temporary_modify(qubits, temporary_parameters=None)
¶
Modify the quantum elements temporarily with the given parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qubits
|
QuantumElements
|
the quantum elements to be temporarily modified. |
required |
temporary_parameters
|
dict[str, dict | QuantumParameters] | None
|
the parameters to be temporarily modified. If None, the quantum elements are returned as is. The dictionary has the following form:
|
None
|
Returns:
Type | Description |
---|---|
QuantumElements
|
The list of quantum elements with the temporary parameters applied, including |
QuantumElements
|
the original quantum elements that were not modified. |
QuantumElements
|
If a single quantum element is passed, returns the modified quantum element. |
Raises:
Type | Description |
---|---|
TypeError
|
If the temporary parameters have invalid type. |
Deprecated in version 2.54.0.
The method `temporary_modify` was deprecated and replaced with the method
`temporary_qpu`. Instead of passing temporary qubits to an experiment, we
now pass a temporary QPU.
temporary_qpu(qpu, temporary_parameters=None)
¶
Modify the QPU temporarily with the given parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qpu
|
QPU
|
The QPU to be temporarily modified. |
required |
temporary_parameters
|
dict[str, dict | QuantumParameters] | None
|
The parameters to be temporarily modified. If None, the QPU is returned as is. The dictionary has the following form:
|
None
|
Returns:
Name | Type | Description |
---|---|---|
QPU |
QPU
|
The QPU with the temporary parameters applied to each quantum element. |
Raises:
Type | Description |
---|---|
TypeError
|
If the temporary parameters have invalid type. |
temporary_quantum_elements_from_qpu(qpu, quantum_elements=None)
¶
Return temporarily-modified quantum elements from the QPU.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qpu
|
QPU
|
The temporarily-modified QPU. |
required |
quantum_elements
|
QuantumElements | list[str] | str | None
|
The quantum elements to return. Either the QuantumElement objects or the UIDs may be provided. |
None
|
Returns:
Type | Description |
---|---|
QuantumElements
|
The temporarily-modified quantum elements. |
Raises:
Type | Description |
---|---|
TypeError
|
If the quantum elements have invalid type. |
update_qubits(qpu, qubit_parameters)
¶
Updates the parameters of the qubits in the qpu.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qpu
|
QPU
|
the qpu containing the qubits to be updated. |
required |
qubit_parameters
|
dict[str, dict[str, dict[str, int | float | Variable | None]]]
|
qubit parameters and the new values to be updated. This dictionary has the following form:
|
required |