qat.tomo.core.perform_tomography

qat.tomo.core.perform_tomography(qpu, method, prep_gates, meas_gates, target_gates_spec=None, n_shots=1024, qbits=[0], gate_list=None, enforce_CP=False, enforce_TP=False, verbose=False)

Perform tomography of a QPU.

Three tomography methods are supplied:

  • Linear inversion Quantum Process Tomography (‘lqpt’),

  • Maximum Likelihood Quantum Process Tomography (‘mlqpt’), and

  • Linear inversion Gateset Tomography (‘lgst’).

Parameters
  • qpu (QPUHandler) – qpu to be tomographed

  • method (string) – type of tomography (lqpt|mlqpt|lgst)

  • prep_gates (list<list<pair<string, int>>>) – list of gate sequences for state preparation (\(>= d^2\)), with \(d = 2^{nqbits}\)

  • meas_gates (list<list<pair<string, int>>>) – list of gate sequences for measurement (\(>= d^2\))

  • target_gates_spec (GatesSpecification, optional) – ideal/target gates specification. Required for QPT methods.

  • n_shots (int, optional) – number of shots in experiment (repetitions of each circuit). Defaults to 1024.

  • qbits (tuple<int>, optional) – qbits to be tomographed. Defaults to None (implying qbit #0).

  • gate_list (list<string>, optional) – list of gates to be tomographed. If None, make tomography of all gates in target_gates_spec

  • enforce_CP (bool) – whether to enforce complete-positive character. Included in ‘mlqpt’ (not yet implemented for GST methods)

  • enforce_TP (bool) – whether to enforce trace-preserving character (implemented by fixing some PTM elements in ‘mlqpt’, and by gauge-fixing in ‘lgst’)

  • verbose (bool) – verbose output

Returns

the output gates specification (with channels in QuantumChannelPTM form)

Return type

GatesSpecification

Note

  • gate names in prep_gates, meas_gates, gate_list have to be consistent with those of the qpu and target_gates_spec

  • it is also possible to perform this task in two separate tasks (see collect_tomography_data and process_tomography_data)

Note

This method is available as an application in Qaptiva Access.