* Install twine in wheel build jobs
The wheel build jobs failed to install twine so when the jobs completed
and went to upload the wheels this failed because the command wasn't
found. This commit fixes the issue by installing twine as part of the
wheel build job set ups so that we can actually upload our built
binaries.
* Pip install -U twine
* Bump cibuildwheel version
Right now when you try to build terra >=0.8.0 and you don't have Cython
installed it will fail. This is because we rely on cython being present
to build the stochastic swap code. While we have a setuptools
setup_requires defining this dependency it doesn't work because the
dependency on cython is needed before setuptools can resolve that for
us. PEP518 provides a solution for this problem by adding the concept of
a pyproject.toml file which can be used to outline build requirements
which are build time depdencies needed before the setup.py is run. With
this file present when you run:
pip install git+https://github.com/Qiskit/qiskit-terra
(or running on a local checkout)
and cython isn't installed pip will acquire it and use it for building
the sdist.
* is_symmetric by matrices
* more testing
* invalidate
* adding a shortcut when self.coupling_map.is_symmetric==True
* adding a shortcut when self.coupling_map.is_symmetric==True
* adding conditional to preset pass managers
* testing!
* lint and docstrings
* abs and 1e-10
* do not invalidate when add_physical_qubit
This commit adds a new valid field to the circuit_drawer field in the
user config file. If the value is set to auto the circuit drawer will
determine if matplotlib is installed and if it is will use mpl,
otherwise it'll just revert to using the text backend.
* Add stable branch policy to CONTRIBUTING.rst
This commit documents are policy for the stable branch, how it's used
what we need to evaluate when looking at potential changes, and the
priorities for the stable branch.
Fixes#2352
* Add section about backporting subsets of large PRs
* Update .github/CONTRIBUTING.rst
Co-Authored-By: mtreinish <mtreinish@kortar.org>
* Small tweaks
* fix BasicAer sampling bug (#1624) (#1859)
* fix BasicAer sampling bug (#1624)
* fix BasicAer sampling bug
* changelog
* remove legacysimulator from test_compile
Conflicts:
CHANGELOG.rst
test/python/tools/test_compiler.py
The changelog conflicts were inevitable as the stable branch doesn't
have the same history as master. As for the test conflict it was a
difference in the simulator (python vs c++) used, this backport
switches to use the python like on master.
(cherry picked from commit 5f7b2e7fc6)
* Try pinning isort version
* Use constraints from last working version of lint
* Add requirements constraints too
* Bump version and prepare for 0.7.1 release (#1886)
* Bump version and prepare for 0.7.1 release
To prepare for the 0.7.1 bugfix release we need to increase the version
number and update the changelog. This commit takes care of that so we
can tag the release and build it.
* Fix instruction inheritance issues (#1900)
* Addressed issue with instruction.py which prohibited inheritance of QuantumRegisters and ClassicalRegisters
* Updated changelog
* Fixed typo
* Revert "Fix instruction inheritance issues (#1900)" (#1906)
This reverts commit 36d5d5dfac.
* Relax schema validation on backendconfiguration (#2258)
* Relax schema validation on backendconfiguration
The schema validation for backendconfig was set too tightly and it was
rejecting valid responses from the backend API. This potentially causes
issues when running against the api. This commit addresses this by
changing the schema validation to ensure that we properly validate the
response received by the backends and no longer reject valid responses
moving forward.
* Add changelog
* Fix tests and lint
* Bump version and prepare for 0.7.2 release (#2269)
To prepare for the 0.7.2 bugfix release we need to increase the version
number and update the changelog. This commit takes care of that so we
can tag the release and build it.
* Fix typo in changelog (#2270)
This finishes a last minute typo in the changelog to link to the correct
version.
* Install twine in wheel build jobs (#2290)
The wheel build jobs failed to install twine so when the jobs completed
and went to upload the wheels this failed because the command wasn't
found. This commit fixes the issue by installing twine as part of the
wheel build job set ups so that we can actually upload our built
binaries.
* level 2 and 3 honors seed_transpiler
* clean
* clean up!
* fix BasicAer sampling bug (#1624) (#1859)
* fix BasicAer sampling bug (#1624)
* fix BasicAer sampling bug
* changelog
* remove legacysimulator from test_compile
Conflicts:
CHANGELOG.rst
test/python/tools/test_compiler.py
The changelog conflicts were inevitable as the stable branch doesn't
have the same history as master. As for the test conflict it was a
difference in the simulator (python vs c++) used, this backport
switches to use the python like on master.
(cherry picked from commit 5f7b2e7fc6)
* Try pinning isort version
* Use constraints from last working version of lint
* Add requirements constraints too
* Bump version and prepare for 0.7.1 release (#1886)
* Bump version and prepare for 0.7.1 release
To prepare for the 0.7.1 bugfix release we need to increase the version
number and update the changelog. This commit takes care of that so we
can tag the release and build it.
* Fix instruction inheritance issues (#1900)
* Addressed issue with instruction.py which prohibited inheritance of QuantumRegisters and ClassicalRegisters
* Updated changelog
* Fixed typo
* Revert "Fix instruction inheritance issues (#1900)" (#1906)
This reverts commit 36d5d5dfac.
* Relax schema validation on backendconfiguration (#2258)
* Relax schema validation on backendconfiguration
The schema validation for backendconfig was set too tightly and it was
rejecting valid responses from the backend API. This potentially causes
issues when running against the api. This commit addresses this by
changing the schema validation to ensure that we properly validate the
response received by the backends and no longer reject valid responses
moving forward.
* Add changelog
* Fix tests and lint
* Bump version and prepare for 0.7.2 release (#2269)
To prepare for the 0.7.2 bugfix release we need to increase the version
number and update the changelog. This commit takes care of that so we
can tag the release and build it.
* Fix typo in changelog (#2270)
This finishes a last minute typo in the changelog to link to the correct
version.
* Install twine in wheel build jobs (#2290)
The wheel build jobs failed to install twine so when the jobs completed
and went to upload the wheels this failed because the command wasn't
found. This commit fixes the issue by installing twine as part of the
wheel build job set ups so that we can actually upload our built
binaries.
* fix
* check at the end
* undo order flip
* syntax
* DeprecationWarning message (#2350)
* clean up stable
The setup.py for terra has grown organically as we've added and removed
different functionality from the repo. This has led to some pieces in
there which were out of date, others which weren't actually used, or
some missing metadata. This commit goes through the code in the setup.py
and removes unused or things not needed anymore and updates some of the
metadata for when we push future releases to pypi.
The qiskit._util module was left in place as a backwards compat shim and
was intended to be removed in the 0.9 release. Now that 0.8 has been
released and development on 0.9 has opened on master we can remove this,
as this commit does.
* Match appveyor requirements install to travis
In #2328 tests were added that required nxpd to be installed, but it was
merged before waiting for the results from appveyor. These new tests
don't pass appveyor because the requirements installed were different
from what were installed on travis. This commit fixes this so that we
install the same set of requirements on appveyor and travis jobs to
make sure when people take shortcuts in the future there are less
surprises.
* Add tempfile skip for newly enabled test
* Fix windows skip
* Remove deprecated plot_state methods
In the 0.7 release we deprecated the plot_state and iplot_state
visualization methods for removal in the 0.9 release. These functions
were made obsolete when we cleaned up and unified the interfaces to each
of the individual plot_state_*() and iplot_state_*() functions. Since
0.8 is released and development on 0.9 started we can remove these
functions.
Fixes#2320
* Update changelog
* Fix lint
As part of the large refactor adding column justification to the latex
drawer in #1977 the function used to determine the image depth was
greatly simplified since most of the work was offset to the dag
processing prior to the latex drawer. However, one piece of critical
code was removed inadvertently which was used for determining the row
spacing. This section looked at every operation and determined if we
should increase or decrease the row spacing depending on what time of
operations were being drawn. The result of this check end up directly
setting a value in the output latex call to \Qcircuit. Without this code
the calculations which are done to determine the output page size are
off by the spacing factor and result in the output circuit exceeding the
single page size. This causes a blank image to be output since the first
is blank and that leads pdf to png conversion to return a blank image.
This commit fixes this by adding back the previously removed row spacing
check before we determine the image depth. This way we properly set the
output row spacing in the latex and avoid page wraps.
Fixes#2155
Now that terra and other qiskit elements have been released we can
tweak how we install packages in CI for running tests. This commit
updates things so we install terra from source, no longer pin the
ibmq-provider, and removes aer (since there are no tests using it
anymore).
Now that qiskit-terra 0.8.0 is out the door we should bump the version
string on master to show the source verrsion we're installing is newer
than what's been released.
This commit updates the changelog on master to include the intermediate
0.7.x stable releases and also marks the 0.8 release. This should be the
last commit on master prior to the the 0.8 release.
* allow commutation analysis pass to skip over non gates
* rename to CheckCXDirection
* cx direction uses u2 instead of h
* add new preset pass managers
* do not require transformation passes
* reduced_coupling_map
* style
* new headers
* make reduce a CouplingMap method
* get rid of 'backend'
* fix test for python version dependent ordering
* fix idx
* add assembler for schedule (@itoko, @nkanazawa1989)
* update tests
* ensure value is complex
* convert list to tuple before taking lo_range from backend
* add execute assembler to init
* lint
* switch back to original spec about #schedule:#user_lo_dicts
* Add ops module. Begin breaking up schedule operations.
* Add lshift and rshift to schedule.
* Initialize Schedule from Schedules. TimeslotCollection now accepts *slots rather than slots.
* remove default pulse lib from qobj config
* lint
* fix bug when pulse_library is not defined
* Update assembler.py
docstring fix
* Update assembler.py
docstring update.
* Fix docstrings.
* wip schedule draw support
* add pulse backend mock
* rename lo_frequency to lo_freq
* get freq_est from backend.defaults()
* update test
* remove conditioned_schedule
* remove conditioned_schedule
* fix bugs
* update assembler test
* lint
* restructure
* optimize import
* remove empty kernel and discriminator
* update test
* add lo_range check __eq__
* update UserLoDict to check channel type
* remove _replaced_with_user_los
* move converter under qobj
* update test
* add lo converter
* add lo converter
* update docstring
* Change LoDict to LoConfig.
* removed lo_converter as argument and hardcoded instead. This should reduce the complexity of the interface for now. We can always readd.
* Assembler now accepts lo_config as a dictionary (which is then converted to an LoConfig).
* Remove unnecessary return placeholders and commented print statements from tests.
* Renamed LoDictConverter to LoConfigConverter.
* linting
* import linting
* Update LO kwarg documentation
* Remove continuation statements by wrapping with parenthesis.
* Remove lo range and lofreq from output channel identity check.
* Remove dependence of channel hash on frequency.
* Remove lo freq from channel hash.
* Fix test assembler docstrings.
* Remove unnecessary placeholder assignment.
* Restructured assemble_schedules to remove run_config and pass arguments as kwargs.
* renamed lo_configs to schedule_los.
* Change meas_lo_dict to actually return dict.
* Fix test.
* linting.
* Updated changelog.
* remove unnecessary hash.
* wip update channel manager
* Removed __eq__ from output channel.
* update schedule drawer
* wip update drawer
* Add to changelog to force test rerun.
* update drawer
* fix plot range bug
* fix plot range bug
* Remove unneeded raises in docstring.
* remove extra schedule los docstring.
* Fix overrwritten scedule config.
* Add memory/meas_level error messages and handling to schedules.
* Update qobj header docstring.
* Added qobjheader support for dict argument.
* Updated schedule execute and assemble signatures to match. Updated case of meas_level 2 and meas_return, warnings.
* Moved schedule.pulse_schedule to schedule modeule.
* Began shifting to immutable Schedule. Update Timeslots to handle creation from list of timeslots. Can also return time over channels."
* Switched timeslot channels to property.
* reordered schedule methods to go after dunder methods.
* Add insertion method logic.
* Rename occupancies to timeslots. Renamed shifted to shift.
* Switched to ch_start/stop_time methods and start/stop_time properties. All timing is now derived from timeslots.
* update instruction starting times to be handled by timeslots.
* Unify ops between schedule and instruction.
* Update docstring.
* All pulse schedule/instruction/command methods now access attributes through proproperties in order to ensure immutability.
* Remove linebreaks in if statement
* Added schedule operation to ScheduleComponent interface.
* Add schedule composition via timeslots.
* Move pulse.common modules up a level to pulse
* Update schedule flatten generators.
* rename flatten_generator to flatten
* Made schedule methods immutable. Required reworking many of the interfaces.
* More changes to interfaces and bug fixing. Still not passing.
* pulse tests passing.
* Add immutable tests.
* Schedule names are inherited from leftmost child. Fix Instruction naming.
* Fix 0 in timeslots duration.
* Fix 0 in timeslots duration.
* Readd union to schedulecomponent.
* Update tests for latest code.
* Linting.
* Update changelog.
* Fix test formatting.
* Rework pulse instruction converter to no longer use introspection.
* Test fix
* linting.
* disable cyclic import.
* Remove rshift from schedulecomponent.
* Add type hint to pulse schedule.
* Add type hint to sample pulse.
* Switch to style docstring due to cyclic imports.
* Fix channels for pulses.
* Remove individual channel from instructions implementations.
* Update visualization for start times.
* Schedules are now composed of child nodes that track time of children.
* rework instructions.
* Delete extra interface methods.
* Fix typo.
* Added pulse visualization test case.
* added snapshot to visualization
* Remove unused device specification.
* Add visualization to instruction.
* Add plotting to instruction.
* Add instruction plotting test.
* Readd methods to interfaces.
* Add legend.
* Refactor schedule visualization.
* Add acquires to schedule.
* Refactor interpolation module.
* Added reference images and skip image tests again.
* linting.
* fix styling bug.
* Added ability to toggle legend and table.
* Restructure pulse module.
* linting.
* Fix styling defaults.
* Add labels to visualization.
* Add labelling to pulse plots.
* linting
* pulse boundaries are now visualized with lines.
* Update plots
* linting.
* update snapshot location.
* Fix plotting after merge.
* Remove output visualization option.
* Make use of figstyle consistent
* Update pulse scaling and linting.
* Update copyrights
* fix lint
* add space
* I hate the linter
* fix whitespace
* Fix init
* Fix tests.:
* And error check for channel.
* Add type dict.
* Handle edge case in text drawer line length logic
There is an edge case in the initial line length logic for the text
drawer. When it's trying to figure out how long a line should be it
initially tries various methods to determine the length. But, it only
checks for a None response from those initial checks. It's possible a 0
could be returned. Later we check if the value of the line_length is
true, which it won't be for a 0 value. In that case we unconditionally
use the class variable line_length which if not initialized is None. In
this case we'll hit an error further down trying to compare None to an
int. This commit fixes this by checking the value of self.line_length
before using it and defaulting to the value of get_terminal_size() if
it's not true.
* Simplify line length logic