Releases: Quandela/Perceval
v1.2.3
New features
- Arithmetic operations can now be applied on BSDistribution
- "+" and "-" between BSDistributions with the same number of modes
- "*" and "/" between floats and BSDistributions
Improvements
- HTTP error message is now clearer
Breaking changes
- The BSDistribution internal representation has been changed. It must now be imported directly from perceval and no longer from exqalibur
You can contact us on Quandela community forum
v1.2.2
v1.2.1 The Royal Court
New features
- The main computation classes have been ported to Exqalibur
- Noisy computations should be faster and use less memory
- SLOS is now fully in Exqalibur by default
- Simulators (both probability and sampling) are now in Exqalibur, and will be used by default if the backends exists in Exqalibur (e.g. SLOS, Clifford)
- RemoteProcessor now have a
get_current_noise()method that returns a NoiseModel corresponding to its performance. - RemoteProcessor specs are now a dedicated object type that ensures some fields are always available. This should also provide code hints for your IDE
- Fourier interferometers can now be constructed through a helper method of the Unitary class
Improvements
- The "postselect" can now be changed in the Sampler's iterations
- The Unitary class now have a
random()method to make a random unitary. - The Unitary class can now take directly a numpy array instead of a Matrix
Bug fixes
- RemoteProcessor's experiment can now be changed without breaking it
- RemoteProcessor was raising an error when having asymetrical heralds
- The precision in the Sampler's probability computations depended on the presence of iterations
- The Grover's search notebook is now closer to the process proposed in its source material
- The modulus fidelity was returning complex values
- Circuit deserialization have been fixed for nested circuits with parameters
- Optical components could added after detectors in some cases
Breaking changes
- Although some classes were ported to Exqalibur, their python versions can still be accessed if needed
- No class name has been changed, so
SimulatororSLOSBackendstill points to the python version - The python SLOS is still available in Processors under the name "SLOS_LEGACY"
- No class name has been changed, so
- Tokens that were saved before perceval 0.13 will no longer be loaded by perceval due to previous changes to their storage
- Loading them and saving them in a perceval 1.1 should be enough to do the transition
- Importing the Processor class from the
componentssubmodule is now deprecated- Processor should now be imported directly from perceval's root, or from the
runtimesubmodule
- Processor should now be imported directly from perceval's root, or from the
- The new PlatformSpecs object that is now returned by RemoteProcessor.specs should be accessed through its attributes and no longer as a dictionary. While this remains possible, it is now deprecated.
- Catalog items'
build_processor()is now deprecated.build_experiment()should be used instead
A detailed documentation on how to update your Perceval code to version 1.2 is available here: https://perceval.quandela.net/docs/v1.2/legacy.html
You can contact us on Quandela community forum
v1.1.0 The Round Table
New features
- Python 3.14 is now supported.
- JobGroup
- Two new async methods to launch jobs,
launch_async_jobsandrelaunch_async_failed_jobs, that launch as many jobs as possible. - New
cancel_allmethod. - Jobs coming from a
JobGroupshould now be grouped together on the Quandela Cloud interface using the name of the JobGroup.
- Two new async methods to launch jobs,
- PPNR detectors have a new
wire_efficiencyparameter, allowing to represent losses directly within the detector. - The cloud target url can now be saved in
RemoteConfig.
Improvements
PersistentDatafolder can now be specified using aPCVL_PERSISTENT_PATHenvironment variable, or falls back to a temp folder if the default path is not writable.- Sped-up computation with Heralds and non-perfect detectors.
- HTTP errors received during the use of a
RemoteProcessoror aRemoteJobare more explicit. - SLAP backend can now directly simulate feed-forward in usual cases.
Bug fixes
- Duplicated
Parameternames are now correctly detected when inserting a new component into aProcessor. Processor.get_parametersnow successfully gives the parameters defined in any insertedFFCircuitProvider.RemoteProcessor.estimate_required_shotsandRemoteProcessor.estimate_expected_samplesnow work with non-unitary experiments.- Conversion from
BSDistributiontoBSCountorBSSampleswas forgetting the 0-photon states. JobGroupwas unable to take a Job containing an iteration list containing an input state or a noise model.- PNR detectors can now limit the number of photons.
- Tomography will now work with RemoteProcessor.
Breaking changes
Even though the changes in the API brought by the 1.1.0 version were targeted to be minimal, there are still a few breaking changes:
- Following Python cycle of life, python 3.9 is no longer supported.
- Linux version requirement has been increased. We now support:
- Debian 10+
- Ubuntu 18.10+
- Fedora 29+
- CentOS/RHEL 8+
RemoteConfig.set_cloud_maximal_job_countis deprecated asJobGroupnow retrieves the number of launchable jobs directly from the cloud.- The order of the parameters in
Circuit.compute_unitarywas inconsistent with the order for this method on components, so it has been changed. - The
.copy()methods now perform deepcopies (was previously something between shallow and deep copies). This method has been removed for Processors.
A detailed documentation on how to update your Perceval code to version 1.1 is available here: https://perceval.quandela.net/docs/v1.1/legacy.html
You can contact us on Quandela community forum
v1.0.1 - The Grail Encounter
Improvements
- In legacy, we clarified that
BasicStatewith distinguishability noise should use the newNoisyFockStateformat (i.e. "|{0}>" instead of "|{_:0}>")
Bug fixes
- Fix
ExpressionandParametercopy. CircuitandExperimentcontaining several times the sameParametercan now be copied properly using.copy().SimulatorallowedAnnotatedFockStateinputs when it shouldn'tBasicStatecan be initialised from anumpy.arrayagain- Fixed Two-particle bosonic-fermionic quantum walk example notebook
- Fixed typos and missing links in the user documentation
v1.0.0 - The Grail Encounter
After a long wait, Perceval has finally reached version 1!
New features and reasons to upgrade
-
The user documentation has been completely revamped.
-
It is now possible to send
Experimentscontaining feed-forward to the Cloud. Please note that only a limited list of platforms can handle feed-forward (at the time of its release, only "sim:slos" has this capability). -
Noisy simulations were optimised a lot, through an improved preprocessing of noisy input states, the use of light-weight
FockStaterepresentation during computations and an improved algorithm. It is now consuming way less memory and shows speed-ups up to 50x on larger noisy simulations.
Improvements
-
CircuitOptimizernow supports an initial guess -
A
Heraldcan be added on only one side of anExperiment, making it asymmetrical (user input state and output state won't have the same size anymore) -
Better probability threshold management in chained tensor products of distributions
-
Use herald values during an imperfect
Detectorsimulation -
Heralds and PostSelect are now transmitted between simulation layers for
LCandTDcomponents -
Optimized usage of an
FSMaskin SLAP -
Optimized the
SLAP.prob_distributioncall -
Optimized the
Sourcemodel algorithm (by moving it to exqalibur) -
NoiseModelnow provides pythonic access to its attributes -
A request payload may now be generated without connecting to a Cloud provider
-
Enhanced Scaleway provider code
-
Shor's algorithm example notebook has been modernised
-
Rendering
pdisplayhandlesBSSamples- Sped up the rendering of large
SVDistribution
-
Remote computing
- Perceval now checks a new constraint from remote platforms, telling whether they can handle multiple input photons per mode
- Read
RemoteProcessor.statusproperty to know the current status of the corresponding remote platform - Add field
cloud_maximal_job_counttoRemoteConfig, limiting the number of concurrentJobrun at once when callingJobGroup.run_parallel JobGroup.list_existing()method was renamed tolist_locally_saved(), for clarity- The behaviour of
get_resultsis now consistent for failed jobs (LocalJoborRemoteJob).
Bug fixes
-
Experiment composition
- When composing two experiments or processors, the right-hand-side detectors now have priority
- Adding a single component to an
Experimenton non-consecutive modes correctly applies an inverted permutation after it
-
Circuit and Processor rendering
- Modes are now rendered below the input ports
- Fixed a bug where a subcircuit and its container box would be shifted
- Fixed a bug in specific feed-forwarded circuits rendering
-
Fix handling of
min_detected_photonsin theNoisySamplingSimulator -
Fix
Expression.fixedproperty -
Fix a crash that could occur in Clifford & Clifford 2017 sampling back-end
-
Internal logger can now be setup to write in a file at a path containing non-ASCII characters
-
A
Jobdoes not forget its name anymore when reloaded from aJobGroup -
Fix the result of
PS.definition()
Breaking changes
With the release of Perceval version 1 comes a list of updated features and syntax. Here's a list of the major potential code breaks:
- To achieve large performance gains in noisy simulations, the
FockStateclass was split into three. While thepcvl.BasicStateretains most of its versatility, user code might be broken by this code. - In some computations,
physical_perfandlogical_perfscores have been merged into aglobal_perf - Gate based to LO circuits converters were moved from Perceval to a new package perceval-interop. Read its documentation.
A detailed documentation on how to update your Perceval code to version 1 is available here: https://perceval.quandela.net/docs/v1.0/legacy.html
You can contact us on Quandela community forum
v0.13.2 - Castle of Wonders
Bug fixes
- Fixed copy of Experiment when holding a defined state
- Fixed a memory leak in Experiment
v0.13.1 - Castle of Wonders
New Features
- The
StateGeneratoris now able to generate photonic states based on new rules
Improvements
- The catalog items now expose a
build_experimentmethod that allows creating anExperimentwithout creating aProcessor, allowing easier integration intoRemoteProcessor. - Non
BasicStateinput in aProcessorrequire setting themin_detected_photons_filter. The error message when omitting it was not human readable. The message is now clearer.
Bug fixes
- Fixed copy of
ExperimentandProcessorthat now give a deep copy of the original object.
v0.13.0 - Castle of Wonders
New features and reasons to upgrade
-
Noisy states aren't completely computed anymore for sampling simulations, allowing for 15+ noisy photon samplings.
-
Perceval
Parameterclass now supports math expressions with the newExpressionclass
See: https://perceval.quandela.net/docs/v0.13/reference/utils.html#expression -
Perceval handles proxies configuration
See: https://perceval.quandela.net/docs/notebooks/Remote_computing.html -
Complete overhaul of the
JobGroupfeature, to improve its reliability and reduce the number of http requests to a minimum -
Introduce a new noise parameter in
NoiseModel: the phase error
See: https://perceval.quandela.net/docs/reference/noise_model.html
Improvements
- Native optimised library (exqalibur) is now available for Linux ARM64, making Perceval installable on such an environment (i.e. you can now install Perceval in a Linux virtual machine running on a recent Mac computer)
Detectorsmay now be simulated in non-unitaryProcessors- Perceval component
catalognow contains all major 1-qubit gates
See: https://perceval.quandela.net/docs/reference/catalog.html JobGroupnow has__len__and__getitem__operatorsSimulatormasks as much of the Fock space as possible to improve memory consumption and computation times (in case of superposed and/or noisy input)PostSelect.mergemethod ignores duplicate conditions- Components containing variable parameters can now be inverted
- Beam splitter reflectivity to theta conversion manages variable parameters
- Removed several meaningless user warnings
Bug fixes
- Fixed Perceval logging system using a Python logger
CircuitandProcessorrenderers wrap and/or reduce text size when it's too long- Circuits using the same named variable multiple times will now be correctly serialised/deserialised
Other changes
- Perceval no longer deduces the
min_detected_photon_filterfor noisy and remote simulations. It is now mandatory to pass a value. min_detected_photons_filtervalue in a processor containing heralds is now the minimum expected photon count ignoring any ancillary mode and heraldSourceis no longer a valid parameter when instantiating aProcessor
For more information, see: https://perceval.quandela.net/docs/v0.13/legacy.html
You can contact us on the Perceval forum
v0.12.2 - The Bleeding Lance
Improvements
- Detector simulation now uses the optional progress callback
- Renamed
JobGroupmethodlist_unfinished_jobstolist_unsuccessful_jobsfor clarity - Removed a warning which always occurred when injecting noise in a converter
Bug fixes
- Fixed post-selection conditions composition in converters
- Fixed heralds display in highly nested circuits
- Fixed
JobGroupnot saving the refreshed jobs status in a parallel run