Local-Energy-Scale Drive
Local-Energy-Scale Drive Shaper
Section titled āLocal-Energy-Scale Drive ShaperāLocalEnergyScaleDriveShaper generates a fixed analog drive from:
- the diagonal of the QUBO matrix;
- the interactions returned by the embedded register;
- a scaling parameter Īŗ.
It does not run a pulse-parameter optimization loop.
The shaper returns the generated Drive and an empty Solution. Samples and
QUBO costs are produced when the drive is executed.
Target Detunings
Section titled āTarget DetuningsāFor a QUBO matrix Q, the target detuning associated with variable i is
diā=ā2Qiiāā.These values are taken directly from the matrix received by the drive shaper.
DMM Encoding
Section titled āDMM EncodingāThe DMM is used only when:
dmm=True;- the selected device exposes a DMM detuning range;
- the target detunings are not all equal.
Let
dminā=iminādiā,dmaxā=imaxādiā,Īd=dmaxāādminā.When Īd>10ā15, the code sets
Ī“gā(T)=dmaxā,Ī“dmmā(T)=āĪd,and
wiā=Īddmaxāādiāā.The weights are clipped to [0,1]. The resulting local final detuning is
Ī“iā(T)=Ī“gā(T)+Ī“dmmā(T)wiā.With the unscaled target detunings, this gives
Ī“iā(T)=diā.If DMM is not used, the code applies one global final detuning:
Ī“gā(T)=N1āi=1āNādiā.In that case,
Ī“iā(T)=Ī“gā(T)for every qubit.
Local Energy Scale
Section titled āLocal Energy ScaleāLet Vijā denote the interaction value returned by
register.interactions()for qubits i and j.
For each qubit, the code accumulates
Iiā=jī =iāāā£Vijāā£.The local energy scale is
Eiā=ā£Ī“iā(T)ā£+Iiā.The mean local energy scale is
E=N1āi=1āNāEiā.The raw peak Rabi frequency is
Ī©maxrawā=ĪŗE.The default value is
local_energy_scale_kappa = 0.25Hardware Adjustments
Section titled āHardware AdjustmentsāAmplitude
Section titled āAmplitudeāThe code obtains the maximum compilable amplitude for the selected device and
register through max_virtual_amplitude(...).
If
Ī©maxrawā>Ī©maxdeviceā,the amplitude is clamped:
Ī©maxā=Ī©maxdeviceā.Otherwise,
Ī©maxā=Ī©maxrawā.A warning is emitted when clamping occurs.
Detunings
Section titled āDetuningsāThe code defines the allowed detuning magnitude as
dallowedā=ĻĪ©maxā(1ā10ā3),where Ļ is returned by detuning_amplitude_ratio(device).
If
imaxāā£diāā£>dallowedā,all target detunings are multiplied by
maxiāā£diāā£dallowedāā.The global detuning and DMM encoding are then recomputed from the scaled target detunings.
The local energy scale and Ī©maxā are not recomputed after this detuning rescaling.
Waveforms
Section titled āWaveformsāThe sequence duration is
device.specs["max_duration"] or 1000.0The amplitude waveform is
[ε,Ī©maxā,Ī©maxā,ε],ε=10ā9.The initial detuning is
Ī“0ā=āimaxāā£diāā£,using the possibly rescaled target detunings.
The global detuning waveform is
[Ī“0ā,Ī“0ā,Ī“gā(T),Ī“gā(T)].Both waveforms are created with qoolqit.InterpolatedWaveform.
When DMM is active, the weighted detuning waveform is created with
constant_weighted_dmm(...).
Configuration
Section titled āConfigurationā| Field | Type | Description |
|---|---|---|
drive_shaping_method |
DriveType \| str |
DriveType.LOCAL_ENERGY_SCALE or "local_energy_scale" |
dmm |
bool |
Requests DMM encoding when supported by the device |
local_energy_scale_kappa |
float |
Multiplies the mean local energy scale; default: 0.25 |
Example
Section titled āExampleāfrom qubosolver import ( DriveShapingConfig, DriveType, Instance, Solver, SolverConfig, matrix,)
qubo = matrix.tensor( [ [-6.0, 2.0, 2.0, 2.0], [2.0, -7.5, 2.0, 2.0], [2.0, 2.0, -7.5, 2.0], [2.0, 2.0, 2.0, -7.0], ])
instance = Instance(matrix=qubo)
config = SolverConfig( use_quantum=True, drive_shaping=DriveShapingConfig( drive_shaping_method=DriveType.LOCAL_ENERGY_SCALE, dmm=True, local_energy_scale_kappa=0.25, ),)
solver = Solver(instance, config)solution = solver.solve()
print(solution)