github PennyLaneAI/pennylane-sf v0.11.0
Release 0.11.0

latest releases: v0.29.1, v0.29.0, v0.20.1...
3 years ago

New features since last release

  • A new device, strawberryfields.remote, provides support for Xanadu's photonic hardware from within PennyLane. (#41)

    dev = qml.device('strawberryfields.remote', backend="X8", shots=10, sf_token="XXX")

    Once created, the device can be bound to photonic QNode for evaluation and training:

    @qml.qnode(dev)
    def quantum_function(theta, x):
        qml.TwoModeSqueezing(1.0, 0.0, wires=[0, 4])
        qml.TwoModeSqueezing(1.0, 0.0, wires=[1, 5])
        qml.Beamsplitter(theta, phi, wires=[0, 1])
        qml.Beamsplitter(theta, phi, wires=[4, 5])
        return qml.expval(qml.NumberOperator(0))

    Samples can also be returned from the hardware using

    return [qml.sample(qml.NumberOperator(i)) for i in [0, 1, 2, 4]]

    For more details, please see the remote device documentation

  • The Strawberry Fields devices now support returning Fock state probabilities. (#39)

    @qml.qnode(dev)
    def quantum_function(theta, x):
        qml.TwoModeSqueezing(1.0, 0.0, wires=[0, 1])
        return qml.probs(wires=0)

    If a subset of wires are requested, the marginal probabilities will be computed and returned. The returned probabilities will have the shape [cutoff] * wires.

    If not specified when instantiated, the cutoff for the Gaussian simulator is by default 10.

  • Added the ability to compute the expectation value and variance of tensor number operators (#37) (#42)

  • The Strawberry Fields devices now support custom wire labels. (#48)

    dev = qml.device('strawberryfields.gaussian', wires=['alice', 1])
    
    @qml.qnode(dev)
    def circuit(x):
        qml.Displacement(x, 0, wires='alice')
        qml.Beamsplitter(wires=['alice', 1])
        return qml.probs(wires=[0, 1])

Improvements

  • PennyLane-SF has been updated to support the latest version of Strawberry Fields (v0.15) (#44)

Contributors

This release contains contributions from (in alphabetical order):

Josh Izaac, Maria Schuld, Antal Száva

Don't miss a new pennylane-sf release

NewReleases is sending notifications on new releases.