From 6fc62cbbec812c1314aa1fccba59ffa3c206c2fa Mon Sep 17 00:00:00 2001 From: Dave Bacon Date: Thu, 7 Apr 2022 12:38:25 -0700 Subject: [PATCH 1/2] Properly use links in docs for external urls --- cirq-aqt/cirq_aqt/aqt_device.py | 7 +++++-- cirq-aqt/cirq_aqt/aqt_sampler.py | 4 ++-- cirq-google/cirq_google/engine/runtime_estimator.py | 7 ++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cirq-aqt/cirq_aqt/aqt_device.py b/cirq-aqt/cirq_aqt/aqt_device.py index fb9242c70cc..4c83513e9a3 100644 --- a/cirq-aqt/cirq_aqt/aqt_device.py +++ b/cirq-aqt/cirq_aqt/aqt_device.py @@ -11,18 +11,21 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# pylint: disable=line-too-long """Current device parameters for the AQT/UIBK ion trap device The device is based on a linear calcium ion string with arbitrary connectivity. For more information see: -https://quantumoptics.at/en/publications/journal-articles.html +[https://quantumoptics.at/en/publications/journal-articles.html](https://quantumoptics.at/en/publications/journal-articles.html){:.external} -https://iopscience.iop.org/article/10.1088/1367-2630/15/12/123012/meta +[https://iopscience.iop.org/article/10.1088/1367-2630/15/12/123012/meta](https://iopscience.iop.org/article/10.1088/1367-2630/15/12/123012/meta){:.external} The native gate set consists of the local gates: X,Y, and XX entangling gates """ +# pylint: enable=line-too-long + import json from typing import Any, cast, Dict, Optional, Sequence, List, Tuple, Union import numpy as np diff --git a/cirq-aqt/cirq_aqt/aqt_sampler.py b/cirq-aqt/cirq_aqt/aqt_sampler.py index 4f6aab3754c..105e6d0e2af 100644 --- a/cirq-aqt/cirq_aqt/aqt_sampler.py +++ b/cirq-aqt/cirq_aqt/aqt_sampler.py @@ -14,11 +14,11 @@ """Samplers to access the AQT ion trap devices via the provided API. For more information on these devices see the AQT homepage: -https://www.aqt.eu +[https://www.aqt.eu](https://www.aqt.eu){:.external} API keys for classical simulators and quantum devices can be obtained at: -https://gateway-portal.aqt.eu/ +[https://gateway-portal.aqt.eu/](https://gateway-portal.aqt.eu/){:.external} """ diff --git a/cirq-google/cirq_google/engine/runtime_estimator.py b/cirq-google/cirq_google/engine/runtime_estimator.py index 9ebbb173e4a..e31366c5030 100644 --- a/cirq-google/cirq_google/engine/runtime_estimator.py +++ b/cirq-google/cirq_google/engine/runtime_estimator.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - +# pylint: disable=line-too-long """Utility functions to estimate runtime using Engine to execute circuits. Users can call estimate_run_time, estimate_run_sweep_time, or @@ -25,12 +25,13 @@ Parameters were calculated using a variety of width/depth/sweeps from the rep rate calculator, see: -https://github.com/quantumlib/ReCirq/blob/master/recirq/benchmarks/rep_rate/ +[https://github.com/quantumlib/ReCirq/blob/master/recirq/benchmarks/rep_rate/](https://github.com/quantumlib/ReCirq/blob/master/recirq/benchmarks/rep_rate/){:.external} Model was then fitted by hand, correcting for anomalies and outliers when possible. - """ +# pylint: enable=line-too-long + from typing import List, Optional, Sequence import cirq From 7ee6b6d001d55e37581b6a2783808343535c7046 Mon Sep 17 00:00:00 2001 From: Dave Bacon Date: Fri, 8 Apr 2022 12:46:14 -0700 Subject: [PATCH 2/2] Update pylintrc --- cirq-aqt/cirq_aqt/aqt_device.py | 3 --- cirq-google/cirq_google/engine/runtime_estimator.py | 2 -- dev_tools/conf/.pylintrc | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/cirq-aqt/cirq_aqt/aqt_device.py b/cirq-aqt/cirq_aqt/aqt_device.py index 4c83513e9a3..7c3c3a08347 100644 --- a/cirq-aqt/cirq_aqt/aqt_device.py +++ b/cirq-aqt/cirq_aqt/aqt_device.py @@ -11,7 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# pylint: disable=line-too-long """Current device parameters for the AQT/UIBK ion trap device The device is based on a linear calcium ion string with @@ -22,9 +21,7 @@ [https://iopscience.iop.org/article/10.1088/1367-2630/15/12/123012/meta](https://iopscience.iop.org/article/10.1088/1367-2630/15/12/123012/meta){:.external} The native gate set consists of the local gates: X,Y, and XX entangling gates - """ -# pylint: enable=line-too-long import json from typing import Any, cast, Dict, Optional, Sequence, List, Tuple, Union diff --git a/cirq-google/cirq_google/engine/runtime_estimator.py b/cirq-google/cirq_google/engine/runtime_estimator.py index e31366c5030..9468cc0625b 100644 --- a/cirq-google/cirq_google/engine/runtime_estimator.py +++ b/cirq-google/cirq_google/engine/runtime_estimator.py @@ -11,7 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# pylint: disable=line-too-long """Utility functions to estimate runtime using Engine to execute circuits. Users can call estimate_run_time, estimate_run_sweep_time, or @@ -30,7 +29,6 @@ Model was then fitted by hand, correcting for anomalies and outliers when possible. """ -# pylint: enable=line-too-long from typing import List, Optional, Sequence import cirq diff --git a/dev_tools/conf/.pylintrc b/dev_tools/conf/.pylintrc index e782d77b6b0..5582381a555 100644 --- a/dev_tools/conf/.pylintrc +++ b/dev_tools/conf/.pylintrc @@ -63,7 +63,7 @@ enable= yield-outside-function # Ignore long lines containing urls or pylint directives. -ignore-long-lines=^(.*#\w*pylint: disable.*|\s*(# )??)$ +ignore-long-lines=^(.*#\w*pylint: disable.*|\s*(# )?[<\[\(]?https?://\S+[>\]\)]?)$ [TYPECHECK]