- Windows binary wheel packaging.
get_purity
in*FockState
for calculating the purity.PostSelectPhotons
andImperfectPostSelectPhotons
forPureFockSimulator
andSamplingSimulator
.Beamsplitter5050
support.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.HomodyneMeasurement
support forPureFockSimulator
.cvqnn.get_cvqnn_weight_indices
is created, which enables slicing of the weights when needed.PureFockState.variance_photon_number
for calculating the variance of the photon number operator.- Partial JAX support for
GaussianSimulator
. GaussianState.get_threshold_detection_probability
.- Python 3.12 support.
- Support for
ParticleNumberMeasurement
inGaussianSimulator
with the configuse_torontonian=True
and displaced Gaussian states. Config.validate
flag. If set tovalidate=False
, validations are skipped, possibly enabling minor speed-up or JIT compilation.piquasso.fermionic
package with support for fermionic Gaussian states.- Support for differentiable
GaussianState.get_particle_detection_probability
.
Simulator.execute
withinitial_state
specified while usingtf.function
.GaussianSimulator
random number generation fromConfig.rng
.- Error message formatting in
Simulator
. Beamsplitter
default parameters.fock_probabilities
differentiability inPureFockSimulator
.SamplingState.fock_probabilities
returns with probabilities corresponding to all particle number sectors.
- Delete unused attributes in
SamplingState
. - Clements decomposition rewritten.
- The original RNG is kept when a
Config
is copied. This is done to prevent unexpected behaviour with seeded calculations. - The config variable
Config.normalize
is deleted. For the same result, one can callState.normalize
at the end of the calculations. Simulator._default_calculator_class
initial value got deleted to avoid confusion.- Renamed
Calculator
toConnector
and corresponding names containing the termcalculator
, referring to the originalCalculator
class (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_representation
for embeddng 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.function
inPureFockSimulator
. - Supporting JAX in
PureFockSimulator
.
- Error in custom gradient of passive linear gates in
PureFockSimulator
.
- Python 3.7 support dropped.
TensorflowPureFockSimulator
has been deleted. Instead, one can usePureFockSimulator
withTensorflowConnector
specified.- Printing format of Fock states have been changed.
- Renamed
_state_vector
tostate_vector
.
dtype
configuration variable inConfig
to set precision of calculations.Kerr
gate calculation inPureFockSimulator
performance improved.- Gradient calculation in
TensorflowPureFockSimulator
got improved. - A method called
PureFockState.mean_position
which calculates the average position in a specified mode. normalize
configuration variable inConfig
to enable/disable normalization of statesPureFockSimulator
andFockSimulator
.
Displacement
parametrization 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-blackbird
version got bumped fornumpy
compatibility.Kerr
gate was applied with a wrong equation, it got corrected.- Typing error was fixed when applying
Interferometer
inTensorflowPureFockSimulator
.
- Performance increase for the
PureFockSimulator
andTensorflowPureFockSimulator
.
GaussianState.fidelity
gave incorrect results for multiple modes and it needed to be corrected.- During Williamson decomposition, sometimes
scipy.linalg.sqrtm
returned 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 theInterferometer
gate was not converted to atensorflow.Tensor
automatically, 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
.
SamplingSimulator
along withLoss
using uniform transmissivity (transmittance) parameters andParticleNumberMeasurement
produced only-zero samples instead of the expected samples.
- Support for
Attenuator
inFockSimulator
andPureFockSimulator
. LossyInterferometer
channel forSamplingSimulator
.- Possibility to provide the
hafnian
as a function inpiquasso.Config
.
- The occupation number order has been changed from lexicographic to anti-lexicographic.
- The
piquasso.api.errors
module got renamed topiquasso.api.exceptions
. - The
Sampling
measurement class has been unified withParticleNumberMeasurement
.
Kerr
gate calculations were incorrect for multiple modes inFockSimulator
andPureFockSimulator
.- Calculations that were incorrect for multiple modes using
FockSimulator
along withSqueezing
,Displacement
orCubicPhase
. - Symmetric tensorpower ordering in Fock-backend simulations.
- Handling 0 matrix elements at Clements decomposition.