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

calling compiled_circuits on qiskit_superstaq.superstaq_job.SuperstaqJob manually retrieved through a backend throws an exception #843

Open
CuriousCesium opened this issue Nov 13, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@CuriousCesium
Copy link

CuriousCesium commented Nov 13, 2023

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.

@CuriousCesium CuriousCesium added the bug Something isn't working label Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant