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

CTMP mitigator over corrects for 8Q stabilizer #575

Open
nonhermitian opened this issue Apr 26, 2021 · 0 comments
Open

CTMP mitigator over corrects for 8Q stabilizer #575

nonhermitian opened this issue Apr 26, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@nonhermitian
Copy link
Contributor

Informations

  • Qiskit Ignis version: latest
  • Python version:
  • Operating system:

What is the current behavior?

For an 8Q X-stabilizer on a GHZ, the CTMP over corrects from the expected value of 1.0 to about 1.33 on ibmq_dublin. Standard tensored mitigation corrects to ~0.95.

Steps to reproduce the problem

import numpy as np
from qiskit import *
from qiskit.providers.aer import QasmSimulator, noise

from qiskit.ignis.mitigation import (expectation_value, 
                                     expval_meas_mitigator_circuits,
                                     ExpvalMeasMitigatorFitter)

IBMQ.load_account()
pro= IBMQ.get_provider(project='internal-test')
sim = QasmSimulator()
backend = pro.backends.ibmq_dublin



# Test Circuit Measure <XXXXXXXX> stabilizer
# Eight qubit stabilizer
qubits=[1, 4, 7, 10, 12, 2, 3, 5]

qc = QuantumCircuit(8, 8)
qc.h(0)
qc.cx(0, 1)
qc.cx(1, 2)
qc.cx(2, 3)
qc.cx(3, 4)
qc.cx(0, 5)
qc.cx(5, 6)
qc.cx(6, 7)
qc.h(range(8))
qc.measure(range(8), range(8))

shots = 8192
#Get ideal result and raw counts from backend
result_target = execute(qc, sim, shots=shots, initial_layout=qubits).result()
result_noise = execute(qc, backend, shots=shots, initial_layout=qubits).result()
counts_target = result_target.get_counts(0)
counts_noise = result_noise.get_counts(0)

circuits1, metadata1 = expval_meas_mitigator_circuits(len(qubits), method='tensored')

job_cal1 = execute(circuits1, backend, shots=8192, initial_layout=qubits)
result_cal1 = job_cal1.result()

ctmp_mitigator = ExpvalMeasMitigatorFitter(result_cal1, metadata1).fit()
print('CTMP mitigated:', expectation_value(counts_noise, meas_mitigator=ctmp_mitigator)[0])

gives

CTMP mitigated: 1.3377458081929379

What is the expected behavior?

Suggested solutions

@nonhermitian nonhermitian added the bug Something isn't working label Apr 26, 2021
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

1 participant