Transmon with tunable couplers

Transmon with tunable couplers#

This notebook is similar but not as detail as examples/fluxonium_multipath_coupling/fluxonium_mpcoupling_6q_x.ipynb. Please check that notebook for more info.

This example is based on Xu, Y. et al. High-Fidelity, High-Scalability Two-Qubit Gate Scheme for Superconducting Qubits. Phys. Rev. Lett. 125, 240503 (2020). We construct a 5 transmon qubit system, where 3 of them (q0, q2, q4) are computational qubits and the other 2 (q1, q3) are the couplers. More concretely, the couplers are always initialized to \(|0\rangle\) before the time evolution, and it is a leakage error if it is not in \(|0\rangle\) afterwards. The computed unitary is only for the 3 qubits (q0, q2, q4). The target unitary is simultaneous X gate \(X^{\otimes 3}\)

[1]:
import jax.numpy as jnp
import haiku as hk

import supergrad
from supergrad.helper import Evolve
from supergrad.utils import compute_fidelity_with_1q_rotation_axis
from supergrad.utils.gates import sigmax
from supergrad.utils.optimize import scipy_minimize, adam_opt

from supergrad.scgraph.graph_transmon_1d import XGateTmon1D

truncated_dim = 5
add_random = True
share_params = False
compensation_option = 'only_vz'
opt = 'adam'

gate_graph = XGateTmon1D(seed=1)
qubit_subset = gate_graph.subgraph(['q0', 'q1', 'q2', 'q3', 'q4'])
evo = Evolve(qubit_subset,
             truncated_dim,
             add_random,
             share_params,
             coupler_subsystem=['q1', 'q3'],  # these two qubits are treated as coupler
             compensation_option=compensation_option,
             options={
                 'astep': 5000,
                 'trotter_order': 2
             })
unitary = supergrad.tensor(*([sigmax()] * 3))  # the target unitary X^3

For optimization, let us use an object function based on the average gate fidelity with leakage. The formula is from Physical Review A 87, 022309 (2013).

\[C = 1 - \frac{1}{D(D + 1)}[Tr(PU^{\dagger}_{\text{sim}}P U_{\text{sim}}P)+|Tr(PU^{\dagger}_{\text{sim}} P U_{\text{target}})|^2],\]

where \(P\) is the projector into the computational subspace \(S\), and \(D=2^n\) is the dimension of \(S\).

[2]:
def infidelity(params, unitary):
    params = hk.data_structures.merge(evo.all_params, params)

    sim_u = evo.eigen_basis(params)
    fidelity_vz, _ = compute_fidelity_with_1q_rotation_axis(unitary,
                                                            sim_u,
                                                            opt_method=None)

    return jnp.log10(1 - fidelity_vz)


params = {
    'q0_pulse_cos': {
        'amp': jnp.array(0.0922632),
        'length': jnp.array(39.99841052),
        'omega_d': jnp.array(31.89213402),
        'phase': jnp.array(-0.06459036)
    },
    'q2_pulse_cos': {
        'amp': jnp.array(0.10390872),
        'length': jnp.array(39.92211365),
        'omega_d': jnp.array(27.99554391),
        'phase': jnp.array(0.05805683)
    },
    'q4_pulse_cos': {
        'amp': jnp.array(0.09196213),
        'length': jnp.array(39.88357291),
        'omega_d': jnp.array(31.97277349),
        'phase': jnp.array(-0.07858071)
    },
}

Show the optimization procedure of control parameters

[3]:
adam_opt(infidelity, params, (unitary,), {'adam_lr': 1e-6, 'steps': 3})

{'adam_lr': 1e-06, 'adam_lr_decay_rate': 1000, 'steps': 3, 'adam_b1': 0.9, 'adam_b2': 0.999}
step: 0
parameters:
{ 'q0_pulse_cos': { 'amp': 0.0922632,
                    'length': 39.99841052,
                    'omega_d': 31.89213402,
                    'phase': -0.06459036},
  'q2_pulse_cos': { 'amp': 0.10390872,
                    'length': 39.92211365,
                    'omega_d': 27.99554391,
                    'phase': 0.05805683},
  'q4_pulse_cos': { 'amp': 0.09196213,
                    'length': 39.88357291,
                    'omega_d': 31.97277349,
                    'phase': -0.07858071}}
gradient:
{ 'q0_pulse_cos': { 'amp': -0.00026231205820437253,
                    'length': -0.0029519136838362936,
                    'omega_d': 0.000506687672070516,
                    'phase': -0.0003085253010533043},
  'q2_pulse_cos': { 'amp': 7.925128920258095e-05,
                    'length': -0.00037554374813147245,
                    'omega_d': 0.0013459499335581881,
                    'phase': -0.0006141370930905499},
  'q4_pulse_cos': { 'amp': -0.0014573463684559584,
                    'length': 0.005324932714879108,
                    'omega_d': 0.0013312074711167021,
                    'phase': 5.541753721970133e-05}}
loss: -2.394032273000885
step: 1
parameters:
{ 'q0_pulse_cos': { 'amp': 0.09226419996187893,
                    'length': 39.998411519996615,
                    'omega_d': 31.892133020019735,
                    'phase': -0.0645893600324112},
  'q2_pulse_cos': { 'amp': 0.10390772012616499,
                    'length': 39.92211464997337,
                    'omega_d': 27.99554291000743,
                    'phase': 0.05805782998371725},
  'q4_pulse_cos': { 'amp': 0.09196312999313826,
                    'length': 39.883571910001876,
                    'omega_d': 31.972772490007515,
                    'phase': -0.07858170981958426}}
gradient:
{ 'q0_pulse_cos': { 'amp': 0.05765787546026502,
                    'length': -0.04033024663401588,
                    'omega_d': -0.024991453103388572,
                    'phase': -0.0008018555444377837},
  'q2_pulse_cos': { 'amp': -0.04003671122299096,
                    'length': -0.0004923541299002195,
                    'omega_d': -0.02672793669779594,
                    'phase': -0.001558281666280914},
  'q4_pulse_cos': { 'amp': 0.056305724845651994,
                    'length': 0.005439890264693027,
                    'omega_d': -0.03472160958630077,
                    'phase': -0.0009729450485859992}}
loss: -2.3940321804697504
step: 2
parameters:
{ 'q0_pulse_cos': { 'amp': 0.09226345939327668,
                    'length': 39.99841231049047,
                    'omega_d': 31.892133749921825,
                    'phase': -0.06458842563558405},
  'q2_pulse_cos': { 'amp': 0.10390846242088071,
                    'length': 39.92211564727744,
                    'omega_d': 27.995543619028574,
                    'phase': 0.05805876726230952},
  'q4_pulse_cos': { 'amp': 0.09196240393728716,
                    'length': 39.88357091019733,
                    'omega_d': 31.972773207442838,
                    'phase': -0.07858100546912729}}
gradient:
{ 'q0_pulse_cos': { 'amp': 0.014238893436406386,
                    'length': 0.1986971674129276,
                    'omega_d': 0.092282528992083,
                    'phase': 0.004491579305348881},
  'q2_pulse_cos': { 'amp': -0.009959922645033148,
                    'length': -0.0003801605338958139,
                    'omega_d': 0.07913085327837166,
                    'phase': 0.0034220523731163244},
  'q4_pulse_cos': { 'amp': 0.014939958347973459,
                    'length': 0.005388521190405608,
                    'omega_d': 0.08228694939562109,
                    'phase': 0.004349090081084209}}
loss: -2.3940321277124923
[3]:
{'q0_pulse_cos': {'amp': Array(0.09226275, dtype=float64),
  'length': Array(39.99841181, dtype=float64),
  'omega_d': Array(31.89213328, dtype=float64),
  'phase': Array(-0.06458892, dtype=float64)},
 'q2_pulse_cos': {'amp': Array(0.10390917, dtype=float64),
  'length': Array(39.92211664, dtype=float64),
  'omega_d': Array(27.99554319, dtype=float64),
  'phase': Array(0.05805851, dtype=float64)},
 'q4_pulse_cos': {'amp': Array(0.0919617, dtype=float64),
  'length': Array(39.88356991, dtype=float64),
  'omega_d': Array(31.97277284, dtype=float64),
  'phase': Array(-0.07858151, dtype=float64)}}