Skip to content

Atomic

oqd_core.interface.atomic

circuit

AtomicCircuit

Bases: TypeReflectBaseModel

Class representing a trapped-ion experiment in terms of light-matter interactons.

Attributes:

Name Type Description
system System

The trapped-ion system.

protocol Protocol

Pulse program for the trapped-ion experiment referenced to the trapped-ion system.

Source code in oqd-core/src/oqd_core/interface/atomic/circuit.py
class AtomicCircuit(TypeReflectBaseModel):
    """
    Class representing a trapped-ion experiment in terms of light-matter interactons.

    Attributes:
        system: The trapped-ion system.
        protocol: Pulse program for the trapped-ion experiment referenced to the trapped-ion system.

    """

    system: System
    protocol: Protocol

protocol

Beam

Bases: TypeReflectBaseModel

Class representing a referenced optical channel/beam for the trapped-ion device.

Attributes:

Name Type Description
transition Transition

Transition that the optical channel/beam is referenced to.

rabi CastMathExpr

Rabi frequency of the referenced transition driven by the beam.

detuning CastMathExpr

Detuning away from the referenced transition.

phase CastMathExpr

Phase relative to the ion's clock.

polarization conlist(float, max_length=3, min_length=3)

Polarization of the beam.

wavevector conlist(float, max_length=3, min_length=3)

Wavevector of the beam.

target int

Index of the target ion of the beam.

Source code in oqd-core/src/oqd_core/interface/atomic/protocol.py
class Beam(TypeReflectBaseModel):
    """
    Class representing a referenced optical channel/beam for the trapped-ion device.

    Attributes:
        transition: Transition that the optical channel/beam is referenced to.
        rabi: Rabi frequency of the referenced transition driven by the beam.
        detuning: Detuning away from the referenced transition.
        phase: Phase relative to the ion's clock.
        polarization: Polarization of the beam.
        wavevector: Wavevector of the beam.
        target: Index of the target ion of the beam.
    """

    transition: Transition
    rabi: CastMathExpr
    detuning: CastMathExpr
    phase: CastMathExpr
    polarization: conlist(float, max_length=3, min_length=3)
    wavevector: conlist(float, max_length=3, min_length=3)
    target: int

Pulse

Bases: TypeReflectBaseModel

Class representing the application of the beam for some duration.

Attributes:

Name Type Description
beam Beam

Optical channel/beam to turn on.

duration float

Period of time to turn the optical channel on for.

Source code in oqd-core/src/oqd_core/interface/atomic/protocol.py
class Pulse(TypeReflectBaseModel):
    """
    Class representing the application of the beam for some duration.

    Attributes:
        beam: Optical channel/beam to turn on.
        duration: Period of time to turn the optical channel on for.

    """

    beam: Beam
    duration: float

Protocol

Bases: TypeReflectBaseModel

Class representing a light-matter interaction protocol/pulse program for the optical channels/beams.

Source code in oqd-core/src/oqd_core/interface/atomic/protocol.py
class Protocol(TypeReflectBaseModel):
    """
    Class representing a light-matter interaction protocol/pulse program for the optical channels/beams.
    """

    pass

ParallelProtocol

Bases: Protocol

Class representing the parallel composition of a list of pulses or subprotocols.

Attributes:

Name Type Description
sequence List[Union[Pulse, Protocol]]

List of pulses or subprotocols to compose together in a parallel fashion.

Source code in oqd-core/src/oqd_core/interface/atomic/protocol.py
class ParallelProtocol(Protocol):
    """
    Class representing the parallel composition of a list of pulses or subprotocols.

    Attributes:
        sequence: List of pulses or subprotocols to compose together in a parallel fashion.
    """

    sequence: List[Union[Pulse, Protocol]]

SequentialProtocol

Bases: Protocol

Class representing the sequential composition of a list of pulses or subprotocols.

Attributes:

Name Type Description
sequence List[Union[Pulse, Protocol]]

List of pulses or subprotocols to compose together in a sequntial fashion.

Source code in oqd-core/src/oqd_core/interface/atomic/protocol.py
class SequentialProtocol(Protocol):
    """
    Class representing the sequential composition of a list of pulses or subprotocols.

    Attributes:
        sequence: List of pulses or subprotocols to compose together in a sequntial fashion.
    """

    sequence: List[Union[Pulse, Protocol]]

system

AngularMomentumNumber = Annotated[float, AfterValidator(is_halfint)] module-attribute

A valid positive or negative integer or half-integer for angular momentum.

NonNegativeAngularMomentumNumber = Annotated[NonNegativeFloat, AfterValidator(is_halfint)] module-attribute

A valid non-negative integer or half-integer for angular momentum.

Level

Bases: TypeReflectBaseModel

" Class representing an electronic energy level of an ion.

Attributes:

Name Type Description
principal Optional[NonNegativeInt]

Principal quantum number.

spin Optional[NonNegativeAngularMomentumNumber]

Spin of an electron.

orbital Optional[NonNegativeAngularMomentumNumber]

Orbital angular momentum of an electron.

nuclear Optional[NonNegativeAngularMomentumNumber]

Nuclear angular momentum.

spin_orbital Optional[NonNegativeAngularMomentumNumber]

Angular momentum of the spin-orbital coupling.

spin_orbital_nuclear Optional[NonNegativeAngularMomentumNumber]

Angular momentum of the spin-orbital-nuclear coupling.

spin_orbital_nuclear_magnetization Optional[AngularMomentumNumber]

Magnetization of the spin-orbital-nuclear coupled angular momentum.

energy float

Energy of the electronic state.

Source code in oqd-core/src/oqd_core/interface/atomic/system.py
class Level(TypeReflectBaseModel):
    """ "
    Class representing an electronic energy level of an ion.

    Attributes:
        principal: Principal quantum number.
        spin: Spin of an electron.
        orbital: Orbital angular momentum of an electron.
        nuclear: Nuclear angular momentum.
        spin_orbital: Angular momentum of the spin-orbital coupling.
        spin_orbital_nuclear: Angular momentum of the spin-orbital-nuclear coupling.
        spin_orbital_nuclear_magnetization: Magnetization of the spin-orbital-nuclear coupled angular momentum.
        energy: Energy of the electronic state.

    """

    principal: Optional[NonNegativeInt] = None
    spin: Optional[NonNegativeAngularMomentumNumber] = None
    orbital: Optional[NonNegativeAngularMomentumNumber] = None
    nuclear: Optional[NonNegativeAngularMomentumNumber] = None
    spin_orbital: Optional[NonNegativeAngularMomentumNumber] = None
    spin_orbital_nuclear: Optional[NonNegativeAngularMomentumNumber] = None
    spin_orbital_nuclear_magnetization: Optional[AngularMomentumNumber] = None
    energy: float

Transition

Bases: TypeReflectBaseModel

Class representing a transition between electronic states of an ion.

Attributes:

Name Type Description
level1 Level

Energy level 1.

level2 Level

Energy level 2.

einsteinA float

Einstein A coefficient that characterizes the strength of coupling between energy level 1 and 2.

Source code in oqd-core/src/oqd_core/interface/atomic/system.py
class Transition(TypeReflectBaseModel):
    """
    Class representing a transition between electronic states of an ion.

    Attributes:
        level1: Energy level 1.
        level2: Energy level 2.
        einsteinA: Einstein A coefficient that characterizes the strength of coupling between energy level 1 and 2.

    """

    level1: Level
    level2: Level
    einsteinA: float

Ion

Bases: TypeReflectBaseModel

Class representing an ion.

Attributes:

Name Type Description
mass float

Mass of the ion.

charge float

Charge of the ion.

levels List[Level]

Electronic energy levels of the ion.

transitions List[Transition]

Allowed transitions in the ion.

position List[float]

Spatial position of the ion.

Source code in oqd-core/src/oqd_core/interface/atomic/system.py
class Ion(TypeReflectBaseModel):
    """
    Class representing an ion.

    Attributes:
        mass: Mass of the ion.
        charge: Charge of the ion.
        levels: Electronic energy levels of the ion.
        transitions: Allowed transitions in the ion.
        position: Spatial position of the ion.
    """

    mass: float
    charge: float
    levels: List[Level]
    transitions: List[Transition]
    position: List[float]

Phonon

Bases: TypeReflectBaseModel

Class representing a collective phonon mode of the trapped-ion system.

Attributes:

Name Type Description
energy float

Quanta of energy for the phonon mode.

eigenvector List[float]

Profile of the phonon mode in terms of the vibration of the ions.

Source code in oqd-core/src/oqd_core/interface/atomic/system.py
class Phonon(TypeReflectBaseModel):
    """
    Class representing a collective phonon mode of the trapped-ion system.

    Attributes:
        energy: Quanta of energy for the phonon mode.
        eigenvector: Profile of the phonon mode in terms of the vibration of the ions.

    """

    energy: float
    eigenvector: List[float]

System

Bases: TypeReflectBaseModel

Class representing a trapped-ion system.

Attributes:

Name Type Description
ions List[Ion]

List of ions in the trapped-ion system.

modes List[Phonon]

List of collective phonon modes for the trapped-ion system.

Source code in oqd-core/src/oqd_core/interface/atomic/system.py
class System(TypeReflectBaseModel):
    """
    Class representing a trapped-ion system.

    Attributes:
        ions: List of ions in the trapped-ion system.
        modes: List of collective phonon modes for the trapped-ion system.

    """

    ions: List[Ion]
    modes: List[Phonon]

is_halfint(v: float) -> bool

Function that verifies a number is an integer or half-integer.

Parameters:

Name Type Description Default
v float

Number to verify.

required
Source code in oqd-core/src/oqd_core/interface/atomic/system.py
def is_halfint(v: float) -> bool:
    """
    Function that verifies a number is an integer or half-integer.

    Args:
        v: Number to verify.
    """
    if not (v * 2).is_integer():
        raise ValueError()
    return v