client-superstaq
client-superstaq copied to clipboard
calling `compiled_circuits` on `qiskit_superstaq.superstaq_job.SuperstaqJob` manually retrieved through a backend throws an exception
What is happening?
A Superstaq job (superstaq_job
) was submitted to cq_hilbert_qpu
backend.
I can view compiled circuit(s) associated with that job by calling superstaq_job.compiled_circuits()
. No issue with that so far.
However, sometimes I want to check old superstaq jobs submitted days before, and for that I use
superstaq_job = backend.retrieve_job(<superstaq job id>)
But when I call self.compiled_circuits()
on that job, I get the following exception raised:
AttributeError Traceback (most recent call last)
Cell In[95], line 1
----> 1 superstaq_job.compiled_circuits(index=0)
File ~/miniconda3/envs/superstaq/lib/python3.8/site-packages/qiskit_superstaq/superstaq_job.py:225, in SuperstaqJob.compiled_circuits(self, index)
222 compiled_qc.metadata = in_qc.metadata
223 return compiled_circuits
--> 225 compiled_circuit = self._get_circuits("compiled_circuit", index)
226 input_circuit = self._get_circuits("input_circuit", index)
227 compiled_circuit.metadata = input_circuit.metadata
File ~/miniconda3/envs/superstaq/lib/python3.8/site-packages/qiskit_superstaq/superstaq_job.py:184, in SuperstaqJob._get_circuits(self, circuit_type, index)
181 if circuit_type not in ("input_circuit", "compiled_circuit"):
182 raise ValueError("The circuit type requested is invalid.")
--> 184 job_ids = self._job_id.split(",")
185 if not all(
186 job_id in self._job_info and self._job_info[job_id].get(circuit_type)
187 for job_id in job_ids
188 ):
189 self._refresh_job()
AttributeError: 'function' object has no attribute 'split'
How can we reproduce the issue?
See the problem description.
What should happen?
Use self._job_id().split(",")
instead of self.job_id.pslit(",")
?
Environment
- Superstaq version:
- general-superstaq version: 0.4.29
- cirq-superstaq version: N/A
- qiskit-superstaq version: 0.4.29
- Operating system: Ubuntu 20.04.5 LTS
- Python version: 3.8.17
- Any other relevant dependencies:
Any additional context?
cq_hilbert_qpu
backend was used.