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?


1 Answer 1


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

qc = QuantumCircuit(1)

super_op = SuperOp(qc)

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)

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:

# 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']

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] $$

  • $\begingroup$ I had the same question and I think what OP was asking is, even with noise, why is this considered a "simulation" since it is deterministic? But it seems that the answer is just because qiskit considers anything with noise a "simulation", even if the underlying state representation handles noise deterministically. Note this simulator doesn't even offer the ability to provide inputs or measurements, the documentation says it is just a calculator. $\endgroup$
    – Dax Fohl
    Sep 16, 2021 at 1:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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