Commit Graph

45 Commits

Author SHA1 Message Date
Matthew Treinish 9a757c8ae2
Support reproducible builds of Rust library (#7728)
By default Rust libraries don't ship a Cargo.lock file. This is to allow
other Rust consumers of the library to pick a compatible version with
the other upstream dependencies. [1] However, the library we build in
Qiskit is a bit different since it's not a traditional Rust library but
instead we're building a C dynamic library that is meant to be consumed
by Python. This is much closer a model to developing a Rust binary
program because we're shipping a standalone binary. To support
reproducible builds we should include the Cargo.lock file in our source
distribution to ensure that all builds of qiskit-terra are using the
same versions of our upstream Rust dependencies. This commit commits the
missing Cargo.lock file, removes it from the .gitignore (which was added
automatically by cargo when creating a library project), and includes it
in the sdist. This will ensure that any downstream consumer of terra
from source will have a reproducible build. Additionally this adds a
dependabot config file so the bot will manage proposing version bumps on
upstream project releases, since we probably want to be using the latest
versions on new releases in our lock file.

[1] https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries
2022-03-03 17:47:13 +00:00
Matthew Treinish ccc371f8ff
Implement multithreaded stochastic swap in rust (#7658)
* Implement multithreaded stochastic swap in rust

This commit is a rewrite of the core swap trials functionality in the
StochasticSwap transpiler pass. Previously this core routine was written
using Cython (see #1789) which had great performance, but that
implementation was single threaded. The core of the stochastic swap
algorithm by it's nature is well suited to be executed in parallel, it
attempts a number of random trials and then picks the best result
from all the trials and uses that for that layer. These trials can
easily be run in parallel as there is no data dependency between the
trials (there are shared inputs but read-only). As the algorithm
generally scales exponentially the speed up from running the trials in
parallel can offset this and improve the scaling of the pass. Running
the pass in parallel was previously tried in #4781 using Python
multiprocessing but the overhead of launching an additional process and
serializing the input arrays for each trial was significantly larger
than the speed gains. To run the algorithm efficiently in parallel
multithreading is needed to leverage shared memory on shared inputs.

This commit rewrites the cython routine using rust. This was done for
two reasons. The first is that rust's safety guarantees make dealing
with and writing parallel code much easier and safer. It's also
multiplatform because the rust language supports native threading
primatives in language. The second is while writing parallel cython
code using open-mp there are limitations with it, mainly on windows. In
practice it was also difficult to write and maintain parallel cython
code as it has very strict requirements on python and c code
interactions. It was much faster and easier to port it to rust and the
performance for each iteration (outside of parallelism) is the same (in
some cases marginally faster) in rust. The implementation here reuses
the data structures that the previous cython implementation introduced
(mainly flattening all the terra objects into 1d or 2d numpy arrays for
efficient access from C).

The speedups from this PR can be significant, calling transpile() on a
400 qubit (with a depth of 10) QV model circuit targetting a 409 heavy
hex coupling map goes from ~200 seconds with the single threaded cython
to ~60 seconds with this PR locally on a 32 core system, When transpiling
a 1000 qubit (also with a depth of 10) QV model circuit targetting a 1081
qubit heavy hex coupling map goes from taking ~6500 seconds to ~720
seconds.

The tradeoff with this PR is for local qiskit-terra development a rust
compiler needs to be installed. This is made trivial using rustup
(https://rustup.rs/), but it is an additional burden and one that we
might not want to make. If so we can look at turning this PR into a
separate repository/package that qiskit-terra can depend on. The
tradeoff here is that we'll be adding friction to the api boundary
between the pass and the core swap trials interface. But, it does ease
the dependency on development for qiskit-terra.

* Sanitize packaging to support future modules

This commit fixes how we package the compiled rust module in
qiskit-terra. As a single rust project only gives us a single compiled
binary output we can't use the same scheme we did previously with cython
with a separate dynamic lib file for each module. This shifts us to
making the rust code build a `qiskit._accelerate` module and in that we
have submodules for everything we need from compiled code. For this PR
there is only one submodule, `stochastic_swap`, so for example the
parallel swap_trials routine can be imported from
`qiskit._accelerate.stochastic_swap.swap_trials`. In the future we can
have additional submodules for other pieces of compiled code in qiskit.
For example, the likely next candidate is the pauli expectation value
cython module, which we'll likely port to rust and also make parallel
(for sufficiently large number of qubits). In that case we'd add a new
submodule for that functionality.

* Adjust random normal distribution to use correct mean

This commit corrects the use of the normal distribution to have the mean
set to 1.0. Previously we were doing this out of band for each value by
adding 1 to the random value which wasn't necessary because we could
just generate it with a mean of 1.0.

* Remove unecessary extra scope from locked read

This commit removes an unecessary extra scope around the locked read for
where we store the best solution. The scope was previously there to
release the lock after we check if there is a solution or not. However
this wasn't actually needed as we can just do the check inline and the
lock will release after the condition block.

* Remove unecessary explicit type from opt_edges variable

* Fix indices typo in NLayout constructor

Co-authored-by: Jake Lishman <jake@binhbar.com>

* Remove explicit lifetime annotation from swap_trials

Previously the swap_trials() function had an explicit lifetime
annotation `'p` which wasn't necessary because the compiler can
determine this on it's own. Normally when dealing with numpy views and a
Python object (i.e. a GIL handle) we need a lifetime annotation to tell
the rust compiler the numpy view and the python gil handle will have the
same lifetime. But since swap_trials doesn't take a gil handle and
operates purely in rust we don't need this lifetime and the rust
compiler can deal with the lifetime of the numpy views on their own.

* Use sum() instead of fold()

* Fix lint and add rust style and lint checks to CI

This commit fixes the python lint failures and also updates the ci
configuration for the lint job to also run rust's style and lint
enforcement.

* Fix returned layout mapping from NLayout

This commit fixes the output list from the `layout_mapping()`
method of `NLayout`. Previously, it incorrectly would return the
wrong indices it should be a list of virtual -> physical to
qubit pairs. This commit corrects this error

Co-authored-by: georgios-ts <45130028+georgios-ts@users.noreply.github.com>

* Tweak tox configuration to try and reliably build rust extension

* Make swap_trials parallelization configurable

This commit makes the parallelization of the swap_trials() configurable.
This is dones in two ways, first a new argument parallel_threshold is
added which takes an optional int which is the number of qubits to
switch between a parallel and serial version. The second is that it
takes into account the the state of the QISKIT_IN_PARALLEL environment
variable. This variable is set to TRUE by parallel_map() when we're
running in a multiprocessing context. In those cases also running
stochastic swap in parallel will likely just cause too much load as
we're potentially oversubscribing work to the number of available CPUs.
So, if QISKIT_IN_PARALLEL is set to True we run swap_trials serially.

* Revert "Make swap_trials parallelization configurable"

This reverts commit 57790c84b0. That
commit attempted to sovle some issues in test running, mainly around
multiple parallel dispatch causing exceess load. But in practice it was
broken and caused more issues than it fixed. We'll investigate and add
control for the parallelization in a future commit separately after all
the tests are passing so we have a good baseline.

* Add docs to swap_trials() and remove unecessary num_gates arg

* Fix race condition leading to non-deterministic behavior

Previously, in the case of circuits that had multiple best possible
depth == 1 solutions for a layer, there was a race condition in the fast
exit path between the threads which could lead to a non-deterministic
result even with a fixed seed. The output was always valid, but which
result was dependent on which parallel thread with an ideal solution
finished last and wrote to the locked best result last. This was causing
weird non-deterministic test failures for some tests because of #1794 as
the exact match result would change between runs. This could be a bigger
issue because user expectations are that with a fixed seed set on the
transpiler that the output circuit will be deterministically
reproducible.

To address this is issue this commit trades off some performance to
ensure we're always returning a deterministic result in this case. This
is accomplished by updating/checking if a depth==1 solution has been
found in another trial thread we only act (so either exit early or
update the already found depth == 1 solution) if that solution already
found has a trial number that is less than this thread's trial number.
This does limit the effectiveness of the fast exit, but in practice it
should hopefully not effect the speed too much.

As part of this commit some tests are updated because the new
deterministic behavior is slightly different from the previous results
from the cython serial implementation. I manually verified that the
new output circuits are still valid (it also looks like the quality
of the results in some of those cases improved, but this is strictly
anecdotal and shouldn't be taken as a general trend with this PR).

* Apply suggestions from code review

Co-authored-by: georgios-ts <45130028+georgios-ts@users.noreply.github.com>

* Fix compiler errors in previous commit

* Revert accidental commit of parallel reduction in compute_cost

This was only a for local testing to prove it was a bad idea and was
accidently included in the branch. We should not nest the parallel
execution like this.

* Eliminate short circuit for depth == 1 swap_trial() result

This commit eliminates the short circuit fast return in swap_trial()
when another trial thread has found an ideal solution. Trying to do this
in a parallel context is tricky to make deterministic because in cases
of >1 depth == 1 solutions there is an inherent race condition between
the threads for writing out their depth == 1 result to the shared
location. Different strategies were tried to make this reliably
deterministic but there wa still a race condition. Since this was just a
performance optimization to avoid doing unnecessary work this commit
removes this step. Weighing improved performance against repeatability
in the output of the compiler, the reproducible results are more
important. After we've adopted a multithreaded stochastic swap we can
investigate adding this back as a potential future optimization.

* Add missing docstrings

* Add section to contributing on installing form source

* Make rust python classes pickleable

* Add rust compiler install to linux wheel jobs

* Try more tox changes to fix docs builds

* Revert "Eliminate short circuit for depth == 1 swap_trial() result"

This reverts commit c510764a77. The
removal there was premature and we had a fix for the non-determinism in
place, ignoring a typo which was preventing it from working.

Co-Authored-By: Georgios Tsilimigkounakis <45130028+georgios-ts@users.noreply.github.com>

* Fix submodule declaration and module attribute on rust classes

* Fix rust lint

* Fix docs job definition

* Disable multiprocessing parallelism in unit tests

This commit disables the multiprocessing based parallelism when running
unittest jobs in CI. We historically have defaulted the use of
multiprocessing in environments only where the "fork" start method is
available because this has the best performance and has no caveats
around how it is used by users (you don't need an
`if __name__ == "__main__"` guard). However, the use of the "fork"
method isn't always 100% reliable (see
https://bugs.python.org/issue40379), which we saw on Python 3.9 #6188.
In unittest CI (and tox) by default we use stestr which spawns (not using
fork) parallel workers to run tests in parallel. With this PR this means
in unittest we're now running multiple test runner subprocesses, which
are executing parallel dispatched code using multiprocessing's fork
start method, which is executing multithreaded rust code. This three layers
of nesting is fairly reliably hanging as Python's fork doesn't seem to
be able to handle this many layers of nested parallelism. There are 2
ways I've been able to fix this, the first is to change the start method
used by `parallel_map()` to either "spawn" or "forkserver" either of
these does not suffer from random hanging. However, doing this in the
unittest context causes significant overhead and slows down test
executing significantly. The other is to just disable the
multiprocessing which fixes the hanging and doesn't impact runtime
performance signifcantly (and might actually help in CI so we're not
oversubscribing the limited resources.

As I have not been able to reproduce `parallel_map()` hanging in
a standalone context with multithreaded stochastic swap this commit opts
for just disabling multiprocessing in CI and documenting the known issue
in the release notes as this is the simpler solution. It's unlikely that
users will nest parallel processes as it typically hurts performance
(and parallel_map() actively guards against it), we only did it in
testing previously because the tests which relied on it were a small
portion of the test suite (roughly 65 tests) and typically did not have
a significant impact on the total throughput of the test suite.

* Fix typo in azure pipelines config

* Remove unecessary extension compilation for image tests

* Add test script to explicitly verify parallel dispatch

In an earlier commit we disabled the use of parallel dispatch in
parallel_map() to avoid a bug in cpython associated with their fork()
based subprocess launch. Doing this works around the bug which was
reliably triggered by running multiprocessing in parallel subprocesses.
It also has the side benefit of providing a ~2x speed up for test suite
execution in CI. However, this meant we lost our test coverage in CI for
running parallel_map() with actual multiprocessing based parallel
dispatch. To ensure we don't inadvertandtly regress this code path
moving forward this commit adds a dedicated test script which runs a
simple transpilation in parallel and verifies that everything works as
expected with the default parallelism settings.

* Avoid multi-threading when run in a multiprocessing context

This commit adds a switch on running between a single threaded and a
multithreaded variant of the swap_trials loop based on whether the
QISKIT_IN_PARALLEL flag is set. If QISKIT_IN_PARALLEL is set to TRUE
this means the `parallel_map()` function is running in the outer python
context and we're running in multiprocessing already. This means we do
not want to be running in multiple threads generally as that will lead
to potential resource exhaustion by spawn n processes each potentially
running with m threads where `n` is `min(num_phys_cpus, num_tasks)` and
`m` is num_logical_cpus (although only
`min(num_logical_cpus, num_trials)` will be active) which on the typical
system there aren't enough cores to leverage both multiprocessing and
multithreading. However, in case a user does have such an environment
they can set the `QISKIT_FORCE_THREADS` env variable to `TRUE` which
will use threading regardless of the status of `QISKIT_IN_PARALLEL`.

* Apply suggestions from code review

Co-authored-by: Jake Lishman <jake@binhbar.com>

* Minor fixes from review comments

This commits fixes some minor details found during code review. It
expands the section on building from source to explain how to build a
release optimized binary with editable mode, makes the QISKIT_PARALLEL
env variable usage consistent across all jobs, and adds a missing
shebang to the `install_rush.sh` script which is used to install rust in
the manylinux container environment.

* Simplify tox configuration

In earlier commits the tox configuration was changed to try and fix the
docs CI job by going to great effort to try and enforce that
setuptools-rust was installed in all situations, even before it was
actually needed. However, the problem with the docs ci job was unrelated
to the tox configuration and this reverts the configuration to something
that works with more versions of tox and setuptools-rust.

* Add missing pieces of cargo configuration

Co-authored-by: Jake Lishman <jake@binhbar.com>
Co-authored-by: georgios-ts <45130028+georgios-ts@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-28 21:49:54 +00:00
wmurphy-collabstar d77d73ee70
Fixed issue 5920 (#6294)
Co-authored-by: Abby Mitchell abby.s.mitchell@gmail.com
Co-authored-by: Winona Murphy 56129494+wmurphy-collabstar@users.noreply.github.com
Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
Co-authored-by: Abby-Mitchell <abby.mitchell@btinternet.com>
2021-09-15 17:10:01 +02:00
Edwin Navarro 89c19e78e8
Fix a few things from merge of #6672 (#6755)
* Remove excess png and json files from test.ipynb.mpl and graph and move user_style.json to rightful place

* Fix user_style.png
2021-07-16 22:02:02 +02:00
Christopher J. Wood 0040846bdc
Fix density matrix expval cython function (#5984)
* Fix density matrix expval

The cython function for density matrix expectation value only worked if the matrix memory was a C-contiguous array, which isnt usually true since superop evolution uses F-contiguous ordering. This updates the cython function to work on a flattened array assuming F ordering.

* Remove unused import

* Use array access for statevector x_max

* Fix bug in indexing var names

* Fix Pauli phase not being applied to expval

* linting

* git ignore

* Remove python interaction from popcount function

* Avoid runtime imports

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2021-03-11 15:49:23 +00:00
Luciano Bello 2909eac421
Polish the MPL tester (#4604)
* polish mpl tester

* when images do not much size

* allow zip download

* lintian

* empty circuit

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2020-06-30 19:12:37 +00:00
Luciano Bello 970496a1fa
Testing MPL with a notebook in binder (#4544) 2020-06-22 13:34:21 -04:00
Paul Nation 123993c25c
Jupyter widget for circuit library (#3861)
* add qasm lexer

* allow for formatted and saving

* lint

* style

* add to docs as submodule

* add html style

* add circuit library widget

* add line magic

* updates

* remove circuit title as it formats incorrectly

* fix colors

* change header font size

* make widget formatting a bit better

* add ignores

* remove wrong commit

* remove pygmnets from docs

* update

* add pygments directly to qasm

Co-authored-by: Ali Javadi-Abhari <ajavadia@users.noreply.github.com>
2020-03-29 23:23:44 -04:00
Paul Nation 14491426b4 Module level documentation for qiskit.visualization (#3187)
* update visualization docs

* style

* add width change

* quanum -> quantum

* add coloring to function links

* add otehr visuals

* simplify even more

* more styling

* styling

* a bit softer link color

* add example

* add inline

* Add qiskit-aer and qiskit-ibmq-provider to docs job

Using jupyter-sphinx to build examples in the docs enables us to
actually run examples in the docs and get jupyter output. However, the
module fails by default if there is anything printed to stderr when
executing code. The base qiskit namespace will print a warning if ibmq
and aer are not found on a system (which is to provide cover for python
packaging issues). To avoid these warnings the simplest step is to
install both packages into the venv to avoid a warning. This commit does
just that.
2019-10-14 09:45:19 -04:00
Luciano 41e9776e46
gitignore cpp files created in cython folders under the passes folder (#1905) 2019-03-06 16:06:06 -05:00
Salvador de la Puente González 43fc166980 Renaming qiskit.backends to qiskit.providers (#1531)
* Renaming qiskit.backends to qiskit.providers

* Replacing routes in the building files.
2018-12-17 18:11:40 -05:00
Salvador de la Puente González cad469f5e1 Split `qiskit.backend.aer` simulators into Python built-in simulators and C++ legacy simulators (#1484)
* Repackaging qiskit.backends.aer to qiskit.backends.builtinsimulators

* Moving C++ simulators to legacysimulators package

* Fixing qiskit/__init__.py to support extensible backends

* Fixing tests

* Removing traces of aer name inside the backends package.

* Remove traces of aer from qiskit

* Updating CHANGELOG

* Adding deprecation warning

* Replacing aer with legacysimulators in the build system
2018-12-13 19:14:07 -05:00
Luciano a4331001f1 networkx 2.2 in setup and changelog (#1267)
* networkx2.2 in setup and changelog

* Update CHANGELOG.rst
2018-11-14 10:30:21 +01:00
Matthew Treinish 6eb436e411 Switch to stestr for test runner (#737)
* Switch to stestr for test runner

This commit switches the default test runner for qiskit-terra to use
stestr instead of the built-in runner from stdlib unittest. By default
this switches the default mode of execution to be parallel instead of
serial which can lead to significant speed ups in test execution time.

Also the junitxml upload on the appveyor ci is switched to use the
subunit protocol instead of the xunit format. This is because subunit
is used natively by stestr. While we can generate xunit xml in the
same exact format it doesn't work on windows because of the subunit
library bug: https://bugs.launchpad.net/subunit/+bug/1322888 . Once
this bug is fixed we can convert the subunit to xunit xml as part of
the CI job. That being said though, the subunit data contains every
thing and whatever post processing is being done on the xml files
can easily be converted to use the subunit.

Closes #730

* Remove initial check for initializing state

The initializing state for a job is a transient condition. Depending on
how fast the test executes we may or may not be able to catch it during
the execution of the test. When running the test suite in parallel we're
seeing many instances where things execute too quickly and the assert
looking for the initial initializing state is too slow and the api
status has already moved on. This commit fixes this by simply removing
that check from all the tests since it can't be reliably checked.

* Stop writing progress bar to stdout during tests

This commit adjust the parallel_progress bar unit tests to mock out
sys.stdout.write() so we aren't actually writing the progress bar to
stdout during the test run. We're not actually verifying the contents
written to stdout anywhere in the tests and this both pollutes stdout
during a run and also fails when running tests under stestr on windows
ci, likely because of how python-subunit (a external dependency
library of stestr's) internally handles stdout encapsulation. So to
avoid these this commit mocks out the stdout writes and asserts we're at
least calling it. In the future we can adjust these to actually verify
the calls for the proper output. But for right now asserting we're even
calling sys.stdout.write() is an improvement and avoids the issues.

* Fix typos in tox.ini

* Change to per test method parallelization by default

Prior to this commit we were using test class level parallelization (ie
each test class is the minimum unit that gets passed to a worker). This
was done to optimize for the online tests which have expensive class
level constructors which we wouldn't want to run multiple times if the
individual test methods got split across multiple workers. However, this
was hurting the overall performance of the more common case where we
don't make actual api requests. This commit switches us to use per
method parallelization by default and manually switch to per class for
the online tests in CI.

* Revert "Change to per test method parallelization by default"

This reverts commit 0ab794b0a5bc14d23e1820042a70f66b0d68c99b.

* Update appveyor comments for using test_results.xml

This commit updates the comments in the appveyor to refer to the
upstream fix needed to leverage the test_results.xml. It also adds all
the necessary lines to properly generate an xunit xml file and upload
it.
2018-11-06 17:43:03 +00:00
Matthew Treinish 5a1879f378 Add the setup.py back (#1033)
Not having a setup.py causes all sorts of headaches for anyone trying to
use the package from source. Having cmake generate one is kind of absurd
when all it really does is add a version string. There are other ways to
do that (if the burden of updating a version string is too high) in an
automatic fashion (see pbr for an example that uses git tags to
autogenerate the version number). But for right now this just adds the
setup.py back so people will be able to install just the python code
easily, and use tools that expect a python repo to be installable on a
clean checkout without any additional steps.
2018-10-04 18:54:13 -04:00
Diego M. Rodríguez 195a38c295 Fix cpp simulator distribution (#998) 2018-10-01 22:22:25 -04:00
Diego M. Rodriguez 043b65bfe4 Resycn with qasm_simulator_cpp changes
Revise after the modifications to the C++ simulator, updating the
references for the location of the file (`qiskit/backends/local`
instead of `qiskit/backends`).
Reintroduce the c++ simulator gates, that were commented out in the
process.
2018-04-14 23:42:53 +02:00
Jay Gambetta 2717d1c7bd Cleaning up
separating result from qobj schema, and putting them in qiskit/schema

fixes in jay's office

Adding setup.py ignore to put the fire out

Fixing some bugs

disabling qasm header for extensions/qiskit_simulator

Adding the examples working -- test need to fix the test.

modifying quantumprogram to use backendmanager and its tests to pass

Passing the testquantumprogram

Passing backend now

Style fixes

Fixing some lint errors

Renaming test_backend test_backend_manager

Adding compile test

Small changes

Fix basebackend tests

Also ignore ds_store files

Linting

don't traverse extensions when registering api

add back in job_processor tests
2018-04-14 23:37:11 +02:00
cjwood b9e7aad2c2 renamed qiskit-simulator folder to qasm-simulator-cpp
cmake build needs updating for new directory / exe file name
2018-04-13 16:13:57 -04:00
cjwood ad649e2421 Improved handling of JSON for cpp simulator
-  added string simulator input/output
- Fixed compile bugs on linux
- changed snapshot map to use int key instead of unsigned long long key
- allowed sample shots to compute probability vector in place to save memory
2018-04-13 16:13:56 -04:00
cjwood 5461e1cd2d rewriting vector backends to use new QubitVector class
- Updated modified JSON library to version 3.1.1
- Encapsulated multi-partite qubit state vector updates in a
QubitVector class
- Added TensorIndex class used for indexing in the QubitVector class.
- Reworked ideal_backend and qubit_backend to use QubitVector methods
- merged sampleshots_engine into vector_engine
- removed ability to display final and saved quantum states
- added “snapshot” instruction and added ability to display snapshots
of quantum state
- added basic cpp test file for qubit_vector class
- Added auto check to makefile for GCC7 compiler on macOS
2018-04-13 16:13:56 -04:00
Juan Gomez 7347fd1af4 [WIP] CMake integration (#274)
* CMake integration:
* Qiskit simulator now builds on/for Linux 64, Win64 and Darwin
* Added support for creating pip distributable packages (sdist
  and wheels) for Linux, Windows and MacOS
* Added support for testing and lintering via CMake
* Added Windows lib/dll dependencies for C++ simulator
* Added support for building when installing via Pip from source
  distribution, so non-supported platforms have a chance to build
  the C++ code

* Documentation updated, but still a WIP.

* Fix .rst formatting issues

* Restore qiskit-simulator latest changes

* Remove garbage file

* CMake integration:
* Added make "doc" target for Sphinx documentation
* Added both sdist and bdist_wheel distribution packages builds

* CMake integration:
* Setup.py.in now generates the correct platform tag for wheels
  distribution package

* CMake integration:
* 'make clean' target now removes all custom generated files and
  directories.
* Fxied 'make pypi_package' to not include binaries in the source
  distribution package (sdist)

* CMake integration: Addressing review comments
* Git-ignoring some autogenerated files
* Changed linter target name to "lint"
* Improved documentation

* CMake integration: Adressing review comments (2)
* Added qiskit/backends/qiskit_simulator to .gitignore
2018-02-05 15:42:10 +01:00
Juan Gomez 7038d6278a Integrating C++ simulator with PIP installation
* Changed default path of the simulator to:
  1st - The path where the simulator is built by default from the
  Makefile
  2nd - The path where pip installs simulator binary
* Removed .gitignore entries that are not needed anymore
* Integrate simulator's make clean target into the main Makefile
2018-01-04 19:12:59 +01:00
cjwood a9548a09c8 fixed bug with clifford simulator, moved custom gates to extensions
- fixed bug with local_clifford_simulator calling the qubit simulator
instead
- renamed built local_qiskit_simulator executable to qiskit_simulator
- moved custom simulator gate definitions to folder
qiskit.extensions.qiskitsimulator
- added u0 gate class definition to standard extensions
- merged `exe` and `path` args to `path` for cppsimulator run command
2018-01-04 10:57:26 +11:00
cjwood ec627e197e move custom gates to seperate module, moved importing simulator into a function call 2018-01-03 17:27:13 +11:00
cjwood df53caf65d Added external folder with local c++ simulator 2018-01-03 17:08:01 +11:00
Diego M. Rodriguez 331d6b90d0 Add linter/style check to travis
* Relax the pylint output disabling several warnings.
* Reintroduce the linting of qiskit.extensions and qiskit.qasm.node.
* Add a `style` target to the Makefile that performs pycodestyle, and
  reduce the verbosity of `lint` by removing the report.
* Update the Travis configuration in order to add a new step that
  performs linter and style checks via an environment variable.
2017-12-29 10:44:35 +01:00
Luciano 6b4c3502da Issue 111 - Math domain error fix
* Switch from math package to sympy in order to avoid floating point precision errors
2017-11-17 18:19:48 +01:00
Rudy Raymond 00ae38c1f8 Added japanese doc for installation of QISKit (#140)
* Added japanese doc

* Update Make and structure to allow multiple langs

Update the Makefile "doc" target to build both the English and the
Japanese versions, in separate directories, and the "clean" target to
cleanup the autodoc documentation.
Add a "conf.py" file to the "doc/ja" folder that modifies the relevant
variables, as Sphinx uses that folder as the root document folder when
building the Japanese version.

* Fix missing "install" reference on ja sphinx docs

* Update sphinx doc deploy script for Japanese

Add the Japanese sphinx produced directory to the Github pages deploy
script.

* Fix typo and extra line in Makefile
2017-11-08 18:13:43 +01:00
Juan Gomez 7455cd61c7 Issue 69 - Create parsetab.py autogenerated file in a temporary dir (#70)
Issue 69 - Create parsetab.py autogenerated file in a temporary dir
2017-09-28 16:26:37 +02:00
Jay Gambetta df45258eb3 Fixing return values (#38)
* starting to fix up the counts online and making to test to checks

* removing error is cleaning values

* fixing the seed error

* fixing the seed

* adding more test for online format

* Merge remote-tracking branch 'QISKit/r0.3' into fixing_return_values

# Conflicts:
#	test/python/test_quantumprogram.py

* Merge remote-tracking branch 'QISKit/r0.3' into fixing_return_values

# Conflicts:
#	test/python/test_quantumprogram.py

* merging r0.3 changes in

* adding test for online simulator
2017-08-23 22:00:46 -04:00
Erick Winston 9a4ea95e9f clean up docstrings to reduce autodoc errors. 2017-08-03 17:46:26 -04:00
Erick Winston 85db578c43 remove notebook tests 2017-08-03 12:22:22 -04:00
Jay M. Gambetta 1d9a3161e3 removing names and adding codeowners 2017-08-02 18:51:04 -04:00
Jay M. Gambetta 50c8ebf68e more tutorial changes 2017-07-28 00:25:51 -04:00
Jay M. Gambetta 57b79e011f ignoring the pdf 2017-07-27 13:59:59 -04:00
Jay M. Gambetta 7a9cd62059 optimization temp 2017-07-05 17:23:21 -04:00
Jesús Pérez bd0b4e2382 Qconfig file in tests not needed anymore. 2017-05-11 18:12:45 +02:00
Jesús Pérez f9fe204e7b Tests get the QE key from an env variable now. 2017-05-10 19:27:27 +02:00
Andrew Cross 320d92c825 TODOs for awc; update gitignore for vscode files 2017-05-04 16:38:38 -04:00
ismael faro 365c54e277 Add external token 2017-05-03 02:00:32 -04:00
Jay M. Gambetta e7cfc3c344 adding optimization
adding the optimization example
2017-04-18 17:07:40 -04:00
Jay M. Gambetta 9606372e74 adding the scripts i have been working on. 2017-04-03 08:45:01 -04:00
Andrew W. Cross 51dd124500 incorporate aspects of latest discussions, fix bugs 2017-04-01 01:02:08 -04:00
Andrew W. Cross 70fac0bf9b initial commit 2017-03-07 12:53:35 -05:00