Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
9c9f58c
feat: CR gate draft (tested on emulator)
andrea-pasquale Mar 21, 2025
f13b8a7
refactor: Rename cross-resonance protocol
andrea-pasquale Mar 24, 2025
22ca463
feat: Add two-qubit platforms with fixed frequency
andrea-pasquale Apr 4, 2025
9705dc6
feat: Add cross-resonance amplitude protocol
andrea-pasquale Apr 4, 2025
d2e923e
feat: Adding cosinusoid fit to CR amp and duration
andrea-pasquale Apr 7, 2025
4a91ee1
fix: Remove None two-qubit natives from compiler
andrea-pasquale Apr 7, 2025
75409bd
refactor: Define CR pulse without CNOT native
andrea-pasquale Apr 7, 2025
ff3cb33
refactor: Remove sequence code duplication
andrea-pasquale Apr 8, 2025
c7320c4
refactor: Start using drive_extra
andrea-pasquale Apr 8, 2025
4c772ed
chore: Update qutrits platform
andrea-pasquale Apr 8, 2025
2e861f7
feat: Compute effective coupling Jeff
andrea-pasquale Apr 14, 2025
962b6fa
feat: Adding echoCR and use parameters from IBM chip
andrea-pasquale Apr 18, 2025
f126309
chore: Minor corrections
andrea-pasquale Apr 18, 2025
0526a8d
fix: Adjust delays
andrea-pasquale Apr 22, 2025
7359c60
feat: Adding hamiltonian_tomography_cr (no fitting)
andrea-pasquale Apr 22, 2025
be8af10
refactor: Adding tomographies protocols
andrea-pasquale Apr 22, 2025
88b2a9c
feat: Adding preliminary fit to tomographies
andrea-pasquale Apr 22, 2025
b50752c
refactor: Reduce code duplication for CR tomographies
andrea-pasquale Apr 23, 2025
b9d3b4b
refactor: Reduce code duplication for CR protocols
andrea-pasquale Apr 23, 2025
cc7434f
feat: Proper fit for <Z>
andrea-pasquale Apr 23, 2025
8d039d0
feat: Implementing correct fitting procedure
andrea-pasquale Apr 24, 2025
49f82a5
feat: Minor fixes and adding calculation of Hamiltonian coefficients
andrea-pasquale Apr 24, 2025
ec88c6e
feat: Adding phase and compensation pulse as parameters
andrea-pasquale Apr 24, 2025
01ec777
feat: Initial calibration for CNOT
andrea-pasquale Apr 29, 2025
e54b0d7
refactor: Document and simplify tomographies
andrea-pasquale Apr 29, 2025
f9fc0db
refactor: Document code and add tests
andrea-pasquale Apr 29, 2025
94756fb
test: Improve coverage
andrea-pasquale Apr 30, 2025
5e5304e
doc: Documentation for CR experiments
andrea-pasquale Apr 30, 2025
2250a5a
doc: Documentation on Hamiltonian Tomography CR protocols
andrea-pasquale Apr 30, 2025
ee7c5b2
fix: Skip fitting plot if fit fails
andrea-pasquale Jun 13, 2025
d0dadd8
fix: Add missing image in doc
andrea-pasquale Jun 24, 2025
4bb0efe
fix: Fix issue with pair order
andrea-pasquale Jun 25, 2025
b1a4c2f
fix: Remove amplitude sweep on target
andrea-pasquale Jun 26, 2025
f64f777
remove VirtualZ in basis changes
Luca-Ben-Herrmann Jul 2, 2025
efa8d60
new version for emulators parameters.json
lballerio Jan 8, 2026
a688eca
modifying cr_gate length for working also on qw21q-b chip
lballerio Jan 12, 2026
267bb35
adding bloch vector plot R
lballerio Jan 27, 2026
04f2726
correcting convention for CR drive channel name so the emulator can a…
lballerio Jan 30, 2026
f42d5d8
make platform compatible with parameter.json
lballerio Jan 30, 2026
5cbb38d
modified hamiltonian length tomography
lballerio Feb 2, 2026
a2f69cb
adding Bloch vector evolution for hamiltonian tomography and adding t…
lballerio Jan 23, 2026
4644432
added phase and amplitude sweep for hamiltonian tomography
lballerio Jan 26, 2026
f07d7a7
updated full cancellation pulse calibration
lballerio Jan 27, 2026
42f4a4a
modified hamiltonian tomography to retrieve simulation results
lballerio Feb 2, 2026
779613a
minor fix for plotting
lballerio Feb 2, 2026
f10cdea
minor fix for debugging
lballerio Feb 2, 2026
d3a4681
improving concatenated fitting for hamiltonian tomography
lballerio Feb 5, 2026
08d5ab8
plot fixes for hamiltonian tomography
lballerio Feb 5, 2026
d539b61
plot fixes for hamiltonian tomography
lballerio Feb 5, 2026
50e7e18
adding dynamical_evolution_optimizer
lballerio Feb 5, 2026
8a261e4
fixing hamiltonian tomography length protocol, it also estimates CR l…
lballerio Feb 9, 2026
49dfc1e
first version of cr gate, both simple and echo, no cancellation pulse…
lballerio Feb 9, 2026
0081b6d
validated CR and cancellation phase calibration using fixed-frequency…
lballerio Feb 17, 2026
7aaf34c
modified plotting function for amplitude and phase calibration CR gate
lballerio Feb 17, 2026
29e322c
rename of cancellation pulse protocol and adding hamiltonian tomograp…
lballerio Feb 18, 2026
e957e50
fixing numerical_root_finder in hamiltonian_tomography utils.py - now…
lballerio Feb 18, 2026
69bd81c
adding experiment for measuring crosstalk between to connected qubits…
lballerio Mar 2, 2026
e7ab45a
fix amplitude cross rabi oscillation
lballerio Mar 4, 2026
6a15c7a
changing averaving and acquisition mode for Hamiltonian Tomography ex…
lballerio Mar 10, 2026
7da462f
change of names in utils for target readout channel and pulse
lballerio Mar 12, 2026
7734ed0
debuggin CR protocols for cancellation amplitude calibration
lballerio Mar 17, 2026
8bf67f8
fixing bugs and handling corner cases in quinn-fernandes algorithm + …
lballerio Mar 25, 2026
3000951
validated version for CR sequence, phase cal - only ampl cal missing.…
lballerio Mar 31, 2026
e0a7315
modifying control amplitude calibration protocol plus final version o…
lballerio Mar 31, 2026
d1ff300
applying suggested fixes and adding _update function for control CR a…
lballerio Mar 31, 2026
47b9200
fixig bugs and type checking for rabi and ramsey (maybe after rebasin…
lballerio Apr 1, 2026
d9c8bdf
modifications
lballerio Apr 1, 2026
6b09875
refactoring cross resonance sequence for time-sweeping experiments - …
lballerio Apr 2, 2026
68e1b27
removing old versions of cross resonance calibration and reordering f…
lballerio Apr 3, 2026
b687c08
bug fixing in cancellation_amplitude.py calibratyion script
lballerio Apr 3, 2026
b620653
removing unused functions
lballerio Apr 6, 2026
56afddd
fixing bug in tomography_cr_plot function
lballerio Apr 6, 2026
7a42318
making unique delays UUID for CR sequence
lballerio Apr 16, 2026
182de6d
now we compute <Z> on control qubit and no more probability (which wa…
lballerio Apr 30, 2026
1281720
fixing CNOT sequence update
lballerio May 8, 2026
dbbdebe
computing sampling rate inside quinn-fernandes algorithm, removing in…
lballerio May 13, 2026
f4ed748
add quinn_fernandes even for rabi and ramsey parameters guess
lballerio May 14, 2026
c6d568d
applying fixes from PR review
lballerio Jun 3, 2026
f7a27e1
normalizing Bloch vector and fixing duration swept experiments.
lballerio Jun 5, 2026
07d950a
fixing bug in cr_amplitude
lballerio Jun 5, 2026
0ed63a9
removing duplicated class and inserted input check in hamiltonian tom…
lballerio Jun 5, 2026
002f85f
refactoring cross resonance scripts
lballerio Jun 5, 2026
ba410e2
update tests runcard protocols.yml
lballerio Jun 5, 2026
620558b
bug fixing for tests
lballerio Jun 8, 2026
0c40bc6
renaming and splitting of ham_tomography_utils.py file
lballerio Jun 19, 2026
6c935bd
first complete version for CR gate calibration (simple + echo + cance…
lballerio Jun 22, 2026
6319a26
test: Use more realistic tolerances for period guessing
alecandido Jun 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Comment thread
lballerio marked this conversation as resolved.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
188 changes: 188 additions & 0 deletions doc/source/protocols/cross_resonance/cross_resonance.rst

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this is more a "protocol suite" than a single protocol, we should put some care in documenting it properly, to avoid confusion about the roles of the various protocols.

In this sense, this page is quite fundamental.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I'll keep doc updating as last fix.

Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
Calibration of CNOT gate using Cross-Resonance
===============================================

It is possible to generate an interaction between two superconducting qubits without requiring
flux tunability, through a mechanism known as Cross Resonance (CR). This mechanism relies only
on microwave drive pulses. Moreover, not using flux lines, results in a reduction of the number
of fridge lines and allows to ignore all problems related to flux noise.

The cross resonance effect was first proposed :cite:p:`CR_First` in and later
independently discovered in :cite:p:`CR_Righetti, CR_Second`.

The CR effect can be showed by starting with the Hamiltonian of a two-qubit system with
a drive term on the first qubit :cite:p:`Manenti:2023zzn`

.. math::

H = b_1^\dagger b_1 \omega_1 + \frac{\alpha_1}{2} b_1^\dagger b_1^\dagger b_1 b_1 +
b_2^\dagger b_2 \omega_2 + \frac{\alpha_2}{2} b_2^\dagger b_2^\dagger b_2 b_2 +
g (b_1 b_2^\dagger + b_1^\dagger b_2) + \Omega(t) (b_1 + b_1^\dagger)

If we are in a dispersive regime (i.e. :math:`|\omega_1 - \omega_2| \gg g`), through a
Schrieffer-Wolff transformation we can obtain the effective Hamiltonian:

.. math::

H_\text{eff} = - \frac{\tilde{\omega_1}}{2} \sigma_1^z - \frac{\tilde{\omega_2}}{2} \sigma_2^z
+ \frac{\zeta}{4} \sigma_1^z \sigma_2^z
+ \Omega(t) \Big[ \sigma_1^x + \nu \sigma_2^x + \mu \sigma_1^z \sigma_2^x\Big]

where :math:`\zeta` is the ZZ coupling, :math:`\nu` is quantum crosstalk factor and :math:`\mu` is the
cross-resonance factor. From the equation above we can see that by driving the first qubit
at the frequency of the second qubit .

By tuning the amplitude and the duration of this drive pulse it is possible to calibrate a
:math:`RZX` rotation to rotate exactly by :math:`- \pi/2`. This is done because starting
from a :math:`ZX_{frac{\pi}{2}}` we can obtain a CNOT gate using single qubit rotations.

.. math::

\text{CNOT} = \text{R}_\text{ZX}(-\pi/2) \text{R}_\text{IX}(\pi/2) \text{R}_\text{ZI}(\pi/2)

In Qibocal we provide protocols to calibrate CR pulses.

Sweeping the duration of the CR pulse
-------------------------------------

In a first experiment we can sweep the duration of the CR pulse and measure both the
target and control qubit. The measurement is performed while preparing the control
qubit in state :math:`\ket{0}` and :math:`\ket{1}`.

Parameters
^^^^^^^^^^

.. autoclass:: qibocal.protocols.two_qubit_interaction.cross_resonance.length.CrossResonanceLengthParameters
:noindex:

Example
^^^^^^^

A possible runcard to launch the experiment could be the following:

.. code-block:: yaml

- id: CR length
operation: cross_resonance_length
parameters:
targets: [[0,1]]
pulse_duration_start: 10
pulse_duration_end: 200
pulse_duration_step: 10
flux_pulse_amplitude: 0.1
nshots: 2000
relaxation_time: 50000


The expected output is the following:

.. image:: length.png

Post-processing
^^^^^^^^^^^^^^^

The probability of the target qubit is fitted in both cases to a dumped cosine functions.
It is possible to extract the effective coupling as

.. math::

\text{J}_\text{eff}/ 2 \pi = \frac{f^{\pi}_\text{Rabi} - f_\text{Rabi}}{2}


where :math:`f^{\pi}_\text{Rabi}` and :math:`f_\text{Rabi}` are the frequencies of the
fitted Rabi oscillations on the target qubit.
Comment on lines +44 to +92

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This protocol does not exist any longer (to the best of my knowledge) since it has been replaced by hamiltonian_tomography_cr_length (unless it is cr_crosstalk_length, I'm still confused about that).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually there was already a first implementation of the hamiltonian tomography, but yeah we are no longer relying on that. I think documentation will be the last thing I'll fix before merging.


Sweeping amplitude of the CR pulse
----------------------------------

Similarly it is possible to sweep the amplitude of the CR pulse and measure both the
target and control qubit.


Parameters
^^^^^^^^^^

.. autoclass:: qibocal.protocols.two_qubit_interaction.cross_resonance.length.CrossResonanceLengthParameters
:noindex:

Example
^^^^^^^

A possible runcard to launch the experiment could be the following:

.. code-block:: yaml

- id: CR amplitude
operation: cross_resonance_amplitude
parameters:
targets: [[0,1]]
max_amp: 0.05
min_amp: 0.01
step_amp: 0.005
pulse_duration: 100
nshots: 2000
relaxation_time: 50000


The expected output is the following:

.. image:: amplitude.png

Post-processing
^^^^^^^^^^^^^^^

The probability of the target qubit is fitted in both cases to a cosine function.
Comment on lines +94 to +133

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above


Hamiltonian Tomography measurement
----------------------------------

Although from the two previous experiments it is possible to perform an initial
calibration of the CR gate, by performing a state tomography on the target qubit it is
possible to reconstruct the effective Hamiltonian of the system :cite:p:`CRDrag`:

.. math::

H_\text{eff} = \frac{\nu_\text{ZX}}{2} \text{ZX} + \frac{\nu_\text{ZY}}{2} \text{ZY} +
\frac{\nu_\text{ZZ}}{2} \text{ZZ} + \frac{\nu_\text{IX}}{2} \text{IX} +
\frac{\nu_\text{IY}}{2} \text{IY} + \frac{\nu_\text{IZ}}{2} \text{IZ}

In particular, by sweeping the duration of the CR pulse and measuring the expectation
values of the target qubit :math:`\langle X \rangle`, :math:`\langle Y \rangle` and :math:`\langle Z \rangle`
when the control qubit is prepared in :math:`\ket{0}` and :math:`\ket{1}` we can compute all terms in
the effective Hamiltonian following the procedure in :cite:p:`CRDrag`.

Parameters
^^^^^^^^^^


.. autoclass:: qibocal.protocols.two_qubit_interaction.cross_resonance.hamiltonian_tomography.length.HamiltonianTomographyCRLengthParameters
:noindex:

Example
^^^^^^^

A possible runcard to launch the experiment could be the following:

.. code-block:: yaml

- id: Hamiltonian tomography CR
operation: cross_resonance_amplitude
parameters:
targets: [[0,1]]
nshots: 2000
pulse_amplitude: 0.1
pulse_duration_end: 400
pulse_duration_start: 10
pulse_duration_step: 20


The expected output is the following:

.. image:: tomography_length.png
Comment on lines +165 to +180

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely inconsistent. If nothing else, at least the operation: key

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it inconsistent?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe inconsistent was misleading, as a word. Let's say outdated




Requirements
^^^^^^^^^^^^

To run these experiments single qubit gates for both target and control qubit needs
to be calibrated.
Binary file added doc/source/protocols/cross_resonance/length.png
Comment thread
lballerio marked this conversation as resolved.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/source/protocols/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ In this section we introduce the basics of all protocols supported by ``qibocal`
coherence/index
chsh
twpa_calibration/twpa
cross_resonance/cross_resonance
references
63 changes: 63 additions & 0 deletions doc/source/refs.bib
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ @misc{pasquale2024qibocalopensourceframeworkcalibration
primaryClass={quant-ph},
url={https://arxiv.org/abs/2410.00101},
}

@misc{shin2024inoperandomicrowavescatteringparametercalibrated,
title={In-operando microwave scattering-parameter calibrated measurement of a Josephson travelling wave parametric amplifier},
author={S. H. Shin and M. Stanley and W. N. Wong and T. Sweetnam and A. Elarabi and T. Lindström and N. M. Ridler and S. E. de Graaf},
Expand All @@ -293,3 +294,65 @@ @misc{shin2024inoperandomicrowavescatteringparametercalibrated
primaryClass={quant-ph},
url={https://arxiv.org/abs/2406.03063},
}

@article{CR_First,
title = {Microwave-induced coupling of superconducting qubits},
author = {Paraoanu, G. S.},
journal = {Phys. Rev. B},
volume = {74},
issue = {14},
pages = {140504},
numpages = {4},
year = {2006},
month = {Oct},
publisher = {American Physical Society},
doi = {10.1103/PhysRevB.74.140504},
url = {https://link.aps.org/doi/10.1103/PhysRevB.74.140504}
}

@article{CR_Righetti,
title = {Fully microwave-tunable universal gates in superconducting qubits with linear couplings and fixed transition frequencies},
author = {Rigetti, Chad and Devoret, Michel},
journal = {Phys. Rev. B},
volume = {81},
issue = {13},
pages = {134507},
numpages = {7},
year = {2010},
month = {Apr},
publisher = {American Physical Society},
doi = {10.1103/PhysRevB.81.134507},
url = {https://link.aps.org/doi/10.1103/PhysRevB.81.134507}
}

@article{CR_Second,
author = {Groot, P. and Lisenfeld, Jürgen and Schouten, R. and Ashhab, S. and Lupascu, Adrian and Harmans, Kees and Mooij, Hans},
year = {2010},
month = {08},
pages = {},
title = {Selective darkening of degenerate transitions demonstrated with two
superconducting quantum bits},
volume = {6},
journal = {Nature Physics},
doi = {10.1038/nphys1733}
}

@book{Manenti:2023zzn,
author = "Manenti, Riccardo and Motta, Mario",
title = "{Quantum Information Science}",
isbn = "978-0-19-878748-8",
publisher = "Oxford University Press",
month = "8",
year = "2023"
}

@article{CRDrag,
author = {Li, Boxi and Calarco, Tommaso and Motzoi, Felix},
year = {2024},
month = {07},
pages = {},
title = {Experimental error suppression in Cross-Resonance gates via multi-derivative pulse shaping},
volume = {10},
journal = {npj Quantum Information},
doi = {10.1038/s41534-024-00863-4}
}
75 changes: 75 additions & 0 deletions platforms/qutrits/calibration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"single_qubits": {
"0": {
"resonator": {
"bare_frequency": 0.0,
"dressed_frequency": 0.0,
"depletion_time": 0,
"bare_frequency_amplitude": null
},
"qubit": {
"frequency_01": 5114000000.0,
"frequency_12": 4784000000.0,
"maximum_frequency": 5114000000.0,
"asymmetry": 0.0,
"sweetspot": 0.0,
"flux_coefficients": null
},
"readout": {
"fidelity": 0.0,
"coupling": null,
"effective_temperature": null,
"ground_state": [
0.0,
1.0
],
"excited_state": [
1.0,
0.0
],
"qudits_frequency": {}
},
"t1": null,
"t2": null,
"t2_spin_echo": null,
"rb_fidelity": null
},
"1": {
"resonator": {
"bare_frequency": 0.0,
"dressed_frequency": 0.0,
"depletion_time": 0,
"bare_frequency_amplitude": null
},
"qubit": {
"frequency_01": 4914000000.0,
"frequency_12": 4584000000.0,
"maximum_frequency": 4914000000.0,
"asymmetry": 0.0,
"sweetspot": 0.0,
"flux_coefficients": null
},
"readout": {
"fidelity": 0.0,
"coupling": null,
"effective_temperature": null,
"ground_state": [
0.0,
1.0
],
"excited_state": [
1.0,
0.0
],
"qudits_frequency": {}
},
"t1": null,
"t2": null,
"t2_spin_echo": null,
"rb_fidelity": null
}
},
"two_qubits": {},
"readout_mitigation_matrix": null,
"flux_crosstalk_matrix": null
}
Loading
Loading