Release Notes¶
0.3.1¶
New Features¶
The class
MockIQBackend
for testing has been updated to support multiple qubits. It now takes lists of IQ cluster centers and widths as input, and specific backends are now defined as subclasses ofMockIQExperimentHelper
.
Bug Fixes¶
Fixes a bug where instantiating the
CrossResonanceHamiltonian
experiment without specifying thecr_gate
andbackend
init kwargs raises an exception.
Fixes a visualization error in the figure produced during analysis of
CrossResonanceHamiltonian
when multi-canvas plotting mode is enabled.
Fixes an issue with marginalization of kerneled and discriminated memory in
CompositeAnalysis
not working correctly. This fixesParallelExperiments
not working correctly for level-1 measurement data.
Fixes a bug with JSON serialization of
ExperimentData
due to Qiskitbackend
andservice
objects not being JSON serializable. These properties are now set toNone
in the serialized experiment data.
0.3.0¶
Prelude¶
The Qiskit Experiments 0.3 release includes several bug fixes and improvements and several new experiments added to the library
. Added experiments include readout error, resonator spectroscopy, two-qubit fine amplitude, and several characterization experiments. Experiments can now be run restlessly without resetting.
There are also numerous changes and improvements to the BaseExperiment
, ExperimentData
, CurveAnalysis
, and composite experiment classes to improve JSON serialization, handling of metadata, accessing the status of jobs and experiments, and the storing and loading of experiments to and from the IBM experiment database service.
New Features¶
Adds an
analysis
kwarg toCompositeExperiment
,BatchExperiment
andParallelExperiment
to allow a user to supply a customCompositeAnalysis
instance.
The curve fit parameter guess function
rb_decay()
has been added. This improves the initial parameter estimation of randomized benchmark experiments.
Adds
CompositeAnalysis.component_analysis()
method for accessing a component analysis class object from a composite analysis object.
Adds a
flatten_results
init kwarg toCompositeAnalysis
,CompositeExperiment
,ParallelExperiment
, andBatchExperiment
that if set toTrue
flattens all analysis results and figures from component experiment analysis into the mainExperimentData
container, and does not save the individual child data components.Note that for nested composite experiments setting
flatten_results=True
will recursively set the same value for all component experiments that are also composite experiments.
MplCurveDrawer
has been added for curve analysis visualization. This class instance is JSON serializable with the experiment encoder and it implements public methods to draw analysis results in several different formats. Its instance is attached toCurveAnalysis
instance as an analysis optionscurve_plotter
. This class is a drop-in replacement ofMplDrawSingleCanvas
andMplDrawMultiCanvasVstack
. This instance has dedicated drawing options. New optionsubplots
, which is a tuple of two integer representing(n_rows, n_cols)
, defines arbitrary 2D array subplots without usingMplDrawMultiCanvasVstack
.
Drawing options are moved from
CurveAnalysis.options
toMplCurveDrawer.options
.
Adds a
BaseExperiment._finalize()
method toBaseExperiment
which is after configuring any runtime options, backend, or analysis classes but before generation and execution of experiment circuits duringBaseExperiment.run
.This method is intended to be overridden in experiment subclasses if they need to configure any analysis or runtime options based on a combination of properties of the experiment, for example some combination of backend, experiment and run options.
Improved handling of job and analysis processes in
ExperimentData()
. Verbose logging information on execution of analysis callbacks in an experiment can enabled by setting theqiskit_experiments
log level toDEBUG
.
Adds
ExperimentData.jobs()
method for returning a list of Qiskit Jobs for a running or finished experiment.
Adds
ExperimentData.job_status()
method for returning the status of Qiskit Job execution for an experiment. This returns aJobStatus
enum class value.
Adds
ExperimentData.analysis_status()
method for returning the status of analysis callbacks for an experiment. This returns aAnalysisStatus
enum class value.
Adds
ExperimentData.cancel_analysis()
method to allow cancelling pending analysis callbacks. Note that analysis callbacks that have already started running cannot be cancelled.
Adds
ExperimentData.cancel()
to cancel both jobs and analysis.
Adds
ExperimentData.add_jobs()
method for adding one or more Qiskit jobs to experiment data. This method takes an optionaltimeout
kwarg that when used will automatically cancel all non-finished jobs that exceed the alloted time.
Added enum classes for experiment, job, and analysis status.
Exposed and expanded the class
FakeService
. The fake service will allow enhanced testing of qiskit-experiments and external packages.
A new mixin class
RestlessMixin
is added that enables experiments to run in restless measurement mode, where the qubits are not reset after each measurement.
A new data processing node to marginalize qubit counts is introduced. This node is, for instance, used in the data processing of a fine ZX amplitude experiment run with restless measurements.
A new fine amplitude experiment for two qubits is added. This experiment accepts a two-qubit gate with on rotation angle as parameter.
Added two new experiments (
LocalReadoutError
andCorrelatedReadoutError
) for characterizing the readout error of devices.
Added a new experiment
ResonatorSpectroscopy
to run spectroscopy on readout resonators. This is done by attaching a custom pulse-schedule to the measure instruction. Note that the resonator spectroscopy experiment may cause errors on backends that do not support circuit instructions with measurement schedules attached to them.
A new data processing node
ToAbs
is introduced to take the absolute value of IQ points. This node is needed to analyse readout resonator spectroscopy IQ data since it rotates around in the IQ plane but can also be used in other contexts.
Adds support for JSON serialization of
ExperimentData
objects. These objects can be serialized using theExperimentEncoder
andExperimentDecoder
classes.Note that serialization of general experiment results requires that the individual option values and analysis result types are themselves JSON serializable using the encoder and decoder classes.
Adds support for pickling
ExperimentData
objects using the Pythonpickle
module.
Adds a
T2Hahn
class for composing and running Hahn Echo experiment to estimate T2.
Adds a
T2HahnAnalysis
class for analyzing experiment data fromT2Hahn
.
Adds a
T2HahnBackend
class for testing which simulates T2 noise statistics.
Added new tomography basis classes
LocalPreparationBasis
andLocalMeasurementBasis
for constructing N-qubit bases from the tensor product of 1-qubit instructions. These classes can optionally be initialized with custom qubit-specific density matrix or POVM element states for respectively for tomographic reconstruction.
Added a new experiment Tphi. It computes the pure dephasing time and is computed as \(1/T_\varphi = 1/T_{2*} - 1/2T_1\). It is implemented as a composite experiment with sub-experiments T1 and T2Ramsey. The new classes are:
Tphi
- class defining the Tphi experiment.TphiAnalysis
- class for Tphi analysis.TphiBackend
- fake backend for running a Tphi experiment, based on the fake backends for T1 and T2Ramsey.
Adds
BaseExperiment._transpiled_circuits()
which returns a list of experiment circuits, transpiled. It can be overridden to define custom transpilation.
The all curve fit plot generated by the
CurveAnalysis
shows a confidence interval properly computed with error propagation. By default it shows 1 sigma and 3 sigma region but you can customize this via thestyle
option of the curve analysis subclass. ThePlotterStyle
dataclass has been updated with new attributeplot_sigma
which takes a list oftuple(float, float)
specifying a pair of sigma and transparency.
DataProcessor
andDataAction
are now JSON serializable with the qiskit experiments default encoder. This allows one to retrieve a configured processor from the record and re-analyze loaded data with the processor. Trained nodes are serialized with accquired parameters so that the loaded processor can continue to process new data.
Upgrade Notes¶
Experiment
CrossResonanceHamiltonian
and its subclasses have been upgraded. Now its instance can generate circuits without setting backend for just checking experiment sequence. The sequence with actual parameters is generated after the backend is set. In addition, now experiments can takecr_gate
in the constractor which isGate
type subclass taking a single parameter (flat-top width). If one inputs aHamiltonianGate
subclass with cross resonance Hamiltonian, experiment can be simulated with Aer QASM simulator.
BaseCurveAnalysis
class has been added as a superclass ofCurveAnalysis
. The new base class doesn’t define the_run_analysis()
abstract method and it cannot conduct analysis by itself, however it defines several subroutines that can be combined to build a custom fitting process in the subclass. This allows more flexibility to write custom curve analysis by directly inheriting from the new base class. SeeBaseCurveAnalysis
for details. See also Issue 737 for discussion.
The method
CurveAnalysis._generate_fit_guesses()
has been upgraded with a new method signature. Now this method is called withcurve_data
argument that provides dataset which is used for curve fitting. If you define customCurveAnalysis
subclass in your codestack, you may need to upgrade the method. SeeBaseCurveAnalysis
for details.
Arguments of
FitData
have been updated to takex_data
andy_data
instead ofx_range
andy_range
.
The computation of error per gates (EPGs) from EPC in
RBAnalysis
has been upgraded. To compute these values from a single EPC value obtained by the experiment, we should provide a guess of contribution per basis gate to the depolarization. This ratio has been extracted from backend properties withRBUtils.get_error_dict_from_backend()
, but this approach may result in unreproducible EPG outcomes under certain circumstances. See PR 762 for more details. Not this error ratio is provided from a hard-coded lookup table, and the user can still provide custom values with analysis optiongate_error_ratio
. One can skip computation of EPGs by setting the option toFalse
.
RBAnalysis
has been upgraded to compute corrected EPC for 2Q RB. When the analysis optionepg_1_qubit
is provided, it returns two EPG analysis results, with and without correction for underlying single qubit depolarization channels. New result is added under the nameEPC_corrected
.
CompositeAnalysis
initialization is changed to require a list ofBaseAnalysis
objects so that these are stored in the class, rather than being accessed later via a composite experiment. This initialization is handled automatically byParallelExperiment
andBatchExperiment
composite experiments.
Changed the
Tphi
experiment andTphiAnalysis
to combine the component analysis results so that it runs as a single experiment returning \(T_\phi\), \(T_1\), and \(T_2^\ast\) analysis results.
The component experiment circuits of
ParallelExperiment
andBatchExperiment
are now explicitly transpiled using the respective component experimentstranspile_options()
before being combined into the composite circuits returned by theBaseExperiment.circuits
method.Any transpile options set directly on the
ParallelExperiment
orBatchExperiment
will also be applied as a transpile option to each component experiment.
The circuits returned by the
ParallelExperiment.circuits()
method of parallel circuits will now always be the combined circuits circuits of the transpiled circuits of the individual component experiments transpiled with that experiments transpile options.
New default
CurveAnalysis
analysis optionfixed_parameters
has been added. We can directly exclude parameters from the fit model of the particular analysis instance, rather than defining a new class to define the class attributeCurveAnalysis.__fixed_parameters__
.
The function
get_processor()
of the data processing package has an updated signature to make the method easy to extend. This will allow a more flexible creation of data processors.
The value returned by
ExperimentData.status()
has been changed from a string to aExperimentStatus
enum class value.
The signature of the
outcome_data
argument of the tomography fitter functions inlibrary.tomography
has been changed from a list of NumPy ndarray vectors of non-zero observed frequencies into a single ndarray matrix containing the observed frequencies of all possible measurement outcomes for the measurement bases.
The FineAmplitude experiment is refactored for more flexibility. Furthermore, the FineAmplitudeAnalysis class is upgraded to accept 0/1 calibration circuits to better fit the amplitude A of the ping-pong pattern.
The processing of
meas_level=2
data in the functionget_processor()
is generalized to data processing of experiments with more than one qubit.
The
ParallelExperiment
andBatchExperiment
composite experiments have been changed to no longer return analysis results containing information about sub-experiments. Instead, use thechild_data()
method to retrieve sub-experiments of a given composite experiment.
The RB data processing flow is updated to align it with the recent refactoring of the
get_processor()
function. The RB analysis will now use theget_processor()
function to choose the suitable data processor.
The
job_metadata
field has been removed fromBaseExperiment
. Experiments which needed job metadata for analysis should now directly override the.BaseExperiment._metadata
method to store the required job metadata.Individual experiments using
CurveAnalysis
based analysis have been updated to store themeas_level
andmeas_return
run options in metadata if they have been set in the experiment for use in setting the data processor during analysis.
The
BaseExperiment._additional_metadata
method has been removed, and experiments should now directly override theBaseExperiment._metadata
method to add additional experiment metadata to the run experiment data.
The tomography experiment basis classes
PauliMeasurementBasis
,PauliPreparationBasis
, andPauli6PreparationBasis
have been upgraded to be instances of the new tomography bases classesLocalMeasurementBasis
andLocalPreparationBasis
.
Changed the signature of the
circuit()
andmatrix()
methods of tomography basis classes to require aqubits
kwarg for specifying the specific physical qubits that the basis is being applied to.
The
CurveAnalysis
class has been updated to use the covariance between fit parameters in the error propagation. This will provide more accurate standard error for your fit values.
The data format of analysis result data value has been replaced from
FitVal
touncertainties.ufloat
from the Python uncertainties package to support error propatation for post analysis computation.expdata = T1(0, delays, backend).run() fit_t1 = expdata.analysis_results("T1").value assert isinstance(fit_t1, UFloat) new_value = fit_t1 / 2 new_value.std_dev # show new standard error value
Now
fit_t1
value is anuncertainties.ufloat
instance with new propertiesnominal_value
andstd_dev
, and you can directly apply mathematical operation to this object. The new error value is predicted by linear error propagation theory. Note that you no longer need to separately compute the standard error.This computation is offered by the uncertainties package which is a requirement since from Qiskit Experiments v0.2. The functions supporting error propagation is also available in
uncertainties.umath
.
In the analysis result object,
FitVal.unit
property has been moved toDbAnalysisResultV1.extra
as metadata.
Deprecation Notes¶
Several protected methods of
CurveAnalysis
intended to be overriden or directly be used by subclass have been deprecated.CurveAnalysis._data()
has been deprecated without alternative method to makeCurveAnalysis
state cleaner. Now relevent curve analysis methods requiring curve data are called with thecurve_data
argument.CurveAnalysis._extra_database_entry()
has also been deprecated. This method becomes a part ofCurveAnalysis._create_analysis_results()
. Analysis class author can override this method to inject a code to create custom analysis results.
Calling
RBUtils
methods have been deprecated and will be removed after 0.4.
The
CompositeExperiment.component_analysis()
method has been deprecated. Component analysis classes should now be directly accessed from aCompositeAnalysis()
object using the :meth:.`CompositeAnalysis.component_analysis` method.
Conventional curve visualization classes
MplDrawSingleCanvas
,MplDrawMultiCanvasVstack
and the stylesheetPlotterStyle
have been deprecated and now replaced withMplCurveDrawer
. These classes had been attached to the analysis instance as acurve_plotter
which is a string and mapped to the class method.draw
at runtime via :FitResultPlotters: Enum. It was almost impossible to track the code and hurted the readability. In addition, this implementation was problematic due to dependency on the raw data points saved in an instance variable. See qiskit-experiments/#737 for details.
Class attribute
CurveAnalysis.__fixed_parameters__
has been deprecated and support for the instantiation of the class with this attribute will be dropped soon. In addition, the fixed parameter value defined as a standalone analysis option has been deprecated. Please set fixed_parameters option instead. This is a python dictionary of fixed parameter values keyed on the fit parameter names.
Analysis class
FineDragAnalysis
has been deprecated. Now you can directly set fixed parameters to theErrorAmplificationAnalysis
instance as an analysis option.
Analysis class
FineFrequencyAnalysis
has been deprecated. Now you can directly set fixed parameters to theErrorAmplificationAnalysis
instance as an analysis option.
Analysis class
FineHalfAngleAnalysis
has been deprecated. Now you can directly set fixed parameters to theErrorAmplificationAnalysis
instance as an analysis option.
The library argument to
Calibrations
has been deprecated in favour of a new argument called libraries.
Adding data from jobs using
ExperimentData.add_data()
has been deprecated. This method should now only be used to add data from QiskitResult
objects or raw data dicts. Job data should now be added using the newExperimentData.add_jobs()
method instead.
The
timeout
kwarg ofExperimentData.add_data()
has been deprecated. Timeout for adding jobs is now handled by theExperimentData.add_jobs()
method.
BaseExperiment._postprocess_transpiled_circuits
is deprecated and will be removed in the 0.4.0 release. UseBaseExperiment._transpiled_circuits()
instead.
The
FitVal
class had been deprecated and being replaced with the uncertainties package. When loading saved experiments or analysis results anyFitVal
s will be implicitly converted intoUFloat
which should be re-saved to ensure these experiments can be reloaded in the future.
Bug Fixes¶
Fixes a bug in the
InterleavedRB
experiment where aDelay
instruction, or a Clifford circuit containing delay instructions, could not be used as the interleaved element.
Fixed built-in tomography fitter functions
cvxpy_linear_lstsq()
,cvxpy_gaussian_lstsq()
,scipy_linear_lstsq()
,scipy_gaussian_lstsq()
,linear_inversion()
to make themeasurement_basis
kwarg optional so that these functions could be used for fitting raw tomography fitter data with preparation data but no measurement data.
Fix bug in
TomographyAnalysis
when accumulating count data from repeated circuits using the same preparation and measurement basis configuration.
Fixes an issue with
ExperimentData.block_for_results()
sometimes having a race issue with all analysis callbacks finishing.
ExperimentData.save()
should now fail gracefully when experiment metadata failed to save instead of crashing.
The link to the experiment entry in the database service shown after saving is now by default obtained from the service, not hard-coded.
The FineZXAmplitude now works properly with restless measurements.
Fixes a bug with the
ProcessTomography
where the default target channel analysis option was computed incorrectly if not all qubits were prepared and measured, and the preparations and measurements were applied to different subsets of qubits.See Issue 758 for details.
Fixes a bug with the
ProcessTomographyAnalysis
where analysis would raise an exception if the number of prepared and measurement qubits are not equal.See Issue 757 for details.
Fix
ParallelExperiment.copy()
andBatchExperiment.copy()
so that the copies preserves any references between the original component experiments analysis classes and theCompositeAnalysis
classes component analysis classes.
Fixes
CompositeAnalysis.copy()
to recursively make a copy of the component analysis classes.
The initial guess function
exp_decay()
, which estimates an exponent of the decay curve by taking the natural logarithm of the y values, has been updated to handle exceptions when some y values are negative.
Fixes a bug with JSON deserialization using the
ExperimentDecoder
failing to decode custom user classes defined in the__main__
scope of python scripts and notebooks.
Fixes bug in
CompositeAnalysis
where analysis of nested composite experiments could raise a RuntimeError.
Fixes a bug in
TomographyAnalysis
where the basis elements of unobserved measurement outcomes were not being included in the fitter objective function for least-squares fitters (CVXPY and SciPy). This would lead to lower than expected fit fidelities when fitting data with many zero count outcomes (typically synthetic data from ideal simulation).
Fixes issue with the CVXPY
ProcessTomography
analysis fitter functionscvxpy_linear_lstsq()
andcvxpy_gaussian_lstsq()
where the trace preserving constraint was not being applied to the fit functions by default and required being explicitly passed as asolver_option
. Now all CVXPY process tomography experiments will have this option set to True by default unless a user explicitly disables it by setting the solver_option to False.
Cloud database experiment links no longer display when there was an error saving to the API.
Fixes some issues with
ExperimentData.cancel_analysis()
andExperimentData.cancel()
to make cancelling analysis callbacks more robust.
Fixes
ExperimentData.block_for_results()
to handle blocking in recursive cases where an analysis callback adds another job or analysis callback.
The ResonanceAnalysis class has been switched from a Gaussian fit to a Lorentzian fit function. Furthermore, the Gaussian fitting capability is preserved by moving the Gaussian fitting to a new class called GaussianAnalysis. Note that the previous analysis can be used by doing:
spec = ResonatorSpectroscopy(qubit, backend) spec.analysis = GaussianAnalysis()
where
GaussianAnalysis
is imported fromcurve_analysis
.
A bug related to single-shot data in the SVD data processing node is fixed.
Poor python instance representation of
DataAction
has been upgraded to show all information contained in the class instance.
Other Notes¶
Default fit bounds for
d_theta
parameter ofqiskit_experiments.curve_analysis.ErrorAmplificationAnalysis
class has been updated from [-pi, pi] to [-0.8 pi, 0.8 pi]. This change will improve the bad fit when the error value is really close to zero. This has sometimes yielded ind_theta
~ pi rather than zero. Though 0.8 is the empirical factor, this is okey for most situations since the amplification analysis is applied to experiments in the small error regime (this is often sufficiently smaller than pi).
0.2.0¶
Prelude¶
The Qiskit Experiments 2.0 release includes several bug fixes and improvements and many new experiments added to the library
. Added experiments include a full suite of single-qubit gate calibration and characterization experiments, and two-qubit Cross-resonance Hamiltonian characterization experiments.
There are also numerous changes and improvements to the base classes in framework
and calibration_management
to make developing new experiments easier, to improve JSON serialization, and to improve storing and loading experiments for the IBM experiment database service.
New Features¶
You can now change the default
matplotlib
backend used for generated figures by settingqiskit_experiments.framework.matplotlib.default_figure_canvas
to the desired canvas. Note that it has to be a canvas for one of the non-interactive backend. For example, you can setdefault_figure_canvas
toFigureCanvasAgg
to use theAGG
backend.
Added the
replace_results
kwarg torun()
with default value ofreplace_results=False
.If analysis is run with
replace_results=True
then any analysis results and figures in the experiment data will be cleared and replaced with the new analysis results. Saving this experiment data will replace any previously saved data in a database service using the same experiment ID.If analysis is run with
replace_results=False
and the experiment data being analyzed has already been saved to a database service, or already contains analysis results or figures, a copy with a unique experiment ID will be returned containing only the new analysis results and figures. This data can then be saved as its own experiment to a database service.
Added a
set_options()
method andoptions()
property to theqiskit_experiments.framework.BaseAnalysis
class to store and retrieve any analysis options in the state of the analysis instance.
The
analysis
kwarg ofqiskit_experiments.framework.BaseExperiment.run()
can now optionally be passed aqiskit_experiments.framework.BaseAnalysis
instance to use for analysis of that single execution. If no instance is provided the current storedanalysis()
instance for that experiment will be used. Settinganalysis=None
disables analysis for the specific execution.
Add
backend
as an optional__init__
kwarg for all experiments to allow setting the backend at initialization. The backand can also be set and retrieved from the experiment object after construction using thebackend()
property and setter.When using the
backend
kwarg ofrun()
to specify a backend this will temporarily override any currently set backends for that single execution.
Add
ExperimentConfig
dataclass for storing the configuration of an experiment. This configuration can be obtained by using theconfig()
property. Experiments can also be reconstructed from their configuration using thefrom_config()
class method.
Adds automatic job splitting to
BaseExperiment
for execution of experiments with a larger number of circuits than can be run in a single job on the target backend. This enables running large experiments on legacy and non-IBM backends that don’t handle job splitting automatically.
The
qiskit_experiments.data_processing.Probability
data processing node has been enhanced to compute the estimated mean and standard deviation of a measured outcome probability using a Bayesian update of a a Beta distribution prior from the observed measurement outcomes. The default prior is an uninformative prior. The user can also provide a custom prior for the probability distribution.
Adds
add_analysis_callback()
method toExperimentData
for adding a post-processing analysis function to run as a callback after currently executing experiment jobs are finished.
Added a
block
kwarg with default valueblock=True
to theqiskit_experiments.framework.ExperimentData.analysis_results()
method. If this is True then callinganalysis_results()
will block to wait for all running analysis callbacks to finish before returning results. This prevents issues where trying to retrieve analysis results before analysis was finished would raise an error that the result could not be found.Note that in the case of
ParallelExperiment
andBatchExperiment
blocking or callinganalysis_results
on the parent experiment should be performed before attempting to access results in the component experiment data containers to ensure the component analysis callbacks have been initialized.
The
ExperimentData
class can now store childExperimentData
containers. Child data can either be added at initialization using thechild_data
kwarg or added later using theadd_child_data()
method. ChildExperimentData
can be accessed using thechild_data()
method.
Added a
copy()
method toExperimentData
which allows making a copy of an experiment data container with a new experiment ID, new result IDs, and new figure names, generated for the copy.This method has a kwarg option
copy_results
that can be set toFalse
to only copy the experimentdata()
and metadata, but not the analysis results and figures.
Adds methods
add_tags_recursive()
andremove_tags_recursive()
toqiskit_experiments.framework.ExperimentData
for adding and removing tags of an experiment data object and all itschild_data()
.
Adds support for saving and loading
qiskit_experiments.framework.ParallelExperiment
andqiskit_experiments.framework.BatchExperiment
experiment data and all component experiment data and results from the IBM experiments database service. Changing the share level of the parent composite experiment will also change the share level of all component experiments.When saving composite experiments each component experiment analysis results and figures will be saved under a unique experiment ID. Note that these component experiments do not save any of the marginalized circuit result data. The unmarginalized circuit result data is saved in the parent componsite experiments.
Adds a collection of experiments for performing single-qubit gate
characterization
andcalibration
. The new experiments areRabi
: This experiment scans the amplitude of a pulse and measures the qubit population. This allows us to determine the amplitude that creates, for example, anX
gate and/or aSX
gate.RoughXSXAmplitudeCal
: The calibration version ofRabi
. It extracts the amplitudes needed to implement anX
gate an aSX
gate. This type of calibration is a rough amplitude calibration since the resulting parameter value is typically not very precises.FineAmplitude
: This experiment repeats a rotation a variable number of times to amplify over- and under-rotations. The resulting ping-pong pattern in the qubit population is fit to determine the error in the rotation angle. This experiment has specializations for X (FineXAmplitude
) and SX (FineSXAmplitude
) gates.FineAmplitudeCal
: The calibration version ofFineAmplitude
. It will update the amplitude of the pulse according to the measurred deviation. This experiment has specializations for X (FineXAmplitudeCal
) and SX (FineSXAmplitudeCal
) gates.RoughDrag
: This experiment scans the DRAG parameter of a repeated sequence of rotation and anti-rotation. If the DRAG parameter does not have the correct value phase errors will accumulate and the repeated sequece of gates will not return the qubit to the ground state.RoughDragCal
: The calibration version ofRoughDrag
.FineDrag
: This experiment iterates the gate sequence Rp - Rm where Rp is a rotation around an axis and Rm is the same rotation but in the opposite direction. This sequence amplifies phase errors due to the presence of higher excited states. This experiment has specializations for X (FineXDrag
) and SX (FineSXDrag
) gates.FineDragCal
: The calibration version ofFineDrag
. This will update the DRAG parameter in the instance of the:class:`~qiskit_experiments.calibration_management.Calibrations
class. This experiment has specializations for X (FineXDragCal
) and SX (FineSXDragCal
) gates.QubitSpectroscopy
: This experiment performs spectroscopy by applying a frequency shift to a long pulse. This experiment is typically used to identify the resonance frequency of the qubit.RoughFrequencyCal
the calibration version ofQubitSpectroscopy
. This gives us a first rough estimate of the qubits frequency.RamseyXY
: This experiment performs a Ramsey-XY experiment which allows us to measure the frequency of the qubit. This experiment is sensitive to the sign of the frequency offset from the main transition. It is a more precise measurement than spectroscopy.FrequencyCal
: This is the calibration version ofRamseyXY
.FineFrequency
: This experiment performs an error amplifying sequence to measure the frequency of the qubit. This is done with delay instructions with a variable length and RZ gates.FineFrequencyCal
: This is the calibration version ofFineFrequency
.HalfAngle
: This experiment measures the amount by which the SX and X gates are not parallel. Such errors can occur due to phase errors. For example, the non-linearities in the mixer’s skew for \(\pi/2\) pulses may be different from the \(\pi\) pulse.HalfAngleCal
: This is the calibration version ofHalfAngle
.
Two cross-resonance Hamiltonian tomography experiments have been added to the
qiskit_experiments.library
.qiskit_experiments.library.CrossResonanceHamiltonian
qiskit_experiments.library.EchoedCrossResonanceHamiltonian
These experiments estimates the IX, IY, IZ, ZX, ZY, ZZ Hamiltonian term coefficients of the cross-resonance Hamiltonian, using either a single-tone cross-resonance gate (
CrossResonanceHamiltonian
) or an echoed cross-resonance gate (EchoedResonanceHamiltonian
).
Adds a
qiskit_experiments.library.ReadoutAngle
characterization experiment. This experiment computes the average of the angles of the IQ clusters of the ground and excited states.
StandardRb
andInterleavedRb
experiments now compute error as part of the error-per-gate computation.
Known Issues¶
Curve analysis may have imperfection in the uncertainty propagation computation. Fit paramters consist of the nominal part and standard error, however, the correlation of these paramters are not precisely taken into account. This sometimes result in the overestimation of the confidence interval of fit curves, or overestimation of the standard error of some analysis values computed with multiple fitting parameters. This issue will be solved in the version 0.3. See qiskit-experiments/#551 for details.
Upgrade Notes¶
The default
matplotlib
backend used for generated figures was changed from AGG to SVG.
Due to changes in JSON serialization it is possible that some experiments saved to the IBM Experiments database service using the Qiskit Experiments 0.1 API may not be able to be loaded using Qiskit Experiments 0.2.
Changed
run()
to run asynchronously using theadd_analysis_callback()
. Previously analysis was only run asynchronously if it was done as part of an experimentsrun()
.
The
qiskit_experiments.framework.BaseExperiment.analysis()
property has been changed to return aqiskit_experiments.framework.BaseAnalysis
instance rather than a class type. This method also now has a setter which allows setting an analysis instance for use by an experiment.
Data format used in the
qiskit_experiments.data_processing.DataProcessor
has been changed from Tuple[Any, Any] to np.ndarray.
Uncertainty propagation in the
qiskit_experiments.data_processing.DataProcessor
class is now computed using the uncertainties package. Seeqiskit_experiments.data_processing
module documentation for details.
The
CompositeExperimentData
class has been removed and its functionality integrated into theExperimentData
class. A compositeExperimentData
can now be created by initializing with a list of childExperimentData
containers using thechild_data
kwarg.
ParallelExperiment
andBatchExperiment
now return aExperimentData
object which no longer contains acomponent_experiment_data
method. This method has been replaced by thechild_data()
method.
The
qiskit_experiments.framework.ExperimentData.analysis_results()
method has been changed to block on analysis callbacks finishing by default, this means it is no longer necessary to call theblock_for_results()
method first before accessing analysis results.To disable blocking this can be set to run with
block=False
. This should be usedanalysis_results()
needs to be called during another analysis callback to prevent that callback from blocking.
The
callback
and**kwarg
arguments have been removed fromadd_data()
To add a callback function to run after experiment jobs have finished executing use theadd_analysis_callback()
method instead.
All
qiskit_experiments.library
experiments have been changed to work with fixed SI units: Hz for frequency, seconds for delays, and backend dt for pulse widths and durations. Previous experiments withunit
kwargs in their init functions have had this kwarg removed.
The
qubits
intitialization argument forStandardRb
,InterleavedRb
,QuantumVolume
,StateTomography
, andProcessTomography
no longer accepts interger values for specifying a range of qubits. and must now contain an explicit sequence of qubits.
The behavior of the
seed
initialization kwarg of theStandardRB
,InterleavedStandardRB
,QuantumVolume
experiments has been modified.In the new version the
seed
value is used as to initialize a Numpy random number generator object asnumpy.random.default_rng(seed=seed)
each time the experimentscircuits
method is called. This change means that using a fixed seed value will result in the same circuits being generated each time an experiment is run, if no other experiment options are changed.To generate different new random circuits each time an experiment is run the (default) value of
seed=None
should be used. To reproduce equivalent functionality to the previous version behavior of differnet circuits being generated each timerun
is called with a fixed seed you must now set a new fixed seed value between each call torun
usingexperiment.set_experiment_options(seed=value)
.
Deprecation Notes¶
The
qiskit_experiments.framework.BaseExperiment.set_analysis_options()
method has been deprecated, use theqiskit_experiments.framework.BaseAnalysis.set_options()
method for the experiments analysis class instead. This can be accessed from the experiment instance using theqiskit_experiments.framework.BaseExperiment.analysis()
property asexperiment.analysis.set_options(**options)
.
The
qiskit_experiments.framework.BaseExperiment.analysis_options()
property has been deprecated, use theqiskit_experiments.framework.BaseAnalysis.options()
property for the experiments analysis class instead. This can be accessed from the experiment instance using theqiskit_experiments.framework.BaseExperiment.analysis()
property asexperiment.analysis.options
.
The
qiskit_experiments.framework.BaseExperiment.run_analysis()
and method has been deprecated, use theqiskit_experiments.framework.BaseAnalysis.run()
method for the experiments analysis class instead. This can be accessed from the experiment instance using theqiskit_experiments.framework.BaseExperiment.analysis()
property asexperiment.analysis.run(**kwargs)
.
Boolean values for the
analysis
kwarg inqiskit_experiments.framework.BaseExperiment.run()
have been deprecated. Useanalysis="default"
instead ofanalysis=True
, andanalysis=None``instead of ``analysis=False
.
Using the
__analysis_class__
class attrbiute to define a defaultBaseAnalysis
class in aBaseExperiment
subclass has been deprecated. A default analysis class instance should now be passed to the initialization method ofBaseExperiment
instead.
Bug Fixes¶
The
qiskit_experiments.data_processing.Probability
data processing node will no longer return exactly 0 or 1 for a probability estimate. This fixes an issue where this could cause division by 0 when computing weights during curve fitting analysis.
Fixes a bug where the
qiskit_experiments.framework.ExperimentData.load()
method would return anDbExperimentDataV1
object instead of aExperimentData
object.
Fixed bug in
qiskit_experiments.framework.ExperimentData
where trying to load saved job data from a backend usingExperimentData(backend=backend, job_ids=job_ids)
resulted in an error.
Fixes a bug in
StandardRB
andInterleavedRB
where the variance in the estimated error per Clifford did not scale correctly with the number of sampled RB sequences.See Issue 428 for details.