* Initial commit additing parametric pulses Commands to Pulse.
Functionally complete Gaussian parametric pulse.
Allow 'parametric_pulses' to be supplied at assemble time to be consistent with other arguments
Consistent ordering in imports
Removed outdated TODO and update parametric pulse module docstring
Add other parametric pulse shapes to converter pulse shapes
Work on docstrings. Make ParametricPulse methods abstract
Continue adding docstrings. Placeholders for reno note and tests
Rename SquarePulse -> ConstantPulse. Add placeholder tests across multiple test files
Improve how parameters are extracted from the parametric pulse classes to a dict. Params are now 'frozen' as properties. Complete drag documentation.
Handle complex param serialization
Cast amp to complex. Start writing tests
Write release note, including prelude note
Small doc improvements and remove AcquireChannel from release notes (does not apply)
Do not 'zero ends' by default
Add command tests
Small change to reno note, add placeholder for schedule tests
Fix cyclic import error and other style fixes. Add test docstrings
Add schedule and qobj conversion tests
Fix bug in qobj -> instruction converter, add test
Add assembler tests
Pick a more reasonable sigma for gaussian pulses. Add visualization test
Respond to Daniel Egger's helpful feedback
Add 'width' as optional parameter to discrete pulse lib gauss_square, since GaussianSquare command takes it (user consistency).
Fixup docstring mistake, change type hint for gaussian square width to float
Remove 'remove_baseline' option
Respond to Zach's feedback: Fixed bug in pulse library. Fixed up old reference to 'square' pulse. Added check that 'width' is non negative
Apply suggestions from code review
documentation improvements thanks to Thomas!
Co-Authored-By: Thomas Alexander <thomasalexander2718@gmail.com>
Update the documentation for the DRAG pulse
* Validate parameters properly by class
* Get beta restriction in with help from Daniel Egger and Zach Schoenfeld
* style fixes
* Add tests for beta
* Fixup bug (thank you Zach)
* Learn a bit more about the drag pulse: if beta < sigma, only the amplitude matters
* Improve how the math was written for the drag pulse params check
* Improve GaussianSquare error message, add another test
* Improve comments in beta check of drag pulse
* Improve beta checking, fixup the description a bit
* Respond to feedback: variable name updates and improved docstrings
* Finish moving get_params to get_parameters
* Add PulseCommand class between Command and SamplePulse/ParametricPulse
* Finish moving params to parameters, following schema
* Abstract methods had to be passed on to PulseCommand from Command. Added draw as an abstract method there and implemented in ParametricPulse
* Fix imports, lint, and whitelist dt
* Update qiskit/pulse/commands/parametric_pulses.py
Co-Authored-By: Thomas Alexander <thomasalexander2718@gmail.com>
* Fixup mismatch in schema name
* Write out the parameters dict and make it a property
* Fixup accidental change
* Fix repr
* Add one last test to check that the scheduler works with parametric input
* Add more assembler tests
* Add another test that fails with beta too large
* Update qiskit/pulse/commands/parametric_pulses.py
Co-Authored-By: Luciano Bello <luciano.bello@ibm.com>
Co-authored-by: Thomas Alexander <thomasalexander2718@gmail.com>
Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
This commit deprecates the circuit_instruction_map attribute of the Schedule class.
The new attribute to use is instruction_schedule_map because the class name for
the value of this attribute InstructionScheduleMap. This makes the attribute consistent
with the type returned by the attribute.
* Update schemas for parametric pulses
* Update copy paste error :(((((((
* Update type of 'params'
* Add new fields to example jsons
* Update qiskit/schemas/examples/qobj_openpulse_example.json
remove trailing comma
Co-Authored-By: Diego M. Rodríguez <diego.plan9@gmail.com>
* Try out changing params to parameters to deal with type conflict
Co-authored-by: Diego M. Rodríguez <diego.plan9@gmail.com>
* Make assemble() respect max_shots
Currently the assemble() function was not respecting the value of the
max_shots property from the backend. It takes in a shots argument which
could exceed the maximum number of allowed shots reported by the backend
and not do anything. This will result in an error when running on the
backend and is something that should be caught before we send a job to
the backend. This commit adds this check, if the backend has the
max_shots property set and the value of shots is greater than that it
will raise a RuntimeWarning and switch the number of shots to be
max_shots. This behavior was chosen because some backends (namely from
qiskit-aqt-provider) have a max_shots value less than the default of
1024.
* Fix lint
* Raise instead of warn when shots>max_shots
This commit updates the logic to no longer warn if shots>max_shots and
then change the value to making that a hard exception. To address the
default behavior if no shots kwarg is specified either 1024 or max_shots
will be used, whichever is smaller.
* Update tests too
* Fix lint
* added error in assemble and added new test in test_assembler
* added error in assemble and added new test in test_assembler
* Update assemble.py
removed f-string
* linting
* added pylint exception
* Update qiskit/compiler/assemble.py
Co-Authored-By: Kevin Krsulich <kevin@krsulich.net>
Co-authored-by: Kevin Krsulich <kevin@krsulich.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Added crx, cry and rxx gates
* Added ast_to_dag imports and extensions + modified gate definitions
* Modified qasm parser tests to account for length of new gates and reordered components
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Currently we're pinning pylint and astroid via a constraints file. This
was done primarily because astroid is not a direct dependency for
development since we only actually directly use pylint. The constraints
file mechanism is designed for this purpose to let us set explict
versions for repeatability for any package installed via pip, even if
it's not a direct requirement. However, the constraints file mechanism
isn't obvious to developers who are manually installing development
requirements into their environment. Additionally, the
requirements-dev.txt had a pylint version cap which conflicts with the
version set via the constraints file which made it extra confusing.
This commit moves away from using the constraints for pylint and moves
to using requirements-dev.txt directly. To facilitate this astroid
pinned at a specific version is also added to the requirements-dev.txt
file to ensure we have a consistent output from pylint. While this isn't
a direct dependency for development it does make it simpler to find and
install a consistent pylint env locally.
* Bump pylint version to unify across elements
This commit bumps the pinned versions of pylint and astroid to the
lastest versions of both. We are unifying the version of both used in CI
across all the elements to these versions to have a consistent
experience with the linters when working across the elements.
This adjusts the terra code to make the newer versions pass. This
involves disabling one rule globally because it doesn't apply to how
terra is structured, adding per file (and 1 per line) disable for usage
of numpy that pylint can't track because of the c extensions, and a
number of code changes to fix failing rules which are marked by the new
version.
Fixes#3629
* Fix tests
* Rename kron() args to avoid ordering confusion
* Fix lint failures introduced in recent patches
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
The recent nbformat release 5.0.0 that was just pushed to pypi is
missing jsonschema files from the uploaded artifacts,
(see jupyter/nbformat#155). This is causing CI failures, until the issue
is resolved this commit pins the version installed via pip using the
constraints file (since it's not a direct dependency).
* Fix backend config where lo ranges were not adjusted to Hz.
* Fix bug where assemble/execute accepted parameters in GHz rather than Hz.
* linting
* Documentation fixes for Hz.
* Add channel bandwidth.
* bug fix with kwarg pop.
* Missing None in kwargs pop.
* linting.
* Fix range in list comprehension for lo ranges in backend configuration.
* Update qiskit/compiler/assemble.py
Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com>
* Update qiskit/compiler/assemble.py
Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com>
* lo to LO in docstrings.
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Lauren Capelluto <laurencapelluto@gmail.com>
* Fixed issue 3640 by adding logic for complex imaginary numbers
Co-Author: Sumit Puri <er.sumitpuri@gmail.com>
* Added test for display of 'pi'.
* Added test for displaying 'pi' for both real and imaginary parts of complex number.
* Release notes added for Fixes#3640
* release notes
Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
* Document `Bit.index` and `Bit.register`
* Fix parsing and formatting for Sphinx docs
* Follow grammar conventions in docs
* Fix class formatting
Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
* fixing text
* adjust text test
* adjust test
* latex
* mpl
* release notes
* clean up
* lint
* with an arrow
* no parenthesis
* adjusting test
* mpl sequence
* Fixes#3520 via adding #3590
Co-authored-by: Tharrmashastha SAPV <51048173+TharrmashasthaPV@users.noreply.github.com>
* new mpl refs
* blacking qiskit/visualization/matplotlib.py
* lint
* shorter lines
* diff_tolerance for windows
Co-authored-by: Tharrmashastha SAPV <51048173+TharrmashasthaPV@users.noreply.github.com>
* seeding randn
* use np.random.RandomState
* i
* cleaning up
* test case
* Update test/python/quantum_info/test_synthesis.py
Co-Authored-By: Ali Javadi-Abhari <ajavadia@users.noreply.github.com>
* Update qiskit/quantum_info/synthesis/two_qubit_decompose.py
Co-authored-by: Ali Javadi-Abhari <ajavadia@users.noreply.github.com>
* remove random from two_qubit_decompose
* include negative numbers
* clean up diff
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Since we've deprecated python 3.5 having 3.5 be the first round of
testing performed in CI feels out of place. This commit makes the
default jobs run in the first stage of the CI pipeline in azure all use
python 3.7. We still need to verify that 3.5 works and still gate on the
3.5 job passing. But, it doesn't get as much attention now that it's
deprecated. At the same time this commit takes the opportunity to remove
the duplicated python 3.8 job in the travis config. This was added
originally because travis had 3.8 support well before azure pipelines
but was never removed after azure added their 3.8 support.
Co-authored-by: Kevin Krsulich <kevin@krsulich.net>
In #3560 the issue templates were updated to include the tags. However
the tags for enhancement and feature request contain a ':' in them. This
confuses the yaml parser because ':' is a reserved character. To address
this issue, this commit adds quotes around the tags so the yaml parser
can process the issue templates and add them back to the list of
options.