Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set amplitude on channel 0 #54

Open
einsmein opened this issue Oct 14, 2022 · 4 comments
Open

Cannot set amplitude on channel 0 #54

einsmein opened this issue Oct 14, 2022 · 4 comments

Comments

@einsmein
Copy link
Contributor

I was trying to set an amplitude on the MFLI, which I assume would be mfli1.sigouts[0].amplitudes[0].value(). I got an error that there is no attribute value. When I checked the snapshot, there is no parameters on 0th channel.

> mfli1.sigouts[0].amplitudes[0].snapshot()
{'functions': {},
 'submodules': {},
 'parameters': {},
 '__class__': 'zhinst.qcodes.qcodes_adaptions.ZINode',
 'name': 'mfli1_sigouts0_amplitudes0'}

However, I could set the amplitude with mfli1.sigouts[0].amplitudes[1].value(0.05)

> mfli1.sigouts[0].amplitudes[0].snapshot()

image

Is it intentional that it's not zero-based index?

@einsmein einsmein changed the title Cannot set amplitudes on channel 0 Cannot set amplitude on channel 0 Oct 14, 2022
@tobiasah
Copy link
Member

@einsmein Thanks for reaching out to us. This looks weird ... it should be zero-based indexed by all means 😇

However, I could not reproduce it on my machine. I can both read and write to the ampilitudes[0].value node.

The snapshot returns the follwoing:

{
    "functions": {},
    "submodules": {},
    "parameters": {
        "value": {
            "__class__": "zhinst.qcodes.qcodes_adaptions.ZIParameter",
            "full_name": "zi_baseinstrument_devxxxx_sigouts0_amplitudes0_value",
            "value": 0.100006103515625,
            "raw_value": 0.100006103515625,
            "ts": "2022-10-14 12:14:01",
            "unit": "V",
            "name": "value",
            "label": "value",
            "post_delay": 0,
            "instrument": "zhinst.qcodes.qcodes_adaptions.ZINode",
            "instrument_name": "zi_baseinstrument_devxxxx_sigouts0_amplitudes0",
            "inter_delay": 0
        }
    },
    "__class__": "zhinst.qcodes.qcodes_adaptions.ZINode",
    "name": "zi_baseinstrument_devxxx_sigouts0_amplitudes0"
}

May I ask for the following information:

  • qcodes version.
  • zhinst-qcodes version.
  • zhinst-toolkitversion.
  • zhinst-core version (if you are using LabOne < 22.08 the version of zhinst instead)
  • LabOne version
  • Firmware revision

Just so that I can try to reproduce it.

@mehdialem
Copy link
Collaborator

@einsmein and @tobiasah, Thank you for the discussion. Let me clarify that both of you have correct observation but the difference is in the installed options on your instruments. @einsmein's device does not include the MF-MD option while @tobiasah's device has it. The screenshots below shows the differences in the UI:

Device w/o MF-MD option
mfli_base

Device w/ MF-MD option
mfli_md

As evident from the screenshots, MFLI with MD option has 4 signal amplitudes indexed as 0, 1, 2, and 3. However, the device without MD option has only 1 signal amplitude which is the index 1 out of those 4 amplitudes. The reason is to decouple the phase of reference for demodulator (index 0) from the phase of signal output (index 1).

So in summary, the user of MFLI without MF-MD option has only one choice for output amplitude and it is index 1

@einsmein
Copy link
Contributor Author

@tobiasah @mehdialem Thanks for the quick reply, and for the explanation. I still don't understand why the output signal params have to be at index 1 instead of 0, but I assume that comes from some lower-level implementation.

@mehdialem
Copy link
Collaborator

@einsmein, Let me explain it further using the screenshot below. One would like to have independent phases for signal generation (red-box phase in the screenshot with index 1) and for signal demodulation (green-box phase in the screenshot with index 0). Now suppose that the amplitude has an index of 0 in your script and you upgrade your MFLI with the MF-MD option. In this case your old script results in a different behavior for the new situation because it uses index 0 which means the signal output has the same phase of demodulator (green box). So this kind of indexing avoids behavioral incompatibility between instruments with and without options. I hope it answers your question.

mfli_base

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants