Result.get_countsmethod for showing repetitions in the obtained samples.dasksupport for Gaussian Boson Sampling.- State vector display with occupation numbers using
fock_amplitude_map.
- Handling number of modes mismatch in
Simulator.execute. - Typos in the documentation corrected.
- Instruction mode validation improved for caching invalid indices.
- Jupyter notebook download issue in the documentation.
- Unnecessary singularity check deleted in
Graph.
- Fermionic
GaussianHamiltoniansupport for subsystem. - The analog of the
Squeezing2gate in the fermionic setting. - Fermionic
ControlledPhasegate. - Fermionic Ising XX coupling gate.
- Fermionic
PureFockState.fock_probabilities_map. get_marginal_fock_probabilitiesmethods forGaussianState,FockStateandPureFockStatefor calculating the marginal particle detection probabilities.- The
SamplingState.get_particle_detection_probabilitymethod is made differentiable via JAX. - Support for nested program definitions.
GaussianState.get_xp_string_momentfor calculating higher XP-string moments for Gaussian states.fock_amplitudes_mapmethod forFockState,PureFockStateandBatchPureFockState, a defaultdict containing the probability amplitudes, indexed by tuples of occupation numbers on each mode.- Support for Python 3.13.
plot_wignermethod forFockState,PureFockStateandGaussianState, which can be used to visualize the marginal Wigner function on a single mode.
- JAX has been mistakenly loaded when importing Piquasso, but has been fixed in this release.
- Numba reflected list warning got removed.
- Some typos in the documentation got fixed.
- Pfaffian, torontonian and loop torontonian precision type is fixed.
- Pfaffian got reimplemented in C++ using the Parlett-Reid algorithm.
SLOS_fullalgorithm implemented for state vector calculation inSamplingState.- Permanent function got reimplemented in C++ using the algorithm described in https://arxiv.org/abs/2309.07027.
- Minimal
fermionic.PureFockSimulatorimplementation. GaussianState.get_purity()function for calculating Gaussian state purity.
- Passive linear operations in
fermionic.GaussianSimulatortime evolution direction.
- Majorana operator ordering changed in
piquasso.fermionicpackage. - Phaseshifters are commuted to the end of the circuit in the Clements decomposition.
- Windows binary wheel packaging.
get_purityin*FockStatefor calculating the purity.PostSelectPhotonsandImperfectPostSelectPhotonsforPureFockSimulatorandSamplingSimulator.Beamsplitter5050support.SamplingState.state_vector, analog of*FockState.state_vector.- JAX support for
SamplingSimulator. - Support for multiple occupation numbers in
SamplingSimulator. PureFockState.get_particle_detection_probability_on_modes, which is similar toget_particle_detection_probability, but for the specified modes.HomodyneMeasurementsupport forPureFockSimulator.cvqnn.get_cvqnn_weight_indicesis created, which enables slicing of the weights when needed.PureFockState.variance_photon_numberfor calculating the variance of the photon number operator.- Partial JAX support for
GaussianSimulator. GaussianState.get_threshold_detection_probability.- Python 3.12 support.
- Support for
ParticleNumberMeasurementinGaussianSimulatorwith the configuse_torontonian=Trueand displaced Gaussian states. Config.validateflag. If set tovalidate=False, validations are skipped, possibly enabling minor speed-up or JIT compilation.piquasso.fermionicpackage with support for fermionic Gaussian states.- Support for differentiable
GaussianState.get_particle_detection_probability.
Simulator.executewithinitial_statespecified while usingtf.function.GaussianSimulatorrandom number generation fromConfig.rng.- Error message formatting in
Simulator. Beamsplitterdefault parameters.fock_probabilitiesdifferentiability inPureFockSimulator.SamplingState.fock_probabilitiesreturns with probabilities corresponding to all particle number sectors.
- Delete unused attributes in
SamplingState. - Clements decomposition rewritten.
- The original RNG is kept when a
Configis copied. This is done to prevent unexpected behaviour with seeded calculations. - The config variable
Config.normalizeis deleted. For the same result, one can callState.normalizeat the end of the calculations. Simulator._default_calculator_classinitial value got deleted to avoid confusion.- Renamed
CalculatortoConnectorand corresponding names containing the termcalculator, referring to the originalCalculatorclass (e.g.,_default_calculator_class->_default_connector_class). BaseConnector(formerBaseCalculator) rewritten as an abstract class.- Added/updated
__repr__methods for all classes in the Piquasso API.
- Hafnian, loop hafnian, torontonian and permanent implementations replaced with faster implementations. The torontonian calculation is written in C++, and is distributed in the wheels alongside the Python code.
- Faster
FockState.norm. - Faster
SamplingState.get_particle_detection_probability. - JIT compilation of passive linear gates in
*FockSimulator. - Common Fock-space related calculations got rewritten, JIT compilation enabled.
- More efficient sampling algorithms for BS and GBS simulations.
- Python 3.11 support.
- Purification of Gaussian states.
PureFockState.get_tensor_representationfor embedding the state vector into a tensor with rank equal to the number of modes.- Batch processing of pure Fock states.
- CVQNN module.
- Support for
tf.functioninPureFockSimulator. - Supporting JAX in
PureFockSimulator.
- Error in custom gradient of passive linear gates in
PureFockSimulator.
- Python 3.7 support dropped.
TensorflowPureFockSimulatorhas been deleted. Instead, one can usePureFockSimulatorwithTensorflowConnectorspecified.- Printing format of Fock states have been changed.
- Renamed
_state_vectortostate_vector.
dtypeconfiguration variable inConfigto set precision of calculations.Kerrgate calculation inPureFockSimulatorperformance improved.- Gradient calculation in
TensorflowPureFockSimulatorgot improved. - A method called
PureFockState.mean_positionwhich calculates the average position in a specified mode. normalizeconfiguration variable inConfigto enable/disable normalization of statesPureFockSimulatorandFockSimulator.
Displacementparametrization is simplified.- The autoscaling of single mode gates got deleted.
- Vacuum state typing issue fixed in
PureFockSimulator. - Calculation error during gradient calculation.
- Several major performance improvements got implemented in
TensorflowPureFockSimulator.
quantum-blackbirdversion got bumped fornumpycompatibility.Kerrgate was applied with a wrong equation, it got corrected.- Typing error was fixed when applying
InterferometerinTensorflowPureFockSimulator.
- Performance increase for the
PureFockSimulatorandTensorflowPureFockSimulator.
GaussianState.fidelitygave incorrect results for multiple modes and it needed to be corrected.- During Williamson decomposition, sometimes
scipy.linalg.sqrtmreturned with complex matrices instead of real ones which caused problems so it is manually casted to real. - In
TensorflowPureFockSimulator, the gradient of the displacement gate matrix was not applied properly to the upstream gradient, a conjugation is added. - Using
TensorflowPureFockSimulator, the input of theInterferometergate was not converted to atensorflow.Tensorautomatically, which has been included.
- A simulator class called
TensorflowPureFockSimulator, which uses Tensorflow and is able to calculate gradients.
- By enabling Tensorflow support, we dropped support for customizing the
permanent, hafnian and loop hafnian calculations through
Config.
SamplingSimulatoralong withLossusing uniform transmissivity (transmittance) parameters andParticleNumberMeasurementproduced only-zero samples instead of the expected samples.
- Support for
AttenuatorinFockSimulatorandPureFockSimulator. LossyInterferometerchannel forSamplingSimulator.- Possibility to provide the
hafnianas a function inpiquasso.Config.
- The occupation number order has been changed from lexicographic to anti-lexicographic.
- The
piquasso.api.errorsmodule got renamed topiquasso.api.exceptions. - The
Samplingmeasurement class has been unified withParticleNumberMeasurement.
Kerrgate calculations were incorrect for multiple modes inFockSimulatorandPureFockSimulator.- Calculations that were incorrect for multiple modes using
FockSimulatoralong withSqueezing,DisplacementorCubicPhase. - Symmetric tensorpower ordering in Fock-backend simulations.
- Handling 0 matrix elements at Clements decomposition.