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

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

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.

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.

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: Optional[float] = None, bias_step: Optional[float] = None, drive_amplitude: Optional[float] = None, transition: Optional[str] = '01', drive_duration: int = 2000, flux_qubits: Optional[list[Union[str, int]]] = None)[source]#

Bases: QubitFluxParameters

Crosstalk runcard inputs.

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.

class qibocal.protocols.flux_dependence.qubit_crosstalk.QubitCrosstalkData(resonator_type: str, qubit_frequency: dict[typing.Union[str, int], float] = <factory>, offset: 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>, sweetspot: dict[typing.Union[str, int], float] = <factory>, d: dict[typing.Union[str, int], float] = <factory>, voltage: dict[typing.Union[str, int], float] = <factory>, matrix_element: dict[typing.Union[str, int], float] = <factory>)[source]#

Bases: QubitFluxData

Crosstalk acquisition outputs when flux_qubits are given.

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

Sweetspot for each qubit.

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

Asymmetry for each qubit.

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

Voltage applied to each flux line.

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

Diagonal crosstalk matrix element.

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]#
class qibocal.protocols.flux_dependence.qubit_crosstalk.QubitCrosstalkResults(sweetspot: dict[Union[str, int], float], frequency: dict[Union[str, int], float], asymmetry: dict[Union[str, int], float], fitted_parameters: dict[tuple[Union[str, int], Union[str, int]], dict], matrix_element: dict[Union[str, int], float], crosstalk_matrix: dict[Union[str, int], dict[Union[str, int], float]])[source]#

Bases: QubitFluxResults

Qubit Crosstalk outputs.

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.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.

class qibocal.protocols.flux_dependence.qubit_flux_dependence.QubitFluxResults(sweetspot: dict[Union[str, int], float], frequency: dict[Union[str, int], float], asymmetry: 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.

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

Asymmetry between junctions.

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

Raw fitting output.

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

V_ii coefficient.

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, qubit_frequency: dict[typing.Union[str, int], float] = <factory>, offset: 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.

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

Qubit frequencies.

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

Qubit bias offset.

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.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.

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.

class qibocal.protocols.flux_dependence.qubit_flux_tracking.QubitFluxTrackData(resonator_type: str, qubit_frequency: dict[typing.Union[str, int], float] = <factory>, offset: 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.

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: Optional[float] = None, bias_step: Optional[float] = None, flux_qubits: Optional[list[Union[str, int]]] = None)[source]#

Bases: ResonatorFluxParameters

ResonatorFlux runcard inputs.

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.

class qibocal.protocols.flux_dependence.resonator_crosstalk.ResCrosstalkResults(frequency: dict[typing.Union[str, int], float] = <factory>, sweetspot: dict[typing.Union[str, int], float] = <factory>, asymmetry: dict[typing.Union[str, int], float] = <factory>, bare_frequency: dict[typing.Union[str, int], float] = <factory>, drive_frequency: dict[typing.Union[str, int], float] = <factory>, fitted_parameters: dict[tuple[typing.Union[str, int], typing.Union[str, int]], dict] = <factory>, coupling: dict[typing.Union[str, int], float] = <factory>, matrix_element: 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.

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.

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], int] = <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>, sweetspot: dict[typing.Union[str, int], float] = <factory>, asymmetry: dict[typing.Union[str, int], float] = <factory>, coupling: dict[typing.Union[str, int], float] = <factory>, voltage: dict[typing.Union[str, int], float] = <factory>, resonator_frequency: dict[typing.Union[str, int], float] = <factory>, matrix_element: dict[typing.Union[str, int], float] = <factory>)[source]#

Bases: ResonatorFluxData

ResFlux acquisition outputs when flux_qubits are given.

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

Sweetspot for each qubit.

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

Asymmetry for each qubit.

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

Coupling parameter g for each qubit.

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

Voltage provided to each qubit.

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

Readout resonator frequency for each qubit.

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.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.].

class qibocal.protocols.flux_dependence.resonator_flux_dependence.ResonatorFluxResults(frequency: dict[typing.Union[str, int], float] = <factory>, sweetspot: dict[typing.Union[str, int], float] = <factory>, asymmetry: dict[typing.Union[str, int], float] = <factory>, bare_frequency: dict[typing.Union[str, int], float] = <factory>, drive_frequency: dict[typing.Union[str, int], float] = <factory>, fitted_parameters: dict[typing.Union[str, int], dict[str, float]] = <factory>, coupling: dict[typing.Union[str, int], float] = <factory>, matrix_element: dict[typing.Union[str, int], float] = <factory>)[source]#

Bases: Results

ResonatoFlux outputs.

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

Readout frequency for each qubit.

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

Sweetspot for each qubit.

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

Asymmetry between junctions.

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

Resonator bare frequency.

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

Qubit frequency at sweetspot.

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

Raw fitting output.

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

Qubit-resonator coupling.

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

C_ii coefficient.

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>, 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.

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

Qubit bare resonator frequency power provided by the user.

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.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, sweetspot, d, matrix_element, crosstalk_element)[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

  • 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)\).

Returns:

(float)

qibocal.protocols.flux_dependence.utils.transmon_frequency(xi, xj, w_max, d, matrix_element, sweetspot, crosstalk_element)[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 – 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)\).

qibocal.protocols.flux_dependence.utils.transmon_frequency_diagonal(x, w_max, d, matrix_element, sweetspot)[source]#

Approximation to transmon frequency without crosstalk.

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

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

Parameters:
  • x (float) – bias of target 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

  • d – 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)\).

qibocal.protocols.flux_dependence.utils.transmon_readout_frequency(xi, xj, w_max, d, matrix_element, crosstalk_element, sweetspot, resonator_freq, g)[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.transmon_readout_frequency_diagonal(x, w_max, d, matrix_element, sweetspot, resonator_freq, g)[source]#

Approximation to flux dependent resonator frequency without crosstalk.

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

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

Parameters:
  • x (float) – bias value

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

  • d (float) – d (float): asymmetry between the two junctions of the transmon.

  • element (matrix) – diagonal crosstalk matrix element

  • phase (float) – bias corresponding to zero flux (sweetspot).

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

  • g – readout coupling.

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

Returns bounds for qubit flux fit.

qibocal.protocols.flux_dependence.utils.resonator_flux_dependence_fit_bounds(qubit_frequency: float, bias: array, bare_resonator_frequency: float)[source]#

Returns bounds for resonator flux fit.