-
Notifications
You must be signed in to change notification settings - Fork 0
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
unable to communicate with device #7
Comments
Hi @palnitishh. What is the output of
Actually, @palnitishh -- can you move this to a new issue? And can you tell me details of the device you're using? Based on the error message, It looks like the *IDN command didn't work and the returned value from the device is an empty string. |
From @palnitishh Hi @gadamc |
From @palnitishh the QC terminal is able to do *IDN command |
@palnitishh -- I'm not 100% sure, but the output from the QC terminal seems to suggest that your device is QC 9528. https://www.quantumcomposers.com/pulse-delay-generator-9520. This python package (qt3uw/qcsapphire) was only ever tested with QC 9200 devices. A quick review of the manual for the 9520 and the 9200 reveals some differences in USB communication. The 9520 uses USB 1 specs and the 9200 uses USB 2 specs. Relatedly, they use different default BAUD rates. |
From @palnitishh
hi, I am trying to communicate to the COM4 in my case using
pulser = qcsapphire.Pulser('COM4')
but end up with error
IndexError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_8180\1879743324.py in
----> 1 pulser = qcsapphire.Pulser('COM4')
~\AppData\Roaming\Python\Python39\site-packages\qcsapphire\pulser.py in init(self, port, timeout)
88 self.open()
89 self._command_history = collections.deque(maxlen=1000)
---> 90 self._read_hardware_versions()
91
92 ## PRIVATE
~\AppData\Roaming\Python\Python39\site-packages\qcsapphire\pulser.py in _read_hardware_versions(self)
175
176 def _read_hardware_versions(self):
--> 177 res_str = self.query('*IDN?')
178 _, model_number, serial_number, firm_fpga = res_str.split(',')
179 self.model_number = model_number
~\AppData\Roaming\Python\Python39\site-packages\qcsapphire\pulser.py in query(self, data)
223 return_val = self._readlines()
224 else:
--> 225 return_val = self._readline()
226
227 return return_val
~\AppData\Roaming\Python\Python39\site-packages\qcsapphire\pulser.py in _readline(self)
162 '''
163 rdata = self._inst.readline()
--> 164 return self._check_error(rdata.decode('utf-8').strip())
165
166 def _readlines(self):
~\AppData\Roaming\Python\Python39\site-packages\qcsapphire\pulser.py in _check_error(self, string)
128 except Exception as e:
129 self._readlines() #flush out the read return on error to be ready for next query
--> 130 raise e
131
132 return string
~\AppData\Roaming\Python\Python39\site-packages\qcsapphire\pulser.py in _check_error(self, string)
107
108 try:
--> 109 if string[0] == '?':
110 if string[1] == '1':
111 raise Exception(f'Incorrect prefix, i.e. no colon or * to start command. Last write command == {self.last_write_command}')
IndexError: string index out of range
what do you think, am I mising some prequisites or something else is wrong?
The text was updated successfully, but these errors were encountered: