BloqadeNoisy.ErrorModelType
struct ErrorModel

This struct holds all of the information used to simulate coherent noise, incoherent noise, and readout error for a specific error model. The structure is as follows:

Arguments

  • confusion_mat: Function to generate a confusion matrix given a number of qubits,

with type (Int)->(T) where T` is Matrix-like

  • collapse_ops: Function to generate the collapse operators given a number of qubits, with type

(Int)->Vector{SparseMatrixCSC}

  • coherent_noise: Function returning a function that generates random samples from a Hamiltonian

with type (RydbergHamiltonian)->(()->RydbergHamiltonian)

BloqadeNoisy.NoisySchrodingerEquationType
struct NoisySchrodingerEquation

Decorator object for SchrodingerEquation. Implements the f(dstate, state, p, t) interface to fit into a standard ODE Problem.

Arguments

  • equation: The coherent 'SchrodingerEquation` equation for the problem
  • imag_evo: ∑_L L^†L for collapse operators L which defines the non-hermitian part of the Hamiltonian
  • num_cops`: number of collapse operators (for displaying)
BloqadeNoisy.NoisySchrodingerProblemType
struct NoisySchrodingerEquation
NoisySchrodingerEquation(reg, tspan, hamiltonian, c_ops; kw...)
NoisySchrodingerEquation(reg, tspan, hamiltonian, noise_model; kw...)

Define an ODE Problem representing a single noisy trajectory in an open system in the weak-coupling limit

Arguments

  • reg: evolution register and initial state of the problem
  • tspan: a vector of times at which to save the simulation
  • hamiltonian: AbstractBlock such as that produced by rydberg_h` representing evolution hamiltonian
BloqadeNoisy.AquilaMethod

function Aquila

Create an ErrorModel representing the noise model of Aquila.
BloqadeNoisy.emulate_noisyMethod
function emulate

Emulate an ensemble and return the ensemble average of a set of expectation values

Arguments

  • prob: NoisySchrodingerProblem
  • ntraj: Number of trajectories
  • expectations: Set of Hermitian operators representing observables. Matrix-like objects
  • shots: Whether to resample the solution at a fixed number of shots. No resamping if shots = 0`
  • report_error: Returns 2σ estimated from the sample. Requires expectation values to be diagonal in computational basis
  • ensemble_algo: What type of parallelization is desired. See EnsembleSimulation documentation
BloqadeNoisy.emulate_noisyMethod
function emulate

Emulate the evolution of a noisy system by averaging over an ensemble of ntraj noisy trajectories. The output is an array where each array contains the output of output_func on the timeseries corresponding to a single trajectory.

Arguments

  • prob: NoisySchrodingerProblem to emulate
  • ntraj: number of trajectories to use for simulation
  • output_func: Vector{Complex}->Any - Transformation of the statevector array to save
  • ensemble_algo: See EnsembleProblem documentation. Common choices are EnsembleSerial and EnsembleThreaded
BloqadeNoisy.emulate_noisyMethod
function emulate

Emulate an ensemble and return the ensemble average over bitstring distribution.

Arguments

  • prob: NoisySchrodingerProblem
  • ntraj: Number of trajectories
  • report_error: Returns 2σ estimated from the sample
  • ensemble_algo: What type of parallelization is desired. See EnsembleSimulation documentation
BloqadeNoisy.expectation_value_noisyMethod
function expectation_value_noisy

Get the expectation value of an operator after applying readout error. operators Must be diagonal in the computational basis.

Arguments

  • noisy_model: the simulated noise model
  • amps: the probability distribution over computational basis states
  • op: desired expectation value
  • shots: resample the distribution at a fixed number of shots to compute the expectation value
  • errs: (optional) error estimates for the probability amplitudes to propagate to

the error in the expectation value

BloqadeNoisy.expectation_value_noisyMethod
function expectation_value_noisy

Get the expectation value of an operator after applying readout error. operators Must be diagonal in the computational basis.

Arguments

  • noisy_model: the simulated noise model
  • amps: the probability distribution over computational basis states
  • op: desired expectation value
  • errs: (optional) error estimates for the probability amplitudes to propagate to

the error in the expectation value

BloqadeNoisy.load_error_modelMethod
function load_error_model

Load a generic Rydberg atom error model from a JSON string

Arguments

  • config: JSON string with error model parameters (example in src/noise_models.jl)
BloqadeNoisy.measure_noisyFunction

function measure_noisy

This function mimicks YaoAPI.measure with noisy readout

Arguments

  • reg: statevector representing the quantum state to be measured
  • noise_model: an ErrorModel struct which contains a method to create the confusion matrix
  • site (optional): site to be measured
  • nshots (optional kwarg): number of measurements to return
BloqadeNoisy.randomizeMethod
function randomize

Used to randomly modify the parameters of the Hamiltonian and randomly change the initial condition, producing another NoisySchrodingerProblem object representing a new trajectory. This is a replacement for SciML remake

BloqadeNoisy.simulation_series_errMethod
function expec_series_err

Convenience method to estimate the sampling error in the ensemble solution

Arguments

  • sim: EnsembleSolution, result of calling emulate
  • index: index of the expectation value in the array provided
  • factor: How many σ from the mean to report
BloqadeNoisy.simulation_series_meanMethod
function expec_series_mean

Convenience method to access the expectation value over the ensemble over the series of save times.

Arguments

  • sim: EnsembleSolution, result of calling emulate
  • index: index of the expectation value in the array provided
CommonSolve.solveMethod
function solve

This method should generally not be called directly unless you are implementing your own EnsembleProblem. This Implements the DifferentialEquations interface for NoisySchrodingerProblem, which represents a single quantum trajectory.