Compares gates in the allowed TFQ gate set.
tfq.util.gate_approx_eq(
gate_true, gate_deser, atol=1e-05
)
Gates in TFQ support symbols, numbers or a single product of a real number
and a symbol as their parameters. This function behaves like
cirq.approx_eq
specialized for these kinds of gates so that TFQ can
support approximate equality in gates containing symbols.
Returns |
bool which says if the two gates are approximately equal in the way
described above.
|
Raises |
TypeError
|
If input gates are not of type cirq.Gate .
|
ValueError
|
If invalid gate types are provided.
|