Releases: Quandela/Perceval
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
v0.12.1 - The Bleeding Lance
New features
- A KL divergence method to compare two distributions.
- Two methods that reduce the number of states in a
BSDistributionto help comparing distributions. - A
qloq ansatzin the catalog to help building ansatz with qudit encoding.
See https://perceval.quandela.net/docs/v0.12/notebooks/QLOQ_QUBO_tutorial.html
Improvements
- The
catalognow includes usual 1-qubit gates. - The
CircuitOptimizercan now ignore columns of the unitary given a list of modes that won't receive input photons. - Perceval's Qiskit bridge is now using Qiskit 1.3.1
- Feed-forward simulation is now faster when using heralds.
- Noisy input state generation is now faster and is now only dependant on the number of photons.
Bug fixes
LCandTDsimulation now succeed if there are empty modes at the end of the Processor.- Fixed performance computation when using
LCandTD. - Fixed potentially wrong results when using several layers of feed-forward.
- The
Sampleriterator no longer need heralded modes to be defined in the input state. - Fixed a crash when trying to display a circuit having empty sub-circuits.
You can contact us on the Perceval forum
v0.12.0 - The Bleeding Lance
New features
-
Feed-forward local simulation
You can now build aProcessorcontaining detectors and feed-forward controllers configuring unitary circuits and obtain strong simulation results!
See: https://perceval.quandela.net/docs/notebooks/Quantum_teleportation_feed_forward.html
See also: https://perceval.quandela.net/docs/reference/feed_forward_configurator.html -
Detector imperfections can now be simulated.
Four different types of detectors are currently supported:- Photon number resolving (PNR) perfect detectors,
- Threshold detectors,
- Interleaved pseudo-PNR detectors,
- Pseudo-PNR detectors using layers of beam splitters and threshold detectors.
-
A new job management system helps you group jobs, check statuses and retrieve results.
See: https://perceval.quandela.net/docs/reference/job_group.html -
A new strong simulation back-end is available: SLAP.
See: https://perceval.quandela.net/docs/backends.html#slap -
New usage example - Quantum kernel methods
See: https://perceval.quandela.net/docs/notebooks/quantum_kernel_methods.html -
Resource estimator for gate-based conversion, supporting dual rail and qudit encodings.
-
A TVD function between probability distributions.
Improvements
- Perceval now supports Python 3.13.
PostSelectsyntax now supports nested logical expressions of 'and', 'or', 'xor' and 'not' operators.- Gate-based circuits to linear optics converters now save heralded photons (by using as many post-selected CNOT as possible).
- Strong simulation now automatically uses heralds to mask the Fock space when possible, saving computation time and memory.
- Failed and cancelled jobs may now be programmatically restarted.
Barriercomponents can now be invisible (used only for alignments).- Improved circuit rendering.
DisplayConfigenabling to select a rendering skin can now be persistent.- Modernized some example notebooks.
Bug fixes
- Tensor product between
BasicStateandSVDistributionnow always succeeds
Other information & known issues
- Python 3.8 is no longer supported.
- Perceval is compatible with both numpy versions 1 and 2. However, installing a fresh Perceval, then a dependency requiring numpy<2 may result in a pip conflict. If it happens, try to install them both in a single pip command.
- You may have to update
pipandsetuptoolsto the latest version before installing Perceval in a Python 3.13 virtual environment.
See syntax changes here: https://perceval.quandela.net/docs/v0.12/legacy.html
You can contact us on the Perceval forum
v0.11.2 - Sir Gawain
Improvements
- Add a Symmetric MZI in the component catalog
- Rectangular
GenericInterferometercan now autogenerate any 1-mode component whenever the first or last mode is MZI-free - Fix typos in logging documentation
- Remove deprecated calls from user documentation
Bug fixes
- Remove a small sleep time in local sampling simulation (that would hinder low photon count sampling)
- Fix how unit tests requiring extra dependencies are run