Skip to content

Atomic

oqd_core.interface.atomic

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 ProtocolSubTypes

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: ProtocolSubTypes

Beam

Bases: TypeReflectBaseModel

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

Attributes:

Name Type Description
transition Union[str, Tuple[str, int], Transition]

Transition, or it's label, 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`][oqd_core.interface.atomic.system.Transition], or it's label, 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: Union[str, Tuple[str, int], 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

ParallelProtocol

Bases: Protocol

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

Attributes:

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

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, ProtocolSubTypes]]

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

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

SequentialProtocol

Bases: Protocol

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

Attributes:

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

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, ProtocolSubTypes]]

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]

Level

Bases: TypeReflectBaseModel

" Class representing an electronic energy level of an ion.

Attributes:

Name Type Description
label str

Label for the Level

principal NonNegativeInt

Principal quantum number.

spin NonNegativeAngularMomentumNumber

Spin of an electron.

orbital NonNegativeAngularMomentumNumber

Orbital angular momentum of an electron.

nuclear NonNegativeAngularMomentumNumber

Nuclear angular momentum.

spin_orbital NonNegativeAngularMomentumNumber

Angular momentum of the spin-orbital coupling.

spin_orbital_nuclear NonNegativeAngularMomentumNumber

Angular momentum of the spin-orbital-nuclear coupling.

spin_orbital_nuclear_magnetization 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:
        label: Label for the Level
        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.

    """

    label: str
    principal: NonNegativeInt
    spin: NonNegativeAngularMomentumNumber
    orbital: NonNegativeAngularMomentumNumber
    nuclear: NonNegativeAngularMomentumNumber
    spin_orbital: NonNegativeAngularMomentumNumber
    spin_orbital_nuclear: NonNegativeAngularMomentumNumber
    spin_orbital_nuclear_magnetization: AngularMomentumNumber
    energy: 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]

Transition

Bases: TypeReflectBaseModel

Class representing a transition between electronic states of an ion.

Attributes:

Name Type Description
label str

Label for the Transition

level1 Union[str, Level]

Label for energy level 1.

level2 Union[str, Level]

Label for 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:
        label: Label for the Transition
        level1: Label for energy level 1.
        level2: Label for energy level 2.
        einsteinA: Einstein A coefficient that characterizes the strength of coupling between energy level 1 and 2.

    """

    label: str
    level1: Union[str, Level]
    level2: Union[str, Level]
    einsteinA: float
    multipole: Literal["E1", "E2", "M1"]

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 ProtocolSubTypes

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: ProtocolSubTypes

protocol

Beam

Bases: TypeReflectBaseModel

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

Attributes:

Name Type Description
transition Union[str, Tuple[str, int], Transition]

Transition, or it's label, 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`][oqd_core.interface.atomic.system.Transition], or it's label, 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: Union[str, Tuple[str, int], 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, ProtocolSubTypes]]

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, ProtocolSubTypes]]

SequentialProtocol

Bases: Protocol

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

Attributes:

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

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, ProtocolSubTypes]]

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
label str

Label for the Level

principal NonNegativeInt

Principal quantum number.

spin NonNegativeAngularMomentumNumber

Spin of an electron.

orbital NonNegativeAngularMomentumNumber

Orbital angular momentum of an electron.

nuclear NonNegativeAngularMomentumNumber

Nuclear angular momentum.

spin_orbital NonNegativeAngularMomentumNumber

Angular momentum of the spin-orbital coupling.

spin_orbital_nuclear NonNegativeAngularMomentumNumber

Angular momentum of the spin-orbital-nuclear coupling.

spin_orbital_nuclear_magnetization 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:
        label: Label for the Level
        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.

    """

    label: str
    principal: NonNegativeInt
    spin: NonNegativeAngularMomentumNumber
    orbital: NonNegativeAngularMomentumNumber
    nuclear: NonNegativeAngularMomentumNumber
    spin_orbital: NonNegativeAngularMomentumNumber
    spin_orbital_nuclear: NonNegativeAngularMomentumNumber
    spin_orbital_nuclear_magnetization: AngularMomentumNumber
    energy: float

Transition

Bases: TypeReflectBaseModel

Class representing a transition between electronic states of an ion.

Attributes:

Name Type Description
label str

Label for the Transition

level1 Union[str, Level]

Label for energy level 1.

level2 Union[str, Level]

Label for 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:
        label: Label for the Transition
        level1: Label for energy level 1.
        level2: Label for energy level 2.
        einsteinA: Einstein A coefficient that characterizes the strength of coupling between energy level 1 and 2.

    """

    label: str
    level1: Union[str, Level]
    level2: Union[str, Level]
    einsteinA: float
    multipole: Literal["E1", "E2", "M1"]

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