Qml.probs() with default.qubit

Hi,

When using qml.probs() at the end of a circuit, am I correct in thinking you don’t have to specify shots when using default.qubit?

And will qml.probs() also work with lightning.qubit?

Thanks again :slight_smile:

Hi @James_Ellis!

When using qml.probs() at the end of a circuit, am I correct in thinking you don’t have to specify shots when using default.qubit?

That’s right. If shots aren’t specified (and analytic=True), then the probabilities returned are exact, and computed directly from the statevector.

Instead, if analytic=False and a finite number of shots requested, then the probabilities will be estimated based on the samples generated by the device.

And will qml.probs() also work with lightning.qubit?

It will :slight_smile: