Run tomography experiments


In [2]:
from __future__ import print_function
import matplotlib.pyplot as plt
from mock import MagicMock
import json

import numpy as np
from grove.tomography.state_tomography import do_state_tomography
from grove.tomography.utils import notebook_mode
from grove.tomography.process_tomography import do_process_tomography


from pyquil.gates import CZ, RY
from pyquil.api import QVMConnection, QPUConnection, get_devices, Job
from pyquil.quil import Program

try:
    # inline plotting
    %matplotlib inline
    # get fancy TQDM progress bars
    notebook_mode(True)
except:
    pass

NUM_SAMPLES = 2000

# Set this flag if you want to send programs to Forest.
SEND_PROGRAMS = False

if SEND_PROGRAMS:
    qvm = QVMConnection()
    # QPU
    online_devices = [d for d in get_devices() if d.is_online()]
    if online_devices:
        d = online_devices[0]
        qpu = QPUConnection(d.name)
        print("Found online device {}, making QPUConnection".format(d.name))
    else:
        qpu = QVMConnection()
        print("Could not find online device, defaulting to QVM")
else:
    qvm = MagicMock(QVMConnection)
    qvm_job = MagicMock(Job)
    qvm.wait_for_job.return_value = qvm_job
    qvm_job.result.side_effect = json.load(open("qvm.json", 'r'))
    qpu = MagicMock(QPUConnection)
    qpu_job = MagicMock(Job)
    qpu.wait_for_job.return_value = qpu_job
    qpu_job.result.side_effect = json.load(open("qpu.json", 'r'))


Found online device 19Q-Acorn, making QPUConnection

Entangled state tomography

Create a Bell state


In [3]:
qubits = [5, 10]
bell_state_program = Program(RY(-np.pi/2, qubits[0]),
                             RY(np.pi/2, qubits[1]),
                             CZ(qubits[0],qubits[1]),
                             RY(-np.pi/2, qubits[1]))

Run on QPU & QVM, and calculate the fidelity


In [4]:
%%time
print("Running state tomography on the QPU...")
state_tomography_qpu, _, _ = do_state_tomography(bell_state_program, NUM_SAMPLES, qpu, qubits)
print("State tomography completed.")
print("Running state tomography on the QVM for reference...")
state_tomography_qvm, _, _ = do_state_tomography(bell_state_program, NUM_SAMPLES, qvm, qubits)
print("State tomography completed.")


Running state tomography on the QPU...
job oHWAyTdThYslpEXL is currently running
job zJMyuPUkIZMoGFXf is currently running
job ICGVxNPUtsVthzCg is currently queued at position 0
job ICGVxNPUtsVthzCg is currently running
job SDyVuwvumiHJUEzv is currently running

job GCESOAjqKeyBZaYL is currently queued at position 0
job CXayAFHDqRhepVYR is currently queued at position 0
job CXayAFHDqRhepVYR is currently running
job WjjvdWQKOemEDQWb is currently queued at position 0
job jyhdBwiTVDgMWITh is currently running
job zzeYjvltsxJTiXqh is currently queued at position 0
job zzeYjvltsxJTiXqh is currently running
job vnVCNmFNDuWxtCLo is currently queued at position 0
job nnOKjCrkETwOLyMv is currently running
job IybzYYaLAtwoHWla is currently queued at position 0
job bdgqbpXLhwEHNsTR is currently queued at position 0
job bdgqbpXLhwEHNsTR is currently running
job CdklwcGjZqjHCazc is currently running
job UangZhPxwpwVeHOo is currently running
job osYJMiVAAHSFwklP is currently queued at position 0
job osYJMiVAAHSFwklP is currently running
job SicdBJXumNoclsFH is currently queued at position 0
job BxAKVtMJqpCunCdY is currently running
job ircBsZUULbQBdRSR is currently queued at position 0
job ircBsZUULbQBdRSR is currently running
job qRYGtSJfFaljaZaV is currently running

State tomography completed.
Running state tomography on the QVM for reference...

State tomography completed.
CPU times: user 7.35 s, sys: 549 ms, total: 7.9 s
Wall time: 1min 16s

In [5]:
state_fidelity = state_tomography_qpu.fidelity(state_tomography_qvm.rho_est)

if not SEND_PROGRAMS:
    EPS = .01
    assert np.isclose(state_fidelity, 1, EPS)

qpu_plot = state_tomography_qpu.plot();
qpu_plot.text(0.35, 0.9, r'$Fidelity={:1.1f}\%$'.format(state_fidelity*100), size=20)

state_tomography_qvm.plot();


Process tomography

Perform process tomography on a controlled-Z (CZ) gate


In [6]:
qubits = [5, 10]
CZ_PROGRAM = Program([CZ(qubits[0], qubits[1])])
print(CZ_PROGRAM)


CZ 5 10

Run on the QPU & QVM, and calculate the fidelity


In [7]:
%%time
print("Running process tomography on the QPU...")
process_tomography_qpu, _, _ = do_process_tomography(CZ_PROGRAM, NUM_SAMPLES, qpu, qubits)
print("Process tomography completed.")
print("Running process tomography on the QVM for reference...")
process_tomography_qvm, _, _ = do_process_tomography(CZ_PROGRAM, NUM_SAMPLES, qvm, qubits)
print("Process tomography completed.")


Running process tomography on the QPU...
job eeQGCHhgZaqxeRjW is currently running
job VtnjnqNrrNAAcQTR is currently queued at position 0
job VtnjnqNrrNAAcQTR is currently running
job lWKMkkMDYSPlPzVn is currently queued at position 0
job nCYEnOsFRjMgQlrP is currently running

job UEgFoFFKoSweSUJu is currently running
job sUAtqbSGykrjREGB is currently queued at position 0
job sUAtqbSGykrjREGB is currently running
job JVBDeUcDEMlSYuJc is currently running
job QayrpNEUUdfgATnk is currently queued at position 0
job QayrpNEUUdfgATnk is currently running
job DBtcueqMWjegbyiV is currently running
job KqtlzjfKihYdjQnx is currently queued at position 0
job KqtlzjfKihYdjQnx is currently running
job fdZFQBIVDOexPitO is currently running
job JBGALJcuNhzzHNqk is currently queued at position 0
job JBGALJcuNhzzHNqk is currently running
job oebRggCoxgOsGBIM is currently running
job zrGSOhmvOOZjLtaW is currently queued at position 0
job zrGSOhmvOOZjLtaW is currently running
job IZDatokfJIQIuHEx is currently running
job suQZKTXQbSOVLVev is currently queued at position 0
job epPqVqtEHaaNQwJU is currently queued at position 0
job epPqVqtEHaaNQwJU is currently running
job bolbGyeAUXBCiLAi is currently running
job lVBXYsUApSbRVgkv is currently running
job MndbgMJHfRBTpvqC is currently queued at position 0
job MndbgMJHfRBTpvqC is currently running
job QMHHtaGFigZkwekI is currently running
job hnccwrVsBPMzCOuT is currently running
job sGgoLqZkSwVTkfrc is currently queued at position 0
job sGgoLqZkSwVTkfrc is currently running
job TKWKnuYLJgxdfuqA is currently running
job vvjKFAqfHYfQWBHF is currently queued at position 0
job vvjKFAqfHYfQWBHF is currently running
job SJMxbJjhjUZODROR is currently running
job EwSqPNnBYaPHISrz is currently queued at position 0
job DfjfeuasjftQiLJV is currently queued at position 0
job DfjfeuasjftQiLJV is currently running
job tOTJSgZHIHGDrqdM is currently running
job dxUaSrmpUTdfywpI is currently queued at position 0
job FnkqPuTtnUIBuctb is currently queued at position 0
job FnkqPuTtnUIBuctb is currently running
job xMmtuhYhDdpPWucj is currently queued at position 0
job pUcbUvzoOIcTmqwB is currently running
job TyDUrHGLEWerLrkp is currently queued at position 0
job TyDUrHGLEWerLrkp is currently running
job QIngumxIYWTAOCcW is currently queued at position 0
job QwOWrWnMRJuLcOVK is currently queued at position 0
job gLyrmukkPakFjtXB is currently queued at position 0
job azSZBeudPRPXhuDq is currently queued at position 0
job azSZBeudPRPXhuDq is currently running
job peHutzNuGDztpPGB is currently running
job NawZprjWcFprGOvX is currently queued at position 0
job KAbvqAPHdYGSRfaa is currently queued at position 0
job KAbvqAPHdYGSRfaa is currently running
job HFrsHgaLpQFjmwcI is currently running
job yFrtjQHKsSOlkKUi is currently queued at position 0
job qKvNuVIsdUbmYpsC is currently queued at position 0
job qKvNuVIsdUbmYpsC is currently running
job UPbMzRfVcLrgybfA is currently running
job mCoOJHzvMQOxmRjC is currently running
job mCoOJHzvMQOxmRjC is currently running
job BVOlKbLkCTjSqJio is currently queued at position 0
job TBImvPANLnvgjRWB is currently queued at position 0
job DIXnPcwXBpLfUTjn is currently running
job SVQkHFXgqFMXeCOy is currently queued at position 0
job SVQkHFXgqFMXeCOy is currently running
job SzZybkDRQyzwaxNI is currently running
job KbDLXBrIxhSieUHn is currently queued at position 0
job yqwORFptLdBHoZQs is currently queued at position 0
job yqwORFptLdBHoZQs is currently running
job nrFdLMMuwNWcqAtz is currently running
job SyIhcbkckXVIYqNp is currently queued at position 0
job TzMHIemsOSgbtuaB is currently queued at position 0
job TzMHIemsOSgbtuaB is currently running
job ErCLpPOpfUTIeejQ is currently queued at position 0
job RiwxibnGbFejqlxX is currently running
job MhYfRUqXzsRSblTP is currently queued at position 0
job MhYfRUqXzsRSblTP is currently running
job GyFcFZfwxyGQJuzu is currently running
job dAzwkXKqFTrxAxVb is currently queued at position 0
job yoJOhnEuqunDusml is currently queued at position 0
job yoJOhnEuqunDusml is currently running
job ofEHvzaHcHoBEprY is currently running
job IUHfqEHbCqOGXVuX is currently running
job jbSRdVGrloCKPryz is currently queued at position 0
job jbSRdVGrloCKPryz is currently running
job EdViBxbtilMrCybz is currently queued at position 0
job EVtrvQSroSpgQNxl is currently running
job UajWBnPNVMXTthMc is currently queued at position 0
job UajWBnPNVMXTthMc is currently running
job WGsWTtcaGVQaxars is currently running
job FXwrRqnHuELgGBBJ is currently queued at position 0
job jTldVrZiHUFdhvga is currently queued at position 0
job jTldVrZiHUFdhvga is currently running
job QfUbgxeOolTkjMOr is currently running
job itXoVyuEQYfOCyny is currently queued at position 0
job jzqCwRDJpiyTSwMl is currently queued at position 0
job jzqCwRDJpiyTSwMl is currently running
job dejCSkhvLEUljVta is currently running
job VHcCxUznEJSEcPLZ is currently running
job yaLGxSBzPmDYigmi is currently queued at position 0
job ypbJIwQeuOglhpOI is currently running
job rLMdYqxbtVedBbJD is currently running
job CWDzEiUtlUzIbQHA is currently queued at position 0
job CWDzEiUtlUzIbQHA is currently running
job HRLSPKXmFOrnnQXO is currently running
job dfRoTzaslnPeDifH is currently running
job tOSHMlrdNrVkgbrZ is currently queued at position 0
job tOSHMlrdNrVkgbrZ is currently running
job qglwQySEwfgrLXlh is currently running
job WYrAxftZciFOqooi is currently running
job QMaQtbwdzZhItYFP is currently queued at position 0
job QMaQtbwdzZhItYFP is currently running
job HeKVSMVgFXDbudVH is currently running
job NazbKYslXITurujG is currently running
job GZzSFRdYQDzCXoDm is currently queued at position 0
job GZzSFRdYQDzCXoDm is currently running
job jXkUIYqDesWrOHsy is currently running
job DSIxmqZZtGKEhhtT is currently queued at position 0
job aMBZwGNFOWfZIJMg is currently queued at position 0
job aMBZwGNFOWfZIJMg is currently running
job uPZQcOUjcAkFtjRI is currently queued at position 0
job nOGNguDwIwhZSZFD is currently running
job FXebeWiwrdBGzsGj is currently queued at position 0
job FXebeWiwrdBGzsGj is currently running
job NFcPAvryXaWqrfGZ is currently running
job pMHqyxCqtBfzrtGh is currently queued at position 0
job pMHqyxCqtBfzrtGh is currently running
job okgiZXFqTxzXEsQW is currently running
job eaDjJQmPRXpukMKu is currently running
job kaQRiVoWNumwikdq is currently running
job KqweNmAYoLTisiFw is currently queued at position 0
job KqweNmAYoLTisiFw is currently running
job TnkyPFdnKlrdWeDY is currently running
job uMfjZdumsMpUqCXa is currently running
job FotDgwsPUNyYGUjF is currently queued at position 0
job FotDgwsPUNyYGUjF is currently running
job BNvFprmOrYVQvIMQ is currently queued at position 0
job MUBJhnydeQOYeYNp is currently queued at position 0
job bFJIZGccfrAvETod is currently queued at position 0
job bFJIZGccfrAvETod is currently running
job eLKysVfXjOiDplpt is currently queued at position 0
job eLKysVfXjOiDplpt is currently running
job WmmqpHzYxgqMmazZ is currently queued at position 0
job WmmqpHzYxgqMmazZ is currently running
job KdKcyuunCqVJWVJt is currently running
job fClSvRVGjwVIvkKt is currently running
job tgzkIzLSDindwCqo is currently queued at position 0
job tgzkIzLSDindwCqo is currently running
job kEoHOVxsOyxsgknW is currently queued at position 0
job QSiYxSgnbfdVVwBv is currently running
job BbzBuzbVZxhNZHJX is currently queued at position 0
job BbzBuzbVZxhNZHJX is currently running
job AKXeWaKJqdCTGBhp is currently queued at position 0
job nJovxpbekjVUzeWz is currently queued at position 0
job nJovxpbekjVUzeWz is currently running
job TohIFpsFUVglspjY is currently running
job TqxHaofgKAUvYrcS is currently running
job nRElSkRGpFwiJGVC is currently queued at position 0
job nRElSkRGpFwiJGVC is currently running
job SjYDJTahPblWxjkC is currently running
job VeFCzKxapvhCYsOh is currently running
job WGqbaLzwMvhFsvqv is currently queued at position 0
job WGqbaLzwMvhFsvqv is currently running
job pFRFWEblanQQqirJ is currently running
job lsEphytMkJuNYxVZ is currently running
job LYvtSaJDoevrbLZV is currently queued at position 0
job LYvtSaJDoevrbLZV is currently running
job uFUmovsFqSDKpMvW is currently running
job RWBlYBLvyEJdBDSj is currently running
job mqxQrnrMtkdEcmBq is currently queued at position 0
job mqxQrnrMtkdEcmBq is currently running
job tXgXFxruzwlYIRJP is currently running
job eiXUuYZShiZxTLjj is currently queued at position 0
job EiNHznzphgtAFaxN is currently queued at position 0
job EiNHznzphgtAFaxN is currently running
job XVBCXeWWdpnxiXNh is currently running
job JRJFrSELtXnnrrxn is currently running
job brjSpCHNlkFkvtJY is currently queued at position 0
job brjSpCHNlkFkvtJY is currently running
job deipQVRJSZqkPmfb is currently queued at position 0
job dzjVcmUpHtBmhfdk is currently queued at position 0
job UqGiaoCxtPIIIzeA is currently queued at position 0
job UqGiaoCxtPIIIzeA is currently running
job yoSAohUNTganrsuy is currently running
job pUjQGnjkeKrJicJw is currently running
job oncNMMBCKGOltePY is currently queued at position 0
job oncNMMBCKGOltePY is currently running
job LZvVQrLCzndhAPRC is currently running
job IqIePvFNfgXHixFT is currently queued at position 0
job CZPiWqWCDzpRDKeP is currently queued at position 0
job CZPiWqWCDzpRDKeP is currently running
job bJJUNwUFNGdOaauK is currently running
job YPbFlQrucBkGyLRt is currently queued at position 0
job XwPNiNZPMleVRRjl is currently queued at position 0
job XwPNiNZPMleVRRjl is currently running
job rjEyqKZBLJTRhRuu is currently queued at position 0
job pCtplNUSpndvFGBV is currently queued at position 0
job wApHpJwONHvBkiPA is currently queued at position 0
job wApHpJwONHvBkiPA is currently running
job cSfVEJVpqunhQAel is currently queued at position 0
job KloBotkPgusKxviv is currently running
job cjJdoGXRnFNQwhjj is currently queued at position 0
job cjJdoGXRnFNQwhjj is currently running
job yatMstSSzSPbkDmR is currently queued at position 0
job WFcmQdZIgPuBDmqP is currently queued at position 0
job AcxXJCeNHYEHOjeD is currently queued at position 0
job AcxXJCeNHYEHOjeD is currently running
job ONKEABiNCKWTRdzw is currently queued at position 0
job JwhGBQDWUxdcemkv is currently running
job NJsOJYiRGLFQPgFP is currently queued at position 0
job NJsOJYiRGLFQPgFP is currently running
job OFyecXMwKhAvFzfr is currently running
job NyFeRFRLKyvgBWja is currently running
job QCScWqwAOevutMTs is currently queued at position 0
job QCScWqwAOevutMTs is currently running
job SxQaUNHtxfuYFAst is currently queued at position 0
job KiMSvHXjeXgwCDSj is currently running
job sxmFwozaDtPNZynf is currently queued at position 0
job sxmFwozaDtPNZynf is currently running
job ZrHBokotCrsCSzjE is currently queued at position 0
job RVnpkFJliFmrGzhi is currently queued at position 0
job RVnpkFJliFmrGzhi is currently running
job QDqGfgNxxlcHMxhB is currently running
job fMEeASYtIEPNadtp is currently queued at position 0
job fMEeASYtIEPNadtp is currently running
job HhuDmhAQYmjNcsFr is currently running
job zzagJqnbIeyYKQHb is currently queued at position 0
job zzagJqnbIeyYKQHb is currently running
job vkgVvAzIrWpySyAK is currently running
job deWsTHFITTpOFJFJ is currently queued at position 0
job deWsTHFITTpOFJFJ is currently running
job MQNVdVxNSfxIgsYK is currently queued at position 0
job VadocAzAuZtBbVqU is currently running
job LhnnparBfNaVgUyp is currently queued at position 0
job LhnnparBfNaVgUyp is currently running
job pSNGgqztgkxRwOvc is currently running
job IZaowFFeQieCDEAb is currently running
job VMHHSVVvZwjAtGqy is currently queued at position 0
job VMHHSVVvZwjAtGqy is currently running
job kQNvEvJsvEQdcuRh is currently queued at position 0
job uTYKyongQYbZBNgn is currently running
job cSyOxGuWIwKgxoMv is currently queued at position 0
job cSyOxGuWIwKgxoMv is currently running
job mgKKkUJacqjReiWf is currently running
job LXaJuJQkyMhRMLNx is currently running
job FqixNdJsDnoIzvFK is currently queued at position 0
job FqixNdJsDnoIzvFK is currently running
job zqPJyLbrgjSWuPHt is currently queued at position 0
job tPidxdiXhHObpLFz is currently queued at position 0
job dqyDROmVzCgulXKw is currently queued at position 0
job dqyDROmVzCgulXKw is currently running
job mDLXETrsNWIWbrrw is currently queued at position 0
job UlHeAVnOiOAiXjwP is currently queued at position 0
job UlHeAVnOiOAiXjwP is currently running
job xuHWTLcKVvLcTikl is currently running
job FdGLdPNFdIBFxkVg is currently queued at position 0
job FdGLdPNFdIBFxkVg is currently running
job mkLFlRTyiTtnsXSM is currently queued at position 0
job AVibvbinFvlsqxOT is currently running
job AVibvbinFvlsqxOT is currently running
job unjrBPmZThCFtbmI is currently queued at position 0
job JfiIDYROZDrAiwpd is currently queued at position 0
job GtHzvDkfWPSIUykD is currently running
job rfYsaCRqTyqAwTEu is currently queued at position 0
job rfYsaCRqTyqAwTEu is currently running
job isMJuMtTWNzNFRrw is currently running
job xvQCCLHNcFjfQlXG is currently queued at position 0
job xvQCCLHNcFjfQlXG is currently running
job qRWPvptHoejqQJgF is currently running
job MGtAQsorATrqBcbh is currently queued at position 0
job MGtAQsorATrqBcbh is currently running
job qKSedBamFQUeLReX is currently running
job UgtBcFwXfKMmbPvq is currently queued at position 0
job yPiXJqJqwFmyxXQF is currently queued at position 0
job yPiXJqJqwFmyxXQF is currently running
job wYgWkrYqPlJxMJVp is currently running
job mLGNhmaKNfQTMVSj is currently queued at position 0
job mLGNhmaKNfQTMVSj is currently running
job BcWjtKKwUCsCBbCc is currently running
job OhYaZqvSyHWjUglQ is currently queued at position 1
job OhYaZqvSyHWjUglQ is currently queued at position 0
job KrOBwMHsRXeNurfY is currently queued at position 0
job KrOBwMHsRXeNurfY is currently running
job YMYJjHGFGGWcMhQM is currently queued at position 0
job YMYJjHGFGGWcMhQM is currently running
job xLzUlvzDiuhexnNj is currently queued at position 0
job xLzUlvzDiuhexnNj is currently running
job aLMorOFBsrZZuMKq is currently queued at position 0
job aLMorOFBsrZZuMKq is currently running
job uHMyZloRlNCKbQvk is currently queued at position 0
job nAOLDUbfLfIsFkJZ is currently queued at position 0
job nAOLDUbfLfIsFkJZ is currently running
job xAZGBBsUdLSVWnVr is currently running
job UtQgjtqPjFHPjTnw is currently running
job xDQdobLZkPBFYrOi is currently queued at position 0
job xDQdobLZkPBFYrOi is currently running
job qxAIXXyKsLFyLHMZ is currently running
job ElyFUyjDwdUvpcwh is currently queued at position 0
job ElyFUyjDwdUvpcwh is currently running
job eSfMzaNXknJVLQWi is currently running
job fhaIATaLqJrfPjIj is currently running
job DZzkpXunLfudyYCc is currently queued at position 1
job DZzkpXunLfudyYCc is currently queued at position 0
job cGAYVFmUTRmcjypF is currently running
job gAYfcEgTyDSIWPTv is currently running
job cuxVHVUbrwHkvmuL is currently queued at position 0
job cuxVHVUbrwHkvmuL is currently running
job GvVOUeRhVobZiKrZ is currently running
job tfkQqCxLcAksLIkt is currently queued at position 0
job KiLXUHOdjVTOtfYt is currently queued at position 0
job KiLXUHOdjVTOtfYt is currently running
job UiaudJQtopyzeIZs is currently queued at position 0
job OviJANjqlvdJIzxQ is currently queued at position 0
job OviJANjqlvdJIzxQ is currently running
job VfPkEhOSqQYciHIX is currently queued at position 0
job VfPkEhOSqQYciHIX is currently running
job PUdcZYYIiHxlzqJN is currently running
job iRhedzRjObnVzxwz is currently running
job BuMlxkuSPMfVOpmD is currently queued at position 0
job BuMlxkuSPMfVOpmD is currently running
job mBymuthGtssLiMpr is currently running
job vlcEYKxKeuNzimvz is currently running
job vewJDwfIAcrWoKeH is currently queued at position 0
job vewJDwfIAcrWoKeH is currently running
job EgxMrBdauhwmzwPh is currently running
job qQHRjYEtEmsyefVz is currently queued at position 0
job qQHRjYEtEmsyefVz is currently running
job ffMACPRxvcoQpZXB is currently running
job ctEjJXOnaBVAbyvd is currently queued at position 0
job OQStMnyYlaOaOXBK is currently queued at position 0
job OQStMnyYlaOaOXBK is currently running
job PJyspceMmbFqKiby is currently running
job YYNsbETtOfJfuxXH is currently queued at position 0
job TzOMznfEkoUfFZKl is currently queued at position 0
job TzOMznfEkoUfFZKl is currently running
job zTtWVkLGqBpsarQV is currently queued at position 0
job fJIOGwXlpiZzeAum is currently running
job nExKnHcJZWyUeWtg is currently queued at position 0
job nExKnHcJZWyUeWtg is currently running
job IfCFrRwcLGkWMEMM is currently running
job mREgoYRbLlOECeWH is currently running
job ldmqBFXBQebRvHmM is currently queued at position 0
job ldmqBFXBQebRvHmM is currently running
job GJOcmGJwqkeFuqsB is currently running
job VfVMfzrnsAHDwqcs is currently running
job QwXqWAdxKifSWoAm is currently queued at position 0
job QwXqWAdxKifSWoAm is currently running
job fQciWpJlSHtqIYPX is currently running
job MLYtRftJFcGZUlCz is currently running
job PYDtdNtcftzFlEPU is currently queued at position 0
job PYDtdNtcftzFlEPU is currently running
job hdJdYafjupCPLSYi is currently running
job SVuchhpxVdmRSXtH is currently running

Process tomography completed.
Running process tomography on the QVM for reference...

Process tomography completed.
CPU times: user 1min 35s, sys: 6.82 s, total: 1min 42s
Wall time: 17min 38s

In [8]:
process_fidelity = process_tomography_qpu.avg_gate_fidelity(process_tomography_qvm.r_est)

if not SEND_PROGRAMS:
    EPS = .01
    assert np.isclose(process_fidelity, 1, EPS)

qpu_plot = process_tomography_qpu.plot();
qpu_plot.text(0.4, .95, r'$F_{{\rm avg}}={:1.1f}\%$'.format(process_fidelity*100), size=25)

process_tomography_qvm.plot();



In [ ]: