Tensorflow Quantum Versions Save

Hybrid Quantum-Classical Machine Learning in TensorFlow

v0.7.2

1 year ago

Patch release to bring GitHub release versions in line with pypi. No functional changes.

v0.6.1

2 years ago

No functional changes. Fix for internal build systems.

v0.6.0

2 years ago

New Features / Improvements

tfq.math now contains high performance fixed bond dimension MPS simulation to sample, compute expectation values and compute expectation values via sampling from 1D non periodic circuits. tfq.math.mps_1d_expectation tfq.math.mps_1d_sample tfq.math.mps_1d_sampled_expectation These are fully parallelized and based on new qsim MPS functionality found here: https://github.com/quantumlib/qsim/blob/d063d427d1f55d580416259233ce9c64037c00a0/lib/mps_simulator.h#L1

Instances of cirq.LineQubit are now supported when serializing circuits and paulisum objects.

tfq.optimizers now contains an implementation of SPSA optimization: https://www.jhuapl.edu/spsa/ tfq.optimizers.spsa_minimize.

Other

Minor CPU performance boosts from qsim upgrades. TFQ now relies on TensorFlow version 2.7.0. New tutorials that can be found on website.

Full commit list:

New Contributors

Full Changelog: https://github.com/tensorflow/quantum/compare/v0.5.0...v0.6.0

v0.5.1

2 years ago

Remove explicit and potentially problematic grpcio==1.30.0 dependency, along with some docs cleanup.

v0.5.0

2 years ago

TensorFlow Quantum 0.5.0 includes new features, bug fixes and minimal API changes.

New Features/Improvements: Added support for Cirq gates that have arbitrary control via the gate.controlled_by function. (Gradient support as well) Added tfq.math.inner_product gradient. This op will now provide a gradient via tf.GradientTape. Added tfq.math.fidelity op and gradient. This op will now provide a gradient via tf.GradientTape. Added support in tfq.convert_to_tensor for circuits containing any Cirq noise channel from common_channels . Added tfq.noise.expectation op and support with existing Differentiators for noisy analytic expectation calculation. Noisy simulations done via monte-carlo/trajectory sampling. Added tfq.noise.samples op to draw bitstring samples from noisy circuits. Added tfq.noise.sampled_expectation op and support with existing Differentiators for sample based expectation calculation. Introduced get_gradient_circuits interface method for differentiators for users wanting to define a custom Differentiator. Updated tfq.layers.Expectation, tfq.layers.Samples, tfq.layers.SampledExpectation with __init__ parameter backend=noisy, backend='noiseless' to support noisy circuits. Added tfq.layers.NoisyPQC and tfq.layers.NoisyControlledPQC which are noisy equivalents of tfq.layers.PQC and tfq.layers.ControlledPQC. New datasets available via tfq.datasets. Improved stability and performance in distributed training with MultiWorkerMirroredStrategy and ParameterServer.

Bug fixes Fixed an issue where backward passes done on expectation ops with empty input tensors would cause SEGFAULT. Fixed inconsistent output shapes between some ops, when input was the empty tensor. Fixed randomness sources used for sampling to use thread safe philox_random approaches from TF instead of std::mt19937 from the standard library. Removed parallel calls to custom Cirq simulators when using backend != None inside of any tfq.layers. This is to ensure compatibility with high performance remote simulators as well as when running on real devices.

Breaking changes We now depend on cirq==0.11.0 and tensorflow==2.4.1.

A big thanks to all of our contributors for this release: @zaqqwerty , @jaeyoo , @lamberta , @MarkDaoust , @MichaelBroughton , @therooler , @sjerbi, @balopat , @lockwo, @gatorwatt .

v0.4.0

3 years ago

TensorFlow Quantum Release 0.4.0 includes several new features, bug fixes and some breaking changes.

New Features/Improvement: Added tfq.datasets.tfi_chain downloadable dataset. Added tfq.datasets.xxz_chain downloadable dataset. Performance improvement across all ops with improved parallelization in circuit parsing. Improved np.float32 and np.float64 reliability when serializing circuits. Updated circuit simulation parallelization scheme. When circuits are less than 25 qubits each unique circuit gets 1 thread. Otherwise all threads are used for each individual circuit. Reduced memory overhead of tfq.get_sampling_op(). Moved to depending on oss qsim (https://github.com/quantumlib/qsim). Removed last of stray Eigen3 dependencies. Added tfq.enable_low_latency_op_mode to block graph level parallelism (useful when hitting real devices or in memory/compute limited scenarios). Added adjoint differentiation, capable of analytic differentiation with thousands of symbols and better runtime complexity than methods like SGDifferentiator and ParameterShift. Added Rotosolve optimizer for use as a black box optimizer with quantum circuits. Added tfq.math ops with the first op featured being inner_product.

Bug Fixes: Fixed certain invalid inputs in all underlying ops causing SIGSEGV instead of raising tf.invalidargumenterrors.

Breaking changes: Removed SGDifferentiator (Performance improvements and large rewrite needed). TensorFlow dependency is now required to be 2.3.1. Cirq dependency is now required to be Cirq 0.9.1. Pinned Sympy dependency to 1.5, until now we allowed flexibility with whatever the Cirq requirements were. Windows builds will not be provided for this release (We do have hopes to add them back in later versions).

A big thanks to all of our contributors for this version:

@zaqqwerty , @SachinCompton , @therooler , @jaeyoo , @vinitX , @yuanoook , @tiancheng2000 , @MarkDaoust , @lamberta , @MichaelBroughton , @kristenrq .

v0.3.1

3 years ago

NO FUNCTIONAL CHANGES. Added installer support for internal builds.

v0.3.0

3 years ago

Features / Improvements

  • tfq.layers.Unitary Keras layer added.
  • tfq.calculate_unitary op added.
  • support for cirq.I in all graph operations.
  • Performance improvements for tfq.layers.SampledExpectation.
  • Added sampled_expectation C++ op.
  • Upgraded Cirq from 0.7 to 0.8 (Possibly breaking)

Bug Fixes

  • removed (hopefully) all incorrect autographer warnings.
  • Fixed issues with op parallelization on Windows.
  • Fixed @tf.function performance issues for certain layer configurations of tfq.layers.State.
  • Fixed precision issue when simulating > 10 qubits with certain layouts.

v0.2.0

4 years ago

This is the first release of TensorFlow Quantum.