Skip to content

Commit

Permalink
Remove kwarg prep from QuantumTape (deprecation warning).
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentmr committed Sep 6, 2023
1 parent 9453a02 commit 269e3f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -1492,16 +1492,16 @@ def test_circuit_with_stateprep(op, theta, phi, tol):
init_state = np.random.rand(2**n_qubits) + 1j * np.random.rand(2**n_qubits)
init_state /= np.sqrt(np.dot(np.conj(init_state), init_state))

prep = [qml.StatePrep(init_state, wires=range(n_qubits))]
ops = [
qml.StatePrep(init_state, wires=range(n_qubits)),
qml.RY(theta, wires=[0]),
qml.RY(phi, wires=[1]),
qml.CNOT(wires=[0, 1]),
op,
qml.QubitUnitary(U, wires=range(2, 2 + 2 * n_wires, 2)),
]
measurements = [qml.state()]
tape = qml.tape.QuantumTape(ops=ops, measurements=measurements, prep=prep)
tape = qml.tape.QuantumTape(ops=ops, measurements=measurements)
assert np.allclose(dev.execute(tape), dev_def.execute(tape), tol)

def circuit():
Expand Down

0 comments on commit 269e3f3

Please sign in to comment.