Skip to content

Commit

Permalink
add style parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
abbycross committed Feb 2, 2024
1 parent 5f0717a commit ac13ad8
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 23 deletions.
14 changes: 7 additions & 7 deletions docs/build/circuit-library.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"source": [
"from qiskit.circuit.library import TwoLocal\n",
"two_local = TwoLocal(3, 'rx', 'cz')\n",
"two_local.decompose().draw('mpl')"
"two_local.decompose().draw('mpl', style=\"iqp\")"
]
},
{
Expand Down Expand Up @@ -114,7 +114,7 @@
],
"source": [
"bound_circuit = two_local.assign_parameters({ p: 0 for p in two_local.parameters})\n",
"bound_circuit.decompose().draw('mpl')"
"bound_circuit.decompose().draw('mpl', style=\"iqp\")"
]
},
{
Expand Down Expand Up @@ -165,7 +165,7 @@
"feature_map = ZZFeatureMap(feature_dimension=len(features))\n",
"\n",
"encoded = feature_map.assign_parameters(features)\n",
"encoded.draw('mpl')"
"encoded.draw('mpl', style=\"iqp\")"
]
},
{
Expand Down Expand Up @@ -220,7 +220,7 @@
"# Evolve state by appending the evolution gate\n",
"state.compose(evolution, inplace=True)\n",
"\n",
"state.draw('mpl')"
"state.draw('mpl', style=\"iqp\")"
]
},
{
Expand Down Expand Up @@ -265,7 +265,7 @@
],
"source": [
"from qiskit.circuit.library import QuantumVolume\n",
"QuantumVolume(4).decompose().draw('mpl')"
"QuantumVolume(4).decompose().draw('mpl', style=\"iqp\")"
]
},
{
Expand Down Expand Up @@ -334,7 +334,7 @@
"# register B, so we'll measure those qubits.\n",
"circuit = circuit.compose(number_a, qubits=reg_a).compose(number_b, qubits=reg_b).compose(adder)\n",
"circuit.measure(reg_b, reg_result)\n",
"circuit.draw('mpl')"
"circuit.draw('mpl', style=\"iqp\")"
]
},
{
Expand Down Expand Up @@ -416,7 +416,7 @@
"qc = QuantumCircuit(4)\n",
"qc.append(hadamard_gate, [0])\n",
"qc.append(mcx_gate, [0,1,2,3])\n",
"qc.draw('mpl')"
"qc.draw('mpl', style=\"iqp\")"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/build/circuit-visualization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
],
"source": [
"# Matplotlib drawing\n",
"circuit.draw(output='mpl')"
"circuit.draw(output='mpl', style=\"iqp\")"
]
},
{
Expand Down Expand Up @@ -237,7 +237,7 @@
],
"source": [
"# Draw the circuit\n",
"circuit.draw(output='mpl')"
"circuit.draw(output='mpl', style=\"iqp\")"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/build/interoperate-qiskit-qasm3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ program = """
out = measure q;
"""
circuit = qiskit.qasm3.loads(program)
circuit.draw("mpl")
circuit.draw("mpl", style="iqp")
```
![output](/images/build/interoperate-qiskit-qasm3/qasm3circ.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/build/operators-overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@
"circ = QuantumCircuit(2, 2)\n",
"circ.append(XX, [0, 1])\n",
"circ.measure([0,1], [0,1])\n",
"circ.draw('mpl')"
"circ.draw('mpl', style=\"iqp\")"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/build/pulse.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"circ.measure(0, 0)\n",
"circ.measure(1, 1)\n",
"\n",
"circ.draw('mpl')"
"circ.draw('mpl', style=\"iqp\")"
]
},
{
Expand Down Expand Up @@ -219,7 +219,7 @@
"circ.append(custom_gate, [0])\n",
"circ.measure(0, 0)\n",
"\n",
"circ.draw('mpl')"
"circ.draw('mpl', style=\"iqp\")"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/transpile/defaults-and-configuration-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ qc = qc.compose(GroverOperator(oracle))
qc.measure_all()

# View the circuit
qc.draw(output='mpl')
qc.draw(output='mpl', style="iqp")
```

![Original circuit](/images/transpile/defaults-and-configuration-options/original-circuit.png "Original circuit")
Expand All @@ -47,7 +47,7 @@ backend = FakeSherbrooke()
transpiled_circ = transpile(qc, backend)

# View the transpiled circuit
transpiled_circ.draw(output='mpl')
transpiled_circ.draw(output='mpl', style="iqp")
```

![Transpiled circuit](/images/transpile/defaults-and-configuration-options/transpiled-circuit.png "Transpiled circuit")
Expand Down
2 changes: 1 addition & 1 deletion docs/transpile/set-optimization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ rand_U = UnitaryGate(UU)
qc = QuantumCircuit(2)
qc.append(rand_U, range(2))
qc.swap(0, 1)
qc.draw('mpl')
qc.draw('mpl', style="iqp")
```
![Original abstract circuit](/images/transpile/defaults-and-configuration-options/abstract-circ.png "Original abstract circuit")

Expand Down
6 changes: 3 additions & 3 deletions docs/transpile/transpiler-stages.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
"print(\"native gates:\" + str(backend.operation_names))\n",
"qc = QuantumCircuit(2)\n",
"qc.swap(0, 1)\n",
"qc.decompose().draw('mpl')"
"qc.decompose().draw('mpl', style=\"iqp\")"
]
},
{
Expand Down Expand Up @@ -258,7 +258,7 @@
"source": [
"qc = QuantumCircuit(3)\n",
"qc.ccx(0, 1, 2)\n",
"qc.decompose().draw('mpl')"
"qc.decompose().draw('mpl', style=\"iqp\")"
]
},
{
Expand Down Expand Up @@ -444,7 +444,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.1"
"version": "3.12.0"
},
"title": "Transpiler stages",
"widgets": {
Expand Down
4 changes: 2 additions & 2 deletions docs/verify/simulate-with-qiskit-primitives.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ from qiskit import QuantumCircuit
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0,1)
qc.draw("mpl")
qc.draw("mpl", style="iqp")
```

![Initial QuantumCircuit](/images/verify/simulate-with-qiskit-primitives/estimator-initialize.png "Initial QuantumCircuit")
Expand Down Expand Up @@ -267,7 +267,7 @@ qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0,1)
qc.measure_all()
qc.draw("mpl")
qc.draw("mpl", style="iqp")
```

![Initial QuantumCircuit](/images/verify/simulate-with-qiskit-primitives/sampler-initialize.png "Initial QuantumCircuit")
Expand Down
4 changes: 2 additions & 2 deletions docs/verify/using-ibm-quantum-simulators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ qc.cp(theta,0,1)
qc.h(0)
qc.measure(0,0)

qc.draw('mpl')
qc.draw('mpl', style="iqp")
```

![](/images/qiskit-ibm-runtime/noisy-sim-circuit.png)
Expand Down Expand Up @@ -109,7 +109,7 @@ The Estimator binds single-qubit rotations to get Hamiltonians before it returns

``` python
qc_no_meas = qc.remove_final_measurements(inplace=False)
qc_no_meas.draw('mpl')
qc_no_meas.draw('mpl', style="iqp")
```

![](/images/qiskit-ibm-runtime/noisy-sim-estimator-circuit.png)
Expand Down

0 comments on commit ac13ad8

Please sign in to comment.