5
$\begingroup$

I'm trying to understand what the use case of a superop simulator would be. My understanding is that density matrix is generally more resource intensive than state vector, but it has additional capabilities to support noisy channels and such. And also my understanding is that every circuit has a corresponding superop that can be extracted from it via QIS, but I believe that can be obtained via calculation rather than simulation. So I don't understand what a superop simulator is for. I know it's even more resource intensive than density matrix, but what additional capabilities does it provide?

New contributor
lobsterism is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$
5
$\begingroup$

If you have an ideal quantum circuit, you can easily get its superoperator representation using qiskit.quantum_info.SuperOp as follows,

qc = QuantumCircuit(1)
qc.x(0)

super_op = SuperOp(qc)
array_to_latex(super_op)

The output will be $$ \left[\begin{matrix} 0 & 0 & 0 & 1\\ 0 & 0 & 1 & 0\\ 0 & 1 & 0 & 0\\ 1 & 0 & 0 & 0\\ \end{matrix}\right] $$

And to see how a quantum state is evolved by applying this operator:

rho1 = DensityMatrix.from_label('0')

rho2 = rho1.evolve(super_op)
rho2.draw('latex')

However, you can not use this method to get the superoperator representation of the circuit in the presence of errors. Instead, you can use superop simulator, which accepts a NoiseModel as a parameter

# Add save_superop instruction to save the simulator state to the returned results:
qc.save_superop()

# Get noise model:
provider = IBMQ.load_account()
backend = provider.get_backend('ibmq_16_melbourne')
noise_model = NoiseModel.from_backend(backend)

# Get the superoperator:
noisy_simulator = AerSimulator(method = 'superop', noise_model = noise_model)
result = noisy_simulator.run(qc).result()
super_op_array = result.data()['superop']
array_to_latex(super_op_array)

And in this case the output will be somthing like that: $$ \left[\begin{matrix} 0.00094 & 0 & 0 & 0.99979\\ 0 & 0 & 0.99907 & 0\\ 0 & 0.99907 & 0 & 0\\ 0.99906 & 0 & 0 & 0.00021\\ \end{matrix}\right] $$

$\endgroup$

Your Answer

lobsterism is a new contributor. Be nice, and check out our Code of Conduct.

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.