Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Gateset Tomography does not correctly estimate readout errors #404

Closed
ChriPiv opened this issue May 12, 2020 · 1 comment
Closed

Gateset Tomography does not correctly estimate readout errors #404

ChriPiv opened this issue May 12, 2020 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@ChriPiv
Copy link
Contributor

ChriPiv commented May 12, 2020

Informations

  • Qiskit Ignis version: 0.4.0.dev0+e3b227e
  • Python version: 3.7.3
  • Operating system: Debian 10 (WSL)

What is the current behavior?

GST should give us an estimate of the readout error in the circuit, by giving us a single POVM measurement operator. In the current implementation in qiskit, this POVM operator seems to be a perfect projection.

Steps to reproduce the problem

Following code runs a GST on a simple basis set, using a noise_model that includes readout noise. GST should be able to give us an estimate of that readout error.

from qiskit import *
from qiskit.extensions import HGate
from qiskit.compiler import transpile
from qiskit.providers.aer.noise import *
from qiskit.ignis.verification.tomography.basis.gatesetbasis import default_gateset_basis
from qiskit.ignis.verification.tomography import *

# create some noise model
noise_model = NoiseModel()
depol_error = depolarizing_error(0.1, 1)
readout_error = ReadoutError([[0.9, 0.1], [0.15, 0.85]])
noise_model.add_all_qubit_quantum_error(depol_error, ['u2', 'u3'])
noise_model.add_all_qubit_readout_error(readout_error)

# create GST circuits
gate = HGate()
basis = default_gateset_basis()
basis.add_gate(gate)
circuits = gateset_tomography_circuits(gateset_basis=basis)
for i in range(len(circuits)):
    circuits[i] = transpile(circuits[i], basis_gates=['id', 'u2', 'u3'])

# Run GST circuits
job = qiskit.execute(circuits, Aer.get_backend('qasm_simulator'), noise_model=noise_model, shots=10000)
result = job.result()

# Run GST fitter
fitter = GatesetTomographyFitter(result, circuits, basis)
result_gates = fitter.fit()
print(result_gates.keys())
# 'E', 'rho', 'Id', 'X_Rot_90', 'Y_Rot_90', 'h'
print(result_gates['rho'])
# [[1., 0.], [0., 0.]]
print(result_gates['E'])
# [[1., 0.], [0., 0.]]

What is the expected behavior?

The above code should not return a perfect projection [[1., 0.], [0., 0.]] for result_gates['E'].

Suggested solutions

@gadial
Copy link
Contributor

gadial commented May 18, 2020

This was a whole missing piece (thanks for catching it!), fixed in #408 .

@chriseclectic chriseclectic added this to the 0.3.1 milestone May 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants