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

ManualParameter and tests #39

Merged
merged 6 commits into from
Feb 22, 2016
Merged

ManualParameter and tests #39

merged 6 commits into from
Feb 22, 2016

Conversation

alexcjohnson
Copy link
Contributor

@AdriaanRol @damazter @MarkusJacobsen @guenp this is re: #36 - pretty simple usage:

self.add_parameter('bias_resistor', parameter_class=ManualParameter)

with an optional initial_value

ManualParameter inherits the default vals=Numbers() from Parameter - I think this is better than Anything() as a default but I guess it depends on how it will get used.

@damazter
Copy link
Contributor

I think Instrument should be an optional argument in ManualParameter,
This is related to #40

@alexcjohnson
Copy link
Contributor Author

I think Instrument should be an optional argument in ManualParameter,
see also the pull request ill post in a few minutes

Yes, that's awkward - curious to see your solution 😄 - note that Parameter had better strip it out if it's a kwarg, so it doesn't get passed along to Metadatable

@alexcjohnson
Copy link
Contributor Author

Just a github usage note (for everyone, but I noticed @damazter do it here) - it's better to make a new comment than to edit an existing one, unless you're just fixing a typo or something, because edits do not trigger email notifications

@AdriaanRol
Copy link
Contributor

@alexcjohnson

I like the syntax and ease of use. I just pulled it in and will probably use it to replace some of the get-set constructs in my qubit object. Not all untill this is either merged in or we set on an alternative.

Yesterday I had some discussion with @damazter on this subject. (see also #40 ). I think that this functionality is applicable more generally than the instrument class but not as general as the bare instrument class. Therefore it makes sense to insert a different parameter in the inheritance tree between the parameter (base class) and the instrument parameter.

This also relates to another idea we were having (but did not agree on optimal implementation yet) which relates to wrapping of arbitrary functions. Suppose you have some function which you want to loop (and get as if it were a param). That could either be an extra possiblity in the syntax of the loop (increases complexity) or you create a new parameter for which the function is an input argument on instantiating. This is the exact same as when creating a par in an instrument (EDIT: and setting get_cmd = your function) except that there is no instrument there.

@damazter
Copy link
Contributor

This looks perfect to me,
this indeed gives similar flexibility to what I had in mind but without the extra class involved (which is a style choice I guess)

@alexcjohnson
Copy link
Contributor Author

Great, I'm going to take your comments @damazter and @AdriaanRol as a 💃 and I'll take care of sync/async pairing in the Parameter base class in another PR (that's going to take some testing, and I'd like to get #38 merged in before I do too much more with tests)

alexcjohnson added a commit that referenced this pull request Feb 22, 2016
@alexcjohnson alexcjohnson merged commit c533686 into master Feb 22, 2016
@akhmerov
Copy link
Contributor

👍 from me as well, seems useful to the numerics applications.

@alexcjohnson alexcjohnson deleted the holder-param branch February 22, 2016 14:00
@alexcjohnson alexcjohnson mentioned this pull request Feb 22, 2016
@guenp
Copy link
Contributor

guenp commented Feb 22, 2016

if it makes any difference, 💃 👍 from me as well

@AdriaanRol
Copy link
Contributor

Awesome 👍

@AdriaanRol AdriaanRol mentioned this pull request Feb 23, 2016
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Jun 22, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Jun 27, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Jul 7, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Jul 18, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 3, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 3, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 7, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 9, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 10, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 16, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 18, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Aug 22, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Sep 21, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
nataliejpg pushed a commit to nataliejpg/Qcodes that referenced this pull request Oct 11, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Oct 27, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Nov 21, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
jenshnielsen referenced this pull request in jenshnielsen/Qcodes Nov 23, 2017
* docs: Example notebook for QDev specifics

* docs: reader-friendly linewraps
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

Successfully merging this pull request may close these issues.

5 participants