Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

use 'density matrix' instead of 'state matrix' in the plotting tutorial #1189

Closed
eliarbel opened this issue Jun 1, 2021 · 3 comments
Closed
Labels
documentation Something is not clear or error in description

Comments

@eliarbel
Copy link
Contributor

eliarbel commented Jun 1, 2021

the tutorials/circuits/2_plotting_data_in_qiskit.html tutorial uses 'state matrix' when talking about plot_state_city and plot_state_hinton. I think it's better to use 'density matrix' instead; the documentation of those methods also uses density matrix

@eliarbel eliarbel added the documentation Something is not clear or error in description label Jun 1, 2021
@fs1132429
Copy link

i would like to contribute to this

@shil-m
Copy link
Contributor

shil-m commented Jun 12, 2021

Hi @fs1132429, I didn't notice you commented you wanted to work on it, I read the issue earlier but made the PR later without commenting here. I am still figuring out the policies in GitHub. I am not sure what could be done in this case, should I close my PR? @eliarbel Any comments?

@eliarbel
Copy link
Contributor Author

PR #1196 should suffice, thanks a lot

@mergify mergify bot closed this as completed in 5a1dc9b Aug 16, 2023
Eric-Arellano added a commit to Eric-Arellano/qiskit-terra that referenced this issue Aug 25, 2023
…ity matrix' (Qiskit/qiskit-tutorials#1196)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ Also, please add it in the CHANGELOG file under Unreleased section.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
As described in issue Qiskit/qiskit-tutorials#1189, "state matrix" has been replaced by
"density matrix" in `plot_state_city` and
`plot_state_hinton` fotutorials/circuits/2_plotting_data_in_qiskit.html.
Additionally I have also changed it at other plot functions.


### Details and comments
"State matrix" has a different physical meaning and doesn't go with the
definition given in the documentation. Hence "density matrix" seems like
a better option to use instead of "state matrix".

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
github-merge-queue bot pushed a commit to Qiskit/qiskit that referenced this issue Sep 5, 2023
* start new format

* update 2

* updates

* aer tutorials

* add start here back

* updates

* add aqua optim and reorg aer

* Add other optimization notebooks and fixes

* Set up CI with Azure Pipelines (Qiskit/qiskit-tutorials#894)

* Set up CI with Azure Pipelines

This commit adds the CI configuration for running sphinx builds in CI. [skip ci]

* Add missing dep and start caching pip

* Install pandoc and graphviz

* Add cvxpy install for aer noise transformations

* Move aqua tutorials that depend on CPLEX to legacy_tutorials

There are 2 aqua tutorials that do not work unless CPLEX is installed.
CPLEX is too involved and difficult to install in CI. It is also
proprietary software which prohibits installing it in CI (since a CI
system can't agree to the license terms). Honestly, I'm not entirely
sure why aqua has modules in it that depend solely on having proprietary
software installed, it feels like there should be an open alternative or
if there is one already the tutorial should leverage that. To make the
docs buildable this commit moves these problematic tutorials to the
legacy directory so they're not built/run by default.

* Workaround terra mpl drawer bug

There is a bug in the mpl drawer in 0.19.0 (and 0.19.1) release where a
custom instruction does not draw without a label parameter set. This
will need to be fixed in terra, but in the meantime this worksaround the
bug by manually setting a label.

* Add texlive to installed packages

* Install correct texlive metapackage with qcircuit

* Correct package name again

* Add another missing binary dep

* Update qcircuit version as packaged version is too old

* Try using tlmgr instead of manually downloading qcircuit

* Try using more from tlmgr instead of apt

* Fix typo

* Use bash directly

* Adjust texlive update script usage

* Give up on tlmgr and try to manual install qcircuit again

* Fix typo

* revert aqua tutorial move and remove latex install

* Remove section of aqua notebook 2 that requires cplex

* Remove another notebook with cplex

* fix terra adv 1

* reorg

* Update 4_transpiler_passes_and_passmanager.ipynb

* fix spacing around equations in circuits_1

* Re-stating that MSQubit is indexed with 0.

I found it confusing when reading initially, and hence wanted to reiterate that the qubit representing
the MSB is left-most, indexed with 0.

* Adding spacing around operator and argument.

* Spaces around operator

* add working pulse tutorials

* Update 1_getting_started_with_qiskit.ipynb

changed \\rho  to $\rho$ in the visualization markdown cell of statevector backend

* Added line before plot_state_city

* Matched code block order of functions to list

* Fix typo in density matrix designation on tutorials/circuits/1_getting_started_with_qiskit.ipynb

* Fix a typo

* Update 1_getting_started_with_qiskit.ipynb

fix markdown syntax to resolve Qiskit/qiskit-tutorials#975

* Remove broken line from transpiler passes tutorial

The transpiler passes tutorial was previously replacing the 'properties'
attribute of the FakeTokyo backend with an empty dictionary {}. However,
this is a type violation as properties is defined (and has been for a
very long time) as a method in the base abstract backend class. [1] This
didn't block anything because nothing the call path of the notebook was
using properties as a callable before. But in terra 0.15.0 this has
changed and backend.properties() is accessed in the setup for a
transpilation and this is causing a failure. This commit removes the use
overloading of the attribute as it doesn't seem to serve a purpose
anymore (I presume it was there for when NoiseAdaptiveLayout was in
level 3) which will unblock #998

[1] https://github.com/Qiskit/qiskit-terra/blob/master/qiskit/providers/basebackend.py#L65

* rm usage of deprecated gate locations

* Correction in quantum register declaration for composite Gates exampl… (Qiskit/qiskit-tutorials#996)

* Correction in quantum register declaration for composite Gates example. q --> qr.

* Correction in quantum register declaration for composite Gates examples.

* Resolved deprecation warnings in transpiler tutorial notebook (Qiskit/qiskit-tutorials#999)

* Fixed issue 987 by updating 1_getting_started_with_qiskit.ipynb notebook (Qiskit/qiskit-tutorials#1009)

Co-authored-by: Paul Nation <nonhermitian@gmail.com>

* Fix a typo in the summary quantum operations tutorial notebook (Qiskit/qiskit-tutorials#1015)

* Gradient notebook (Qiskit/qiskit-tutorials#1053)

* Update qgans_for_loading_random_distributions.ipynb

* move qGAN tutorial from legacy_tutorials to tutorials

* Update qgans_for_loading_random_distributions.ipynb

* Remove Torch import

* change Kernel

* Update qgans_for_loading_random_distributions.ipynb

* include gradient module tutorial

* update naming -> gradient framework

* update gradient tutorial

* update gradient framework, delete black picture

* fix typos

* Update 02_gradients_framework.ipynb

- minor fixes
- rename to `02_gradients...` to prepare for `01_operator_flow...`

* use circuit instead of circuitfactory

* Update 02_gradients_framework.ipynb

Co-authored-by: Paul Nation <nonhermitian@gmail.com>
Co-authored-by: Cryoris <jules.gacon@googlemail.com>
Co-authored-by: Stefan Woerner <WOR@zurich.ibm.com>

* Add new line for list to be rendered properly

The two lists are not being rendered as lists so we add an extra newline for it to behave properly.

* Fixed issue 1065 by correcting the typo

* Combine advanced circuits and pulse (Qiskit/qiskit-tutorials#1086)

* Combine advanced circuits and pulse

* remove pulse from toc

* fix numbering for proper globing

* Remove deprecated DAGCircuit method usage. (Qiskit/qiskit-tutorials#1093)

* Reindex and rename files

* Add new page about pulse gates

* Modify existing files

* Add note about openpulse being enabled for pulse gates

* Add note about scheduling

* Run pulse gates on 0.16.2

* Add Aqua operators tutorial (Qiskit/qiskit-tutorials#1068)

* Add Aqua operators tutorial

* Make corrections and changes in PR review
	modified:   tutorials/operators/01_operator_flow.ipynb

* Add table of contents

* Remove duplicate H1 header

Co-authored-by: Paul Nation <nonhermitian@gmail.com>

* Execute on terra version 0.16.2

* Terra is removing deprecated interactive visualizations (Qiskit/qiskit-tutorials#1142)

* move iplot to plot

* remove the cells explaining the iplots

* Add usage of backend in pulse builder. (Qiskit/qiskit-tutorials#1134)

* fix math mode (Qiskit/qiskit-tutorials#1150)

* Fixed Some Minor bugs in tutorials  (Qiskit/qiskit-tutorials#1149)

* Fixed minor typo

* Fixed a minor typo

* Update 08_gathering_system_information.ipynb

Co-authored-by: Paul Nation <nonhermitian@gmail.com>

* Removed a Unused Variable in 02_gradients_framework.ipynb (Qiskit/qiskit-tutorials#1151)

* Deleting for adding new one

* Added with fixed Issue

* Rename 02_gradients_framework (1).ipynb to 02_gradients_framework.ipynb

* Editing the initial tutorial with updates to show circuit basics. (Qiskit/qiskit-tutorials#1161)

* Editing the initial tutorial with updates to show circuit basics.

* for paul

* small update

Co-authored-by: Paul Nation <nonhermitian@gmail.com>

* Fix math mode, toc, and spelling of several sections (Qiskit/qiskit-tutorials#1152)

* fix math mode of tutorials/circuits_advanced/09_pulse_simulator_duffing_model.ipynb

* fix toc of tutorials of operator flow

* simplify

* remove toc of tutorials of circuits_advanced

* fix toc of 06_building_pulse_schedules

* fix math mode

* fix math mode and code style in a link

* fix sum, sin, and cos

* fix typos

* Backend should run transpiled circuit (Qiskit/qiskit-tutorials#1170)

In the basic circuit tutorial the circuit to be executed is transpiled, but the
non-transpiled circuit is then run.

* Update 2_plotting_data_in_qiskit.ipynb (Qiskit/qiskit-tutorials#1175)

Corrected a typo. There is no 'dsc' option for sort kwarg of plot_histogram.

Co-authored-by: SooluThomas <soolu.elto@gmail.com>

* Fix spelling in several simulator tutorials and math mode of opflow and grover tutorials (Qiskit/qiskit-tutorials#1163)

* Fix spelling in simulator tutorials and math mode of opflow tutorial

* Fix math mode and list of Grover tutorial

Co-authored-by: SooluThomas <soolu.elto@gmail.com>

* Remove Aqua references from notebooks (Qiskit/qiskit-tutorials#1162)

Aqua imports replaced by QIskit Terra classes.

Chemistry, Finance, Machine Learning and Optimization were
removed as all those were converted and migrated to the new application repositories

* Remove Aqua references from notebooks

* Change algorithm/operator tutorials to use Aer

* compute gradients with fixed operator

* QAOA change weights to 1 and remove get_graph_solution

* Remove parallel disable statement & print oracle

* Update Building Pulse Schedules tutorial to add some notes about in what context schedules should be used (Qiskit/qiskit-tutorials#1204)

* Removed %matplotlib inline (Qiskit/qiskit-tutorials#1200)

* Update 03_advanced_circuit_visualization.ipynb (Qiskit/qiskit-tutorials#1195)

Co-authored-by: SooluThomas <soolu.elto@gmail.com>

* Added extra cell for Alternative way of changing array to latex (Qiskit/qiskit-tutorials#1193)

* Added extra cell for Alternative way of changing array to latex

* Fixed execution count issue

Co-authored-by: SooluThomas <soolu.elto@gmail.com>

* fist -> first (Qiskit/qiskit-tutorials#1186)

Co-authored-by: Eli Arbel <arbel@il.ibm.com>

Co-authored-by: Eli Arbel <arbel@il.ibm.com>
Co-authored-by: SooluThomas <soolu.elto@gmail.com>

* Removing `%matplotlib inline` from different tutorials  (Qiskit/qiskit-tutorials#1206)

* Removing `%matplotlib inline`

* removed matplotlib inline

* matplotlib fix

* removing `%matplotlib inline`

* more changes

* removing

Co-authored-by: Parmeet Singh <76438148+singhmeet11@users.noreply.github.com>
Co-authored-by: SooluThomas <soolu.elto@gmail.com>

* Fix typo quant-info -> quant_info module and remove extra space (Qiskit/qiskit-tutorials#1183)

Co-authored-by: SooluThomas <soolu.elto@gmail.com>

* fix json of getting_stared (Qiskit/qiskit-tutorials#1240)

* replace execute with transpile + backend.run (Qiskit/qiskit-tutorials#1243)

* replace execute with transpile + backend.run

* Update tutorials/circuits_advanced/02_operators_overview.ipynb

Co-authored-by: Kevin Krsulich <kevin@krsulich.net>

Co-authored-by: Kevin Krsulich <kevin@krsulich.net>

* fixes Qiskit/qiskit-tutorials#1214 (Qiskit/qiskit-tutorials#1215)

* Make opflow operator precendence issues more explicit (Qiskit/qiskit-tutorials#1251)

* Update pulse draw() usage (Qiskit/qiskit-tutorials#1253)

This PR updates the pulse drawer usage to be compatible with both v1 and v2 drawer.
In qiskit 0.19.0 the `Schedule.draw()` method will be updated to use the v2 drawer,
which has different arguments. The v1 usage patterns have been deprecated for some
time and this commit updates the tutorial using the drawer to generate visualizations
that work with either. This way the tutorial can be used with 0.18.x and 0.19.x.

* Update pulse draw method in gathering system information tutorial (Qiskit/qiskit-tutorials#1254)

This is a follow-up to Qiskit/qiskit-tutorials#1253 and is updating the
usage of the pulse drawer to avoid deprecated functionality.
This is a blocker of #7267 which is finishing
those deprecations and trying to remove the deprecated usage
patterns.

* Fix small render error (Qiskit/qiskit-tutorials#1278)

Fix small render error in 02_operators_overview.ipynb

* Capital letter (Qiskit/qiskit-tutorials#1288)

Capital letter

* apital Letter

* Capital Letter (Qiskit/qiskit-tutorials#1290)

Capital Letter

Co-authored-by: Luciano Bello <bel@zurich.ibm.com>

* Fix deprecated ref to node.condition

* Typo for identity gate

Fixes typo of "The identity gate is $Id = u0(1)$."
It should be "The identity gate is $Id = u1(0)$."

* Minor improvements to opflow tutorial

* the draw method -> the `draw()` method (Qiskit/qiskit-tutorials#1296)

* Update 03_advanced_circuit_visualization.ipynb

* Update tutorials/circuits_advanced/03_advanced_circuit_visualization.ipynb

Co-authored-by: Jim Garrison <jim@garrison.cc>

Co-authored-by: Junye Huang <h.jun.ye@gmail.com>
Co-authored-by: Jim Garrison <jim@garrison.cc>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Fix Qasmsimulator deprecation warnings (Qiskit/qiskit-tutorials#1305)

* Fix Qasmsimulator deprecation warnings

* imported AerSimulator instead of importing Aer

Co-authored-by: SooluThomas <soolu.elto@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Fixed typo of C_{U} and Controlled Z gate (Qiskit/qiskit-tutorials#1313)

* Fixed typo of C_{U}

Fixed typo of C_{U}:
"$$C_{(jk), (lm)} = \\left(\\underset{\\text{qubit}~1}{\\left\\langle j \\right|} \\otimes \\underset{\\text{qubit}~0}{\\left\\langle k \\right|}\\right) C_{U} \\left(\\underset{\\text{qubit}~1}{\\left| l \\right\\rangle} \\otimes \\underset{\\text{qubit}~0}{\\left| k \\right\\rangle}\\right),$$\n"

It should be 

"$$C_{(jk), (lm)} = \\left(\\underset{\\text{qubit}~1}{\\left\\langle j \\right|} \\otimes \\underset{\\text{qubit}~0}{\\left\\langle k \\right|}\\right) C_{U} \\left(\\underset{\\text{qubit}~1}{\\left| l \\right\\rangle} \\otimes \\underset{\\text{qubit}~0}{\\left| m \\right\\rangle}\\right),$$\n"

* Fix typo of Controlled Z gate

Fix typo of Controlled Z gate:
"#### Controlled $Z$ (or, controlled Phase) gate\n"

It should be
"#### Controlled $Z$ (or, controlled Phase-Flip) gate\n"

ref:
Page 319
Michael A. Nielsen, Isaac L. Chuang, Quantum Computation and Quantum Information, 2010

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Qiskit/qiskit-tutorials#1310 fix (Qiskit/qiskit-tutorials#1319)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Fixing Qiskit/qiskit-tutorials#1326 (Qiskit/qiskit-tutorials#1327)

I adjusted the heading for Visualizing the circuit to what appears to be the correct level.

* Update of Deprecated U and CU gates in 3_summary_of_quantum_operations.ipynb (Qiskit/qiskit-tutorials#1329)

* Initial fixes for Issue 1314

* Updating missed u1 gate conversion

* Addressing comment in PR changing pi/4

* Addressing PR comments on 1329

* Adding missing listing of P gate

* Updating U gate matrix representation

* Updating note on U-gate deprecation Qiskit/qiskit-tutorials#1330 (Qiskit/qiskit-tutorials#1333)

* Updating note on U-gate deprecation Qiskit/qiskit-tutorials#1330

* Typo update

* Adding in formatting and code example

* Trying different html formatting

* fix alert info box

* split code

* Revert "split code"

This reverts commit d044496b8c9cc4f00ec0ddee88c03aabacf3a5c7.

* improve format

* use bullet points

Co-authored-by: Junye Huang <h.jun.ye@gmail.com>

* Update operator tutorial to avoid deprecated Pauli construction (Qiskit/qiskit-tutorials#1339)

This commit updates the operator tutorial to avoid the deprecated Pauli
constructor kwarg, label. This has been deprecated since Qiskit Terra
0.17.0 and is pending removal in #8070. The label
kwarg isn't needed anymore as the Pauli string can just be input
directly as the first positional argument and the Pauli object will be
created just as with the label kwarg before.

* Update pulse gate tutorial for changes in fake backends

In #8665 very large pulse properties for long retired
20q backends are removed to save disk space and reduce overhead. However
the pulse gates tutorial was still relying on these fake backends having
pulse properties. This commit updates the tutorial to use a different
backend to unblock that PR. Additionally, the deprecate import
statements used in the tutorial are updated to avoid the deprecation
warning.

* Update more pulse gate tutorial for changes in fake backends (Qiskit/qiskit-tutorials#1358)

* Update more pulse gate tutorial for changes in fake backends

In #8665 very large pulse properties for long
retired 20q backends are removed to save disk space and reduce
overhead. However the pulse gates tutorial was still relying on
these fake backends having pulse properties. This commit updates
the tutorial to use a different backend to unblock that PR.
Additionally, the deprecate import statements used in the tutorial
are updated to avoid the deprecation warning.

We previously updated one tutorial in Qiskit/qiskit-tutorials#1356 however there were more uses
of FakeAlmaden in other tutorials so things were still blocked. This
commit updates all the other uses of FakeAlmaden to use a provider that
will have pulse properties moving forward.

* Update tutorials/circuits_advanced/08_gathering_system_information.ipynb

Co-authored-by: Luciano Bello <bel@zurich.ibm.com>

* Deleted unused import (Qiskit/qiskit-tutorials#1374)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* qiskit.providers.aer is qiskit_aer in Aer 0.11 (Qiskit/qiskit-tutorials#1357)

* qiskit.providers.aer is qiskit_aer in Aer 0.11

* addressing https://github.com/Qiskit/qiskit-tutorials/pull/1357/files#r973028618

* remove 04_vqe_advanced that was already removed in master

* combine imports from the same module into one line

Co-authored-by: Junye Huang <h.jun.ye@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Small fixes of 1_getting_started_with_qiskit.ipynb (Qiskit/qiskit-tutorials#1383)

Small fixes of the tutorial 1_getting_started_with_qiskit:
- "`execute` function" --> "`run` method" in the text (in the code cells was already correct)
- "addition operator" --> "compose method" in a comment of a code cell
- there was some backtick too much, so the fix is: "``" --> "`" (for example, ``job`` --> `job`)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Replace deprecated module `qiskit.test.mock` (Qiskit/qiskit-tutorials#1387)

* replace deprecated module

* replacement

* remove warning message

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* format list (Qiskit/qiskit-tutorials#1343)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* qubit {j} to qubit $Q_{j}$ more readable (Qiskit/qiskit-tutorials#1301)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Update 2_plotting_data_in_qiskit.ipynb (Qiskit/qiskit-tutorials#1297)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Fixed spelling mistake in text for Qiskit Visualizations (Qiskit/qiskit-tutorials#1448)

fix spelling mistake "use" to "used" in the paragraph describing options for the plot_histogram()

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Update note about pulse gate support (Qiskit/qiskit-tutorials#1455)

Pulse gate support is not tied to the open_pulse setting in
`backend.configuration()`.

Co-authored-by: Junye Huang <h.jun.ye@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Error on Sphinx warnings (Qiskit/qiskit-tutorials#1469)

There were two issues preventing this:

1. nbsphinx changed how it does in-page URLs now for `#` anchors.
2. Grover Examples has had a bad thumbnail. I thought it would be fixed
by Qiskit/qiskit-tutorials#1466, but the error
still exists, so I think this has always been an issue.

* Fix typo in 01_circuit_basics.ipynb (Qiskit/qiskit-tutorials#1474)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary

Fixed typo.

### Details and comments
intial -> initial

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* qiskit.test.mock is deprecated (Qiskit/qiskit-tutorials#1349)

DeprecationWarning: The module 'qiskit.test.mock' is deprecated since
Qiskit Terra 0.21.0, and will be removed 3 months or more later.
Instead, you should import the desired object directly
'qiskit.providers.fake_provider'.
#from qiskit.test.mock import FakeVigo --> 
from qiskit.providers.fake_provider import FakeVigo
(https://qiskit.org/documentation/apidoc/providers_fake_provider.html)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
DeprecationWarning: The module 'qiskit.test.mock'


### Details and comments
DeprecationWarning: The module 'qiskit.test.mock' is deprecated since
Qiskit Terra 0.21.0, and will be removed 3 months or more later.
Instead, you should import the desired object directly
'qiskit.providers.fake_provider'.
#from qiskit.test.mock import FakeVigo -->
from qiskit.providers.fake_provider import FakeVigo
(https://qiskit.org/documentation/apidoc/providers_fake_provider.html)

---------

Co-authored-by: Junye Huang <h.jun.ye@gmail.com>
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>

* Remove empty cell from 02_gradients_framework.ipynb (Qiskit/qiskit-tutorials#1236)

Remove empty cell at bottom of notebook

### Summary

Empty cell serves no purpose. 


### Details and comments

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>

* Clarify misleading description of a layer of operations. (Qiskit/qiskit-tutorials#1165)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ Also, please add it in the CHANGELOG file under Unreleased section.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
Fixing layer description in "Implementing a BasicMapper Pass"


### Details and comments
Original sentence stated "each layer is a group of operations that does
not act on independent qubits, so in theory all operations in a layer
can be done independently", which is incorrect. Every layer is a group
of operations specifically acting on separate qubits each. The new
sentence clarifies that with "each layer is a group of operations acting
on independent qubits..."

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>

* Fixes Broken links (Qiskit/qiskit-tutorials#1488)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
I have coded a script which (when directory is specified) checks for the
broken links in the Jupyter notebooks and tells its exact place and the
error it shows.
```
import os
import nbformat as nbf
import re
import requests
# Code to populate file_list with relevant .ipynb files
file_list = []

for root, dirs, files in os.walk("qiskit-tutorials/tutorials/"):
    for file in files:
        if file.endswith(".ipynb"):
            file_list.append(os.path.join(root, file))  # Including the relative path of the file

INLINE_LINK_RE = re.compile(r'\[([^\]]+)\]\(([^)]+)\)')
for file_path in file_list:
    try:
        with open(file_path) as file:
            nb = nbf.read(file, 4)
    except OSError as e:
        print(f"Error occurred while reading file: {file_path}")
        print("Error message:", str(e))
        print()
        continue

    for cell in nb["cells"]:
        if cell["cell_type"] != "markdown":
            continue
        links = list(INLINE_LINK_RE.findall(cell["source"]))
        for link in links:
            if not link:
                continue
            link_text, link_url = link
            if link_url.lower().endswith(('.png', '.jpg', '.jpeg', '.gif')):
                continue  # Skip image links
            try:
                response = requests.get(link_url)
                if response.status_code != 200:
                    print(f"Broken link found in file: {file_path}")
                    print(f"Link: {link_text}")
                    print(f"URL: {link_url}")
                    print("HTTP status code:", response.status_code)
                    print()
            except requests.RequestException as e:
                print(f"Error occurred while checking link in file: {file_path}")
                print(f"Link: {link_text}")
                print(f"URL: {link_url}")
                print("Error message:", str(e))
                print()

```

### Details and comments

This code is part of QAMP Project [Issues in Qiskit Tutorials
Qiskit/qiskit-tutorials#37](qiskit-advocate/qamp-spring-23#37)
which can read many files at once and can find broken links with their
exact position and error code it is showing.

I ran this above code throughout the repo and checked each and every
Jupyter notebook files, based on the output I have fixed many links.
This PR is just the Last PR of the of project, which fixes the remaining
broken links. All the other broken links are already fixed in the past
PRs which are made throughout this project. Qiskit/qiskit-tutorials#1445 Qiskit/qiskit-tutorials#1446 Qiskit/qiskit-tutorials#1467 Qiskit/qiskit-tutorials#1483
Qiskit/qiskit-tutorials#1484.
This project also fixes Qiskit/qiskit-tutorials#1402

* fix missing backticks for plot_histogram() (Qiskit/qiskit-tutorials#1480)

### Summary
The function plot_histogram() in the text should be `plot_histogram()`


### Details and comments

---------

Co-authored-by: Eric Arellano <ericarellano@me.com>

* Closes Qiskit/qiskit-tutorials#1189 Replacing 'state matrix' by 'density matrix' (Qiskit/qiskit-tutorials#1196)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ Also, please add it in the CHANGELOG file under Unreleased section.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
As described in issue Qiskit/qiskit-tutorials#1189, "state matrix" has been replaced by
"density matrix" in `plot_state_city` and
`plot_state_hinton` fotutorials/circuits/2_plotting_data_in_qiskit.html.
Additionally I have also changed it at other plot functions.


### Details and comments
"State matrix" has a different physical meaning and doesn't go with the
definition given in the documentation. Hence "density matrix" seems like
a better option to use instead of "state matrix".

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>

* Fixed a code typo in 02_operators_overview.ipynb (Qiskit/qiskit-tutorials#1231)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ Also, please add it in the CHANGELOG file under Unreleased section.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
Fix a typo, in cell with description "# Compose YX in front of the
previous operator". The code compose XZ in front of the previous
operator, while it should be YX.


### Details and comments
`op.compose(XZ, qargs=[0, 2], front=True)` is changed with
`op.compose(YX, qargs=[0, 2], front=True)`, and add the correct output.

---------

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>

* Fix unit sphere notation in 3_summary_of_quantum_operations.ipynb (Qiskit/qiskit-tutorials#1493)

Change the unit sphere notation to $\\mathbb{S}^2$

Co-authored-by: Xueyan Niu <63600514+niuxueyan@users.noreply.github.com>

* Fix typos in 04_transpiler_passes_and_passmanager.ipynb (Qiskit/qiskit-tutorials#1494)

Built on top of Qiskit/qiskit-tutorials#1239.

---------

Co-authored-by: Bochen "Daniel" Tan <33230390+tbcdebug@users.noreply.github.com>

* Remove placeholders and prepare_tutorials.bash

* Update tutorials with the latest builds

---------

Co-authored-by: Paul Nation <nonhermitian@gmail.com>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: 3yakuya <3yakuya@outlook.com>
Co-authored-by: Sristy Sangskriti <sristysangskriti007@gmail.com>
Co-authored-by: Vismai Khanderao <59114226+Vismai-Khanderao@users.noreply.github.com>
Co-authored-by: zodiacfireworks <martin.vuelta@gmail.com>
Co-authored-by: Wei Hu <wei.hu@kfquantum.com>
Co-authored-by: gunchamalik <gunchamalik@gmail.com>
Co-authored-by: Julien Gacon <jul@zurich.ibm.com>
Co-authored-by: Emixem <64846036+Emixem@users.noreply.github.com>
Co-authored-by: wagnersj <wagnerse@ca.ibm.com>
Co-authored-by: Bruno E. Ramírez Galindo <47431792+brunormzg@users.noreply.github.com>
Co-authored-by: Alejandro Martinez Valencia <66115896+alexini-mv@users.noreply.github.com>
Co-authored-by: Christa Zoufal <40824883+Zoufalc@users.noreply.github.com>
Co-authored-by: Cryoris <jules.gacon@googlemail.com>
Co-authored-by: Stefan Woerner <WOR@zurich.ibm.com>
Co-authored-by: Azeem Bande-Ali <A.BandeAli@gmail.com>
Co-authored-by: Peter J <peter.j@kakao.com>
Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com>
Co-authored-by: Lauren Capelluto <lcapelluto@users.noreply.github.com>
Co-authored-by: John Lapeyre <jlapeyre@users.noreply.github.com>
Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
Co-authored-by: Thomas Alexander <talexander@ibm.com>
Co-authored-by: Takashi Imamichi <31178928+t-imamichi@users.noreply.github.com>
Co-authored-by: Divyanshu Singh <55018955+divshacker@users.noreply.github.com>
Co-authored-by: Jay M. Gambetta <jay.gambetta@us.ibm.com>
Co-authored-by: jaleipekoglu <47296000+jaleipekoglu@users.noreply.github.com>
Co-authored-by: SooluThomas <soolu.elto@gmail.com>
Co-authored-by: Manoel Marques <manoel@us.ibm.com>
Co-authored-by: Eli Arbel <arbel@il.ibm.com>
Co-authored-by: Parmeet Singh <76438148+singhmeet11@users.noreply.github.com>
Co-authored-by: Aurélien Pupier <apupier@redhat.com>
Co-authored-by: Ali Javadi-Abhari <ali.javadi@ibm.com>
Co-authored-by: Kevin Krsulich <kevin@krsulich.net>
Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
Co-authored-by: Naoki Kanazawa <39517270+nkanazawa1989@users.noreply.github.com>
Co-authored-by: Claudia Zendejas-Morales <ing.claudia@gmail.com>
Co-authored-by: Glen <96159532+NG-Glen@users.noreply.github.com>
Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
Co-authored-by: Edwin Navarro <enavarro@comcast.net>
Co-authored-by: Chih-Han Huang <robin.ch.huang@gmail.com>
Co-authored-by: James R. Garrison <garrison@ibm.com>
Co-authored-by: Junye Huang <h.jun.ye@gmail.com>
Co-authored-by: Jim Garrison <jim@garrison.cc>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Kazuki Tsuoka <103920010+king-p3nguin@users.noreply.github.com>
Co-authored-by: InfamousPlatypus <45645300+InfamousPlatypus@users.noreply.github.com>
Co-authored-by: Patrick Downing <19316277+padraignix@users.noreply.github.com>
Co-authored-by: Filippo Tramonto <11334590+filippotramonto@users.noreply.github.com>
Co-authored-by: Kazuki Tsuoka <kazukitsuoka@g.ecc.u-tokyo.ac.jp>
Co-authored-by: Emil Magni <emilmagni@gmail.com>
Co-authored-by: Will Shanks <wshaos@posteo.net>
Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
Co-authored-by: Mehmet Keçeci <WhiteSymmetry@users.noreply.github.com>
Co-authored-by: Abdulah Amer <42150112+AbdulahAmer@users.noreply.github.com>
Co-authored-by: Kuba Pilch <6464505+3yakuya@users.noreply.github.com>
Co-authored-by: Soon Teh <11854984+soon-teh@users.noreply.github.com>
Co-authored-by: Shilpa Mahato <61791872+shil-m@users.noreply.github.com>
Co-authored-by: Elbert <67720913+elberttl@users.noreply.github.com>
Co-authored-by: Xueyan Niu <63600514+niuxueyan@users.noreply.github.com>
Co-authored-by: Bochen "Daniel" Tan <33230390+tbcdebug@users.noreply.github.com>
Eric-Arellano added a commit to Eric-Arellano/qiskit-terra that referenced this issue Sep 8, 2023
…ity matrix' (Qiskit/qiskit-tutorials#1196)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ Also, please add it in the CHANGELOG file under Unreleased section.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
As described in issue Qiskit/qiskit-tutorials#1189, "state matrix" has been replaced by
"density matrix" in `plot_state_city` and
`plot_state_hinton` fotutorials/circuits/2_plotting_data_in_qiskit.html.
Additionally I have also changed it at other plot functions.


### Details and comments
"State matrix" has a different physical meaning and doesn't go with the
definition given in the documentation. Hence "density matrix" seems like
a better option to use instead of "state matrix".

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Eric-Arellano added a commit to Qiskit/documentation that referenced this issue Oct 6, 2023
…ity matrix' (Qiskit/qiskit-tutorials#1196)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ Also, please add it in the CHANGELOG file under Unreleased section.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
As described in issue Qiskit/qiskit-tutorials#1189, "state matrix" has been replaced by
"density matrix" in `plot_state_city` and
`plot_state_hinton` fotutorials/circuits/2_plotting_data_in_qiskit.html.
Additionally I have also changed it at other plot functions.


### Details and comments
"State matrix" has a different physical meaning and doesn't go with the
definition given in the documentation. Hence "density matrix" seems like
a better option to use instead of "state matrix".

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Eric-Arellano added a commit to Qiskit/documentation that referenced this issue Oct 9, 2023
…ity matrix' (Qiskit/qiskit-tutorials#1196)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ Also, please add it in the CHANGELOG file under Unreleased section.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
As described in issue Qiskit/qiskit-tutorials#1189, "state matrix" has been replaced by
"density matrix" in `plot_state_city` and
`plot_state_hinton` fotutorials/circuits/2_plotting_data_in_qiskit.html.
Additionally I have also changed it at other plot functions.


### Details and comments
"State matrix" has a different physical meaning and doesn't go with the
definition given in the documentation. Hence "density matrix" seems like
a better option to use instead of "state matrix".

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Eric-Arellano added a commit to Qiskit/documentation that referenced this issue Oct 9, 2023
…ity matrix' (Qiskit/qiskit-tutorials#1196)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ Also, please add it in the CHANGELOG file under Unreleased section.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
As described in issue Qiskit/qiskit-tutorials#1189, "state matrix" has been replaced by
"density matrix" in `plot_state_city` and
`plot_state_hinton` fotutorials/circuits/2_plotting_data_in_qiskit.html.
Additionally I have also changed it at other plot functions.


### Details and comments
"State matrix" has a different physical meaning and doesn't go with the
definition given in the documentation. Hence "density matrix" seems like
a better option to use instead of "state matrix".

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Something is not clear or error in description
Projects
None yet
Development

No branches or pull requests

3 participants