0
$\begingroup$

In the following circuit, I want to perform tomography on the qubits 0,1,2,3 after qubits 4,5,6,7,8,9 are measured.

Circuit

I run the circuit using with measurement gates on qubits 4,5,6,7,8,9 with the following code:

backend = QasmSimulator()
backend_options = {'method': 'statevector'}
job = qiskit.execute(circuit, backend, backend_options=backend_options, shots = 1)
job_result = job.result()
state_vector = job_result.get_statevector(circuit)

After that, I run tomography on the statevector I obtain in the above code.

Following the official tutorial, I perform tomography using this:

from qiskit_experiments.library import StateTomography

qstexp1 = StateTomography(state_vector, measurement_qubits = [0,1,2,3])
qstdata1 = qstexp1.run(backend, seed_simulation=100).block_for_results().

But the tomography code runs for a long time and then I get the message

Server unavailable or unreachable. Would you like to restart?

I am running this code on IBM Quantum Lab.

What am I doing wrong here? Is this too big a state vector to be doing tomography on? And is my approach of first simulating the full circuit and then using the posterior statevector for tomography correct?

$\endgroup$
4
  • $\begingroup$ QasmSimulator doesn't generate state vector result, you should consider using StatevectorSimulator or AerSimulator. $\endgroup$
    – poig
    Jun 23 at 22:58
  • $\begingroup$ your question has a lot of errors, please review them, and edit the question. $\endgroup$
    – poig
    Jun 23 at 23:12
  • $\begingroup$ for the Server unavailable or unreachable. Would you like to restart? it is Jupiter notebook, try to follow instruction: quantum-computing.ibm.com/lab/docs/iql/…. related Jupyter Discourse Forum: discourse.jupyter.org/t/… related github issue: github.com/jupyterlab/jupyterlab/issues/9324 $\endgroup$
    – poig
    Jun 23 at 23:22
  • $\begingroup$ I changed to AerSimulator and I am able to run tomography. Thank You $\endgroup$ Jun 24 at 4:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.