VirtualDevice
- class pulser.devices.VirtualDevice(name, dimensions, rydberg_level, min_atom_distance=0, max_atom_num=None, max_radial_distance=None, interaction_coeff_xy=None, supports_slm_mask=True, max_layout_filling=0.5, optimal_layout_filling=None, min_layout_traps=1, max_layout_traps=None, max_sequence_duration=None, max_runs=None, requires_layout=False, reusable_channels=True, channel_ids=None, channel_objects=<factory>, dmm_objects=(DMM(addressing='Global', max_abs_detuning=None, max_amp=0, min_retarget_interval=None, fixed_retarget_t=None, max_targets=None, clock_period=1, min_duration=1, max_duration=100000000, min_avg_amp=0, mod_bandwidth=None, custom_phase_jump_time=None, eom_config=None, propagation_dir=None, bottom_detuning=None, total_bottom_detuning=None), ), default_noise_model=None, short_description='')
Bases:
BaseDevice
Specifications of a virtual neutral-atom device.
A VirtualDevice can only be used for emulation and allows some parameters to be left undefined. Furthermore, it optionally allows the same channel to be declared multiple times in the same Sequence (when reusable_channels=True) and allows the Rydberg level to be changed.
- Parameters:
name (
str
) – The name of the device.dimensions (
Literal
[2
,3
]) – Whether it supports 2D or 3D arrays.max_atom_num (
int
|None
, default:None
) – Maximum number of atoms supported in an array.max_radial_distance (
int
|None
, default:None
) – The furthest away an atom can be from the center of the array (in μm).min_atom_distance (
float
, default:0
) – The closest together two atoms can be (in μm).requires_layout (
bool
, default:False
) – Whether the register used in the sequence must be created from a register layout. Only enforced in QPU execution.max_layout_filling (
float
, default:0.5
) – The largest fraction of a layout that can be filled with atoms.optimal_layout_filling (
float
|None
, default:None
) – An optional value for the fraction of a layout that should be filled with atoms.min_layout_traps (
int
, default:1
) – The minimum number of traps a layout can have.max_layout_traps (
int
|None
, default:None
) – An optional value for the maximum number of traps a layout can have.rydberg_level (
int
) – The value of the principal quantum number \(n\) when the Rydberg level used is of the form \(|nS_{1/2}, m_j = +1/2\rangle\).interaction_coeff_xy (
float
|None
, default:None
) – \(C_3/\hbar\) (in \(rad \cdot \mu s^{-1} \cdot \mu m^3\)), which sets the van der Waals interaction strength between atoms in different Rydberg states. Needed only if there is a Microwave channel in the device. If unsure, 3700.0 is a good default value.reusable_channels (
bool
, default:True
) – Whether each channel can be declared multiple times on the same pulse sequence.channel_objects (
tuple
[Channel
,...
], default:<factory>
) – The Channel subclass instances specifying each channel in the device.channel_ids (
tuple
[str
,...
] |None
, default:None
) – Custom IDs for each channel object. When defined, an ID must be given for each channel. If not defined, the IDs are generated internally based on the channels’ names and addressing.dmm_objects (
tuple
[DMM
,...
], default:(DMM(addressing='Global', max_abs_detuning=None, max_amp=0, min_retarget_interval=None, fixed_retarget_t=None, max_targets=None, clock_period=1, min_duration=1, max_duration=100000000, min_avg_amp=0, mod_bandwidth=None, custom_phase_jump_time=None, eom_config=None, propagation_dir=None, bottom_detuning=None, total_bottom_detuning=None),)
) – The DMM subclass instances specifying each channel in the device. They are referenced by their order in the list, with the ID “dmm_[index in dmm_objects]”.supports_slm_mask (
bool
, default:True
) – Whether the device supports the SLM mask feature.max_sequence_duration (
int
|None
, default:None
) – The maximum allowed duration for a sequence (in ns).max_runs (
int
|None
, default:None
) – The maximum number of runs allowed on the device. Only used for backend execution.default_noise_model (
NoiseModel
|None
, default:None
) – An optional noise model characterizing the default noise of the device. Can be used by emulator backends that support noise.
Attributes
channel_ids
Dictionary of available channels on this device.
default_noise_model
Dictionary of available DMM channels on this device.
dmm_objects
The interaction coefficient for the chosen Rydberg level.
interaction_coeff_xy
max_atom_num
max_layout_filling
max_layout_traps
max_radial_distance
max_runs
max_sequence_duration
min_atom_distance
min_layout_traps
optimal_layout_filling
requires_layout
reusable_channels
short_description
Text summarizing the specifications of the device.
Available electronic transitions for control and measurement.
Available states ranked by their energy levels (highest first).
supports_slm_mask
name
dimensions
rydberg_level
channel_objects
Methods
Changes the Rydberg level used in the Device.
Deserialize a VirtualDevice from an abstract JSON object.
Prints the device specifications.
The maximum Rabi frequency value to enforce a given blockade radius.
Calculates the Rydberg blockade radius for a given Rabi frequency.
Serializes the device into an abstract JSON object.
Checks if a register layout is compatible with this device.
Checks if a register properly fills its layout.
Checks if 'register' is compatible with this device.
Signatures
- change_rydberg_level(ryd_lvl)
Changes the Rydberg level used in the Device.
Find the \(C_6/\hbar\) coefficient matching the Rydberg level on this page (external)
- Parameters:
ryd_lvl (
int
) – the Rydberg level to use (between 50 and 100).- Return type:
None
- static from_abstract_repr(obj_str)
Deserialize a VirtualDevice from an abstract JSON object.
Warning
If the JSON string represents a Device, the Device is converted into a VirtualDevice using the Device.to_virtual method.
- Parameters:
obj_str (str) – the JSON string representing the noise model encoded in the abstract JSON format.
- Return type:
- print_specs()
Prints the device specifications.
- Return type:
None
- rabi_from_blockade(blockade_radius)
The maximum Rabi frequency value to enforce a given blockade radius.
- Parameters:
blockade_radius (
float
) – The Rydberg blockade radius, in µm.- Return type:
float
- Returns:
The maximum rabi frequency value, in rad/µs.
- rydberg_blockade_radius(rabi_frequency)
Calculates the Rydberg blockade radius for a given Rabi frequency.
- Parameters:
rabi_frequency (
float
) – The Rabi frequency, in rad/µs.- Return type:
float
- Returns:
The rydberg blockade radius, in μm.
- to_abstract_repr()
Serializes the device into an abstract JSON object.
- Return type:
str
- validate_layout(layout)
Checks if a register layout is compatible with this device.
- Parameters:
layout (
RegisterLayout
) – The RegisterLayout to validate.- Return type:
None
- validate_layout_filling(register)
Checks if a register properly fills its layout.
- Parameters:
register (
BaseRegister
|MappableRegister
) – The register to validate. Must be created from a register layout.- Return type:
None
- validate_register(register)
Checks if ‘register’ is compatible with this device.
- Parameters:
register (
BaseRegister
) – The Register to validate.- Return type:
None
- property channels: dict[str, Channel]
Dictionary of available channels on this device.
- property dmm_channels: dict[str, DMM]
Dictionary of available DMM channels on this device.
- property interaction_coeff: float
The interaction coefficient for the chosen Rydberg level.
Corresponds to \(C_6/\hbar\) (in units of \(rad \cdot \mu s^{-1} \cdot \mu m^6\)) for the interaction term of the Ising hamiltonian.
- property specs: str
Text summarizing the specifications of the device.
- property supported_bases: set[str]
Available electronic transitions for control and measurement.
- property supported_states: list[Literal['u', 'd', 'r', 'g', 'h', 'x']]
Available states ranked by their energy levels (highest first).