Is it possible to get the statevector while running quantum circuits on IBMQ real hardware? If getting the statevector is not possible can I still calculate the fidelity of a qubit somehow?. What I want is to calculate the fidelity of q0, q1 and q2 in the following circuit after running it on real quantum hardware.
The code I am using is as follows:
import numpy as np
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import IBMQ, Aer, transpile, assemble
from qiskit.visualization import plot_histogram, plot_bloch_multivector, array_to_latex
from qiskit.extensions import Initialize
from qiskit.tools.monitor import job_monitor
from qiskit.quantum_info import random_statevector,partial_trace,state_fidelity
from math import pi, sqrt
from qiskit import IBMQ, transpile
from qiskit import IBMQ
IBMQ.load_account()
IBMQ.providers()
provider = IBMQ.get_provider(hub='ibm-q') # replace by your runtime provider
backend = provider.get_backend('ibmq_lima')
psi= random_statevector(2)
fidelityQ00=[]
# Display it nicely
display(array_to_latex(psi, prefix="|\\psi\\rangle ="))
# Show it on a Bloch sphere
plot_bloch_multivector(psi)
qc = QuantumCircuit(3)
qc.initialize(psi, 0)
qc.u(np.arccos(1/sqrt(5)), 0,0,1)
qc.cx(1,2)
qc.u(np.arccos(sqrt(5)/3), 0,0,2)
qc.cx(2,1)
qc.u(np.arccos(2/sqrt(5)), 0,0,1)
qc.cx(0,1)
qc.cx(0,2)
qc.cx(1,0)
qc.cx(2,0)
qc.draw(output='mpl')
#qc.save_statevector()
#t_qc = transpile(qc, backend, optimization_level=3)
#job = backend.run(t_qc)
#job_monitor(job)
#exp_result = job.result()
#exp_counts = exp_result.get_statevector(qc)