A Julia package for simulating noisy quantum systems under sequential measurements with dynamical decoupling control. The package builds upon QuantumOptics.jl for time-dependent quantum evolution and operator manipulation.
- Simulation of quantum systems with configurable number of bath qubits
- Support for different noise models through customizable power spectral density functions
- Implementation of Concatenated Dynamical Decoupling (CDD) sequences
- Flexible measurement schemes (fidelity measurements, expectation values)
- Parallel execution support for multiple realizations
- Data management and persistence capabilities
The package primarily depends on:
- QuantumOptics.jl: Provides the core functionality for quantum operations and time-dependent evolution
- Other standard Julia packages for numerical computations and data handling
To install the package for development:
julia> using Pkg
julia> Pkg.develop(url="https://github.com/diego-bernal/SequentialMeasurements.jl.git")Here's a basic example of running an error virtualization simulation:
using SequentialMeasurements
# Define control parameters
ctrl_params_dict = Dict(
:n => 0, # CDD order
:t0 => 0.0, # initial time
:τg => 1.0, # gate duration
:nsteps => 10, # time steps per evolution
:M_max => 60 # control cycles
)
# Define noise parameters
noise_params_dict = Dict(
:Nb => 0, # number of bath qubits (0 for classical noise)
:psd_function => lf_gaussian, # spectral density function
:psd_kwargs => Dict(:s => 1.0, :Δ0 => 50, :Γ0 => 0.1),
:ωu => 2π*1.0, # upper frequency cutoff
:Nh => Int(2.0^12) # number of harmonics
)
# Define measurement scheme
measurement_scheme_dict = Dict(
:fout => process_fidelity_with_plus, # measurement processing function
:conditional_evolution => false # whether to use conditional evolution
)
# Initialize components
control = initialize_ctrl(:cdd, ctrl_params_dict)
noise = initialize_noise(:lf_gaussian, noise_params_dict)
measurement_scheme = initialize_measurement_scheme(measurement_scheme_dict)
# Run simulation
results = run_simulation(
1000, # number of realizations
noise,
control,
"output_directory", # data collection path
measurement_scheme,
error_virtualization_realization; # realization function
save_output=false # whether to save results to disk
)The package provides several measurement processing functions:
process_fidelity_with_plus: Measures fidelity with respect to the |+⟩ stateprocess_fidelity: Generic fidelity measurement with respect to any target stateprocess_expectation: Measures expectation value of an operator
Measurements can be performed in two modes:
- Unconditional evolution (
conditional_evolution = false): Average over all possible measurement outcomes - Conditional evolution (
conditional_evolution = true): Perform measurements and update states based on outcomes
The package includes several built-in spectral density functions:
lf_gaussian: Low-frequency Gaussian noisehf_gaussian: High-frequency Gaussian noiselorentzian: Lorentzian spectral densitylorentzian_article: Alternative Lorentzian parameterization
You can also implement custom spectral density functions for specific noise models.
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature) - Make your changes
- Run the tests (
julia> ]test SequentialMeasurements) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature/your-feature) - Create a new Pull Request
To set up the package for development:
- Clone the repository:
git clone https://github.com/diego-bernal/SequentialMeasurements.jl.git
cd SequentialMeasurements.jl- Start Julia and enter package mode by pressing
], then:
pkg> activate .
pkg> instantiate- Run the tests:
pkg> test- Measurement Schemes: Add new measurement schemes by creating a subtype of
MeasurementSchemeand implementingprocess_measurement - Noise Models: Add new noise models by implementing new spectral density functions
- Control Sequences: Extend the control capabilities by adding new control sequence generators
This project is licensed under the MIT License - see the LICENSE file for details.