Note

This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.

BasisGateLibrary

class BasisGateLibrary(basis_gates=None, default_values=None, **extra_kwargs)[source]

A base class for libraries of basis gates to make it easier to setup Calibrations.

Setup the library.

Parameters:
  • basis_gates (Optional[List[str]]) – The basis gates to generate.

  • default_values (Optional[Dict]) – A dictionary to override library default parameter values.

  • extra_kwargs – Extra key-word arguments of the subclasses that are saved to be able to reconstruct the library using the __init__() method.

Raises:

CalibrationError – If on of the given basis gates is not supported by the library.

Attributes

BasisGateLibrary.basis_gates

Return the basis gates supported by the library.

Methods

BasisGateLibrary.__getitem__(name)

Return the schedule.

BasisGateLibrary.__len__()

The length of the library defined as the number of basis gates.

BasisGateLibrary.config()

Return the settings used to initialize the library.

BasisGateLibrary.default_values()

Return the default values for the parameters.

BasisGateLibrary.from_config(config)

Deserialize the library given the input dictionary

BasisGateLibrary.get(k[,d])

BasisGateLibrary.items()

BasisGateLibrary.keys()

BasisGateLibrary.num_qubits(name)

Return the number of qubits that the schedule with the given name acts on.

BasisGateLibrary.values()