This resource function is obsolete. Use the paclet Wolfram/QuantumFramework instead.

Function Repository Resource:

QuantumMeasurementOperator

Source Notebook

Represent a discrete quantum measurement operator

Contributed by: Jonathan Gorard (with modifications by Ruhi Shah and Taufiq Murtadho)

ResourceFunction["QuantumMeasurementOperator"][<|b11e11,b12e12,|>,order,QuantumBasis[]]

represents a discrete projection-valued quantum measurement operator with (tensor products of) basis elements bij and associated matrix elements eij, applied to qudits indexed by order, defined with respect to a specified QuantumBasis.

ResourceFunction["QuantumMeasurementOperator"][<|b1o1,b2o2,|>,order,QuantumBasis[]]

represents a discrete positive operator-valued quantum measurement operator with basis elements bi and associated matrix operators oi, applied to qudits indexed by order, defined with respect to a specified QuantumBasis.

ResourceFunction["QuantumMeasurementOperator"][mat,order,QuantumBasis[]]

represents a discrete projection-valued quantum measurement operator with matrix representation mat, applied to the qudits indexed by order, defined with respect to a specified QuantumBasis.

ResourceFunction["QuantumMeasurementOperator"][ops,order,QuantumBasis[]]

represents a discrete positive operator-valued quantum measurement operator with the list of matrix operators ops, applied to the qudits indexed by order, defined with respect to a specified QuantumBasis.

ResourceFunction["QuantumMeasurementOperator"][{QuantumBasis[],eigs},order]

represents a discrete projection-valued quantum measurement operator with respect to the specified QuantumBasis, with possible outcomes/eigenvalues given by the list eigs, applied to the qudits indexed by order.

ResourceFunction["QuantumMeasurementOperator"]["name",order,pic]

represents a named discrete projection-valued quantum measurement operator "name", applied to the qudits indexed by order, with respect to the quantum mechanical picture pic.

ResourceFunction["QuantumMeasurementOperator"][{"name",d},order,pic]

represents a d-dimensional version of a named discrete projection-valued quantum measurement operator "name", applied to the qudits indexed by order, with respect to the quantum mechanical picture pic.

ResourceFunction["QuantumMeasurementOperator"][{"name",d,eigs},order,pic]

represents a discrete projection-valued quantum measurement operator with respect to a named basis "name", with possible outcomes/eigenvalues given by the list eigs, applied to the qudits indexed by order, with respect to the quantum mechanical picture pic.

ResourceFunction["QuantumMeasurementOperator"][ResourceFunction["QuantumMeasurementOperator"][],QuantumBasis[]]

transforms a specified ResourceFunction["QuantumMeasurementOperator"] into a new QuantumBasis.

ResourceFunction["QuantumMeasurementOperator"][ResourceFunction["QuantumMeasurementOperator"][],pic]

transforms a specified ResourceFunction["QuantumMeasurementOperator"] into the new quantum mechanical picture pic.

Details

When a QuantumBasis object is not specified, the default is taken to be QuantumBasis["Computational"].
When an order order is not specified, the default is taken to be Range[arity], where arity designates the arity of the ResourceFunction["QuantumMeasurementOperator"].
When a list of outcomes/eigenvalues eigs is not specified for a measurement with respect to a given quantum basis, the default is taken to be Range[0,d^arity-1], where d is the dimensionality of the qudits and arity designates the arity of the ResourceFunction["QuantumMeasurementOperator"].
The permitted values of pic in ResourceFunction["QuantumMeasurementOperator"][,pic] are "Schrodinger" (default - may also be written "Schroedinger" or "Schrödinger"), "Heisenberg", "Interaction" and "PhaseSpace".
The canonical form of a ResourceFunction["QuantumMeasurementOperator"] is ResourceFunction["QuantumMeasurementOperator"][assc,order,type,QuantumBasis[]], where type is either "Projection" or "POVM" depending upon whether the quantum measurement is projection-valued or positive operator-valued (this is generally computed automatically based upon the rank of the elements of the association assc).
ResourceFunction["QuantumMeasurementOperator"][<|b11e11,b12e12,|>,d,order], QuantumDiscreteOperator[<|b1o1,b2o2,|>,d,order], QuantumDiscreteOperator[mat,d,order] and QuantumDiscreteOperator[ops,d,order] are used to represent a discrete quantum measurement operator, specified by the Association <|b11e11,b12e12,|> (projection-valued case), the Association <|b1o1,b2o2,|> (positive operator-valued case), the matrix mat (projection-valued case) or the list of matrix operators ops (positive operator-valued case), consisting of qudits of dimensionality d (when d is not specified, the default is taken to be 2).
The Association <|b11e11,b12e12,|> for a projection-valued measurement has keys given by (tensor products of) named basis elements bij and values given by matrix elements eij (i.e. entries in the corresponding matrix representation). The Association <|b1o1,b2o2,|> for a positive operator-valued measurement has keys given by named basis elements bi and values given by matrix operators oi. The order order is always a list of positive integers.
ResourceFunction["QuantumMeasurementOperator"][]["prop"] gives the property "prop" of the specified discrete quantum measurement operator. Possible properties include:
"Operator"association <|b11e11,b12e12,|> of tensor products of basis names and matrix elements (for projection-valued measurements), or association <|b1o1,b2o2,|> of basis names and matrix operators (for positive operator-valued measurements)
"Basis"which QuantumBasis the measurement operator is defined with respect to
"Picture"which quantum mechanical picture the measurement operator is defined with respect to
"BasisElements"list of basis elements bi
"MatrixRepresentation"matrix representation mat of the measurement operator (projection-valued measurements only)
"POVMElements"list of operator matrices ops of the measurement operator (positive operator-valued measurements only)
"OrderedMatrixRepresentation"matrix representation adjusted according to the order of the measurement operator, assuming an input state containing Max[order] qudits (subsystems)
{"OrderedMatrixRepresentation",n}matrix representation adjusted according to the order of the measurement operator, assuming an input state containing n qudits (subsystems)
"OrderedPOVMElements"list of operator matrices adjusted according to the order of the measurement operator, assuming an input state containing Max[order] qudits (subsystems)
{"OrderedPOVMElements",n}list of operator matries adjusted according to the order of the measurement operator, assuming an input state containing n qudits (subsystems)
"Arity"arity of the measurement operator
"Dimensions"dimensionality of each qudit (subsystem) in the input state for the measurement operator
"Order"order in which the measurement operator should be applied to qudits (subsystems) in the input state
"HermitianQ"whether the operator is Hermitian (self-adjoint)
"UnitaryQ"whether the operator is unitary (an automorphism of Hilbert space)
"Eigenvalues"eigenvalues of the matrix representation(s) of the measurement operator
"Eigenvectors"eigenvectors of the matrix representation(s) of the measurement operator
"ProjectionQ"whether the measurement operator is projection-valued
"POVMQ"whether the measurement operator is positive operator-valued
"Properties"list of all property names
A ResourceFunction["QuantumMeasurementOperator"] can act either on a QuantumDiscreteState object (to yield a QuantumMeasurement object), or on a QuantumMeasurement object itself (to yield another QuantumMeasurement object representing the joint distribution).
A QuantumDiscreteState or QuantumMeasurement can be created with the resource functions QuantumDiscreteState and QuantumMeasurement.
ResourceFunction["QuantumMeasurementOperator"]["name"] or ResourceFunction["QuantumMeasurementOperator"][{"name",n}] represents an (n-qudit, unless otherwise specified) named discrete quantum measurement operator. Possible named operators include:
"PauliX"measurement operator based on the Pauli-X gate for qubits (equivalent to a π rotation around the x-axis of the Bloch sphere)
{"PauliX",d}measurement operator based on the Pauli-X gate for d-dimensional qudits (not Hermitian for general d>2)
"PauliY"measurement operator based on the Pauli-Y gate for qubits (equivalent to a π rotation around the y axis of the Bloch sphere)
"PauliZ"measurement operator based on the Pauli-Z gate for qubits (equivalent to a π rotation around the z axis of the Bloch sphere)
{"PauliZ",d}measurement operator based on the Pauli-Z gate for d-dimensional qudits (not Hermitian for general d>2)
"Hadamard"measurement operator based on the Hadamard gate for qubits (equivalent to a QFT gate on one qubit)
"RandomHermitian"random Hermitian operator on qubits (Gaussian Hermitian ensemble)
{"RandomHermitian",d}random Hermitian operator for d-dimensional qudits
"ComputationalBasis"measurement in the 2-dimensional computational basis
{"ComputationalBasis",d}measurement in the d-dimensional computational basis
{"ComputationalBasis",d,eigs}measurement in the d-dimensional computational basis with eigenvalues (i.e. measurement outcomes) eigs
"BellBasis"measurement in the Bell basis
{"BellBasis",eigs}measurement in the Bell basis with eigenvalues (i.e. measurement outcomes) eigs
"PauliBasis"measurement in the basis of Pauli matrices
{"PauliBasis",eigs}measurement in the basis of Pauli matrices with eigenvalues (i.e. measurement outcomes) eigs
"FourierBasis"measurement in the 2-dimensional basis of the quantum Fourier transform
{"FourierBasis",d}measurement in the d-dimensional basis of the quantum Fourier transform
{"FourierBasis",d,eigs}measurement in the d-dimensional basis of the quantum Fourier transform with eigenvalues (i.e. measurement outcomes) eigs
In general, ResourceFunction["QuantumMeasurementOperator"][QuantumBasis[],] can be used to perform a measurement in a given QuantumBasis, and ResourceFunction["QuantumMeasurementOperator"][{QuantumBasis[],eigs},] can be used to perform a measurement in a given QuantumBasis with eigenvalues (i.e. measurement outcomes) eigs.
Whenever eigenvalues (i.e. measurement outcomes) eigs are not specified, the default is taken to be Range[0,out-1], where out designates the number of possible measurement outcomes.

Examples

Basic Examples (10) 

Create a projection-valued discrete quantum measurement operator from a matrix representation in the computational basis (default):

In[1]:=
measurement = ResourceFunction[
  "QuantumMeasurementOperator"][{{1/2, 1/2}, {1/2, -1/2}}]
Out[1]=

Return its operator association:

In[2]:=
measurement["Operator"]
Out[2]=

Apply the measurement operator to the first qubit (default) of a two-qubit discrete quantum state in the computational basis:

In[3]:=
state = ResourceFunction["QuantumDiscreteState"][{1, -1, I, -I}]
Out[3]=
In[4]:=
measurement[state]
Out[4]=

Apply the measurement operator instead to the second qubit of the state:

In[5]:=
measurement2 = ResourceFunction[
  "QuantumMeasurementOperator"][{{1/2, 1/2}, {1/2, -1/2}}, {2}]
Out[5]=
In[6]:=
measurement2[state]
Out[6]=

Create a positive operator-valued discrete quantum measurement operator from a list of matrix representations in the computational basis (default):

In[7]:=
o1 = {{0, 0}, {0, Sqrt[2]/(1 + Sqrt[2])}};
o2 = (Sqrt[2]/(2 + 2 Sqrt[2]))*{{1, -1}, {-1, 1}};
o3 = IdentityMatrix[2] - o1 - o2;
measurement = ResourceFunction["QuantumMeasurementOperator"][{o1, o2, o3}]
Out[7]=

Show that the measurement operator is positive operator-valued:

In[8]:=
measurement["ProjectionQ"]
Out[8]=
In[9]:=
measurement["POVMQ"]
Out[9]=

Return its list of operator matrices:

In[10]:=
measurement["POVMElements"]
Out[10]=

Return the ordered list of operator matrices (assuming a state of size 2):

In[11]:=
measurement[{"OrderedPOVMElements", 2}]
Out[11]=

Return the ordered list of operator matrices (assuming a state of size 3):

In[12]:=
measurement[{"OrderedPOVMElements", 3}]
Out[12]=

Return its operator association:

In[13]:=
measurement["Operator"]
Out[13]=

Apply the measurement operator to the first qubit (default) of a two-qubit discrete quantum state in the computational basis:

In[14]:=
state = ResourceFunction["QuantumDiscreteState"][{1 + I, 1 - I, 2 + I,
     2 - I}];
measurement[state]
Out[14]=

Create a projection-valued discrete quantum measurement operator from a matrix representation in a specified basis (Pauli-X) and return its matrix representation:

In[15]:=
measurement = ResourceFunction[
   "QuantumMeasurementOperator"][{{1/2, -1/2}, {-1/2, 1/2}}, ResourceFunction["QuantumBasis"]["PauliX"]];
measurement["MatrixRepresentation"]
Out[15]=

Return its operator association:

In[16]:=
measurement["Operator"]
Out[16]=

Show that the measurement operator is Hermitian, but not unitary:

In[17]:=
measurement["HermitianQ"]
Out[17]=
In[18]:=
measurement["UnitaryQ"]
Out[18]=

Return the ordered matrix representation (assuming a state of size 2):

In[19]:=
measurement[{"OrderedMatrixRepresentation", 2}]
Out[19]=

Return the ordered matrix representation (assuming a state of size 3):

In[20]:=
measurement[{"OrderedMatrixRepresentation", 3}]
Out[20]=

Return the ordered matrix representation (assuming a state of size 2) assuming that the measurement operator is applied instead to the second qubit of the state:

In[21]:=
measurement2 = ResourceFunction[
   "QuantumMeasurementOperator"][{{1/2, -1/2}, {-1/2, 1/2}}, {2}, ResourceFunction["QuantumBasis"]["PauliX"]];
measurement2[{"OrderedMatrixRepresentation", 2}]
Out[21]=

Create a measurement operator based on the Pauli-X gate for qubits:

In[22]:=
measurement = ResourceFunction["QuantumMeasurementOperator"]["PauliX", {1}];
measurement["Operator"]
Out[22]=

Create a measurement operator based on the Pauli-X gate for 3-dimensional qudits (non-Hermitian):

In[23]:=
measurement2 = ResourceFunction["QuantumMeasurementOperator"][{"PauliX", 3}, {1}];
measurement2["Operator"]
Out[23]=

Create a measurement operator in the basis of the quantum Fourier transform on 1 qubit:

In[24]:=
measurement3 = ResourceFunction["QuantumMeasurementOperator"][
   "FourierBasis", {1}];
measurement3["Operator"]
Out[24]=

Create a measurement operator in the basis of the quantum Fourier transform on 2 qubits:

In[25]:=
measurement4 = ResourceFunction["QuantumMeasurementOperator"][
   "FourierBasis", {1, 2}];
measurement4["Operator"]
Out[25]=

Create a measurement operator in the Bell basis, with eigenvalues (i.e. measurement outcomes) x, y, z and w:

In[26]:=
measurement5 = ResourceFunction[
   "QuantumMeasurementOperator"][{"BellBasis", {x, y, z, w}}];
measurement5["Operator"]
Out[26]=

Return its list of eigenvalues:

In[27]:=
measurement5["Eigenvalues"]
Out[27]=

Return its list of eigenvectors:

In[28]:=
measurement5["Eigenvectors"]
Out[28]=

Create a measurement operator directly from a QuantumBasis object:

In[29]:=
measurement = ResourceFunction["QuantumMeasurementOperator"][
   ResourceFunction["QuantumBasis"]["Bell"], {1, 2}];
measurement["Operator"]
Out[29]=

Use eigenvalues (i.e. measurement outcomes) 1, -1, I, -I instead:

In[30]:=
measurement2 = ResourceFunction[
   "QuantumMeasurementOperator"][{ResourceFunction["QuantumBasis"][
     "Bell"], {1, -1, I, -I}}, {1, 2}];
measurement2["Operator"]
Out[30]=

Return the lists of eigenvalues and eigenvectors:

In[31]:=
measurement2["Eigenvalues"]
Out[31]=
In[32]:=
measurement2["Eigenvectors"]
Out[32]=

Create a projection-valued discrete quantum measurement operator by explicitly specifying an association of matrix elements in a given (tensor product) basis and return its matrix representation:

In[33]:=
measurement = ResourceFunction[
   "QuantumMeasurementOperator"][<|TensorProduct[Ket[0], Ket[0]] -> 1,
     TensorProduct[Ket[0], Ket[1]] -> -1, TensorProduct[Ket[1], Ket[0]] -> -1, TensorProduct[Ket[1], Ket[1]] -> 1|>];
measurement["MatrixRepresentation"]
Out[33]=

Return its basis element association:

In[34]:=
measurement["BasisElements"]
Out[34]=

Return its operator association:

In[35]:=
measurement["Operator"]
Out[35]=

Create a positive operator-valued discrete quantum measurement operator by explicitly specifying an association of matrix operators in a given basis and return its list of elements:

In[36]:=
measurement2 = ResourceFunction[
   "QuantumMeasurementOperator"][<|
    TensorProduct[Ket[0], Ket[0]] -> {{0, 0}, {0, 1}}, TensorProduct[Ket[0], Ket[1]] -> {{1, -1}, {-1, 1}}, TensorProduct[Ket[1], Ket[0]] -> {{0, 1}, {1, 0}}|>];
measurement2["POVMElements"]
Out[36]=

Return its basis element association:

In[37]:=
measurement2["BasisElements"]
Out[37]=

Return its operator association:

In[38]:=
measurement2["Operator"]
Out[38]=

Discrete quantum measurement operators can be applied to QuantumDiscreteState objects:

In[39]:=
measurement = ResourceFunction["QuantumMeasurementOperator"][
   "RandomHermitian", {1, 2}];
state = ResourceFunction["QuantumDiscreteState"][{"RandomPure", 2}];
measurementOutcome = measurement[state]
Out[39]=

However, measurement operators can also be applied directly to QuantumMeasurement objects to obtain a joint distribution:

In[40]:=
measurement2 = ResourceFunction["QuantumMeasurementOperator"][
   "RandomHermitian", {2, 1}];
measurement2[measurementOutcome]
Out[40]=

By default, all discrete quantum measurement operators are assumed to apply to tensor products of 2-dimensional subsystems (i.e. qubits):

In[41]:=
measurement = ResourceFunction[
  "QuantumMeasurementOperator"][{{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 0,
     1}, {0, 0, 1, 0}}]
Out[41]=
In[42]:=
measurement["Operator"]
Out[42]=

Create a discrete quantum measurement operator with the same matrix representation applying to a single 4-dimensional subsystem (i.e. qudit) instead:

In[43]:=
measurement2 = ResourceFunction[
  "QuantumMeasurementOperator"][{{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 0,
     1}, {0, 0, 1, 0}}, 4]
Out[43]=
In[44]:=
measurement2["Operator"]
Out[44]=

Create a projection-valued discrete quantum measurement operator in the computational basis (default):

In[45]:=
measurement = ResourceFunction[
  "QuantumMeasurementOperator"][{{2, 1 + I}, {1 - I, 3}}]
Out[45]=
In[46]:=
measurement["Operator"]
Out[46]=
In[47]:=
measurement["Basis"]
Out[47]=

Transform the measurement operator to the Fourier basis:

In[48]:=
measurement2 = ResourceFunction["QuantumMeasurementOperator"][measurement, ResourceFunction["QuantumBasis"]["Fourier"]]
Out[48]=
In[49]:=
measurement2["Operator"]
Out[49]=
In[50]:=
measurement2["Basis"]
Out[50]=

Transform the measurement operator back to the computational basis:

In[51]:=
measurement3 = ResourceFunction["QuantumMeasurementOperator"][measurement2, ResourceFunction["QuantumBasis"]["Computational"]]
Out[51]=
In[52]:=
measurement3["Operator"]
Out[52]=
In[53]:=
measurement3["Basis"]
Out[53]=

The initial and final operators are the same:

In[54]:=
measurement["MatrixRepresentation"] == measurement3["MatrixRepresentation"]
Out[54]=

Create a positive operator-valued discrete quantum measurement operator in the computational basis (default):

In[55]:=
POVM = ResourceFunction[
  "QuantumMeasurementOperator"][{{{1, 1 + I}, {1 - I, 2}}, {{2, 2 + I}, {2 - I, 3}}}]
Out[55]=
In[56]:=
POVM["Operator"]
Out[56]=
In[57]:=
POVM["Basis"]
Out[57]=

Transform the measurement operator to the Fourier basis:

In[58]:=
POVM2 = ResourceFunction["QuantumMeasurementOperator"][POVM, ResourceFunction["QuantumBasis"]["Fourier"]]
Out[58]=
In[59]:=
POVM2["Operator"]
Out[59]=
In[60]:=
POVM2["Basis"]
Out[60]=

Transform the measurement operator back to the computational basis:

In[61]:=
POVM3 = ResourceFunction["QuantumMeasurementOperator"][POVM2, ResourceFunction["QuantumBasis"]["Computational"]]
Out[61]=
In[62]:=
POVM3["Operator"]
Out[62]=
In[63]:=
POVM3["Basis"]
Out[63]=

The initial and final operators are the same:

In[64]:=
POVM["POVMElements"] == POVM3["POVMElements"]
Out[64]=

Scope (12) 

Represent the Pauli-Z measurement gate in the Heisenberg picture:

In[65]:=
measurement = ResourceFunction["QuantumMeasurementOperator"]["PauliZ", "Heisenberg"]
Out[65]=
In[66]:=
measurement["Basis"]
Out[66]=

Transform the measurement operator to the interaction picture:

In[67]:=
measurement2 = ResourceFunction["QuantumMeasurementOperator"][measurement, "Interaction"]
Out[67]=
In[68]:=
measurement2["Basis"]
Out[68]=

Represent a 2-qubit random Hermitian operator in the computational basis:

In[69]:=
measurement = ResourceFunction["QuantumMeasurementOperator"][
   "RandomHermitian", {1, 2}];
measurement["Operator"]
Out[69]=
In[70]:=
measurement["Basis"]
Out[70]=

Represent the same operator in the Pauli-X basis instead:

In[71]:=
measurement2 = ResourceFunction["QuantumMeasurementOperator"][measurement, ResourceFunction["QuantumBasis"]["PauliX", 2]];
measurement2["Operator"]
Out[71]=
In[72]:=
measurement2["Basis"]
Out[72]=

Measurement operators in a given quantum-mechanical picture can be applied to QuantumDiscreteState objects that are also in the same picture:

In[73]:=
measurement = ResourceFunction["QuantumMeasurementOperator"][
   "RandomHermitian", {1, 2}, "Heisenberg"];
measurement["Picture"]
Out[73]=
In[74]:=
state = ResourceFunction["QuantumDiscreteState"][{"RandomPure", 2}, "Heisenberg"];
state["Picture"]
Out[74]=
In[75]:=
measurement[state]
Out[75]=

However, they cannot be applied to QuantumDiscreteState objects if the pictures do not match (returns unevaluated):

In[76]:=
state2 = ResourceFunction["QuantumDiscreteState"][{"RandomPure", 2}, "Interaction"];
state2["Picture"]
Out[76]=
In[77]:=
measurement[state2]
Out[77]=

Represent a Pauli-X measurement gate (a π rotation around the x axis of the Bloch sphere) on qubits for qubit number 3:

In[78]:=
measurement = ResourceFunction["QuantumMeasurementOperator"]["PauliX", {3}];
measurement["Operator"]
Out[78]=

Represent a Pauli-X measurement gate on 3-dimensional qudits for qudit number 3 (not Hermitian):

In[79]:=
measurement2 = ResourceFunction["QuantumMeasurementOperator"][{"PauliX", 3}, {3}];
measurement2["Operator"]
Out[79]=

Represent a Pauli-Y measurement gate (a π rotation around the y axis of the Bloch sphere) on qubits for qubit number 3:

In[80]:=
measurement3 = ResourceFunction["QuantumMeasurementOperator"]["PauliY", {3}];
measurement3["Operator"]
Out[80]=

Represent a Pauli-Z measurement gate (a π rotation around the z-axis of the Bloch sphere) on qubits for qubit number 3:

In[81]:=
measurement4 = ResourceFunction["QuantumMeasurementOperator"]["PauliZ", {3}];
measurement4["Operator"]
Out[81]=

Represent a Pauli-Z measurement gate on 3-dimensional qudits for qudit number 3 (not Hermitian):

In[82]:=
measurement5 = ResourceFunction["QuantumMeasurementOperator"][{"PauliZ", 3}, {3}];
measurement5["Operator"]
Out[82]=

Represent a Hadamard measurement gate (a single-qubit quantum Fourier transform) for qubit number 1:

In[83]:=
measurement = ResourceFunction["QuantumMeasurementOperator"]["Hadamard", {1}];
measurement["Operator"]
Out[83]=

Represent a single-qubit random Hermitian operator (selected from a Gaussian Hermitian ensemble) for qubit 2:

In[84]:=
measurement = ResourceFunction["QuantumMeasurementOperator"][
   "RandomHermitian", {2}];
measurement["Operator"]
Out[84]=

Represent a two-qubit random Hermitian operator (selected from a Gaussian Hermitian ensemble) for qubits 2 and 3:

In[85]:=
measurement2 = ResourceFunction["QuantumMeasurementOperator"][
   "RandomHermitian", {2, 3}];
measurement2["Operator"]
Out[85]=

Represent a single-qudit random Hermitian operator (selected from a Gaussian Hermitian ensemble) on 3-dimensional qudits for qudit 2:

In[86]:=
measurement3 = ResourceFunction[
   "QuantumMeasurementOperator"][{"RandomHermitian", 3}, {2}];
measurement3["Operator"]
Out[86]=

Represent a two-qudit random Hermitian operator (selected from a Gaussian Hermitian ensemble) on 3-dimensional qudits for qudits 2 and 3:

In[87]:=
measurement4 = ResourceFunction[
   "QuantumMeasurementOperator"][{"RandomHermitian", 3}, {2, 3}];
measurement4["Operator"]
Out[87]=

Represent a single-qubit computational basis measurement (with default eigenvalues) for qubit number 3:

In[88]:=
measurement = ResourceFunction["QuantumMeasurementOperator"][
   "ComputationalBasis", {3}];
measurement["Operator"]
Out[88]=

Represent a two-qubit computational basis measurement (with default eigenvalues) for qubits 3 and 4:

In[89]:=
measurement2 = ResourceFunction["QuantumMeasurementOperator"][
   "ComputationalBasis", {3, 4}];
measurement2["Operator"]
Out[89]=

Represent a two-qubit computational basis measurement (with eigenvalues x, y, z, w) for qubits 3 and 4:

In[90]:=
measurement3 = ResourceFunction[
   "QuantumMeasurementOperator"][{"ComputationalBasis", {x, y, z, w}}, {3, 4}];
measurement3["Operator"]
Out[90]=

Represent a single-qudit computational basis measurement (with default eigenvalues) on 3-dimensional qudits for qudit number 3:

In[91]:=
measurement4 = ResourceFunction[
   "QuantumMeasurementOperator"][{"ComputationalBasis", 3}, {3}];
measurement4["Operator"]
Out[91]=

Represent a two-qudit computational basis measurement (with default eigenvalues) on 3-dimensional qudits for qudits 3 and 4:

In[92]:=
measurement5 = ResourceFunction[
   "QuantumMeasurementOperator"][{"ComputationalBasis", 3}, {3, 4}];
measurement5["Operator"]
Out[92]=

Represent a single-qudit computational basis measurement (with eigenvalues x, y, z) on 3-dimensional qudits for qudit number 3:

In[93]:=
measurement6 = ResourceFunction[
   "QuantumMeasurementOperator"][{"ComputationalBasis", 3, {x, y, z}}, {3}];
measurement6["Operator"]
Out[93]=

Represent a single-qudit Bell basis measurement (with default eigenvalues) for qudit number 3:

In[94]:=
measurement = ResourceFunction["QuantumMeasurementOperator"]["BellBasis", {3}];
measurement["Operator"]
Out[94]=

Represent a single-qudit Bell basis measurement (with eigenvalues x, y, z, w) for qudit number 3:

In[95]:=
measurement2 = ResourceFunction[
   "QuantumMeasurementOperator"][{"BellBasis", {x, y, z, w}}, {3}];
measurement2["Operator"]
Out[95]=

Represent a single-qubit Pauli basis measurement (with default eigenvalues) for qubit number 3:

In[96]:=
measurement = ResourceFunction["QuantumMeasurementOperator"]["PauliBasis", {3}];
measurement["Operator"]
Out[96]=

Represent a two-qubit Pauli basis measurement (with default eigenvalues) for qubits 3 and 4:

In[97]:=
measurement2 = ResourceFunction["QuantumMeasurementOperator"]["PauliBasis", {3, 4}];
measurement2["Operator"]
Out[97]=

Represent a two-qubit Pauli basis measurement (with eigenvalues x, y, z, w) for qubits 3 and 4:

In[98]:=
measurement3 = ResourceFunction[
   "QuantumMeasurementOperator"][{"PauliBasis", {x, y, z, w}}, {3, 4}];
measurement3["Operator"]
Out[98]=

Represent a single-qubit Fourier basis measurement (with default eigenvalues) for qubit number 3:

In[99]:=
measurement = ResourceFunction["QuantumMeasurementOperator"]["FourierBasis"];
measurement["Operator"]
Out[99]=

Represent a two-qubit Fourier basis measurement (with default eigenvalues) for qubits 3 and 4:

In[100]:=
measurement2 = ResourceFunction["QuantumMeasurementOperator"][
   "FourierBasis", {3, 4}];
measurement2["Operator"]
Out[100]=

Represent a two-qubit Fourier basis measurement (with eigenvalues x, y, z, w) for qubits 3 and 4:

In[101]:=
measurement3 = ResourceFunction[
   "QuantumMeasurementOperator"][{"FourierBasis", {x, y, z, w}}, {3, 4}];
measurement3["Operator"]
Out[101]=

Represent a single-qudit Fourier basis measurement (with default eigenvalues) on 3-dimensional qudits for qudit number 3:

In[102]:=
measurement4 = ResourceFunction[
   "QuantumMeasurementOperator"][{"FourierBasis", 3}, {3}];
measurement4["Operator"]
Out[102]=

Represent a two-qudit Fourier basis measurement (with default eigenvalues) on 3-dimensional qudits for qudits 3 and 4:

In[103]:=
measurement5 = ResourceFunction[
   "QuantumMeasurementOperator"][{"FourierBasis", 3}, {3, 4}];
measurement5["Operator"]
Out[103]=

Represent a single-qudit Fourier basis measurement (with eigenvalues x, y, z) on 3-dimensional qudits for qudit number 3:

In[104]:=
measurement6 = ResourceFunction[
   "QuantumMeasurementOperator"][{"FourierBasis", 3, {x, y, z}}, {3}];
measurement6["Operator"]
Out[104]=

QuantumMeasurementOperator objects can be constructed purely symbolically (without explicit matrix elements):

In[105]:=
measurement = ResourceFunction["QuantumMeasurementOperator"][{{a, b}, {c, d}}]
Out[105]=

View the measurement operator association:

In[106]:=
measurement["Operator"]
Out[106]=

Standard operations can still be performed on purely symbolic measurement operators:

In[107]:=
measurement["Eigenvalues"]
Out[107]=
In[108]:=
measurement["Eigenvectors"]
Out[108]=

View a list of properties that can be extracted from a QuantumMeasurementOperator object:

In[109]:=
measurement = ResourceFunction["QuantumMeasurementOperator"][
  "RandomHermitian", {2, 3}]
Out[109]=
In[110]:=
measurement["Properties"]
Out[110]=

Return the operator association:

In[111]:=
measurement["Operator"]
Out[111]=

Return which QuantumBasis the measurement operator is defined with respect to:

In[112]:=
measurement["Basis"]
Out[112]=

Return which quantum mechanical picture the measurement operator is defined with respect to:

In[113]:=
measurement["Picture"]
Out[113]=

Return the association of names and basis elements:

In[114]:=
measurement["BasisElements"]
Out[114]=

Return the matrix representation:

In[115]:=
measurement["MatrixRepresentation"]
Out[115]=

Return the ordered matrix representation (when applied to qubits 2 and 3) assuming a state consisting of 3 qubits:

In[116]:=
 measurement["OrderedMatrixRepresentation"]
Out[116]=

Return the ordered matrix representation (when applied to qubits 2 and 3) assuming a state consisting of 4 qubits:

In[117]:=
measurement[{"OrderedMatrixRepresentation", 4}]
Out[117]=

Return arity (number of input subsystems):

In[118]:=
measurement["Arity"]
Out[118]=

Return the number of dimensions:

In[119]:=
measurement["Dimensions"]
Out[119]=

Return the order in which the measurement operator is applied to subsystems:

In[120]:=
measurement["Order"]
Out[120]=

Determine whether the measurement operator is Hermitian:

In[121]:=
measurement["HermitianQ"]
Out[121]=

Determine whether the measurement operator is unitary:

In[122]:=
measurement["UnitaryQ"]
Out[122]=

Return the list of eigenvalues:

In[123]:=
measurement["Eigenvalues"]
Out[123]=

Return the list of eigenvectors:

In[124]:=
measurement["Eigenvectors"]
Out[124]=

Determine whether the measurement operator is projection-valued:

In[125]:=
measurement["ProjectionQ"]
Out[125]=

Determine whether the measurement operator is positive operator-valued:

In[126]:=
measurement["POVMQ"]
Out[126]=

Define a positive operator-valued measurement operator instead:

In[127]:=
measurement2 = ResourceFunction[
  "QuantumMeasurementOperator"][{{{0, 0}, {0, 1}}, {{1, -1}, {-1, 1}}, {{0, 1}, {1, 0}}}, {2}]
Out[127]=

Return the list of operator matrices:

In[128]:=
measurement2["POVMElements"]
Out[128]=

Return the ordered list of operator matrices (when applied to qubit 2) assuming a state consisting of 2 qubits:

In[129]:=
measurement2["OrderedPOVMElements"]
Out[129]=

Return the ordered list of operator matrices (when applied to qubit 2) assuming a state consisting of 3 qubits:

In[130]:=
measurement2[{"OrderedPOVMElements", 3}]
Out[130]=

Return the list of eigenvalues for each operator:

In[131]:=
measurement2["Eigenvalues"]
Out[131]=

Return the list of eigenvectors for each operator:

In[132]:=
measurement2["Eigenvectors"]
Out[132]=

Publisher

Jonathan Gorard

Version History

  • 1.0.0 – 26 April 2021

Related Resources

License Information