Modify manual output control to make it compatible with OPX1000#318
Modify manual output control to make it compatible with OPX1000#318
Conversation
Modified README so that it includes OPX1000 use cases Add test file (should be removed later)
This comment has been minimized.
This comment has been minimized.
| if close_previous: | ||
| self.qmm.close_all_quantum_machines() | ||
| self.qmm.close_all_qms() | ||
| # self.qmm.close_all_quantum_machines() |
There was a problem hiding this comment.
Please remove code if not needed
| self.analog_qm = self.qmm.open_qm(self.analog_config, False) | ||
| self._start_digital_qms() | ||
| self._start_analog() | ||
| print("If an element is turned on without an explicit amplitude, the amplitude defaults to 0.5 V.") |
There was a problem hiding this comment.
Better practice towards production grade code will be to use logging module. Logging can stay in the code and just be configured differently for development vs. production.
| for port_int in analog_ports: | ||
| if isinstance(port_int, tuple): | ||
| if len(port_int) == 2: | ||
| con_number = (port_int[0] - 1) // 10 + 1 |
There was a problem hiding this comment.
As this calculation repeats many times in the code, please use something like:
def compute_con_number(port_index, group_size=10):
return (port_index - 1) // group_size + 1
con_number = compute_con_number(port_int[0])
|
|
||
| if isinstance(port_int, tuple): | ||
| port_str = str(port_int) | ||
| port1 = (port_int[0] - 1) % 10 + 1 |
There was a problem hiding this comment.
Same for this calculation. Please define a function instead of replicating code
| "I": (con, port1), | ||
| "Q": (con, port2), | ||
| }, | ||
| "intermediate_frequency": 0e6, |
There was a problem hiding this comment.
A bit of neat picking ;) , will be better to define consts to all frequencies e.g: INTERMEDIATE_FREQUENCY = 0e6
Same apply for other frequencies explicitly written in the code.
Summary
|
|
@OziEgri I have modified according to your comments. Please let me know if you have further comments! Thank you. |
Update the manual output control python file so that it is compatible with OPX1000.
Also updated the manual so that it includes the new compatibility.