ParameterWithSetpoints with DelegateParameter as setpoints
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start at Measurement.register_parameter and the dataset dependency validation that produces the shown ValueError. Examine whether nested ParameterWithSetpoints dependencies can be represented without treating them as a two-dimensional setpoint grid, and whether the current dataset structure supports the proposed time-axis/ramp model. Done means a clear feasibility or design decision for this dependency model.
Written by the indexing model from the issue text.
Description
The following setup is disallowed by qcodes:
from qcodes.validators import Arrays
from qcodes.parameters import Parameter, ParameterWithSetpoints
from qcodes.dataset import Measurement
p=Parameter('p', vals=Arrays(shape=(10,)), get_cmd=lambda : np.arange(10))
ps1 = ParameterWithSetpoints('ps1', vals=p.vals, setpoints=(p,), get_cmd=lambda : np.linspace(0, 1, 10))
ps2 = ParameterWithSetpoints('ps2', vals=p.vals, setpoints=(ps1,), get_cmd=lambda : np.random.randn(10))
meas = Measurement()
meas.register_parameter(ps2)
# ValueError: Paramspec ps1 both depends on ['p'] and is depended upon by ['ps2']
# This was caused while adding these interdependencies {ParamSpecBase('ps1', 'array', 'ps1', ''): (ParamSpecBase('p', 'array', 'p', ''),)}
When instead ps2 has a DelegateParameter as setpoints that points to ps1, the measurement works (but probably shouldn't according to the current logic):
from qcodes.parameters import DelegateParameter
dp = DelegateParameter('dp', source=ps1)
ps2.setpoints = (dp,)
meas = Measurement()
meas.register_parameter(ps2) # p is just forgotten about here
Finally, I'm wondering if the dual dependency should not indeed be allowed. Take a ParameterWithSetpoints whose setpoints are maybe some voltages that are being ramped. We could want to attach time stamp information to the voltage ramp (maybe the measurement of the ParameterWithSetpoints is not continuous, but only during certain windows of the ramp), the natural way of doing which would be to make the voltage ramp a ParameterWithSetpoints itself, with setpoints given by the time stamps. I.e., ps2 -> measured_data, ps1 -> voltage_ramp, p -> time_axis. Another conceivable option would be to define the time stamps also as setpoints of the measured data parameter (ps2), but this is also illegal (two setpoint params imply a 2d setpoint grid rather than two independent setpoints).
The first question here would be if this is even possible with the current dataset structure.
- Dominant language
- Python
- Stars
- 459
- Forks
- 359
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 79
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/Qcodes
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/Qcodes#8168 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
microsoft/Qcodes#1087 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Export to xarray dataset fails when two data variables do not share same setpointsMay be free again @jenshnielsen claimed this 101 days ago, and no pull request is open. Open
microsoft/Qcodes#8232 · 1 reaction · 2 assignees ·
Maintainers usually reply within 1 day
All issues in microsoft/Qcodes
Similar issues
-
deployment release-lag
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nolte/kamerplanter#2047 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-plugin-claude-subscription-directsdk#94 ·
Maintainers usually reply within 1 day
-
namespace operations
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
EclipseFdn/open-vsx.org#13702 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day