Skip to content

Commit

Permalink
Update docs (#4269)
Browse files Browse the repository at this point in the history
* Incrementing the version number to `v0.32.0-dev` (#4266)

* pre-release for v0.31.0

* Update doc/releases/changelog-0.31.0.md

* Incrementing the version number to v0.32.0-dev

* Update installation.rst (#4247)

Update Python version to 3.8

Co-authored-by: Romain Moyard <[email protected]>

* docs typos

* don't include updating versioning from master

* don't include python requirements from master

* update example output for shot_vector

* Update pennylane/operation.py

Co-authored-by: Matthew Silverman <[email protected]>

* fix entirely unrelated rendering issue

---------

Co-authored-by: Matthew Silverman <[email protected]>
Co-authored-by: Catalina Albornoz <[email protected]>
Co-authored-by: Romain Moyard <[email protected]>
  • Loading branch information
4 people authored Jun 21, 2023
1 parent fc0c3f7 commit 975d1e9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion pennylane/gradients/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ def circuit(weights):
ops = [
qml.RX(weights[0], wires=0),
qml.RY(weights[1], wires=1),
qml.CNOT(wires=[0, 1]),
qml.RX(weights[2], wires=1)]
Expand Down
2 changes: 1 addition & 1 deletion pennylane/operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ def compute_matrix(*params, **hyperparams): # pylint:disable=unused-argument
The canonical matrix is the textbook matrix representation that does not consider wires.
Implicitly, this assumes that the wires of the operator correspond to the global wire order.
.. seealso:: :meth:`.Operator.matrix` and :func:`qml.matrix`
.. seealso:: :meth:`.Operator.matrix` and :func:`qml.matrix() <pennylane.matrix>`
Args:
*params (list): trainable parameters of the operator, as stored in the ``parameters`` attribute
Expand Down
2 changes: 1 addition & 1 deletion pennylane/pulse/convenience_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def wrapped(p, t):
time = jnp.linspace(0, 10, 1000)
timespan=(2, 7)
y = qml.pulse.pwc(timespan)(params, time)
plt.plot(time, y, label=f"params={params},\ntimespan={timespan}")
plt.plot(time, y, label=f"params={params}, timespan={timespan}")
plt.legend()
plt.show()
Expand Down
2 changes: 1 addition & 1 deletion pennylane/tape/qscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class QuantumScript:
>>> s_vec = [1, 1, 2, 2, 2]
>>> qscript = QuantumScript([qml.Hadamard(0)], [qml.expval(qml.PauliZ(0))], shots=s_vec)
>>> qscript.shots.shot_vector
(ShotCopies(shots=1, copies=2), ShotCopies(shots=2, copies=3))
(ShotCopies(1 shots x 2), ShotCopies(2 shots x 3))
``ops``, ``measurements``, and ``prep`` are converted to lists upon initialization,
so those arguments accept any iterable object:
Expand Down
5 changes: 4 additions & 1 deletion pennylane/transforms/batch_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def my_transform(tape, a, b):
'''Generates two tapes, one with all RX replaced with RY,
and the other with all RX replaced with RZ.'''
ops1 = []
ops2 = []
# loop through all operations on the input tape
for op in tape._ops:
if op.name == "RX":
Expand All @@ -94,7 +97,7 @@ def my_transform(tape, a, b):
ops1.append(op)
ops2.append(op)
tape1 = qml.tape.QuantumTape(ops1, tape.measurments, tape._prep)
tape1 = qml.tape.QuantumTape(ops1, tape.measurements, tape._prep)
tape2 = qml.tape.QuantumTape(ops2, tape.measurements, tape._prep)
def processing_fn(results):
Expand Down

0 comments on commit 975d1e9

Please sign in to comment.