plot_expectation_value
- SimulationResult.plot_expectation_value(operator, shot='avg', basis='product', frame='rotating', title=None, ax=None, in_qubit_subspace=True, source=None)
Plot operator expectation values over the time evolution.
- Parameters:
operator (
Operator|ndarray|Array|str|List[Operator|ndarray|Array|str]) –Operator, square matrix, Pauli string, or list of these. Strings may includeI,X,Y,Z(qubit subspace),x,y,z,1,Msymbols (full Hilbert space).shot (
str|int) – Specify the shot by its index, or use'avg'.basis (
str) – Specify the basis, must be either'product'or'eigen'.frame (
str) – Specify the frame, must be either'lab'or'rotating'.title (
str) – Title of the plot (optional)ax (
axis) – Matplotlib axis for customization (optional)in_qubit_subspace (
bool) – IfTrueplots in the qubit subspace; ignored when any operator string contains1orM.source (
str|None) – Explicit expectation-value source forwarded toexpectation_value().
Note
X,YandZdenote the Pauli operators in the qubit subspace.x,yandzdenote the full-spin operators \(S_x\), \(S_y\) and \(S_z\).Idenotes the qubit-subspace identity while1denotes the full-spin identity.Mdenotes the full-spin \(S_z^2\) operator (corresponding to the photoluminescence signal for the NV center).