Closed
Description
Description of the issue
Linspace and Points have type annotations that use only floats ... however there is nothing in their operations that doesn't allow using other datatypes that as long as they support arithmetic operations. for example the following example is valid and works
In [1]: import cirq
In [2]: import tunits
In [3]: for t in cirq.Linspace('t', tunits.ns, 3*tunits.ns, 10):
...: print(t)
...:
cirq.ParamResolver({'t': Time(1.0, 'ns')})
cirq.ParamResolver({'t': Time(1.222222222222222, 'ns')})
cirq.ParamResolver({'t': Time(1.4444444444444444, 'ns')})
cirq.ParamResolver({'t': Time(1.6666666666666667, 'ns')})
cirq.ParamResolver({'t': Time(1.8888888888888888, 'ns')})
cirq.ParamResolver({'t': Time(2.111111111111111, 'ns')})
cirq.ParamResolver({'t': Time(2.3333333333333335, 'ns')})
cirq.ParamResolver({'t': Time(2.555555555555556, 'ns')})
cirq.ParamResolver({'t': Time(2.7777777777777777, 'ns')})
cirq.ParamResolver({'t': Time(3.0, 'ns')})
functionally the sweeps work but the type annotations need to be updated to reflect that
related to #6829
Metadata
Metadata
Assignees
Labels
For CI/testing/release process/refactoring/technical debt itemsWant to contribute to Cirq, but don't know quantum computing? This issue is for you.This needs an RFC document.A consensus emerged that this bug report, feature request, or other action should be worked on[Feature requests] Needs design work to prove feasibility before accepting