Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version

GatesetTomographyFitter

GatesetTomographyFitter(result, circuits, gateset_basis='default')

GitHub(opens in a new tab)

Bases: object

Initialize gateset tomography fitter with experimental data.

Parameters

  • result (Result) – a Qiskit Result object obtained from executing tomography circuits.
  • circuits (List) – a list of circuits or circuit names to extract count information from the result object.
  • gateset_basis (Union[GateSetBasis, str]) – (default: ‘default’) Representation of
  • gates and SPAM circuits of the gateset (the) –

Additional information:

The fitter attempts to output a GST result from the collected experimental data. The output will be a dictionary of the computed operators for the gates, as well as the measurment operator and initial state of the system.

The input for the fitter consists of the experimental data collected by the backend, the circuits on which it operated and the gateset basis used when collecting the data.

Example:

from qiskit.circuits.library.standard import *
from qiskit.ignis.verification.basis import default_gateset_basis
from qiskit.ignis.verification import gateset_tomography_circuits
from qiskit.ignis.verification import GateSetTomographyFitter
 
gate = HGate()
basis = default_gateset_basis()
basis.add_gate(gate)
backend = ...
circuits = gateset_tomography_circuits(gateset_basis=basis)
qobj = assemble(circuits, shots=10000)
result = backend.run(qobj).result()
fitter = GatesetTomographyFitter(result, circuits, basis)
result_gates = fitter.fit()
result_gate = result_gates[gate.name]

Methods

fit

GatesetTomographyFitter.fit()

Reconstruct a gate set from measurement data using optimization.

Returns

its approximation found using the optimization process.

Return type

For each gate in the gateset

Additional Information:

The gateset optimization process con/.sists of three phases: 1) Use linear inversion to obtain an initial approximation. 2) Use gauge optimization to ensure the linear inversion results are close enough to the expected optimization outcome to serve as a suitable starting point 3) Use MLE optimization to obtain the final outcome

linear_inversion

GatesetTomographyFitter.linear_inversion()

Reconstruct a gate set from measurement data using linear inversion.

Returns

its approximation found using the linear inversion process.

Return type

For each gate in the gateset

Additional Information:

Given a gate set (G1,…,Gm) and SPAM circuits (F1,…,Fn) constructed from those gates the data should contain the probabilities of the following types: p_ijk = E*F_i*G_k*F_j*rho p_ij = E*F_i*F_j*rho

We have p_ijk = self.probs[(Fj, Gk, Fi)] since in self.probs (Fj, Gk, Fi) indicates first applying Fj, then Gk, then Fi.

One constructs the Gram matrix g = (p_ij)_ij which can be described as a product g=AB where A = sum (i> <E F_i) and B=sum (F_j rho><j) For each gate Gk one can also construct the matrix Mk=(pijk)_ij which can be described as Mk=A*Gk*B Inverting g we obtain g^-1 = B^-1A^-1 and so g^1 * Mk = B^-1 * Gk * B This gives us a matrix similiar to Gk’s representing matrix. However, it will not be the same as Gk, since the observable results cannot distinguish between (G1,…,Gm) and (B^-1*G1*B,…,B^-1*Gm*B) a further step of Gauge optimization is required on the results of the linear inversion stage. One can also use the linear inversion results as a starting point for a MLE optimization for finding a physical gateset, since unless the probabilities are accurate, the resulting gateset need not be physical.

Was this page helpful?
Report a bug or request content on GitHub.