Skip to content

Releases

cudaq-pulse 0.1.0

Choose a tag to compare

@github-actions github-actions released this 13 Nov 23:01

The first public release, a research preview: APIs, dialects and numerical
behavior may change in any 0.x release.

Added

  • Gate calibrations. pulse.gates names the gates a quantum system is
    calibrated for (X, X90, Y, Y90, READOUT, CZ), and
    get_calibration(gate, transition=(0, 1)) gives each one's pulse: in a
    kernel from a line, get_drive_line(q).get_calibration(pulse.gates.X) (a
    DragPulse, which drive(line, pulse) plays) and
    get_readout_line(q).get_calibration(pulse.gates.READOUT) (a
    ReadoutPulse); outside one from a handle,
    dev.qudits[i].get_calibration(...), and from a coupling,
    dev.coupling(a, b).get_calibration(pulse.gates.CZ) (a FluxCZ). A
    qudit's drive and readout (MicrowaveDrive, DispersiveReadout)
    hold its physics; its tuned pulses are given as calibrations=, by gate,
    and read only through get_calibration, as a coupling's are.
    What a quantum system does not publish is derived: an X amplitude from the
    pulse's area, X90 at half of it, Y and Y90 at +90 degrees; an
    unpublished CZ, READOUT or other transition is an error naming the
    coupling or qudit. A qudit's metadata holds the user's own JSON
    values, which the library never reads and which do not make two quantum systems
    differ; system files keep them.
  • Shared lines. A DriveLine or ReadoutLine may reach several
    qudits and play several tones at once: a readout feedline is
    ReadoutLine([0, 1, 2, 3], max_concurrent_tones=4) (1 by default, at most
    the qudits it reaches). Every line has qudits; only a dedicated line has
    qudit. A kernel's get_readout_line(q) of a qudit on it gives one of
    its tones, for q. The compiler checks that a line reaching several
    qudits plays at most max_concurrent_tones tones at once (a kernel with
    runtime qudits, when a call binds them); spacing and max_amplitude
    apply per tone, waveform memory and max_frequencies_per_line per physical
    line. Format /2 of the controller export lists a shared line once,
    with its max_concurrent_tones, and gives each event on it its
    tone_slot and qudits; format /1 raises UnsupportedError for a
    program on a shared line. System files hold one as {"qudits": [...], "max_concurrent_tones": 4, "delay_ns": 12.0}. A qudit is reached by at
    most one line of each kind. A program on a delayed shared line does not
    export yet.
  • Pickling, for process pools and caches on disk. Kernels pickle as
    functions do: by reference, or with cloudpickle (Ray, Dask) by value
    when defined in __main__, at the prompt or inside a function. Quantum systems, qudit handles and registers
    pickle as what they were built from and unpickle equal, with equal
    hashes; a process builds each quantum system it unpickles once. A quantum system's
    fingerprint covers its calibration: a quantum system with and without one are
    two quantum systems. A shipped calibration pickles as its name, checked against
    the file shipped where it unpickles; any other, as its values. Programs
    (ck.lower(...), bound or not) pickle as MLIR bytecode stamped with the
    build that compiled them (hashes of its native and Python sources, taken
    when it was built) and the Python, and run unpickled (export, simulate, bind)
    without compiling again; another build refuses them with
    UnsupportedError, saying to compile again. Errors pickle with what they
    report, so a process pool re-raises them in the parent as they were
    raised. Quantum systems now compare by content.
  • Controllers with their own clocks. Kernels count cycles of the
    quantum system's program clock, pulse.quantum_system(..., clock_ghz=) (or the
    quantum system's own). A controller whose clock is slower starts and times operations
    only every few program cycles: the scheduler puts each line's operations
    on its controller's grid and a sync on the grid its lines share, an
    operation off the grid is a compile error naming the line, its controller
    and the nearest valid lengths, and pulse.cycles_on(line, n) rounds a
    length onto the grid (pulse.Rounding). Controller programs count their
    own cycles, with "program_clock_ghz" written when it differs;
    ControlSystem.reference_clock_ghz is checked against every controller
    clock and exported; the simulator samples generated waveforms at the
    line's controller clock.
  • Runtime qudits. A parameter annotated Qudit or Register (or
    list[Qudit], tuple[Qudit, ...]) is bound at each call, like a float:
    the kernel compiles once and runs on any qudits of a quantum system with the same
    structure, including a recalibrated one. An unannotated qudit parameter
    stays static, whatever the call passes. list[float] parameters are runtime vectors. Their
    controller exports carry a program_id, shared by every call of one
    compile, and symbols: each symbol's value in the call, and per event the
    symbols its qudit, frequency, phase and waveform depend on.
  • Variadic qudits. A kernel may take *qudits:
    def k(tau: float, *qudits: Qudit) is called as k(tau, q0, q1, ...) or
    k(tau, *dev.qudits[0:4]), and from another kernel as
    k(tau, *qudits). In the kernel qudits is a register of the call's
    qudits, which indexes, slices, iterates and has a len(). Annotated
    Qudit it is a runtime register, compiled once per number of qudits;
    unannotated, the kernel is specialized on the qudits. A call may pass
    none. A * parameter takes only qudit handles: another annotation is a
    TypeError when the kernel is defined, another value one when it is
    called. Kernels still cannot take **kwargs. A list or tuple of qudit
    handles is not a register: pass a Register (qs.qudits[0:4]) or use
    *qudits. kernel.static_parameters and kernel.runtime_parameters
    list parameters in the order of the signature.
  • Control systems. A quantum system can hold the controllers that play it:
    pulse.Controller (a controller's limits, the drive and readout lines it
    plays, its peer latency, clock skew and alignment tolerance, its
    supports, backend, model and version) and pulse.ControlSystem
    (its controllers, its links by name, each Link with the controllers
    it reaches). pulse.quantum_system(quantum_system, control_system=...) checks
    the wiring against the quantum system and raises one
    QuantumSystemDefinitionError listing every problem. compile(kernel, quantum_system=qpu) checks every program against
    the system: a line on no controller, each controller's own limits, a
    capability (pulse.Capability) a controller lacks, and a call over a link
    that does not reach its controllers fail to compile.
    compile(kernel, control_system=...) takes a system, or one Controller
    that stands for a system of it alone: what that controller cannot take is
    an error that says to describe the whole system. A system without
    controllers states only its links and lanes. A controller that
    supports loop holds a rolled loop's body once against max_pulses; one
    that does not plays it unrolled, and its limit error names the loop; unrolling adds pulses,
    not waveform memory, which holds each shape once. rcp keeps a branch
    on a readout the feedback_latency_cycles of the controllers that read out.
    A line's calibrated delay is part of its declaration,
    Controller(drive_lines=[DriveLine(5, delay_ns=4.0), 6], readout_lines=[ReadoutLine(5, delay_ns=12.0)]) (times or numbers of ns;
    a bare carrier index is an undelayed line), and a control system's
    reference_clock_ghz is its shared clock; new delays alone schedule its
    programs again without tracing them. Without a
    declared clock_ghz, a quantum system's program clock is its fastest
    controller clock when every other one divides it; clocks that do not
    divide evenly are a QuantumSystemDefinitionError that lists the program clocks
    that work, and every controller clock must be a whole multiple of the
    reference clock. Each controller of a system may run its own clock: every
    line is scheduled on its own controller's grid, a sync and a wait from
    an answer on the grid all lines share, and a runtime qudit's lines on that
    shared grid too, so one schedule fits any qudits a call binds. Each
    controller's limits, line delays and rcp readout latency count its own
    cycles, and custom() samples an envelope at the rate of the line that
    plays it, while samples given at another rate fail to compile.
    export_to_controller(controller=k) and export_to_emulator(controller=k)
    export controller k's part of the program in its own cycles: its
    lines, the events it plays, submits or takes the answer of, its calls and
    its limits, with the program's event and line ids. A program that plays
    the lines of more than one controller needs controller=; a controller
    the program does not use exports a valid empty program, and a program
    of calls alone is exported by the controller that makes them.
    Link(per_controller=True) (per_controller = true in a system file)
    gives each controller its own instance of a link, shared by default:
    its own slots, so its calls do not wait for another controller's, its own
    calls in its export (tagged "controller"), its own processor to place
    the link on, and no cross-controller start uncertainty in its budgets. A
    call whose measurements and answer are on different controllers fails to
    compile.
    Budgets between controllers add each one's start uncertainty, its
    clock_skew_cycles plus one of its own cycles without a
    reference_clock_ghz: a pulse that branches on, or computes with,
    another controller's readout waits for the reader's feedback and peer
    latency and both uncertainties (rcp waits that long for each pair of
    reader and user, and a pulse on the reader's controller its feedback
    latency alone; starting sooner is a ControllerLimitError naming the
    cycle), and an answer ...
Read more

mlir-toolchain-22.1.8

mlir-toolchain-22.1.8 Pre-release
Pre-release

Choose a tag to compare

Prebuilt MLIR toolchain used to build cudaq-pulse.