Skip to content

truncated_transmon

Transmon.

TruncatedTransmon

Bases: FluxDevice

Transmon Device.

Source code in jaxquantum/devices/superconducting/truncated_transmon.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@struct.dataclass
class TruncatedTransmon(FluxDevice):
    """
    Transmon Device.
    """

    def common_ops(self):
        """Written in the linear basis."""

        ops = {}

        N = self.N_pre_diag
        ops["id"] = identity(N)
        ops["a"] = destroy(N)
        ops["a_dag"] = create(N)
        ops["phi"] = self.phi_zpf() * (ops["a"] + ops["a_dag"])
        ops["n"] = 1j * self.n_zpf() * (ops["a_dag"] - ops["a"])
        return ops

    def phi_zpf(self):
        """Return Phase ZPF."""
        return (2 * self.params["Ec"] / self.params["Ej"]) ** (0.25)

    def n_zpf(self):
        """Return Charge ZPF."""
        return (self.params["Ej"] / (32 * self.params["Ec"])) ** (0.25)

    def get_linear_ω(self):
        """Get frequency of linear terms."""
        return jnp.sqrt(8 * self.params["Ec"] * self.params["Ej"])

    def get_H_linear(self):
        """Return linear terms in H."""
        w = self.get_linear_ω()
        return w * self.linear_ops["a_dag"] @ self.linear_ops["a"]

    def get_H_full(self):
        """Return full H in linear basis."""
        cos_phi_op = (
            jsp.linalg.expm(1j * self.linear_ops["phi"])
            + jsp.linalg.expm(-1j * self.linear_ops["phi"])
        ) / 2

        H_nl = -self.params["Ej"] * cos_phi_op - self.params[
            "Ej"
        ] / 2 * jnp.linalg.matrix_power(self.linear_ops["phi"], 2)
        return self.get_H_linear() + H_nl

    def potential(self, phi):
        """Return potential energy for a given phi."""
        return -self.params["Ej"] * jnp.cos(2 * jnp.pi * phi)

common_ops()

Written in the linear basis.

Source code in jaxquantum/devices/superconducting/truncated_transmon.py
21
22
23
24
25
26
27
28
29
30
31
32
def common_ops(self):
    """Written in the linear basis."""

    ops = {}

    N = self.N_pre_diag
    ops["id"] = identity(N)
    ops["a"] = destroy(N)
    ops["a_dag"] = create(N)
    ops["phi"] = self.phi_zpf() * (ops["a"] + ops["a_dag"])
    ops["n"] = 1j * self.n_zpf() * (ops["a_dag"] - ops["a"])
    return ops

get_H_full()

Return full H in linear basis.

Source code in jaxquantum/devices/superconducting/truncated_transmon.py
51
52
53
54
55
56
57
58
59
60
61
def get_H_full(self):
    """Return full H in linear basis."""
    cos_phi_op = (
        jsp.linalg.expm(1j * self.linear_ops["phi"])
        + jsp.linalg.expm(-1j * self.linear_ops["phi"])
    ) / 2

    H_nl = -self.params["Ej"] * cos_phi_op - self.params[
        "Ej"
    ] / 2 * jnp.linalg.matrix_power(self.linear_ops["phi"], 2)
    return self.get_H_linear() + H_nl

get_H_linear()

Return linear terms in H.

Source code in jaxquantum/devices/superconducting/truncated_transmon.py
46
47
48
49
def get_H_linear(self):
    """Return linear terms in H."""
    w = self.get_linear_ω()
    return w * self.linear_ops["a_dag"] @ self.linear_ops["a"]

get_linear_ω()

Get frequency of linear terms.

Source code in jaxquantum/devices/superconducting/truncated_transmon.py
42
43
44
def get_linear_ω(self):
    """Get frequency of linear terms."""
    return jnp.sqrt(8 * self.params["Ec"] * self.params["Ej"])

n_zpf()

Return Charge ZPF.

Source code in jaxquantum/devices/superconducting/truncated_transmon.py
38
39
40
def n_zpf(self):
    """Return Charge ZPF."""
    return (self.params["Ej"] / (32 * self.params["Ec"])) ** (0.25)

phi_zpf()

Return Phase ZPF.

Source code in jaxquantum/devices/superconducting/truncated_transmon.py
34
35
36
def phi_zpf(self):
    """Return Phase ZPF."""
    return (2 * self.params["Ec"] / self.params["Ej"]) ** (0.25)

potential(phi)

Return potential energy for a given phi.

Source code in jaxquantum/devices/superconducting/truncated_transmon.py
63
64
65
def potential(self, phi):
    """Return potential energy for a given phi."""
    return -self.params["Ej"] * jnp.cos(2 * jnp.pi * phi)