QubitSpectroscopy

class QubitSpectroscopy(physical_qubits, frequencies, backend=None, absolute=True, analysis=None, **experiment_options)[source]

A spectroscopy experiment to obtain a frequency sweep of the qubit.

Overview

The circuits produced by spectroscopy, i.e.

           ┌────────────┐ ░ ┌─┐
      q_0: ┤ Spec(freq) ├─░─┤M├
           └────────────┘ ░ └╥┘
measure: 1/══════════════════╩═
                             0

have a spectroscopy pulse-schedule embedded in a spectroscopy gate. The pulse-schedule consists of a set frequency instruction followed by a GaussianSquare pulse. A list of circuits is generated, each with a different frequency “freq”.

Analysis class reference

ResonanceAnalysis

Experiment options

These options can be set by the set_experiment_options() method.

Options
  • Defined in the class Spectroscopy:

    • amp (float)

      Default value: 0.1
      The amplitude of the spectroscopy pulse. Defaults to 0.1 and must be between 0 and 1.
    • duration (int)

      Default value: 2.4e-07
      The duration of the spectroscopy pulse. Defaults to 1024 samples.
    • sigma (float)

      Default value: 6e-08
      The standard deviation of the flanks of the spectroscopy pulse. Defaults to 256.
    • width (int)

      Default value: 0
      The width of the flat-top part of the GaussianSquare pulse. Defaults to 0.
  • Defined in the class BaseExperiment:

    • max_circuits (Optional[int])

      Default value: None
      The maximum number of circuits per job when running an experiment on a backend.

See also

  • Superclass qiskit_experiments.library.characterization.spectroscopy.Spectroscopy

Initialization

A spectroscopy experiment where the frequency of a pulse is scanned.

Parameters:
  • physical_qubits (Sequence[int]) – List containing the qubit on which to run spectroscopy.

  • frequencies (Iterable[float]) – The frequencies to scan in the experiment, in Hz.

  • backend (Optional[Backend]) – Optional, the backend to run the experiment on.

  • absolute (bool) – Boolean to specify if the frequencies are absolute or relative to the qubit frequency in the backend.

  • analysis (Optional[BaseAnalysis]) – An instance of the analysis class to use.

  • experiment_options – Key word arguments used to set the experiment options.

Raises:

QiskitError – If there are less than three frequency shifts.

Attributes

QubitSpectroscopy.analysis

Return the analysis instance for the experiment

QubitSpectroscopy.backend

Return the backend for the experiment

QubitSpectroscopy.experiment_options

Return the options for the experiment.

QubitSpectroscopy.experiment_type

Return experiment type.

QubitSpectroscopy.num_qubits

Return the number of qubits for the experiment.

QubitSpectroscopy.physical_qubits

Return the device qubits for the experiment.

QubitSpectroscopy.run_options

Return options values for the experiment run() method.

QubitSpectroscopy.transpile_options

Return the transpiler options for the run() method.

Methods

QubitSpectroscopy.circuits()

Create the circuit for the spectroscopy experiment.

QubitSpectroscopy.config()

Return the config dataclass for this experiment

QubitSpectroscopy.copy()

Return a copy of the experiment

QubitSpectroscopy.from_config(config)

Initialize an experiment from experiment config

QubitSpectroscopy.run([backend, analysis, ...])

Run an experiment and perform analysis.

QubitSpectroscopy.set_experiment_options(...)

Set the experiment options.

QubitSpectroscopy.set_run_options(**fields)

Set options values for the experiment run() method.

QubitSpectroscopy.set_transpile_options(**fields)

Set the transpiler options for run() method.