BloqadeNoisy.AQUILA
— ConstantAquila noise model parameters in JSON format
BloqadeNoisy.ErrorModel
— Typestruct 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.NoisySchrodingerEquation
— Typestruct 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 problemimag_evo
: ∑_L L^†L for collapse operators L which defines the non-hermitian part of the Hamiltoniannum_cops
`: number of collapse operators (for displaying)
BloqadeNoisy.NoisySchrodingerProblem
— Typestruct 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 problemtspan
: a vector of times at which to save the simulationhamiltonian
: AbstractBlock such as that produced byrydberg_h
` representing evolution hamiltonian
BloqadeNoisy.Aquila
— Methodfunction Aquila
Create an ErrorModel representing the noise model of Aquila.
BloqadeNoisy.emulate_noisy
— Methodfunction emulate
Emulate an ensemble and return the ensemble average of a set of expectation values
Arguments
prob
: NoisySchrodingerProblemntraj
: Number of trajectoriesexpectations
: Set of Hermitian operators representing observables. Matrix-like objectsshots
: Whether to resample the solution at a fixed number of shots. No resamping ifshots = 0
`report_error
: Returns 2σ estimated from the sample. Requires expectation values to be diagonal in computational basisensemble_algo
: What type of parallelization is desired. See EnsembleSimulation documentation
BloqadeNoisy.emulate_noisy
— Methodfunction 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 emulatentraj
: number of trajectories to use for simulationoutput_func
: Vector{Complex}->Any - Transformation of the statevector array to saveensemble_algo
: See EnsembleProblem documentation. Common choices are EnsembleSerial and EnsembleThreaded
BloqadeNoisy.emulate_noisy
— Methodfunction emulate
Emulate an ensemble and return the ensemble average over bitstring distribution.
Arguments
prob
: NoisySchrodingerProblemntraj
: Number of trajectoriesreport_error
: Returns 2σ estimated from the sampleensemble_algo
: What type of parallelization is desired. See EnsembleSimulation documentation
BloqadeNoisy.expectation_value_noisy
— Methodfunction 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 modelamps
: the probability distribution over computational basis statesop
: desired expectation valueshots
: resample the distribution at a fixed number of shots to compute the expectation valueerrs
: (optional) error estimates for the probability amplitudes to propagate to
the error in the expectation value
BloqadeNoisy.expectation_value_noisy
— Methodfunction 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 modelamps
: the probability distribution over computational basis statesop
: desired expectation valueerrs
: (optional) error estimates for the probability amplitudes to propagate to
the error in the expectation value
BloqadeNoisy.load_error_model
— Methodfunction 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_noisy
— Functionfunction 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.randomize
— Methodfunction 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_err
— Methodfunction expec_series_err
Convenience method to estimate the sampling error in the ensemble solution
Arguments
sim
: EnsembleSolution, result of callingemulate
index
: index of the expectation value in the array providedfactor
: How many σ from the mean to report
BloqadeNoisy.simulation_series_mean
— Methodfunction 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.solve
— Methodfunction 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.