qibocal.protocols.flux_dependence package#

Submodules#

qibocal.protocols.flux_dependence.avoided_crossing module#

class qibocal.protocols.flux_dependence.avoided_crossing.AvoidedCrossingParameters(freq_width: int, freq_step: int, bias_width: Optional[float] = None, bias_step: Optional[float] = None, drive_amplitude: Optional[float] = None, transition: Optional[str] = '01', drive_duration: int = 2000)[source]#

Bases: QubitFluxParameters

Avoided Crossing Parameters

bias_step: Optional[float] = None#

Bias step for sweep [a.u.].

bias_width: Optional[float] = None#

Width for bias sweep [V].

drive_amplitude: Optional[float] = None#

Drive amplitude (optional). If defined, same amplitude will be used in all qubits. Otherwise the default amplitude defined on the platform runcard will be used

drive_duration: int = 2000#

Duration of the drive pulse.

hardware_average: bool = False#

By default hardware average will be performed.

transition: Optional[str] = '01'#

Flux spectroscopy transition type (“01” or “02”). Default value is 01

freq_width: int#

Width for frequency sweep relative to the readout frequency [Hz].

freq_step: int#

Frequency step for sweep [Hz].

nshots: int#

Number of executions on hardware

relaxation_time: float#

Wait time for the qubit to decohere back to the gnd state

class qibocal.protocols.flux_dependence.avoided_crossing.AvoidedCrossingResults(parabolas: dict[tuple, list], fits: dict[tuple, list], cz: dict[tuple, list], iswap: dict[tuple, list])[source]#

Bases: Results

Avoided crossing outputs

parabolas: dict[tuple, list]#

Extracted parabolas

fits: dict[tuple, list]#

Fits parameters

cz: dict[tuple, list]#

CZ intersection points

iswap: dict[tuple, list]#

iSwap intersection points

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property params: dict#

Convert non-arrays attributes into dict.

save(path: Path)#

Store results to file.

class qibocal.protocols.flux_dependence.avoided_crossing.AvoidedCrossingData(qubit_pairs: list, drive_frequency_low: dict = <factory>, data: dict[tuple[typing.Union[str, int], str], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]] = <factory>)[source]#

Bases: Data

Avoided crossing acquisition outputs

qubit_pairs: list#

list of qubit pairs ordered following the drive frequency

drive_frequency_low: dict#

Lowest drive frequency in each qubit pair

data: dict[tuple[typing.Union[str, int], str], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]]#

Raw data acquired.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property pairs#

Access qubit pairs ordered alphanumerically from data structure.

property params: dict#

Convert non-arrays attributes into dict.

property qubits#

Access qubits from data structure.

register_qubit(dtype, data_keys, data_dict)#

Store output for single qubit.

Parameters:
  • data_keys (tuple) – Keys of Data.data.

  • data_dict (dict) – The keys are the fields of dtype and

  • arrays. (the values are the related) –

save(path: Path)#

Store data to file.

qibocal.protocols.flux_dependence.avoided_crossing._acquisition(params: AvoidedCrossingParameters, platform: Platform, targets: list[Tuple[Union[str, int], Union[str, int]]]) AvoidedCrossingData[source]#

Data acquisition for avoided crossing. This routine performs the qubit flux dependency for the “01” and “02” transition on the qubit pair. It returns the bias and frequency values to perform a CZ and a iSwap gate.

Parameters:
  • params (AvoidedCrossingParameters) – experiment’s parameters.

  • platform (Platform) – Qibolab platform object.

  • qubits (dict) – list of targets qubit pairs to perform the action.

qibocal.protocols.flux_dependence.avoided_crossing._fit(data: AvoidedCrossingData) AvoidedCrossingResults[source]#

Post-Processing for avoided crossing.

qibocal.protocols.flux_dependence.avoided_crossing._plot(data: AvoidedCrossingData, fit: Optional[AvoidedCrossingResults], target: Tuple[Union[str, int], Union[str, int]])[source]#

Plotting function for avoided crossing

qibocal.protocols.flux_dependence.avoided_crossing.find_parabola(data: dict) list[source]#

Finds the parabola in data

qibocal.protocols.flux_dependence.avoided_crossing.solve_eq(pars: list) tuple[source]#

Solver of the quadratic equation

\[a x^2 + b x + c = 0\]

pars is the list [a, b, c].

qibocal.protocols.flux_dependence.avoided_crossing.index(pairs: list, item: list) list[source]#

Find the ordered pair

class qibocal.protocols.flux_dependence.avoided_crossing.Excitations(value)[source]#

Bases: str, Enum

Excited two qubits states.

_generate_next_value_(start, count, last_values)#

Generate the next value when not given.

name: the name of the member start: the initial start value or None count: the number of existing members last_value: the last value assigned or None

_member_names_ = ['ge', 'gf', 'all_ge']#
_member_map_ = {'all_ge': Excitations.all_ge, 'ge': Excitations.ge, 'gf': Excitations.gf}#
_member_type_#

alias of str

_value2member_map_ = {'01': Excitations.ge, '01+10': Excitations.all_ge, '02': Excitations.gf}#
ge = '01'#

First qubit in ground state, second qubit in excited state

gf = '02'#

First qubit in ground state, second qubit in the first excited state out of the computational basis.

all_ge = '01+10'#

One of the qubit in the ground state and the other one in the excited state.

qibocal.protocols.flux_dependence.avoided_crossing.plot_heatmap(heatmaps, fit, transition, bias_unique, order_pair, data_high, col)[source]#
qibocal.protocols.flux_dependence.avoided_crossing.plot_curves(parabolas, fit, data, order_pair, bias_range)[source]#
qibocal.protocols.flux_dependence.avoided_crossing.plot_intersections(parabolas, cz, iswap)[source]#

qibocal.protocols.flux_dependence.qubit_crosstalk module#

class qibocal.protocols.flux_dependence.qubit_crosstalk.QubitCrosstalkParameters(freq_width: int, freq_step: int, bias_width: ~typing.Optional[float] = None, bias_step: ~typing.Optional[float] = None, drive_amplitude: ~typing.Optional[float] = None, transition: ~typing.Optional[str] = '01', drive_duration: int = 2000, bias_point: ~typing.Optional[dict[typing.Union[str, int], float]] = <factory>, flux_qubits: ~typing.Optional[list[typing.Union[str, int]]] = None)[source]#

Bases: QubitFluxParameters

Crosstalk runcard inputs.

bias_point: Optional[dict[Union[str, int], float]]#

bias_point_qubit_id}.

Type:

Dictionary with {qubit_id

flux_qubits: Optional[list[Union[str, int]]] = None#

IDs of the qubits that we will sweep the flux on. If None flux will be swept on all qubits that we are running the routine on in a multiplex fashion. If given flux will be swept on the given qubits in a sequential fashion (n qubits will result to n different executions). Multiple qubits may be measured in each execution as specified by the qubits option in the runcard.

bias_step: Optional[float] = None#

Bias step for sweep [a.u.].

bias_width: Optional[float] = None#

Width for bias sweep [V].

drive_amplitude: Optional[float] = None#

Drive amplitude (optional). If defined, same amplitude will be used in all qubits. Otherwise the default amplitude defined on the platform runcard will be used

drive_duration: int = 2000#

Duration of the drive pulse.

hardware_average: bool = False#

By default hardware average will be performed.

transition: Optional[str] = '01'#

Flux spectroscopy transition type (“01” or “02”). Default value is 01

freq_width: int#

Width for frequency sweep relative to the readout frequency [Hz].

freq_step: int#

Frequency step for sweep [Hz].

nshots: int#

Number of executions on hardware

relaxation_time: float#

Wait time for the qubit to decohere back to the gnd state

class qibocal.protocols.flux_dependence.qubit_crosstalk.QubitCrosstalkData(resonator_type: str, charging_energy: dict[typing.Union[str, int], float] = <factory>, qubit_frequency: dict[typing.Union[str, int], float] = <factory>, data: dict[tuple[typing.Union[str, int], typing.Union[str, int]], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]] = <factory>, matrix_element: dict[typing.Union[str, int], float] = <factory>, bias_point: dict[typing.Union[str, int], float] = <factory>, offset: dict[typing.Union[str, int], float] = <factory>)[source]#

Bases: QubitFluxData

Crosstalk acquisition outputs when flux_qubits are given.

matrix_element: dict[Union[str, int], float]#

Diagonal flux element.

bias_point: dict[Union[str, int], float]#

Bias point for each qubit.

offset: dict[Union[str, int], float]#

Phase shift for each qubit.

qubit_frequency: dict[Union[str, int], float]#

Qubit frequency for each qubit.

data: dict[tuple[typing.Union[str, int], typing.Union[str, int]], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]]#

Raw data acquired for (qubit, qubit_flux) pairs saved in nested dictionaries.

register_qubit(qubit, flux_qubit, freq, bias, signal, phase)[source]#

Store output for single qubit.

property diagonal: Optional[QubitFluxData]#
_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property pairs#

Access qubit pairs ordered alphanumerically from data structure.

property params: dict#

Convert non-arrays attributes into dict.

property qubits#

Access qubits from data structure.

save(path: Path)#

Store data to file.

resonator_type: str#

Resonator type.

charging_energy: dict[Union[str, int], float]#

Qubit charging energy.

class qibocal.protocols.flux_dependence.qubit_crosstalk.QubitCrosstalkResults(sweetspot: dict[Union[str, int], float], frequency: dict[Union[str, int], float], fitted_parameters: dict[tuple[Union[str, int], Union[str, int]], dict], matrix_element: dict[Union[str, int], float], qubit_frequency_bias_point: dict[Union[str, int], float], crosstalk_matrix: dict[Union[str, int], dict[Union[str, int], float]])[source]#

Bases: QubitFluxResults

Qubit Crosstalk outputs.

qubit_frequency_bias_point: dict[Union[str, int], float]#

Expected qubit frequency at bias point.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property params: dict#

Convert non-arrays attributes into dict.

save(path: Path)#

Store results to file.

sweetspot: dict[Union[str, int], float]#

Sweetspot for each qubit.

frequency: dict[Union[str, int], float]#

Drive frequency for each qubit.

matrix_element: dict[Union[str, int], float]#

V_ii coefficient.

crosstalk_matrix: dict[Union[str, int], dict[Union[str, int], float]]#

Crosstalk matrix element.

fitted_parameters: dict[tuple[Union[str, int], Union[str, int]], dict]#

Fitted parameters for each couple target-flux qubit.

qibocal.protocols.flux_dependence.qubit_crosstalk._acquisition(params: QubitCrosstalkParameters, platform: Platform, targets: list[Union[str, int]]) QubitCrosstalkData[source]#

Data acquisition for Crosstalk Experiment.

qibocal.protocols.flux_dependence.qubit_crosstalk._fit(data: QubitCrosstalkData) QubitCrosstalkResults[source]#
qibocal.protocols.flux_dependence.qubit_crosstalk._plot(data: QubitCrosstalkData, fit: QubitCrosstalkResults, target: Union[str, int])[source]#

Plotting function for Crosstalk Experiment.

qibocal.protocols.flux_dependence.qubit_crosstalk._update(results: QubitCrosstalkResults, platform: Platform, qubit: Union[str, int])[source]#

Update crosstalk matrix.

qibocal.protocols.flux_dependence.qubit_crosstalk.qubit_crosstalk = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

Qubit crosstalk Routine object

qibocal.protocols.flux_dependence.qubit_flux_dependence module#

class qibocal.protocols.flux_dependence.qubit_flux_dependence.QubitFluxParameters(freq_width: int, freq_step: int, bias_width: Optional[float] = None, bias_step: Optional[float] = None, drive_amplitude: Optional[float] = None, transition: Optional[str] = '01', drive_duration: int = 2000)[source]#

Bases: ResonatorFluxParameters

QubitFlux runcard inputs.

drive_amplitude: Optional[float] = None#

Drive amplitude (optional). If defined, same amplitude will be used in all qubits. Otherwise the default amplitude defined on the platform runcard will be used

transition: Optional[str] = '01'#

Flux spectroscopy transition type (“01” or “02”). Default value is 01

drive_duration: int = 2000#

Duration of the drive pulse.

bias_step: Optional[float] = None#

Bias step for sweep [a.u.].

bias_width: Optional[float] = None#

Width for bias sweep [V].

hardware_average: bool = False#

By default hardware average will be performed.

freq_width: int#

Width for frequency sweep relative to the readout frequency [Hz].

freq_step: int#

Frequency step for sweep [Hz].

nshots: int#

Number of executions on hardware

relaxation_time: float#

Wait time for the qubit to decohere back to the gnd state

class qibocal.protocols.flux_dependence.qubit_flux_dependence.QubitFluxResults(sweetspot: dict[Union[str, int], float], frequency: dict[Union[str, int], float], fitted_parameters: dict[Union[str, int], dict[str, float]], matrix_element: dict[Union[str, int], float])[source]#

Bases: Results

QubitFlux outputs.

sweetspot: dict[Union[str, int], float]#

Sweetspot for each qubit.

frequency: dict[Union[str, int], float]#

Drive frequency for each qubit.

fitted_parameters: dict[Union[str, int], dict[str, float]]#

Raw fitting output.

matrix_element: dict[Union[str, int], float]#

V_ii coefficient.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property params: dict#

Convert non-arrays attributes into dict.

save(path: Path)#

Store results to file.

qibocal.protocols.flux_dependence.qubit_flux_dependence.QubitFluxType = dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])#

Custom dtype for resonator flux dependence.

class qibocal.protocols.flux_dependence.qubit_flux_dependence.QubitFluxData(resonator_type: str, charging_energy: dict[typing.Union[str, int], float] = <factory>, qubit_frequency: dict[typing.Union[str, int], float] = <factory>, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]] = <factory>)[source]#

Bases: Data

QubitFlux acquisition outputs.

resonator_type: str#

Resonator type.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property pairs#

Access qubit pairs ordered alphanumerically from data structure.

property params: dict#

Convert non-arrays attributes into dict.

property qubits#

Access qubits from data structure.

save(path: Path)#

Store data to file.

charging_energy: dict[Union[str, int], float]#

Qubit charging energy.

qubit_frequency: dict[Union[str, int], float]#

Qubit charging energy.

data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]]#

Raw data acquired.

register_qubit(qubit, freq, bias, signal, phase)[source]#

Store output for single qubit.

qibocal.protocols.flux_dependence.qubit_flux_dependence._acquisition(params: QubitFluxParameters, platform: Platform, targets: list[Union[str, int]]) QubitFluxData[source]#

Data acquisition for QubitFlux Experiment.

qibocal.protocols.flux_dependence.qubit_flux_dependence._fit(data: QubitFluxData) QubitFluxResults[source]#

Post-processing for QubitFlux Experiment. See arxiv:0703002 Fit frequency as a function of current for the flux qubit spectroscopy data (QubitFluxData): data object with information on the feature response at each current point.

qibocal.protocols.flux_dependence.qubit_flux_dependence._plot(data: QubitFluxData, fit: QubitFluxResults, target: Union[str, int])[source]#

Plotting function for QubitFlux Experiment.

qibocal.protocols.flux_dependence.qubit_flux_dependence._update(results: QubitFluxResults, platform: Platform, qubit: Union[str, int])[source]#
qibocal.protocols.flux_dependence.qubit_flux_dependence.qubit_flux = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

QubitFlux Routine object.

qibocal.protocols.flux_dependence.qubit_flux_tracking module#

class qibocal.protocols.flux_dependence.qubit_flux_tracking.QubitFluxTrackParameters(freq_width: int, freq_step: int, bias_width: Optional[float] = None, bias_step: Optional[float] = None, drive_amplitude: Optional[float] = None, transition: Optional[str] = '01', drive_duration: int = 2000)[source]#

Bases: QubitFluxParameters

QubitFluxTrack runcard inputs.

bias_step: Optional[float] = None#

Bias step for sweep [a.u.].

bias_width: Optional[float] = None#

Width for bias sweep [V].

drive_amplitude: Optional[float] = None#

Drive amplitude (optional). If defined, same amplitude will be used in all qubits. Otherwise the default amplitude defined on the platform runcard will be used

drive_duration: int = 2000#

Duration of the drive pulse.

hardware_average: bool = False#

By default hardware average will be performed.

transition: Optional[str] = '01'#

Flux spectroscopy transition type (“01” or “02”). Default value is 01

freq_width: int#

Width for frequency sweep relative to the readout frequency [Hz].

freq_step: int#

Frequency step for sweep [Hz].

nshots: int#

Number of executions on hardware

relaxation_time: float#

Wait time for the qubit to decohere back to the gnd state

class qibocal.protocols.flux_dependence.qubit_flux_tracking.QubitFluxTrackResults(freq_width: int, freq_step: int, bias_width: Optional[float] = None, bias_step: Optional[float] = None, drive_amplitude: Optional[float] = None, transition: Optional[str] = '01', drive_duration: int = 2000)[source]#

Bases: QubitFluxParameters

QubitFluxTrack outputs.

bias_step: Optional[float] = None#

Bias step for sweep [a.u.].

bias_width: Optional[float] = None#

Width for bias sweep [V].

drive_amplitude: Optional[float] = None#

Drive amplitude (optional). If defined, same amplitude will be used in all qubits. Otherwise the default amplitude defined on the platform runcard will be used

drive_duration: int = 2000#

Duration of the drive pulse.

hardware_average: bool = False#

By default hardware average will be performed.

transition: Optional[str] = '01'#

Flux spectroscopy transition type (“01” or “02”). Default value is 01

freq_width: int#

Width for frequency sweep relative to the readout frequency [Hz].

freq_step: int#

Frequency step for sweep [Hz].

nshots: int#

Number of executions on hardware

relaxation_time: float#

Wait time for the qubit to decohere back to the gnd state

class qibocal.protocols.flux_dependence.qubit_flux_tracking.QubitFluxTrackData(resonator_type: str, charging_energy: dict[typing.Union[str, int], float] = <factory>, qubit_frequency: dict[typing.Union[str, int], float] = <factory>, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]] = <factory>)[source]#

Bases: QubitFluxData

QubitFluxTrack acquisition outputs.

register_qubit_track(qubit, freq, bias, signal, phase)[source]#

Store output for single qubit.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property pairs#

Access qubit pairs ordered alphanumerically from data structure.

property params: dict#

Convert non-arrays attributes into dict.

property qubits#

Access qubits from data structure.

register_qubit(qubit, freq, bias, signal, phase)#

Store output for single qubit.

save(path: Path)#

Store data to file.

resonator_type: str#

Resonator type.

charging_energy: dict[QubitId, float]#

Qubit charging energy.

qubit_frequency: dict[QubitId, float]#

Qubit charging energy.

data: dict[QubitId, npt.NDArray[QubitFluxType]]#

Raw data acquired.

qibocal.protocols.flux_dependence.qubit_flux_tracking._acquisition(params: QubitFluxTrackResults, platform: Platform, targets: list[Union[str, int]]) QubitFluxTrackData[source]#

Data acquisition for QubitFlux Experiment.

qibocal.protocols.flux_dependence.qubit_flux_tracking.qubit_flux_tracking = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

QubitFluxTrack Routine object.

qibocal.protocols.flux_dependence.resonator_crosstalk module#

class qibocal.protocols.flux_dependence.resonator_crosstalk.ResCrosstalkParameters(freq_width: int, freq_step: int, bias_width: ~typing.Optional[float] = None, bias_step: ~typing.Optional[float] = None, bias_point: ~typing.Optional[dict[typing.Union[str, int], float]] = <factory>, flux_qubits: ~typing.Optional[list[typing.Union[str, int]]] = None)[source]#

Bases: ResonatorFluxParameters

ResonatorFlux runcard inputs.

bias_point: Optional[dict[Union[str, int], float]]#

bias_point_qubit_id}.

Type:

Dictionary with {qubit_id

flux_qubits: Optional[list[Union[str, int]]] = None#

IDs of the qubits that we will sweep the flux on. If None flux will be swept on all qubits that we are running the routine on in a multiplex fashion. If given flux will be swept on the given qubits in a sequential fashion (n qubits will result to n different executions). Multiple qubits may be measured in each execution as specified by the qubits option in the runcard.

bias_step: Optional[float] = None#

Bias step for sweep [a.u.].

bias_width: Optional[float] = None#

Width for bias sweep [V].

hardware_average: bool = False#

By default hardware average will be performed.

freq_width: int#

Width for frequency sweep relative to the readout frequency [Hz].

freq_step: int#

Frequency step for sweep [Hz].

nshots: int#

Number of executions on hardware

relaxation_time: float#

Wait time for the qubit to decohere back to the gnd state

class qibocal.protocols.flux_dependence.resonator_crosstalk.ResCrosstalkResults(resonator_freq: dict[typing.Union[str, int], float] = <factory>, bare_resonator_freq: dict[typing.Union[str, int], float] = <factory>, coupling: dict[typing.Union[str, int], float] = <factory>, fitted_parameters: dict[tuple[typing.Union[str, int], typing.Union[str, int]], dict] = <factory>, resonator_frequency_bias_point: dict[typing.Union[str, int], dict[typing.Union[str, int], float]] = <factory>, crosstalk_matrix: dict[typing.Union[str, int], dict[typing.Union[str, int], float]] = <factory>)[source]#

Bases: ResonatorFluxResults

ResCrosstalk outputs.

resonator_frequency_bias_point: dict[Union[str, int], dict[Union[str, int], float]]#

Resonator frequency at bias point.

crosstalk_matrix: dict[Union[str, int], dict[Union[str, int], float]]#

Crosstalk matrix element.

fitted_parameters: dict[tuple[Union[str, int], Union[str, int]], dict]#

Fitted parameters for each couple target-flux qubit.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property params: dict#

Convert non-arrays attributes into dict.

save(path: Path)#

Store results to file.

resonator_freq: dict[Union[str, int], float]#
bare_resonator_freq: dict[Union[str, int], float]#
coupling: dict[Union[str, int], float]#

Qubit-resonator coupling.

class qibocal.protocols.flux_dependence.resonator_crosstalk.ResCrosstalkData(resonator_type: str, qubit_frequency: dict[typing.Union[str, int], float] = <factory>, offset: dict[typing.Union[str, int], float] = <factory>, bare_resonator_frequency: dict[typing.Union[str, int], float] = <factory>, matrix_element: dict[typing.Union[str, int], float] = <factory>, charging_energy: dict[typing.Union[str, int], float] = <factory>, data: dict[tuple[typing.Union[str, int], typing.Union[str, int]], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]] = <factory>, coupling: dict[typing.Union[str, int], float] = <factory>, bias_point: dict[typing.Union[str, int], float] = <factory>, resonator_frequency: dict[typing.Union[str, int], float] = <factory>)[source]#

Bases: ResonatorFluxData

ResFlux acquisition outputs when flux_qubits are given.

coupling: dict[Union[str, int], float]#

Coupling parameter g for each qubit.

bias_point: dict[Union[str, int], float]#

Voltage provided to each qubit.

bare_resonator_frequency: dict[Union[str, int], float]#

Readout resonator frequency for each qubit.

resonator_frequency: dict[Union[str, int], float]#

Readout resonator frequency for each qubit.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property pairs#

Access qubit pairs ordered alphanumerically from data structure.

property params: dict#

Convert non-arrays attributes into dict.

property qubits#

Access qubits from data structure.

save(path: Path)#

Store data to file.

resonator_type: str#

Resonator type.

qubit_frequency: dict[Union[str, int], float]#

Qubit frequencies.

offset: dict[Union[str, int], float]#

Qubit bias offset.

charging_energy: dict[Union[str, int], float]#
matrix_element: dict[Union[str, int], float]#

Diagonal crosstalk matrix element.

data: dict[tuple[typing.Union[str, int], typing.Union[str, int]], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]]#

Raw data acquired for (qubit, qubit_flux) pairs saved in nested dictionaries.

register_qubit(qubit, flux_qubit, freq, bias, signal, phase)[source]#

Store output for single qubit.

property diagonal: Optional[ResonatorFluxData]#
qibocal.protocols.flux_dependence.resonator_crosstalk._acquisition(params: ResCrosstalkParameters, platform: Platform, targets: list[Union[str, int]]) ResCrosstalkData[source]#

Data acquisition for ResonatorFlux experiment.

qibocal.protocols.flux_dependence.resonator_crosstalk._fit(data: ResCrosstalkData) ResCrosstalkResults[source]#
qibocal.protocols.flux_dependence.resonator_crosstalk._plot(data: ResCrosstalkData, fit: ResCrosstalkResults, target: Union[str, int])[source]#

Plotting function for ResonatorFlux Experiment.

qibocal.protocols.flux_dependence.resonator_crosstalk._update(results: ResCrosstalkResults, platform: Platform, qubit: Union[str, int])[source]#

Update crosstalk matrix.

qibocal.protocols.flux_dependence.resonator_crosstalk.resonator_crosstalk = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

Resonator crosstalk Routine object

qibocal.protocols.flux_dependence.resonator_flux_dependence module#

class qibocal.protocols.flux_dependence.resonator_flux_dependence.ResonatorFluxParameters(freq_width: int, freq_step: int, bias_width: Optional[float] = None, bias_step: Optional[float] = None)[source]#

Bases: Parameters

ResonatorFlux runcard inputs.

freq_width: int#

Width for frequency sweep relative to the readout frequency [Hz].

freq_step: int#

Frequency step for sweep [Hz].

bias_width: Optional[float] = None#

Width for bias sweep [V].

bias_step: Optional[float] = None#

Bias step for sweep [a.u.].

hardware_average: bool = False#

By default hardware average will be performed.

nshots: int#

Number of executions on hardware

relaxation_time: float#

Wait time for the qubit to decohere back to the gnd state

class qibocal.protocols.flux_dependence.resonator_flux_dependence.ResonatorFluxResults(resonator_freq: dict[typing.Union[str, int], float] = <factory>, bare_resonator_freq: dict[typing.Union[str, int], float] = <factory>, coupling: dict[typing.Union[str, int], float] = <factory>, fitted_parameters: dict[typing.Union[str, int], float] = <factory>)[source]#

Bases: Results

ResonatoFlux outputs.

resonator_freq: dict[Union[str, int], float]#
bare_resonator_freq: dict[Union[str, int], float]#
coupling: dict[Union[str, int], float]#

Qubit-resonator coupling.

fitted_parameters: dict[Union[str, int], float]#
_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property params: dict#

Convert non-arrays attributes into dict.

save(path: Path)#

Store results to file.

qibocal.protocols.flux_dependence.resonator_flux_dependence.ResFluxType = dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])#

Custom dtype for resonator flux dependence.

class qibocal.protocols.flux_dependence.resonator_flux_dependence.ResonatorFluxData(resonator_type: str, qubit_frequency: dict[typing.Union[str, int], float] = <factory>, offset: dict[typing.Union[str, int], float] = <factory>, bare_resonator_frequency: dict[typing.Union[str, int], int] = <factory>, matrix_element: dict[typing.Union[str, int], float] = <factory>, charging_energy: dict[typing.Union[str, int], float] = <factory>, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]] = <factory>)[source]#

Bases: Data

ResonatorFlux acquisition outputs.

resonator_type: str#

Resonator type.

qubit_frequency: dict[Union[str, int], float]#

Qubit frequencies.

offset: dict[Union[str, int], float]#

Qubit bias offset.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property pairs#

Access qubit pairs ordered alphanumerically from data structure.

property params: dict#

Convert non-arrays attributes into dict.

property qubits#

Access qubits from data structure.

save(path: Path)#

Store data to file.

bare_resonator_frequency: dict[Union[str, int], int]#

Qubit bare resonator frequency power provided by the user.

matrix_element: dict[Union[str, int], float]#
charging_energy: dict[Union[str, int], float]#
data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]]#

Raw data acquired.

register_qubit(qubit, freq, bias, signal, phase)[source]#

Store output for single qubit.

qibocal.protocols.flux_dependence.resonator_flux_dependence._acquisition(params: ResonatorFluxParameters, platform: Platform, targets: list[Union[str, int]]) ResonatorFluxData[source]#

Data acquisition for ResonatorFlux experiment.

qibocal.protocols.flux_dependence.resonator_flux_dependence._fit(data: ResonatorFluxData) ResonatorFluxResults[source]#

Post-processing for QubitFlux Experiment. See arxiv:0703002 Fit frequency as a function of current for the flux qubit spectroscopy data (QubitFluxData): data object with information on the feature response at each current point.

qibocal.protocols.flux_dependence.resonator_flux_dependence._plot(data: ResonatorFluxData, fit: ResonatorFluxResults, target: Union[str, int])[source]#

Plotting function for ResonatorFlux Experiment.

qibocal.protocols.flux_dependence.resonator_flux_dependence._update(results: ResonatorFluxResults, platform: Platform, qubit: Union[str, int])[source]#
qibocal.protocols.flux_dependence.resonator_flux_dependence.resonator_flux = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

ResonatorFlux Routine object.

qibocal.protocols.flux_dependence.utils module#

qibocal.protocols.flux_dependence.utils.is_crosstalk(data)[source]#

Check if keys are tuple which corresponds to crosstalk data structure.

qibocal.protocols.flux_dependence.utils.create_data_array(freq, bias, signal, phase, dtype)[source]#

Create custom dtype array for acquired data.

qibocal.protocols.flux_dependence.utils.flux_dependence_plot(data, fit, qubit, fit_function=None)[source]#
qibocal.protocols.flux_dependence.utils.flux_crosstalk_plot(data, qubit, fit, fit_function)[source]#
qibocal.protocols.flux_dependence.utils.G_f_d(xi, xj, offset, d, crosstalk_element, normalization)[source]#

Auxiliary function to calculate qubit frequency as a function of bias.

It also determines the flux dependence of \(E_J\),:math:E_J(phi)=E_J(0)G_f_d. For more details see: https://arxiv.org/pdf/cond-mat/0703002.pdf

Parameters:
  • xi (float) – bias of target qubit

  • xj (float) – bias of neighbor qubit

  • offset (float) – phase_offset [V].

  • matrix_element (float) – diagonal crosstalk matrix element

  • crosstalk_element (float) – off-diagonal crosstalk matrix element

  • d (float) – asymmetry between the two junctions of the transmon. Typically denoted as \(d\). \(d = (E_J^1 - E_J^2) / (E_J^1 + E_J^2)\).

  • normalization (float) – Normalize diagonal element to 1

Returns:

(float)

qibocal.protocols.flux_dependence.utils.transmon_frequency(xi, xj, w_max, d, normalization, offset, crosstalk_element, charging_energy)[source]#

Approximation to transmon frequency.

The formula holds in the transmon regime Ej / Ec >> 1.

See https://arxiv.org/pdf/cond-mat/0703002.pdf for the complete formula.

Parameters:
  • xi (float) – bias of target qubit

  • xj (float) – bias of neighbor qubit

  • w_max (float) – maximum frequency :math:`w_{max} = sqrt{8 E_j E_c}

  • sweetspot (float) – sweetspot [V].

  • matrix_element (float) – diagonal crosstalk matrix element

  • crosstalk_element (float) – off-diagonal crosstalk matrix element

  • d (float) – asymmetry between the two junctions of the transmon. Typically denoted as \(d\). \(d = (E_J^1 - E_J^2) / (E_J^1 + E_J^2)\).

  • charging_energy – Ec / h (GHz)

qibocal.protocols.flux_dependence.utils.transmon_readout_frequency(xi, xj, w_max, d, normalization, crosstalk_element, offset, resonator_freq, g, charging_energy)[source]#

Approximation to flux dependent resonator frequency.

The formula holds in the transmon regime Ej / Ec >> 1.

See https://arxiv.org/pdf/cond-mat/0703002.pdf for the complete formula.

Parameters:
  • xi (float) – bias of target qubit

  • xj (float) – bias of neighbor qubit

  • w_max (float) – maximum frequency :math:`w_{max} = sqrt{8 E_j E_c}

  • sweetspot (float) – sweetspot [V].

  • matrix_element (float) – diagonal crosstalk matrix element

  • crosstalk_element (float) – off-diagonal crosstalk matrix element

  • d (float) – asymmetry between the two junctions of the transmon. Typically denoted as \(d\). \(d = (E_J^1 - E_J^2) / (E_J^1 + E_J^2)\).

  • resonator_freq (float) – bare resonator frequency [GHz]

  • g – readout coupling.

qibocal.protocols.flux_dependence.utils.qubit_flux_dependence_fit_bounds(qubit_frequency: float)[source]#

Returns bounds for qubit flux fit.

qibocal.protocols.flux_dependence.utils.crosstalk_matrix(platform: Platform, qubits: list[Union[str, int]]) ndarray[source]#

Computing crosstalk matrix for number of qubits selected. The matrix returns has the following matrix element: (M)ij = qubits[i].crosstalk_matrix[qubits[j]]

qibocal.protocols.flux_dependence.utils.compensation_matrix(platform: Platform, qubits: list[Union[str, int]]) ndarray[source]#

Compensation matrix C computed as M C = diag(M’) where M is the crosstalk matrix. For more details check: https://web.physics.ucsb.edu/~martinisgroup/theses/Chen2018.pdf 8.2.3

qibocal.protocols.flux_dependence.utils.invert_transmon_freq(target_freq: float, platform: Platform, qubit: Union[str, int])[source]#

Return right side of equation matrix * total_flux = f(target_freq). Target frequency shoudl be expressed in GHz.

qibocal.protocols.flux_dependence.utils.frequency_to_bias(target_freqs: dict[Union[str, int], float], platform: Platform) ndarray[source]#

Starting from set of target_freqs computes bias points using the compensation matrix.