From 1eedcc2dd647753d2e7352da6eb92f9b13215058 Mon Sep 17 00:00:00 2001 From: Lukas Burgholzer Date: Mon, 16 Sep 2024 01:01:06 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Update=20to=20latest=20versions=20(?= =?UTF-8?q?#18)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ⬆️ update to latest MQT versions * 🔥 remove duplicate link from readme * ♻️ update the examples * 🚨 hide the output of one cell causing a docplex syntax warning * 🍱 update download stats * ✏️ missing adjustment --- README.md | 11 +++++------ docs/handbook/02_simulation.md | 9 +++++---- docs/handbook/03_compilation.md | 19 ++++++++++++------- docs/handbook/04_verification.md | 9 +++++---- docs/handbook/05_benchmarking.md | 1 + docs/requirements.txt | 8 ++++---- 6 files changed, 32 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index d12c09e..8828ff1 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,9 @@ The [_Munich Quantum Toolkit (MQT)_](https://mqt.readthedocs.io) is a collection | GitHub Project | latest version | forks | stars | | --------------------- | --------------------------------: | ------------------------------: | ------------------------------: | | [`mqt-ddsim`] | ![gh.mqt.ddsim.release][] | ![gh.mqt.ddsim.forks][] | ![gh.mqt.ddsim.stars][] | -| [`mqt-qcec`] | ![gh.mqt.qcec.release][] | ![gh.mqt.qcec.forks][] | ![gh.mqt.qcec.stars][] | -| [`mqt-qmap`] | ![gh.mqt.qmap.release][] | ![gh.mqt.qmap.forks][] | ![gh.mqt.qmap.stars][] | | [`mqt-qecc`] | ![gh.mqt.qecc.release][] | ![gh.mqt.qecc.forks][] | ![gh.mqt.qecc.stars][] | +| [`mqt-qmap`] | ![gh.mqt.qmap.release][] | ![gh.mqt.qmap.forks][] | ![gh.mqt.qmap.stars][] | +| [`mqt-qcec`] | ![gh.mqt.qcec.release][] | ![gh.mqt.qcec.forks][] | ![gh.mqt.qcec.stars][] | | [`mqt-bench`] | ![gh.mqt.bench.release][] | ![gh.mqt.bench.forks][] | ![gh.mqt.bench.stars][] | | [`mqt-predictor`] | ![gh.mqt.predictor.release][] | ![gh.mqt.predictor.forks][] | ![gh.mqt.predictor.stars][] | | [`mqt-core`] | ![gh.mqt.core.release][] | ![gh.mqt.core.forks][] | ![gh.mqt.core.stars][] | @@ -35,9 +35,9 @@ The [_Munich Quantum Toolkit (MQT)_](https://mqt.readthedocs.io) is a collection | [`mqt-ddvis`] | ![gh.mqt.ddvis.release][] | ![gh.mqt.ddvis.forks][] | ![gh.mqt.ddvis.stars][] | | [`mqt-qusat`] | ![gh.mqt.qusat.release][] | ![gh.mqt.qusat.forks][] | ![gh.mqt.qusat.stars][] | | [`mqt-dasqa`] | ![gh.mqt.dasqa.release][] | ![gh.mqt.dasqa.forks][] | ![gh.mqt.dasqa.stars][] | -| [`mqt-ionshuttler`] | ![gh.mqt.ionshuttler.release][] | ![gh.mqt.ionshuttler.forks][] | ![gh.mqt.ionshuttler.stars][] | -| [`mqt-qubomaker`] | ![gh.mqt.qubomaker.release][] | ![gh.mqt.qubomaker.forks][] | ![gh.mqt.qubomaker.stars][] | | [`mqt-qudits`] | ![gh.mqt.qudits.release][] | ![gh.mqt.qudits.forks][] | ![gh.mqt.qudits.stars][] | +| [`mqt-qubomaker`] | ![gh.mqt.qubomaker.release][] | ![gh.mqt.qubomaker.forks][] | ![gh.mqt.qubomaker.stars][] | +| [`mqt-ionshuttler`] | ![gh.mqt.ionshuttler.release][] | ![gh.mqt.ionshuttler.forks][] | ![gh.mqt.ionshuttler.stars][] | [`mqt-ddsim`]: https://github.com/cda-tum/mqt-ddsim [`mqt-qcec`]: https://github.com/cda-tum/mqt-qcec @@ -51,7 +51,6 @@ The [_Munich Quantum Toolkit (MQT)_](https://mqt.readthedocs.io) is a collection [`mqt-ddvis`]: https://github.com/cda-tum/mqt-ddvis [`mqt-qusat`]: https://github.com/cda-tum/mqt-qusat [`mqt-dasqa`]: https://github.com/cda-tum/mqt-dasqa -[`mqt-qubomaker`]: https://github.com/cda-tum/mqt-qubomaker [`mqt-ionshuttler`]: https://github.com/cda-tum/mqt-ionshuttler [`mqt-qubomaker`]: https://github.com/cda-tum/mqt-qubomaker [`mqt-qudits`]: https://github.com/cda-tum/mqt-qudits @@ -114,8 +113,8 @@ The [_Munich Quantum Toolkit (MQT)_](https://mqt.readthedocs.io) is a collection | [`mqt.qecc`][pypi.mqt.qecc.stats] | ![pypi.mqt.qecc.version][] | ![pypi.mqt.qecc.weekly][] | ![pypi.mqt.qecc.monthly][] | [![pypi.mqt.qecc.total]](https://pepy.tech/project/mqt.qecc) | | [`mqt.bench`][pypi.mqt.bench.stats] | ![pypi.mqt.bench.version][] | ![pypi.mqt.bench.weekly][] | ![pypi.mqt.bench.monthly][] | [![pypi.mqt.bench.total]](https://pepy.tech/project/mqt.bench) | | [`mqt.predictor`][pypi.mqt.predictor.stats] | ![pypi.mqt.predictor.version][] | ![pypi.mqt.predictor.weekly][] | ![pypi.mqt.predictor.monthly][] | [![pypi.mqt.predictor.total]](https://pepy.tech/project/mqt.predictor) | -| [`mqt.problemsolver`][pypi.mqt.problemsolver.stats] | ![pypi.mqt.problemsolver.version][] | ![pypi.mqt.problemsolver.weekly][] | ![pypi.mqt.problemsolver.monthly][] | [![pypi.mqt.problemsolver.total]](https://pepy.tech/project/mqt.problemsolver) | | [`mqt.qudits`][pypi.mqt.qudits.stats] | ![pypi.mqt.qudits.version][] | ![pypi.mqt.qudits.weekly][] | ![pypi.mqt.qudits.monthly][] | [![pypi.mqt.qudits.total]](https://pepy.tech/project/mqt.qudits) | +| [`mqt.problemsolver`][pypi.mqt.problemsolver.stats] | ![pypi.mqt.problemsolver.version][] | ![pypi.mqt.problemsolver.weekly][] | ![pypi.mqt.problemsolver.monthly][] | [![pypi.mqt.problemsolver.total]](https://pepy.tech/project/mqt.problemsolver) | [pypi.mqt.ddsim.stats]: https://pypistats.org/packages/mqt-ddsim [pypi.mqt.ddsim.version]: https://img.shields.io/pypi/v/mqt.ddsim?label=%20&style=flat-square diff --git a/docs/handbook/02_simulation.md b/docs/handbook/02_simulation.md index 0823d51..ac55fcf 100644 --- a/docs/handbook/02_simulation.md +++ b/docs/handbook/02_simulation.md @@ -31,14 +31,15 @@ This includes strong and weak simulation {cite:p}`zulehnerAdvancedSimulationQuan %config InlineBackend.figure_formats = ['svg'] ``` -Consider the following listing that describes the quantum circuit for generating a three-qubit GHZ state (also shown in {numref}`fig-ghz-circuit`): +Consider the following listing that describes the quantum circuit for generating a four-qubit GHZ state (also shown in {numref}`fig-ghz-circuit`): ```{code-cell} ipython3 :tags: [remove-output] from qiskit import QuantumCircuit -circ = QuantumCircuit(3) -circ.h(2) +circ = QuantumCircuit(4) +circ.h(3) +circ.cx(3, 2) circ.cx(2, 1) circ.cx(1, 0) circ.measure_all() @@ -52,7 +53,7 @@ mystnb: width: 50% figure: align: center - caption: "Quantum circuit for generating a three-qubit GHZ state." + caption: "Quantum circuit for generating a four-qubit GHZ state." name: fig-ghz-circuit --- circ.draw(output="mpl", style="iqp") diff --git a/docs/handbook/03_compilation.md b/docs/handbook/03_compilation.md index 93e71ef..72834b1 100644 --- a/docs/handbook/03_compilation.md +++ b/docs/handbook/03_compilation.md @@ -55,22 +55,23 @@ mystnb: width: 30% figure: align: center - caption: "Coupling map of a generic five-qubit IBM device." + caption: "Coupling map of a generic five-qubit device." name: fig-device --- %config InlineBackend.figure_formats = ['svg'] from qiskit import QuantumCircuit -from qiskit.providers.fake_provider import Fake5QV1 +from qiskit.providers.fake_provider import GenericBackendV2 from qiskit.visualization import plot_gate_map -circ = QuantumCircuit(3) -circ.h(2) +circ = QuantumCircuit(4) +circ.h(3) +circ.cx(3, 2) circ.cx(2, 1) circ.cx(1, 0) circ.measure_all() -backend = Fake5QV1() +backend = GenericBackendV2(num_qubits=5, coupling_map=[[0, 1], [1, 0], [0, 2], [2, 0], [0, 3], [3, 0], [0, 4], [4, 0]]) plot_gate_map(backend) ``` @@ -78,9 +79,13 @@ Then, mapping the circuit to that device merely requires the following lines of ```{code-cell} ipython3 from mqt.qmap import compile -from qiskit.providers.fake_provider import Fake5QV1 +from qiskit.providers.fake_provider import GenericBackendV2 + +backend = GenericBackendV2( + num_qubits=5, + coupling_map=[[0, 1], [1, 0], [0, 2], [2, 0], [0, 3], [3, 0], [0, 4], [4, 0]] +) -backend = Fake5QV1() circ_mapped, results = compile(circ, backend) ``` diff --git a/docs/handbook/04_verification.md b/docs/handbook/04_verification.md index 4ad5322..5fba1ec 100644 --- a/docs/handbook/04_verification.md +++ b/docs/handbook/04_verification.md @@ -41,16 +41,17 @@ Verifying that the quantum circuit from {numref}`fig-ghz-circuit-mapped` has bee %config InlineBackend.figure_formats = ['svg'] from qiskit import QuantumCircuit -from qiskit.providers.fake_provider import Fake5QV1 +from qiskit.providers.fake_provider import GenericBackendV2 from mqt.qmap import compile -circ = QuantumCircuit(3) -circ.h(2) +circ = QuantumCircuit(4) +circ.h(3) +circ.cx(3, 2) circ.cx(2, 1) circ.cx(1, 0) circ.measure_all() -backend = Fake5QV1() +backend = GenericBackendV2(num_qubits=5, coupling_map=[[0, 1], [1, 0], [0, 2], [2, 0], [0, 3], [3, 0], [0, 4], [4, 0]]) circ_mapped, _ = compile(circ, backend) ``` diff --git a/docs/handbook/05_benchmarking.md b/docs/handbook/05_benchmarking.md index f27d57d..8238e78 100644 --- a/docs/handbook/05_benchmarking.md +++ b/docs/handbook/05_benchmarking.md @@ -28,6 +28,7 @@ To make the benchmarks as accessible as possible, MQT Bench comes as an easy-to- A larger version of the quantum circuit from {numref}`fig-ghz-circuit` can easily be obtained programmatically from the MQT Bench Python package as follows: ```{code-cell} ipython3 +:tags: [remove-output] from mqt.bench import get_benchmark circ = get_benchmark("ghz", circuit_size=8, level="alg") diff --git a/docs/requirements.txt b/docs/requirements.txt index b683ab9..c2a3cc5 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,10 +2,10 @@ furo ipykernel ipython matplotlib -mqt-bench~=1.1.0 -mqt-ddsim~=1.21.0 -mqt-qcec~=2.5.0 -mqt-qmap~=2.5.0 +mqt-bench~=1.1.5 +mqt-ddsim~=1.23.0 +mqt-qcec~=2.7.1 +mqt-qmap~=2.6.0 myst-nb myst_parser>=0.13 pybtex>=0.24