-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unitaryhack issue 386: Augment the Rotosolve optimizer to support Rotoselect #392
Unitaryhack issue 386: Augment the Rotosolve optimizer to support Rotoselect #392
Conversation
Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * Supporting symbols as parameters and add nsimplify to results (sandbox-quantum#300) * Symbolic expression simplified. * Simplification of exp. value and fixed a bug in translate op. * Add ability to get inverse with Symbol parameters. * Switch nsimplify to evalf. * Trim trivial qubits from circuit and Hamiltonian (sandbox-quantum#302) Remove qubits that are in a deterministic state in quantum circuits, and simplify qubit Hamiltonian accordingly, in order to reduce resource requirements while computing expectation values. --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * Push contributors towards develop and not to main for PRs (sandbox-quantum#303) * Update to CONTRIB (main -> develop) and added workflow to help avoid PR to main that are not from develop * Set the DMET virtual orbital truncation threshold at the user level (sandbox-quantum#304) * Add option to turn off virt. orb. truncation. * Changed the threshold instead of a flag. Occ. set to their abs values. * Trim bug (sandbox-quantum#305) * minor bug fixes + test * Added typing for option dictionaries in quantum agorithms (sandbox-quantum#307) * added typing for option dictionaries, which improves user experience (autocomplete, auto-loading of docstrings for different GUIs) and handle options better overall * IntegralSolver class: base + support for Psi4 (sandbox-quantum#297) * Tests for pyscf, test for psi4, tests for custom IntegralSolver * temporary: install NO_PYSCF available to users * new: MP2Solver This PR will be followed by 1-2 other PRs to decouple pyscf from almost all algorithms and streamline the use of classical chem backends (support for all classical solvers, turning pyscf as an optional dependency for Tangelo, fixing docs and README etc as a result) * Change multi-controlled CNOT to multi-controlled CX (sandbox-quantum#308) * change multi-controlled CNOT to multi-controlled CX --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * Braket connection (sandbox-quantum#312) Support for Braket connection, including batch submission of jobs. Tests, docs, refresh of env_var.sh A PR for the QPU notebook will follow --------- Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> * Support for UMP2 initial parameters (sandbox-quantum#310) * Support for UMP2 initial parameters. * Checkfile for IntegralSolverPySCF (sandbox-quantum#311) * chkfile for IntegralSolverPySCF. * QubitOperator import from Tangelo, for better encapsulation (sandbox-quantum#299) * Use Tangelo's `QubitOperator` instead of OpenFermion when possible. * Constructor method `from_openfermion` and export method `to_openfermion` available in `QubitOperator` class. Remaining usage of Openfermion is tied to qubit mappings mostly, and code relying on other Openfermion features. --------- Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> * FCISolverPsi4 (sandbox-quantum#309) * moved chem tests to molecular_computation tests * Changed FCISolver to class with solver attribute --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * Removed deprecated Linq functions (sandbox-quantum#316) * Removed deprecated versions of trasnlation functions and Simulator. --------- Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> * CCSD solver psi4 (sandbox-quantum#313) * add ccsd_solver test to psi4 testing * get_rdm currently not supported, suggestions added in comments * ADAPT: add spin to available options (sandbox-quantum#317) * add spin to available options and docstring * MP2 psi4 (sandbox-quantum#315) * Support for MP2 with psi4 backend. * get_rdm and get_mp2_parameters currently unsupported, suggestions left in docstrings. * skip performance tests (Linq) in pytest (sandbox-quantum#319) Perrformance tests take time and should not be run systematically * Typos in docs (sandbox-quantum#321) * Added spaces in messages. * Typos and code format. * Add period. * DMET Effective Core Potential fix(related to sandbox-quantum#306) (sandbox-quantum#318) * potential fix for sandbox-quantum#306, test added * Change installation (sandbox-quantum#320) * remove no_pyscf, attempt windows test * updated psi4 test --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * DMET-ecp test fix: change optimizer to minimize square (sandbox-quantum#323) * improved Error message for MP2 initialization in UCCSD (pySCf currently required) (sandbox-quantum#322) * improved Error message for MP2 initialization if pyscf is not found * Qiskit-related: deprecation update to SparsePauliOp and bug workaround (sandbox-quantum#325) * Stim clifford simulator integration (sandbox-quantum#314) * direct tableau * noise and circuit sampler * decomposition into clifford gates * clifford decomp tests, and SDAG in cirq * is_clifford in gate class * expand clifford decomp to integer values * small comments, add pip install stim to workflow Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * Bump develop to v0.4.0.RC (sandbox-quantum#327) * Update _version.py * Fixed requirements (sandbox-quantum#324) * Remove pre-install reqs (wheel) * Remove openfermionpyscf as not needed anymore * Us extra_requires for pyscf optional dependencies. * Removed unused imports * Use long description for long description * Fix combinatorial mapping when spin!=0. (sandbox-quantum#330) * QPESolver implementation (sandbox-quantum#332) * fix qiskit-aer installation * Initial QPE framework: vanilla QPE with built-in or user-defined unitary * Fixes to MIFNOHelper after QEMIST Cloud 0.6.0 release (sandbox-quantum#331) * Fixes to keep up with the update of QEMIST Cloud * Adding more python versions to tests (sandbox-quantum#333) * adding more python versions to tests, per-version artifacts files, ensuring all of them fully run regarding of failure --------- Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> * Bug Fix: n_shots parameter was ignored in get_expectation_value (sandbox-quantum#337) * add missed condition in get_expectation_value * added test relying on std_dev * convert all gate names to upper case and check that it is a string (sandbox-quantum#340) * Fixes for new version of qiskit runtime. Tangelo now supports sampler with several circuits (sandbox-quantum#341) Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> * Function that returns the qubits used for Truncated Taylor Series (sandbox-quantum#339) * added function that returns the qubits used for truncated taylor series * removed spurious arg in docstring * Support for following VQE minimization in VQESolver (sandbox-quantum#342) * HiddenPrints with verbose option. Option to save energies at each opt steps. * Variable for number of steps. * Align things. * Readme update: more straight to the point. (sandbox-quantum#343) --------- Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: James Brown <84878946+JamesB-1qbit@users.noreply.github.com> Co-authored-by: KrzysztofB-1qbit <86750444+KrzysztofB-1qbit@users.noreply.github.com> Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: James Brown <james.brown@1qbit.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> Co-authored-by: elloyd-1qbit <58313607+elloyd-1qbit@users.noreply.github.com> Co-authored-by: Charles Coulombe <ccoulombe@users.noreply.github.com>
* Fixed requirements (sandbox-quantum#324) * Remove pre-install reqs (wheel) * Remove openfermionpyscf as not needed anymore * Us extra_requires for pyscf optional dependencies. * Fix combinatorial mapping when spin!=0. (sandbox-quantum#330) * QPESolver implementation (sandbox-quantum#332) * fix qiskit-aer installation * Initial QPE framework: vanilla QPE with built-in or user-defined unitary * Fixes to MIFNOHelper after QEMIST Cloud 0.6.0 release (sandbox-quantum#331) * Adding more python versions to tests (sandbox-quantum#333) * Bug Fix: n_shots parameter was ignored in get_expectation_value (sandbox-quantum#337) * add missed condition in get_expectation_value, added test relying on std_dev * convert all gate names to upper case and check that it is a string (sandbox-quantum#340) * Fixes for new version of qiskit runtime. Tangelo now supports sampler with several circuits (sandbox-quantum#341) * Function that returns the qubits used for Truncated Taylor Series (sandbox-quantum#339) * added function that returns the qubits used for truncated taylor series * Support for following VQE minimization in VQESolver (sandbox-quantum#342) * HiddenPrints with verbose option. Option to save energies at each opt steps. * Readme update: more straight to the point. (sandbox-quantum#343) * Classical solver uses mo_coeff from SecondQuantizedMolecule (sandbox-quantum#338) * small fix for assigning mo_coeff to classical solver * CCSDSolver and FCISolver use SecondQuantizedMolecule mo_coeff for both psi4 and pyscf * moved imports to top of file * Simplify method for circuits (sandbox-quantum#345) * convenience functions to merge compatible rotations and umbrella simplify function to combine simplification primitives and run passes on a circuit recursively * QM/MM support with electrostatic embedding (sandbox-quantum#336) * QMMM with psi4 and pyscf * corner case to handle psi4 v1.6 * support for rdkit * improved support for multiple pdb files * Added MMChargesSolver class, IntegralSolver can be chosen * Small fixes for ILC (sandbox-quantum#346) * added functions that implement exact expansion/ parameters for ILC iteration * small fixes so that the circuit generated from the ilc eigenvalue problem has the same energy * QM/MM: charges solvers made consistent with users choices. (sandbox-quantum#347) * Removed QubitHamiltonian use in QITESolver. * Performance upgrade to combinatorial mapping (sandbox-quantum#348) * Update to combinatorial, using recursive version instead of initial naive one with qubit operators. Further work has started to improve performance and reduce memory consumption Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: James Brown <84878946+JamesB-1qbit@users.noreply.github.com> Co-authored-by: Charles Coulombe <ccoulombe@users.noreply.github.com>
* Helper class and functions for iFCI fragment import (sandbox-quantum#351) * Set the instance in a Qiskit runtime job (sandbox-quantum#352) * Added trim_qubits option to Circuit.split() (sandbox-quantum#353) * Measurement Controlled operations (CMEASURE) (sandbox-quantum#334) * Fix after qiskit update: qiskit_noise_model (sandbox-quantum#354) * Bugfix: DMET fragment object initialization from IntegralSolver fixed (sandbox-quantum#355) * added explicit mo_coeff for H4_cation (sandbox-quantum#356) * VQE get_rdm performance improvements (sandbox-quantum#357) * Implementation of Frozen Natural Orbitals (FNO) (sandbox-quantum#358) * UHF reference symmetry labels. (sandbox-quantum#360) * FNO: NotImplementedError for ROHF (sandbox-quantum#362) * Iterative Quantum Phase Estimation (sandbox-quantum#359) * README minor changes + feature overview link (sandbox-quantum#363) * Add feature list (sandbox-quantum#364) (sandbox-quantum#365) --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: James Brown <84878946+JamesB-1qbit@users.noreply.github.com> Co-authored-by: James Brown <james.brown@1qbit.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail>
* Fix: Qiskit v1.0.0 (sandbox-quantum#371) * Added an option for a callable when defining fragment active space (sandbox-quantum#370) * Copyright updated to SBAQ 2021-2024 (sandbox-quantum#375) * Fix for qiskit ibm runtime v 0.22 (sandbox-quantum#376) * DMET with HF and MP2 solvers (sandbox-quantum#377) * Removed python 3.8 support. Added 3.12. (sandbox-quantum#373) --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> Co-authored-by: Alexandre Fleury <76115575+alexfleury-sb@users.noreply.github.com> Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: GitHub Actions <noreply@github.com>
* Update CHANGELOG.md and version number (sandbox-quantum#380) * New release v0.4.3 into main (sandbox-quantum#379) --------- Authored-by: ValentinS4t1qbit <valentin.senicourt@sandboxquantum.com>
…ns per parameter.
* Fixed requirements (sandbox-quantum#324) * Remove pre-install reqs (wheel) * Remove openfermionpyscf as not needed anymore * Us extra_requires for pyscf optional dependencies. * Fix combinatorial mapping when spin!=0. (sandbox-quantum#330) * QPESolver implementation (sandbox-quantum#332) * fix qiskit-aer installation * Initial QPE framework: vanilla QPE with built-in or user-defined unitary * Fixes to MIFNOHelper after QEMIST Cloud 0.6.0 release (sandbox-quantum#331) * Adding more python versions to tests (sandbox-quantum#333) * Bug Fix: n_shots parameter was ignored in get_expectation_value (sandbox-quantum#337) * add missed condition in get_expectation_value, added test relying on std_dev * convert all gate names to upper case and check that it is a string (sandbox-quantum#340) * Fixes for new version of qiskit runtime. Tangelo now supports sampler with several circuits (sandbox-quantum#341) * Function that returns the qubits used for Truncated Taylor Series (sandbox-quantum#339) * added function that returns the qubits used for truncated taylor series * Support for following VQE minimization in VQESolver (sandbox-quantum#342) * HiddenPrints with verbose option. Option to save energies at each opt steps. * Readme update: more straight to the point. (sandbox-quantum#343) * Classical solver uses mo_coeff from SecondQuantizedMolecule (sandbox-quantum#338) * small fix for assigning mo_coeff to classical solver * CCSDSolver and FCISolver use SecondQuantizedMolecule mo_coeff for both psi4 and pyscf * moved imports to top of file * Simplify method for circuits (sandbox-quantum#345) * convenience functions to merge compatible rotations and umbrella simplify function to combine simplification primitives and run passes on a circuit recursively * QM/MM support with electrostatic embedding (sandbox-quantum#336) * QMMM with psi4 and pyscf * corner case to handle psi4 v1.6 * support for rdkit * improved support for multiple pdb files * Added MMChargesSolver class, IntegralSolver can be chosen * Small fixes for ILC (sandbox-quantum#346) * added functions that implement exact expansion/ parameters for ILC iteration * small fixes so that the circuit generated from the ilc eigenvalue problem has the same energy * QM/MM: charges solvers made consistent with users choices. (sandbox-quantum#347) * Removed QubitHamiltonian use in QITESolver. * Performance upgrade to combinatorial mapping (sandbox-quantum#348) * Update to combinatorial, using recursive version instead of initial naive one with qubit operators. Further work has started to improve performance and reduce memory consumption Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: James Brown <84878946+JamesB-1qbit@users.noreply.github.com> Co-authored-by: Charles Coulombe <ccoulombe@users.noreply.github.com>
* Helper class and functions for iFCI fragment import (sandbox-quantum#351) * Set the instance in a Qiskit runtime job (sandbox-quantum#352) * Added trim_qubits option to Circuit.split() (sandbox-quantum#353) * Measurement Controlled operations (CMEASURE) (sandbox-quantum#334) * Fix after qiskit update: qiskit_noise_model (sandbox-quantum#354) * Bugfix: DMET fragment object initialization from IntegralSolver fixed (sandbox-quantum#355) * added explicit mo_coeff for H4_cation (sandbox-quantum#356) * VQE get_rdm performance improvements (sandbox-quantum#357) * Implementation of Frozen Natural Orbitals (FNO) (sandbox-quantum#358) * UHF reference symmetry labels. (sandbox-quantum#360) * FNO: NotImplementedError for ROHF (sandbox-quantum#362) * Iterative Quantum Phase Estimation (sandbox-quantum#359) * README minor changes + feature overview link (sandbox-quantum#363) * Add feature list (sandbox-quantum#364) (sandbox-quantum#365) --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: James Brown <84878946+JamesB-1qbit@users.noreply.github.com> Co-authored-by: James Brown <james.brown@1qbit.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail>
* Fix: Qiskit v1.0.0 (sandbox-quantum#371) * Added an option for a callable when defining fragment active space (sandbox-quantum#370) * Copyright updated to SBAQ 2021-2024 (sandbox-quantum#375) * Fix for qiskit ibm runtime v 0.22 (sandbox-quantum#376) * DMET with HF and MP2 solvers (sandbox-quantum#377) * Removed python 3.8 support. Added 3.12. (sandbox-quantum#373) --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> Co-authored-by: Alexandre Fleury <76115575+alexfleury-sb@users.noreply.github.com> Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: GitHub Actions <noreply@github.com>
…ns per parameter.
@cburdine Thank you so much for the PR and the detailed description ! @elloyd-1qbit and I will take a look at it. In the meantime, it seems our linter ( It seems at first glance all unit tests pass though, which is rad :) |
@ValentinS4t1qbit and @elloyd-1qbit, there's one additional point that I would like your feedback on. Currently
to be passed in, which requires the user to manually modify the protected member I'm thinking we could add a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR! I'll weight in for the previous question about ansatz.update_var_gates()
. I think this would be a useful function, and I prefer this approach to adding gates
to ansatz.update_var_params()
. I don't know if you plan to add restrictions, i.e. only on rotation gates, but I would personally leave a lot of freedom (whatever makes more sense for you, we usually leave the burden of validating the circuit to the user).
Well done! I agree adding a |
@cburdine To clarify: do we intend to add Or would the recommendation be opening a "feature suggestion" issue ? I know you're working on the hackathon, I want to be mindful of your time. |
@ValentinS4t1qbit It looks like adding an I'm currently working on getting the first draft of a PR for issue 384 submitted, which is similar in that it requires extending the functionality of each ansatz class individually. Once I get that submitted I will circle back to this PR and add this feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you so much for your contribution !
As you have touched Tangelo quite a bit with those PRs, any feedback would be very welcome, I wonder how you felt about using it. Any issue (bug, feature request) is very welcome as well.
#397) * Improving draw method: now works with strings for gate parameters (#391) * Added support for multi-controlled gates on qiskit (MCRX, MCRY, MCRZ, MCPHASE) (#390) * Add automated documentation workflow & gitignore (#396) * Unitaryhack issue 386: Augment the Rotosolve optimizer to support Rotoselect (#392) * ⚡Added rotoselect algorithm and improved rotosolve to use 2 evaluations per parameter. * Unitaryhack issue 384: Circuit as reference state in the ansatz definition (#398) * added method `Circuit.fix_variational_parametrs`, which turns all variational gates non-variational. * Added support for circuits referrence states for the ansatze * Fixing Pyscf Incompatibility problem (#394) * update CI to check for version 2.5 * Update mp2_solver.py --------- Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> Co-authored-by: Alexandre Fleury <76115575+alexfleury-sb@users.noreply.github.com> Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: GitHub Actions <noreply@github.com> Co-authored-by: Anush Venkatakrishnan <54374648+anushkrishnav@users.noreply.github.com> Co-authored-by: Or Golan <golanor@users.noreply.github.com> Co-authored-by: Kazuki Tsuoka <kazukitsuoka@g.ecc.u-tokyo.ac.jp> Co-authored-by: Colin Burdine <33066825+cburdine@users.noreply.github.com>
This is a PR to address Issue 386: Augment the Rotosolve optimizer to support Rotoselect
✨ New Features:
rotoselect()
function that implements Algorithm 2 from https://arxiv.org/pdf/1905.09692. This implementation requires 7 function evaluations (per parameter per iteration).extrapolate_exp()
function to extrapolate sinusoidal expectation values using the methods from Appendix A in the above paper.rotoselect()
algorithm (Heisenberg model and a trivial single-qubit Hamiltonian).🚧 Changes to Existing Features:
rotosolve_step()
to return both the optimized parameter set and the extrapolated estimate of the expectation value at that optimal parameter set. This modification is necessary for code reuse, and to allow for further optimization of the existing implementation ofrotoselect()
.extrapolate
option to therotoselect()
algorithm to allow for the use of extrapolated expectation values from the last call torotosolve_step()
in place of an actual function evaluation. This optimization setting reduces the number of function evaluations from three (per parameter per iteration) to two (per parameter per iteration). Theextrapolate
argument is currently set to False by default. More details about this optimization below📝 Footnote on optimizing
rotosolve()
:The existing$\phi = 0$ by default, which is reasonable because it allows for the removal of the gate at compile time. However, if $\phi = \theta_{d-1}^\ast$ is used, then the extrapolated expectation value of $\langle M \rangle_{\theta_{d-1}^\ast}$ returned from the previous call to $\phi$ and a previously extrapolated expectation value $\langle M \rangle_{\theta_{d-1}^\ast}$ can be passed into $\phi = \theta_{d-1}^\ast$ and using the extrapolated $\langle M \rangle_{\phi} = \langle M \rangle_{\theta_{d-1}^\ast}$ from the previous optimized parameter, we only need to evaluate $\langle M \rangle_{\phi + \pi/2}$ and $\langle M \rangle_{\phi + \pi/2}$ to optimize the current parameter. In total, this requires 2/3 the number of evaluations, as long as the extrapolated value is accurate.
rotosolve_step()
function usedrotosolve_step()
can be used in place of a direct evaluation of it.rotosolve_step()
has been modified so that the gate anglerotosolve_step()
via the optional argumentsphi
andm_phi
respectively. By selectingOn an ideal quantum computer with no sampling error, this optimized
rotosolve()
(i.e. withextrapolate=True
) should behave identically to the previous unoptimized version. However, I anticipate that it may perform slightly worse than the unoptimizedrotosolve()
on noisy devices for the same number of iterations. While the unoptimized version (i.e. withextrapolate=False
) is more stable, it requires 50% more evaluations than the optimized version. In terms of the total number of evaluations (which is probably the best basis of comparison), I am not sure which will perform better under noise. If in the future you find that the optimized version is too unstable for noisy devices, then you may consider removing theextrapolate
argument.