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.
* 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
* 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.
* Change two_qubit_kak to use approximate method. Passes current tests
* Move files around and rename two_qubit_kak to cnot_decompose
* Better testing for euler_angles_1q()
* Better testing for euler_angles_1q()
* Better precision for euler_angles_1q
* Better precision for euler_angles_1q
* Better testing for TwoQubitWeylDecomposition
* Testing improvements for quantum_info.synthesis module
* Changelog
* appease the linter. again
* Remove f-strings for python 3.5 compatibility. Change cnot_decompose() to two_qubit_cnot_decompose()
* Handle opaque instructions and identity in qobj_to_circuits
This commit fixes the qobj_to_circuits converter to handle opaque/custom
instructions that aren't decomposed in the qobj. At the same time the
identity gate handling is fixed because it is a special case where the
gate name doesn't match the function name (id vs iden()) and needs to be
handled that way.
* Add test
* Fix lint
* Fix lint and test imports
* Just use getattr for params
* Add user config file for local settings
This commit adds the concept of a user config file to set local defaults
when using qiskit-terra. This enables the end user to override the
default values for some commonly used terra functions in their local
environment. Right now this only includes the backend used by the
circuit drawer, but it will be expanded in the future as more settings
with opinionated defaults are exposed. To set a config file you can
either create one in the default location
'~/.config/qiskit/settings.conf' or use the QISKIT_SETTINGS environment
variable to specify an alternative location.
* Updates
* Fix lint issues
* Fix tests on windows
* Fix lint
* Try to fix tests on python <3.7
* More testing updates
* Fix lint
* Skip tempfile tests on windows
Since I can't figure out a reliable way to mock open on python 3.5 and
3.6 (it works fine on 3.7) this commit just skips the tests that used to
use tempfile and sets them to skip on windows environments, since they
don't work on appveyor.
* Remove unused import
These tests haven't run in a long time, they skip (not silently but
among all the test results no one notices) They also don't work
currently even if we fix the original breakage. If we're not
cross-testing terra master on aer and vice versa keep these tests in
terra don't provide value (although travis and appveyor limit how much
we can do there). We can revisit adding them back in the future if
needed.
* Move parameter binding from ParameterTable to QuantumCircuit.
* Add check that parameters are present in circuit before binding.
* Add __repr__ for Parameter.
* Add test for partial parameter binding.
* Add parameter_binds to RunConfig and execute kwargs.
* add Reset before initialize
* The reset in front of initializer should be removed when zero state
* run after unroller
* RemoveResetInZeroState in default_pass_manager
* test.python.circuit.test_initializer.TestInitialize.test_combiner
* unused-import
* - if 'reset' in basis_gates:
* adapting InitializeGate to the Instruction API
* lint
* rename InitializeGate-> Initialize
* no more TODO
* test_initialize_FakeMelbourne
* TODO
* remove common module and move contents to top-level
* rename PulseCommand to Command
* rename channels module to device module
* remove pulse_ from file name
* rename OutputChannel to PulseChannel
* rename DriveInstruction to PulseInstruction
* improve comments
* rename back module name to