QVFitter

class QVFitter(backend_result=None, statevector_result=None, qubit_lists=None)[source]

Class for fitters for quantum volume.

Parameters
  • backend_result (list) – list of results (qiskit.Result).

  • statevector_result (list) – the ideal statevectors of each circuit

  • qubit_lists (list) – list of qubit lists (what was passed to the circuit generation)

Attributes

QVFitter.depths

Return depth list.

QVFitter.heavy_output_counts

Return the number of heavy output counts as measured.

QVFitter.heavy_output_prob_ideal

Return the heavy output probability ideally.

QVFitter.heavy_outputs

Return the ideal heavy outputs dictionary.

QVFitter.qubit_lists

Return depth list.

QVFitter.results

Return all the results.

QVFitter.ydata

Return the average and std of the output probability.

Methods

QVFitter.add_data(new_backend_result[, …])

Add a new result.

QVFitter.add_statevectors(new_statevector_result)

Add the ideal results and convert to the heavy outputs.

QVFitter.calc_confidence_level(z_value)

Calculate confidence level using z value.

QVFitter.calc_data()

Make a count dictionary for each unique circuit from all the results.

QVFitter.calc_statistics()

Convert the heavy outputs in the different trials into mean and error for plotting.

QVFitter.calc_z_value(mean, sigma)

Calculate z value using mean and sigma.

QVFitter.plot_hop_accumulative(depth[, ax, …])

Plot individual and accumulative heavy output probability (HOP) as a function of number of trials.

QVFitter.plot_qv_data([ax, show_plt, …])

Plot the qv data as a function of depth

QVFitter.plot_qv_trial(depth, trial_index[, …])

Plot individual trial.

QVFitter.quantum_volume()

Return the volume for each depth.

QVFitter.qv_success()

Return whether each depth was successful (> 2/3 with confidence level > 0.977 corresponding to z_value = 2) and the confidence level.