Skip to content

refer to instruments from another instrument #185

@peendebak

Description

@peendebak

When trying to write a virtual gates instrument I encountered the following issue. First I create two drivers:

server_name='test'
ivvi1 = qcodes.instrument_drivers.QuTech.IVVI.IVVI(name='ivvi1', server_name=server_name, adress='ASRL2')
ivvi2 = qcodes.instrument_drivers.QuTech.IVVI.IVVI(name='ivvi2', server_name=server_name, adress='ASRL3')

Then I create a virtual instrument mapping gates to the combination of the two:

gate_map = {
    'L': (0, 8),  'M': (0, 9),  'R': (1, 11), ...
}
gates = virtual_gates(name='gates', gate_map=gate_map, server_name=server_name, instruments=[ivvi1, ivvi2])

The virtual_gates object (a subclass of qcodes.Instrument) automatically creates parameters with the names from gate_map and creates get and set functions mapping to the IVVI drivers. This works for server_name=None, but fails otherwise.

The problem is that when virtual_gates is created on a server the argument instruments=[ivvi1, ivvi2 is being pickled, which is now allowed.

How to solve this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions