# qiskit.ignis.verification.GatesetTomographyFitter¶

class GatesetTomographyFitter(result, circuits, gateset_basis='default')[código fonte]

Initialize gateset tomography fitter with experimental data.

Parâmetros
• 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) –

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()
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]

__init__(result, circuits, gateset_basis='default')[código fonte]

Initialize gateset tomography fitter with experimental data.

Parâmetros
• 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) –

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()
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

 __init__(result, circuits[, gateset_basis]) Initialize gateset tomography fitter with experimental data. Reconstruct a gate set from measurement data using optimization. Reconstruct a gate set from measurement data using linear inversion.
fit()[código fonte]

Reconstruct a gate set from measurement data using optimization.

Retorna

its approximation found using the optimization process.

Tipo de retorno

For each gate in the gateset

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()[código fonte]

Reconstruct a gate set from measurement data using linear inversion.

Retorna

its approximation found using the linear inversion process.

Tipo de retorno

For each gate in the gateset