Repository: Qiskit/qiskit

Issue:
Convert rep_times to seconds
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->

### Information

- **Qiskit Terra version**:
- **Python version**:
- **Operating system**:

### What is the current behavior?
All other time-based units have been converted to seconds/Hz. rep_times should also be converted. This may not be so straightforward because it is currently defined as an integer.

### Steps to reproduce the problem



### What is the expected behavior?



### Suggested solutions





Discussion:
Hi! I have some downtime the next couple of weeks and would like to try working on this, but I'm quite the newbie - would you mind giving a bit of guidance on where to start? :) 

I also suppose this also would relate to #3599 , or am I mistaken? 
That would be great @eembees, this contribution would be a huge help! Currently, the `rep_times` is reported in the schema as an integer, this should likely be a float, see [here](https://github.com/Qiskit/qiskit-terra/blob/2b29f32d40e9155552326f8288e6fba87c3faa0b/qiskit/providers/models/backendconfiguration.py#L119).  It is also used in several [places](https://github.com/Qiskit/qiskit-terra/search?q=rep_times&unscoped_q=rep_times) and we should make sure these are updated to be consistent 

It would also great if a one-time warning could be raised when calling this by making it a property. This way we can properly warn users of the change. See [here](https://github.com/Qiskit/qiskit-terra/blob/2b29f32d40e9155552326f8288e6fba87c3faa0b/qiskit/providers/models/backendconfiguration.py#L348) for an example.

 and yes it is related to #3599.

Resolving patch:
diff --git a/qiskit/compiler/assemble.py b/qiskit/compiler/assemble.py
--- a/qiskit/compiler/assemble.py
+++ b/qiskit/compiler/assemble.py
@@ -114,7 +114,7 @@ def assemble(experiments,
         memory_slot_size (int):
             Size of each memory slot if the output is Level 0.
 
-        rep_time (int): repetition time of the experiment in μs.
+        rep_time (float): repetition time of the experiment in s.
             The delay between experiments will be rep_time.
             Must be from the list provided by the device.
 
@@ -258,6 +258,7 @@ def _parse_pulse_args(backend, qubit_lo_freq, meas_lo_freq, qubit_lo_range,
     if backend:
         backend_default = backend.defaults()
         backend_config = backend.configuration()
+
         if meas_level not in getattr(backend_config, 'meas_levels', [MeasLevel.CLASSIFIED]):
             raise SchemaValidationError(
                 ('meas_level = {} not supported for backend {}, only {} is supported'
@@ -281,11 +282,14 @@ def _parse_pulse_args(backend, qubit_lo_freq, meas_lo_freq, qubit_lo_range,
 
     qubit_lo_range = qubit_lo_range or getattr(backend_config, 'qubit_lo_range', None)
     meas_lo_range = meas_lo_range or getattr(backend_config, 'meas_lo_range', None)
-
     rep_time = rep_time or getattr(backend_config, 'rep_times', None)
+
     if isinstance(rep_time, list):
         rep_time = rep_time[0]
 
+    if rep_time:
+        rep_time = int(rep_time * 1e6)
+
     parametric_pulses = parametric_pulses or getattr(backend_config, 'parametric_pulses', [])
 
     # create run configuration and populate
diff --git a/qiskit/providers/models/backendconfiguration.py b/qiskit/providers/models/backendconfiguration.py
--- a/qiskit/providers/models/backendconfiguration.py
+++ b/qiskit/providers/models/backendconfiguration.py
@@ -161,8 +161,8 @@ class UchannelLO(BaseModel):
         q: Qubit that scale corresponds too.
         scale: Scale factor for qubit frequency.
     """
-    def __init__(self, q: int, scale: complex, **kwargs):
 
+    def __init__(self, q: int, scale: complex, **kwargs):
         self.q = q
         self.scale = scale
 
@@ -203,7 +203,6 @@ def __init__(self,
                  memory: bool,
                  max_shots: int,
                  **kwargs):
-
         self.backend_name = backend_name
         self.backend_version = backend_version
         self.n_qubits = n_qubits
@@ -253,7 +252,6 @@ def __init__(self,
                  memory: bool,
                  max_shots: int,
                  **kwargs):
-
         super().__init__(backend_name=backend_name, backend_version=backend_version,
                          n_qubits=n_qubits, basis_gates=basis_gates, gates=gates,
                          local=local, simulator=simulator, conditional=conditional,
@@ -268,6 +266,7 @@ class PulseBackendConfiguration(BackendConfiguration):
     """
 
     _dt_warning_done = False
+    _rep_time_warning_done = False
 
     def __init__(self,
                  backend_name: str,
@@ -329,11 +328,11 @@ def __init__(self,
                                (min_range, max_range) in qubit_lo_range]
         self.meas_lo_range = [[min_range * 1e9, max_range * 1e9] for
                               (min_range, max_range) in meas_lo_range]
-        self.rep_times = rep_times
         self.meas_kernels = meas_kernels
         self.discriminators = discriminators
         self.hamiltonian = hamiltonian
 
+        self._rep_times = [_rt * 1e-6 for _rt in rep_times]
         self._dt = dt * 1e-9
         self._dtm = dtm * 1e-9
 
@@ -370,6 +369,17 @@ def dtm(self) -> float:  # pylint: disable=invalid-name
 
         return self._dtm
 
+    @property
+    def rep_times(self) -> List[float]:  # pylint: disable=invalid-name
+        """Supported repetition times for device in seconds."""
+        # only raise rep_time warning once
+        if not PulseBackendConfiguration._rep_time_warning_done:
+            warnings.warn('`rep_time` now has units of seconds(s) rather '
+                          'than microseconds(mu s).')
+            PulseBackendConfiguration._rep_time_warning_done = True
+
+        return self._rep_times
+
     @property
     def sample_rate(self) -> float:
         """Sample rate of the signal channels in Hz (1/dt)."""


Test patch:
diff --git a/test/python/compiler/test_assembler.py b/test/python/compiler/test_assembler.py
--- a/test/python/compiler/test_assembler.py
+++ b/test/python/compiler/test_assembler.py
@@ -370,7 +370,7 @@ def setUp(self):
             'meas_level': 1,
             'memory_slot_size': 100,
             'meas_return': 'avg',
-            'rep_time': 100
+            'rep_time': 0.0001,
         }
 
         self.header = {
diff --git a/test/python/providers/test_backendconfiguration.py b/test/python/providers/test_backendconfiguration.py
--- a/test/python/providers/test_backendconfiguration.py
+++ b/test/python/providers/test_backendconfiguration.py
@@ -55,3 +55,13 @@ def test_get_channels(self):
             # Check that an error is raised if the system doesn't have that many qubits
             self.assertEqual(self.config.acquire(10), AcquireChannel(10))
         self.assertEqual(self.config.control(0), ControlChannel(0))
+
+    def test_get_rep_times(self):
+        """Test whether rep time property is the right size"""
+        _rep_times_us = [100, 250, 500, 1000]
+        _rep_times_s = [_rt * 1.e-6 for _rt in _rep_times_us]
+
+        for i, time in enumerate(_rep_times_s):
+            self.assertAlmostEqual(self.config.rep_times[i], time)
+        for i, time in enumerate(_rep_times_us):
+            self.assertEqual(round(self.config.rep_times[i]*1e6), time)