0
$\begingroup$

I run a test on tomography of two circuits like this:

from qiskit import QuantumCircuit, execute, BasicAer

backend = BasicAer.get_backend('qasm_simulator')

qc1 = QuantumCircuit(2,name='qc1')
qc1.h(0)
qc1.cx(0, 1)
tm1=state_tomography_circuits(qc1,[0,1]);

qc2 = QuantumCircuit(2)
qc2.h(0)
tm2=state_tomography_circuits(qc2,[0,1]);

tm=tm1+tm2;



job = execute(tm, backend, shots=4321);
result= job.result();

tmr1=StateTomographyFitter(result,tm1);
b1=tmr1.fit(method='lstsq');

tmr2=StateTomographyFitter(result,tm2);
b2=tmr2.fit(method='lstsq');

b1-b2

So you see that I combine two lists of circuits and run them. Later I want to extract the result for each of the circuits. However the output of this code is 0 (so I get exactly the same state). I think something did not quite work but cannot figure where. Any instruction would be very appreciated.

$\endgroup$

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.