Commit Graph

2683 Commits

Author SHA1 Message Date
Thomas Alexander f0e1b4331b
assemble lo bug fix (#2287)
* assemble lo bug fix.

* fix bug
2019-05-02 15:58:35 -04:00
Thomas Alexander 8d692b3615 Remove buffer from first pulse on channel. (#2280) 2019-05-02 10:00:35 -04:00
Thomas Alexander 07da540051 Pulse assembly bug (#2279)
* small bug

* Add test for bug.
2019-05-02 08:36:01 -04:00
Ali Javadi-Abhari e44d7aebfc Define transpile optimization levels (#2266)
* 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
2019-05-02 12:51:11 +02:00
Paul Nation 25bed6f9f0 Obtain a reduced coupling_map for a subgraph of a device (#2225)
* reduced_coupling_map

* style

* new headers

* make reduce a CouplingMap method

* get rid of 'backend'

* fix test for python version dependent ordering

* fix idx
2019-05-02 05:35:16 -04:00
Lev Bishop 1b4a6976b7 require scipy>=1.0 and go back to scipy.stats.unitary_group for random_unitary() (#2275) 2019-05-02 04:55:45 -04:00
Christopher J. Wood 48659a682f
Fix typo in QuantumChannel init (#2277) 2019-05-01 23:10:13 -04:00
Thomas Alexander 03fb844039 Enforce meas map at assembly (#2276)
* Added meas_map to assemble.

* Add meas_map check.

* Add meas_map tests.

* linting.
2019-05-01 22:32:33 -04:00
Thomas Alexander f8fdfc514b schedule assembly bug. (#2274)
* schedue assembly bug.

* A couple more.

* fix bugs.
2019-05-01 21:55:58 -04:00
Thomas Alexander c869c9c2ac
Openpulse drawer (#2213)
* 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.
2019-05-01 21:21:16 -04:00
Matthew Treinish 99a21bbbb0 Handle edge case in text drawer line length logic (#2253)
* 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
2019-05-01 20:39:04 -04:00
Thomas Alexander ba79de1bdf Move schedule children attribute to private. (#2265) 2019-05-01 18:42:20 -04:00
Matthew Treinish d2e5281f59 Use pylatexenc utf8tolatex for gate names in latex drawer (#2246)
* Use pylatexenc utf8tolatex for gate names in latex drawer

When the latex drawer goes to draw custom gates they can be named and
valid unicode string. That's because the gate name attribute is a
string. However, latex doesn't know how to handle all utf8 characters
and requires escaping or custom libraries to render many of them.
Instead of trying to handle every edge case this commit uses the
pylatexenc lib (which is a MIT licensed lib with no additional
dependencies) which contains a mapping of all the unicode characters
with the latex equivalent. This means that things like '_' in custom
gate names will render properly now.

Partially Addresses #2235

* Fix lint
2019-05-01 18:20:00 -04:00
Matthew Treinish 7053ee238f Add example for stochastic swap and use to verify wheels (#2251)
* Add example for stochastic swap and use to verify wheels

This commit adds a new example to the examples directory for running the
stochastic swap pass. This is then used by the wheel build automation
to verify the built wheel works as expected. The compiled code (and
complexity in the wheel build) is for the stochastic swap pass so
verifying it functions when installed from the built wheel is important.

* Test wheel build with new script

Comment out branch logic and wheel upload to verify the wheel build this
is just for testing and will be reverted before the PR merges.

* Remove prints from example

* Revert "Test wheel build with new script"

This reverts commit f5edc1c777.
2019-05-01 17:40:16 -04:00
Thomas Alexander 52b9d37f17 Pulse command definition (#2263)
* Add pulse backend configuration.

* Add QASM and Pulse backend configuration objects.

* Added QASMBackendConfiguration and PulseBackendConfiguration with factory method from_dict.

* add tests for qasm/pulse backend configuration.

* linting.

* Parameter update

* Cleanup provider models and rename.

* linting

* Linting

* Make QASM -> Qasm

* remove invalid name

* Update open_pulse field to required.

* Remove from_dict hackery.

* Update tests.

* linting.

* linting.

* linting and required variable.

* readd comment.

* Add setting of u_channel_lo frequency.

* Redo qubit signature, all control channels present.

* linting

* Remove lo_freq from pulse channels.

* linting.

* Rework the way lo configuration works. Removed from channels and instead responsibility is placed on assembler.

* Small change to trigger rebuild.

* Fix rebasing.

* Add buffering of commands.

* Add buffer tests.

* linting.

* Small bug in device specification fall back.

* Add buffer to acquire channel.

* Added command definition data structure.

* Added casting of integer input qubits to tuple for cmd_def.

* Added cmd_def object tests. Not running as proper pulse schedule api is not yet running.

* Update imports and making pulse library.

* Added cmd_def and pulse_library to defaults in pulse mock backend

* Remove duplicate of PulseLibraryItem.

* remove redefinition of pulse qobj schema.

* linting

* update schema for parameterizable pulses.

* Add mutable mapping

* Remove mutablemapping and dunder methods.

* cmd_def pulse_library defaults methods.

* Add cmd_def accesor method.

* Update schema for vals and phase of type string.

* Added parameterized schedule and typing to cmd_def.

* Update typing of CmdDef. Add cmd_qubits method.

* Make ConversionMethodBinder generic.

* Rename PulseQobjConverter to InstructionToQobjConverter

* Add conversion logic for qobj to schedules.

* Convert without built pulse_library.

* QobjToInstruction tests and passing.

* Small bug fix.

* Fix cmd_def tests.

* linting.

* linting.

* add linting.

* Add safe expression parsing.

* Add Parameterized Schedule logic.

* Add parameterized schedules with tests.

* Fix cmd_def test.

* Working cmd def.

* Added parameterized cmd_def test

* Update tests.

* Tests passing.

* change cmd_types to cmds)

* Update cmd_def errors.

* Update error strings.

* Fix cmd_qubits.

* Linting.

* update regex and docs.

* Add testing of sanitization

* Update sanitization testing.

* linting.

* Update imports.

* Undo standard imports.

* Fix bug in pulse

* Escape regex
2019-05-01 17:16:36 -04:00
Paul Nation 9b93d17877 generalize mpl_data in gate_maps (#2267)
* generalize mpl_data

* too many lines
2019-05-01 15:32:57 -04:00
Kevin Krsulich 08a77324d6 Add parameter_map keyword arg to circuit_to_instruction (#2271)
* Move Parameter promotion from Instruction.params to converter.

* Add optional parameter_map to circuit_to_instruction.
2019-05-01 15:30:49 -04:00
Lev Bishop a493a64cfa Implement approximate KAK decomposition (#2121)
* 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()
2019-05-01 15:27:29 -04:00
Luciano fe644f669f
Allow PassManager instances to be reused (#2272)
* reset

* lint

* del line

* lint!
2019-05-01 14:33:11 -04:00
Thomas Alexander e775700191 Pulse channel buffers (#2237)
* Add pulse backend configuration.

* Add QASM and Pulse backend configuration objects.

* Added QASMBackendConfiguration and PulseBackendConfiguration with factory method from_dict.

* add tests for qasm/pulse backend configuration.

* linting.

* Parameter update

* Cleanup provider models and rename.

* linting

* Linting

* Make QASM -> Qasm

* remove invalid name

* Update open_pulse field to required.

* Remove from_dict hackery.

* Update tests.

* linting.

* linting.

* linting and required variable.

* readd comment.

* Add setting of u_channel_lo frequency.

* Redo qubit signature, all control channels present.

* linting

* Remove lo_freq from pulse channels.

* linting.

* Rework the way lo configuration works. Removed from channels and instead responsibility is placed on assembler.

* Small change to trigger rebuild.

* Fix rebasing.

* Add buffering of commands.

* Add buffer tests.

* linting.

* Small bug in device specification fall back.

* Add buffer to acquire channel.
2019-05-01 13:51:31 -04:00
Thomas Alexander 9b6db1620f Rework los and lo_ranges for channels (#2226)
* Add pulse backend configuration.

* Add QASM and Pulse backend configuration objects.

* Added QASMBackendConfiguration and PulseBackendConfiguration with factory method from_dict.

* add tests for qasm/pulse backend configuration.

* linting.

* Parameter update

* Cleanup provider models and rename.

* linting

* Linting

* Make QASM -> Qasm

* remove invalid name

* Update open_pulse field to required.

* Remove from_dict hackery.

* Update tests.

* linting.

* linting.

* linting and required variable.

* readd comment.

* Add setting of u_channel_lo frequency.

* Redo qubit signature, all control channels present.

* linting

* Remove lo_freq from pulse channels.

* linting.

* Rework the way lo configuration works. Removed from channels and instead responsibility is placed on assembler.

* Small change to trigger rebuild.

* Fix rebasing.
2019-05-01 08:59:31 -04:00
Diego M. Rodríguez 3bc65bea5b Update BackendConfiguration signature (#2268)
Update the order of the arguments in `BackendConfiguration` for making
it consistent with `QasmBackendConfiguration`.
2019-05-01 08:26:48 -04:00
Ali Javadi-Abhari 7e63af9823 Examples update (#2256)
* Adding the level1

* fixing examples

* level_2

* Bug fix

* Fixing

* make level 2 example richer
2019-04-30 16:59:58 -04:00
Maddy Tod fb1937841f Fixed drawing of rzz and cu1 (#2254) 2019-04-30 16:09:12 -04:00
Luciano 185d6635c4 qubits and clbits as properties (#2257) 2019-04-30 14:43:16 -04:00
Matthew Treinish ed99ad2da2 Handle opaque instructions and identity in qobj_to_circuits (#2147)
* 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
2019-04-30 14:28:11 -04:00
Kevin Krsulich bb8d7387b8
Improve error message when unrolling parameterized CU1. (#2250) 2019-04-30 14:06:13 -04:00
Thomas Alexander a82a774d34
Pulse backend configuration (#2216)
* Add pulse backend configuration.

* Add QASM and Pulse backend configuration objects.

* Added QASMBackendConfiguration and PulseBackendConfiguration with factory method from_dict.

* add tests for qasm/pulse backend configuration.

* linting.

* Parameter update

* Cleanup provider models and rename.

* linting

* Linting

* Make QASM -> Qasm

* remove invalid name

* Update open_pulse field to required.

* Remove from_dict hackery.

* Update tests.

* linting.

* linting.

* linting and required variable.

* readd comment.
2019-04-30 13:26:39 -04:00
Matthew Treinish 86a3ecfe39 Remove warning from qiskit._util and rely on a comment (#2255)
* Override getattr for qiskit._util

The backwards compat shim qiskit._util previously emitted a deprecation
in the raw module. This was done for simplicity and so that it would
only be emitted during import. However, since it's in the base namespace
it would be imported every time qiskit was imported, which led to a
deprecation warning always being emitted. To work around this issue,
this commit defines a custom __getattr__ for the module which will emit
the deprecation warning and call qiskit.util. This should limit the
deprecation warnings to just when qiskit._util is accessed.

Fixes #2252

* Remove warning from qiskit._util and rely on a comment

Since the warning was too noisy and gets emitted on every qiskit import
this commit just removes it. The _util module is still deprecated, and
listed as such in the module and in the changelog (and the future
release notes). But, since it was marked as private previously weighing
the noise of advertising the deprecation with a warning against the
potential of an external user using it removing the warning seems the
better option.

* Add changelog
2019-04-30 13:04:44 -04:00
Paul Nation 97cf677137
Copyrights (#2249)
* 2017 cps

* 2018 cps

* 2019 cps
2019-04-30 10:36:47 -04:00
Matthew Treinish 1b1421c8bf
Add compat shim for util module (#2154)
As part of some peoples desire to remove underscores from module names
the qiskit._util module was renamed to qiskit.util. However external
utilities, namely Aer, were using the public function in this module. To
ensure a smooth transition when we release 0.8 this commit adds a compat
shim qiskit._util module that just provides everything from qiskit.util.
But it raises a deprecation warning when imported that it has been
renamed and qiskit._util will be removed for 0.9.

Related to #2074
2019-04-30 09:01:40 -04:00
Matthew Treinish beeff75ce6 Add user config file for local settings (#2122)
* 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
2019-04-30 07:59:29 -04:00
Maddy Tod 6bc8cbc68b Fix justifying on Latex boxes (#2247)
* Updated the mpl label to only include shorter paramters

* Updated references to columns to column
2019-04-30 06:38:20 -04:00
Matthew Treinish 018289a92b Remove aer provider tests (#2201)
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.
2019-04-30 00:32:31 -04:00
Kevin Krsulich 6623e99c17 Add name collisions for parameterized circuits (#2245)
* Change Paramater.__eq__ to respect identity instead of name.

* Raise if appending different Parameters of same name to circuit.
2019-04-30 00:31:48 -04:00
Jay Gambetta b39827ad26 Compiler api (#2244) 2019-04-29 22:43:48 -04:00
Maddy Tod 418ac498c6 Updated logic to fix mpl box sizes (#2236) 2019-04-29 22:07:36 -04:00
Thomas Alexander d4f58d903b
Refactor enhance schedule (#2241)
* Refactor tree traversal.

* Add flatten test.

* linting.
2019-04-29 20:56:29 -04:00
Kevin Krsulich a475c1d447 Treat parameterized gates as opaque in Optimize1qGates (#2243)
* Update Optimize1qGates to treat Parameterized gates as opaque.

* Remove Parameterized circuit check from default transpile passes.

* Update Instruction.__eq__ to handle Parameters in params.
2019-04-29 16:35:11 -04:00
Ali Javadi-Abhari 10f640aafd
1q unitary decomposition (#2242)
* add 1q unitary decomposition

* changelog

* use to_matrix
2019-04-29 14:36:14 -04:00
Kevin Krsulich 7fc9c9ef31
Add parameterized circuits support in RunConfig and execute (#2210)
* 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.
2019-04-29 14:10:01 -04:00
Luciano a9f770e895 text drawing unitary gates (#2238)
* drawing unitary gates

* unitary

* Kraus and multiplexer

* register name
2019-04-29 13:27:34 -04:00
Maddy Tod b983e03f03 Updated the mpl label to only include shorter paramters (#2239) 2019-04-29 12:24:36 -04:00
Maddy Tod 88f6fe5c51 Fixed issue with params changing type with mpl drawer (#2228)
* Fixed issue with params changing type

* Moved the location of the copy

* Removed the need for the copy instruction
2019-04-29 07:34:24 -04:00
Luciano eda45e2861 Reset before initializer and optimization to remove it when zero state (#2212)
* 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
2019-04-28 21:34:32 -04:00
Ali Javadi-Abhari d1c79f2e66 (re)introduce consolidate blocks pass (#2209)
* introduce consolidate blocks pass

* use auto conversion from operator to instruction

* update to use UnitaryGate
2019-04-28 15:19:15 -04:00
Ali Javadi-Abhari e3b3d18328 move Layout and CouplingMap to transpiler, deprecate qiskit.mapper (#2222)
* move Layout and CouplingMap to transpiler, deprecate qiskit.mapper

* move tests

* add missing files
2019-04-28 13:57:37 -04:00
nkanazawa 7922df9518 PulseQobj and Json Schema updates for pulse simulator (#2052)
* add json schema of pulse simulator configuration

* update custom field of nested dictionary parameter

* add hamiltonian schema

* change dt validation type to float

* add specific QobjConfig

* remove simulator dedicated config

* remove helper qobjs and use pattern properties

* update unittest

* avoid lint error

* relax required restriction in pulse config

* modify simulator config and add schema for each field

* fix schema

* update unittest

* removed unnecessary validation

* remove lint error

* change module name and import

* update simulator_spec

* set required to meas_lo_freq and qubit_lo_freq

* update field name

* allow for empty list of gates and basis_gates

* remove lint error

* reordered pulse qobj config arguments.

* Remove simulator_spec from jsonschema.

* remove simulator spec.
2019-04-27 16:47:28 -04:00
itoko eddef45d42 Fix Pulse naming issues (#2167)
* 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
2019-04-27 15:42:20 -04:00
Luciano a85c741a6e
Pass to remove diagonal gates before measurement (#2208)
* rz_and_z_optimization

* bug fixing and more testing

* changelog

* lint

* RemoveRZandZbeforeMeasure -> RemoveDiagonalGatesBeforeMeasure

* changelog

* invalid-name

* test

* diagonal_control_gates

* CrzGate, Cu1Gate, RZZGate

* lint

* from qiskit.compiler import transpile

* remove_diagonal_gates_before_measurere

* diagonal_control_gates -> diagonal_2q_gates

* quantum_predecessors

* use quantum_predecessors

* test_optimize_1rzz_2measure docstring

* lint
2019-04-26 23:17:07 -04:00