Releases: Budapest-Quantum-Computing-Group/piquasso
Releases · Budapest-Quantum-Computing-Group/piquasso
v5.0.1
v5.0.0
What's Changed
Added
get_purity
in*FockState
for calculating the purity.PostSelectPhotons
andImperfectPostSelectPhotons
forPureFockSimulator
and
SamplingSimulator
.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 to
get_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 config
use_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
.
Fixed
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.
Breaking changes
- 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 call
State.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 term
calculator
, 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.
Performance improvements
- 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.
New Contributors
- @czaba7 made their first contribution in #307
- @dependabot made their first contribution in #355
Full Changelog: 4.0.0...v5.0.0
v4.0.0
Added
- 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
.
Fixed
- Error in custom gradient of passive linear gates in
PureFockSimulator
.
Breaking changes
- Python 3.7 support dropped.
TensorflowPureFockSimulator
has been deleted. Instead, one can use
PureFockSimulator
withTensorflowCalculator
specified.- Printing format of Fock states have been changed.
- Renamed
_state_vector
tostate_vector
.
3.0.0
Added
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
.
Changed
Displacement
parametrization is simplified.- The autoscaling of single mode gates got deleted.
Fixed
- Vacuum state typing issue fixed in
PureFockSimulator
. - Calculation error during gradient calculation.
2.2.0
Changed
- Several major performance improvements got implemented in
TensorflowPureFockSimulator
.
Fixed
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
in
TensorflowPureFockSimulator
.
2.1.0
Added
- Performance increase for the
PureFockSimulator
andTensorflowPureFockSimulator
.
Fixed
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.
2.0.1
[2.0.1] - 2022-11-03
Fixed
GaussianState.fidelity
gave incorrect results for multiple modes and it
needed to be corrected.
2.0.0
Added
- A simulator class called
TensorflowPureFockSimulator
, which uses Tensorflow
and is able to calculate gradients.
Changed
- By enabling Tensorflow support, we dropped support for customizing the
permanent, hafnian and loop hafnian calculations throughConfig
.
Fixed
SamplingSimulator
along withLoss
using uniform transmissivity
(transmittance) parameters andParticleNumberMeasurement
produced only-zero
samples instead of the expected samples.
Release 1.0.0
What's Changed
- feat(config): Moving reduction to loop hafnian + feat(gaussian): Hafnian and loop hafnian cases by @Kolarovszki in #160
- dev: Bumping
black
to non-beta version by @Kolarovszki in #162 - docs: Documentation fixes by @Kolarovszki in #161
- docs: Documentation fixes by @Kolarovszki in #163
- feat(gates): Rename
*BogoliubovTransformation
by @Kolarovszki in #164 - feat(measurements): Delete
Sampling
by @Kolarovszki in #165 - Update README.md by @antalszava in #166
- feat(sampling): TransmissivityMatrix by @Kolarovszki in #167
- fix(requirements.txt): Bumping
black
version by @Kolarovszki in #169 - feat(sampling): Rename
TransmissivityMatrix
by @Kolarovszki in #168 - feat(api): Rename
errors
toexceptions
by @Kolarovszki in #170 - Remove unused dependencies, reformat requirements.txt, and fix documentation by @boldar99 in #173
- Check IPython notebook executability and flake8 tests. by @boldar99 in #174
- perf(benchmarks): Additional pure Fock benchmarks by @Kolarovszki in #172
- FIX(clements): Handling 0 matrix elements by @Kolarovszki in #175
- FIX(fock): Symmetric tensorpower ordering by @Kolarovszki in #176
- chore: Update copyright by @Kolarovszki in #179
- feat: Reversing occupation number order by @Kolarovszki in #180
- Fix documentation by @boldar99 in #182
- Support for Python 3.10 by @boldar99 in #181
- fix(FockSimulator): Wrong auxiliary modes in calculation by @Kolarovszki in #184
- feat(fock):
Attenuator
support by @Kolarovszki in #185 - fix(Kerr): Kerr gate scaling by @Kolarovszki in #188
- bump: 0.8 -> 1.0.0 by @Kolarovszki in #190
New Contributors
- @antalszava made their first contribution in #166
Full Changelog: 0.8.1...1.0.0