Skip to content

Commit

Permalink
add circuit draw style to avoid warning
Browse files Browse the repository at this point in the history
  • Loading branch information
coruscating committed Nov 5, 2023
1 parent 205fb20 commit 1fa4251
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 20 deletions.
6 changes: 3 additions & 3 deletions docs/manuals/characterization/tphi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ relaxation time estimate. We can see that the component experiments of the batch
.. jupyter-execute::

exp = Tphi(physical_qubits=(0,), delays_t1=delays_t1, delays_t2=delays_t2, num_echoes=1)
exp.component_experiment(0).circuits()[-1].draw("mpl")
exp.component_experiment(0).circuits()[-1].draw(output="mpl", style="iqp")

.. jupyter-execute::

exp.component_experiment(1).circuits()[-1].draw("mpl")
exp.component_experiment(1).circuits()[-1].draw(output="mpl", style="iqp")

Run the experiment and print results:

Expand Down Expand Up @@ -94,7 +94,7 @@ experiment:
t2type="ramsey",
osc_freq=1e5)

exp.component_experiment(1).circuits()[-1].draw("mpl")
exp.component_experiment(1).circuits()[-1].draw(output="mpl", style="iqp")

Run and display results:

Expand Down
6 changes: 3 additions & 3 deletions docs/manuals/verification/randomized_benchmarking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -215,20 +215,20 @@ The default RB circuit output shows Clifford blocks:
# Run an RB experiment on qubit 0
exp = StandardRB(physical_qubits=(0,), lengths=[2], num_samples=1, seed=seed)
c = exp.circuits()[0]
c.draw("mpl")
c.draw(output="mpl", style="iqp")

You can decompose the circuit into underlying gates:

.. jupyter-execute::

c.decompose().draw("mpl")
c.decompose().draw(output="mpl", style="iqp")

And see the transpiled circuit using the basis gate set of the backend:

.. jupyter-execute::

from qiskit import transpile
transpile(c, backend, **vars(exp.transpile_options)).draw("mpl", idle_wires=False)
transpile(c, backend, **vars(exp.transpile_options)).draw(output="mpl", style="iqp", idle_wires=False)
.. note::
In 0.5.0, the default value of ``optimization_level`` in ``transpile_options`` changed
Expand Down
10 changes: 5 additions & 5 deletions docs/tutorials/calibrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Instantiate the experiment and draw the first circuit in the sweep:
.. jupyter-execute::

circuit = spec.circuits()[0]
circuit.draw(output="mpl")
circuit.draw(output="mpl", style="iqp")

We can also visualize the pulse schedule for the circuit:

Expand Down Expand Up @@ -225,7 +225,7 @@ with different amplitudes.

.. jupyter-execute::

rabi.circuits()[0].draw("mpl")
rabi.circuits()[0].draw(output="mpl", style="iqp")

After the experiment completes the value of the amplitudes in the calibrations
will automatically be updated. This behaviour can be controlled using the ``auto_update``
Expand Down Expand Up @@ -316,7 +316,7 @@ negative amplitude.
from qiskit_experiments.library import RoughDragCal
cal_drag = RoughDragCal([qubit], cals, backend=backend, betas=np.linspace(-20, 20, 25))
cal_drag.set_experiment_options(reps=[3, 5, 7])
cal_drag.circuits()[5].draw(output='mpl')
cal_drag.circuits()[5].draw(output="mpl", style="iqp")

.. jupyter-execute::

Expand Down Expand Up @@ -393,7 +393,7 @@ over/under rotations is the highest.

overamp_exp = FineXAmplitude((qubit,), backend=backend)
overamp_exp.set_transpile_options(inst_map=inst_map)
overamp_exp.circuits()[4].draw(output='mpl')
overamp_exp.circuits()[4].draw(output="mpl", style="iqp")

.. jupyter-execute::

Expand Down Expand Up @@ -460,7 +460,7 @@ error which we want to correct.
from qiskit_experiments.library import FineSXAmplitudeCal

amp_cal = FineSXAmplitudeCal((qubit,), cals, backend=backend, schedule_name="sx")
amp_cal.circuits()[4].draw(output="mpl")
amp_cal.circuits()[4].draw(output="mpl", style="iqp")

Let's run the calibration experiment:

Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/custom_experiment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ Let's use a GHZ circuit as the input:
for i in range(1, nq):
qc.cx(i-1, i)

qc.draw("mpl")
qc.draw(output="mpl", style="iqp")

Check that the experiment is appending a random Pauli and measurements as expected:

Expand All @@ -586,7 +586,7 @@ Check that the experiment is appending a random Pauli and measurements as expect

# Run ideal randomized meas experiment
exp = RandomizedMeasurement(qc, num_samples=num_samples)
exp.circuits()[0].draw("mpl")
exp.circuits()[0].draw(output="mpl", style="iqp")

We now run the experiment with a GHZ circuit on an ideal backend, which produces nearly
perfect symmetrical results between :math:`|0000\rangle` and :math:`|1111\rangle`:
Expand Down Expand Up @@ -640,4 +640,4 @@ unaffected by the added randomized measurements, which use its own classical reg
qc.cx(i-1, i)

exp = RandomizedMeasurement(qc, num_samples=num_samples)
exp.circuits()[0].draw("mpl")
exp.circuits()[0].draw(output="mpl", style="iqp")
12 changes: 6 additions & 6 deletions docs/tutorials/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ first and last circuits for our :math:`T_1` experiment:
.. jupyter-execute::

print(delays)
exp.circuits()[0].draw(output='mpl')
exp.circuits()[0].draw(output="mpl", style="iqp")

.. jupyter-execute::

exp.circuits()[-1].draw(output='mpl')
exp.circuits()[-1].draw(output="mpl", style="iqp")

As expected, the delay block spans the full range of time values that we specified.

Expand Down Expand Up @@ -331,11 +331,11 @@ child experiments can be accessed via the

.. jupyter-execute::

parallel_exp.component_experiment(0).circuits()[0].draw(output='mpl')
parallel_exp.component_experiment(0).circuits()[0].draw(output="mpl", style="iqp")

.. jupyter-execute::

parallel_exp.component_experiment(1).circuits()[0].draw(output='mpl')
parallel_exp.component_experiment(1).circuits()[0].draw(output="mpl", style="iqp")

Similarly, the child analyses can be accessed via :meth:`.CompositeAnalysis.component_analysis` or via
the analysis of the child experiment class:
Expand All @@ -353,7 +353,7 @@ circuits are composed together and then reassigned virtual qubit indices:

.. jupyter-execute::

parallel_exp.circuits()[0].draw(output='mpl')
parallel_exp.circuits()[0].draw(output="mpl", style="iqp")

During experiment transpilation, a mapping is performed to place these circuits on the
physical layout. We can see its effects by looking at the transpiled
Expand All @@ -363,7 +363,7 @@ and the :class:`.StandardRB` experiment's gates are on physical qubits 3 and 1.

.. jupyter-execute::

parallel_exp._transpiled_circuits()[0].draw(output='mpl')
parallel_exp._transpiled_circuits()[0].draw(output="mpl", style="iqp")

:class:`.ParallelExperiment` and :class:`.BatchExperiment` classes can also be nested
arbitrarily to make complex composite experiments.
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
qiskit-terra>=0.45.0
black~=22.0
stestr
pylint~=3.0.2
Expand Down

0 comments on commit 1fa4251

Please sign in to comment.