Module: tfq

View source on GitHub

Module functions for tensorflow_quantum.*


datasets module: Experimental location for interesting quantum datasets.

differentiators module: Module functions for tfq.differentiators.*

layers module: Module definitions for tensorflow_quantum.python.layers.*

util module: A collection of helper functions that are useful several places in tfq.


calculate_unitary(...): Calculate the unitary matrix for the given circuits.

convert_to_tensor(...): Convert lists of tfq supported primitives to tensor representations.

from_tensor(...): Convert a tensor of tfq primitives back to Python objects.

get_expectation_op(...): Get a TensorFlow op that will calculate batches of expectation values.

get_sampled_expectation_op(...): Get a TensorFlow op that will calculate sampled expectation values.

get_sampling_op(...): Get a Tensorflow op that produces samples from given quantum circuits.

get_state_op(...): Get a TensorFlow op that produces states from given quantum circuits.

padded_to_ragged(...): Utility tf.function that converts a padded tensor to ragged.

padded_to_ragged2d(...): Utility tf.function that converts a 2d padded tensor to ragged.

Other Members

  • __version__ = '0.3.0'