mimiqcircuits.operations.operators.projectors¶
Functions
|
Classes
|
One-qubit operator corresponding to a projection onto \(|0\rangle\). |
|
Two-qubit operator corresponding to a projection onto \(|00\rangle\). |
|
Two-qubit operator corresponding to a projection onto \(|01\rangle\). |
|
One-qubit operator corresponding to a projection onto \(|1\rangle\). |
|
Two-qubit operator corresponding to a projection onto \(|10\rangle\). |
|
Two-qubit operator corresponding to a projection onto \(|11\rangle\). |
|
One-qubit operator corresponding to a projection onto \(|+\rangle\). |
|
One-qubit operator corresponding to a projection onto \(|-\rangle\). |
|
One-qubit operator corresponding to a projection onto \(|y+\rangle\). |
|
One-qubit operator corresponding to a projection onto \(|y-\rangle\). |
Alias for |
|
Alias for |
- class mimiqcircuits.operations.operators.projectors.Projector0(a=1)[source]¶
Bases:
AbstractOperatorOne-qubit operator corresponding to a projection onto \(|0\rangle\).
Matrix Representation
\[\begin{split}\begin{pmatrix} a & 0 \\ 0 & 0 \end{pmatrix}\end{split}\]This matrix is parametrized by a to allow for phases/rescaling. Equivalent to
DiagonalOp(a, 0).The parameter a is optional and is set to 1 by default.
See also
Projector1,DiagonalOp- Parameters:
a (complex, optional) – The top-left entry of the matrix. Defaults to 1.
Examples
>>> from mimiqcircuits import * >>> Projector0() P₀(1)
>>> Projector0(0.5) P₀(0.5)
>>> c = Circuit() >>> c.push(ExpectationValue(Projector0()), 1, 1) 2-qubit, 2-zvar circuit with 1 instruction: └── ⟨P₀(1)⟩ @ q[1], z[1]
- property parnames¶
- class mimiqcircuits.operations.operators.projectors.Projector00(a=1)[source]¶
Bases:
AbstractOperatorTwo-qubit operator corresponding to a projection onto \(|00\rangle\).
Matrix Representation
\[\begin{split}\begin{pmatrix} a & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 \end{pmatrix}\end{split}\]This matrix is parametrized by a to allow for phases/rescaling.
The parameter a is optional and is set to 1 by default.
See also
- Parameters:
a (complex, optional) – Scaling factor for the matrix. Defaults to 1.
Examples
>>> from mimiqcircuits import * >>> Projector00() P₀₀(1)
>>> Projector00(0.5) P₀₀(0.5)
>>> c = Circuit() >>> c.push(ExpectationValue(Projector00()), 1, 2, 1) 3-qubit, 2-zvar circuit with 1 instruction: └── ⟨P₀₀(1)⟩ @ q[1:2], z[1]
- property parnames¶
- class mimiqcircuits.operations.operators.projectors.Projector01(a=1)[source]¶
Bases:
AbstractOperatorTwo-qubit operator corresponding to a projection onto \(|01\rangle\).
Matrix Representation
\[\begin{split}\begin{pmatrix} 0 & 0 & 0 & 0\\ 0 & a & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 \end{pmatrix}\end{split}\]This matrix is parametrized by a to allow for phases/rescaling.
The parameter a is optional and is set to 1 by default.
See also
- Parameters:
a (complex, optional) – Scaling factor for the matrix. Defaults to 1.
Examples
>>> from mimiqcircuits import * >>> Projector01() P₀₁(1)
>>> Projector01(0.5) P₀₁(0.5)
>>> c = Circuit() >>> c.push(ExpectationValue(Projector01()), 1, 2, 1) 3-qubit, 2-zvar circuit with 1 instruction: └── ⟨P₀₁(1)⟩ @ q[1:2], z[1]
- property parnames¶
- class mimiqcircuits.operations.operators.projectors.Projector1(a=1)[source]¶
Bases:
AbstractOperatorOne-qubit operator corresponding to a projection onto \(|1\rangle\).
Matrix Representation
\[\begin{split}\begin{pmatrix} 0 & 0 \\ 0 & a \end{pmatrix}\end{split}\]This matrix is parametrized by a to allow for phases/rescaling. Equivalent to
DiagonalOp(0, a).The parameter a is optional and is set to 1 by default.
See also
Projector0,DiagonalOp- Parameters:
a (complex, optional) – The bottom-right entry of the matrix. Defaults to 1.
Examples
>>> from mimiqcircuits import * >>> Projector1() P₁(1)
>>> Projector1(0.5) P₁(0.5)
>>> c = Circuit() >>> c.push(ExpectationValue(Projector1()), 1, 1) 2-qubit, 2-zvar circuit with 1 instruction: └── ⟨P₁(1)⟩ @ q[1], z[1]
- property parnames¶
- class mimiqcircuits.operations.operators.projectors.Projector10(a=1)[source]¶
Bases:
AbstractOperatorTwo-qubit operator corresponding to a projection onto \(|10\rangle\).
Matrix Representation
\[\begin{split}\begin{pmatrix} 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & a & 0\\ 0 & 0 & 0 & 0 \end{pmatrix}\end{split}\]This matrix is parametrized by a to allow for phases/rescaling.
The parameter a is optional and is set to 1 by default.
See also
- Parameters:
a (complex, optional) – Scaling factor for the matrix. Defaults to 1.
Examples
>>> from mimiqcircuits import * >>> Projector10() P₁₀(1)
>>> Projector10(0.5) P₁₀(0.5)
>>> c = Circuit() >>> c.push(ExpectationValue(Projector10()), 1, 2, 1) 3-qubit, 2-zvar circuit with 1 instruction: └── ⟨P₁₀(1)⟩ @ q[1:2], z[1]
- property parnames¶
- class mimiqcircuits.operations.operators.projectors.Projector11(a=1)[source]¶
Bases:
AbstractOperatorTwo-qubit operator corresponding to a projection onto \(|11\rangle\).
Matrix Representation
\[\begin{split}\begin{pmatrix} 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & a \end{pmatrix}\end{split}\]This matrix is parametrized by a to allow for phases/rescaling.
The parameter a is optional and is set to 1 by default.
See also
- Parameters:
a (complex, optional) – Scaling factor for the matrix. Defaults to 1.
Examples
>>> from mimiqcircuits import * >>> Projector11() P₁₁(1)
>>> Projector11(0.5) P₁₁(0.5)
>>> c = Circuit() >>> c.push(ExpectationValue(Projector11()), 1, 2, 1) 3-qubit, 2-zvar circuit with 1 instruction: └── ⟨P₁₁(1)⟩ @ q[1:2], z[1]
- property parnames¶
- class mimiqcircuits.operations.operators.projectors.ProjectorY1(a=1)[source]¶
Bases:
AbstractOperatorOne-qubit operator corresponding to a projection onto \(|y-\rangle\).
Matrix Representation
\[\begin{split}\frac{a}{2} \begin{pmatrix} 1 & i \\ -i & 1 \end{pmatrix}\end{split}\]This matrix is parametrized by a to allow for phases/rescaling.
The parameter a is optional and is set to 1 by default.
See also
- Parameters:
a (complex, optional) – Scaling factor for the matrix. Defaults to 1.
Examples
>>> from mimiqcircuits import * >>> ProjectorY1() PY₁(1)
>>> ProjectorY1(0.5) PY₁(0.5)
>>> c = Circuit() >>> c.push(ExpectationValue(ProjectorY1()), 1, 1) 2-qubit, 2-zvar circuit with 1 instruction: └── ⟨PY₁(1)⟩ @ q[1], z[1]
- property parnames¶
- class mimiqcircuits.operations.operators.projectors.ProjectorY0(a=1)[source]¶
Bases:
AbstractOperatorOne-qubit operator corresponding to a projection onto \(|y+\rangle\).
Matrix Representation
\[\begin{split}\frac{a}{2} \begin{pmatrix} 1 & -i \\ i & 1 \end{pmatrix}\end{split}\]This matrix is parametrized by a to allow for phases/rescaling.
The parameter a is optional and is set to 1 by default.
See also
- Parameters:
a (complex, optional) – Scaling factor for the matrix. Defaults to 1.
Examples
>>> from mimiqcircuits import * >>> ProjectorY0() PY₀(1)
>>> ProjectorY0(0.5) PY₀(0.5)
>>> c = Circuit() >>> c.push(ExpectationValue(ProjectorY0()), 1, 1) 2-qubit, 2-zvar circuit with 1 instruction: └── ⟨PY₀(1)⟩ @ q[1], z[1]
- property parnames¶
- class mimiqcircuits.operations.operators.projectors.ProjectorX1(a=1)[source]¶
Bases:
AbstractOperatorOne-qubit operator corresponding to a projection onto \(|-\rangle\).
Matrix Representation
\[\begin{split}\frac{a}{2} \begin{pmatrix} 1 & -1 \\ -1 & 1 \end{pmatrix}\end{split}\]This matrix is parametrized by a to allow for phases/rescaling.
The parameter a is optional and is set to 1 by default.
See also
- Parameters:
a (complex, optional) – Scaling factor for the matrix. Defaults to 1.
Examples
>>> from mimiqcircuits import * >>> ProjectorX1() PX₁(1)
>>> ProjectorX1(0.5) PX₁(0.5)
>>> c = Circuit() >>> c.push(ExpectationValue(ProjectorX1()), 1, 1) 2-qubit, 2-zvar circuit with 1 instruction: └── ⟨PX₁(1)⟩ @ q[1], z[1]
- property parnames¶
- class mimiqcircuits.operations.operators.projectors.ProjectorX0(a=1)[source]¶
Bases:
AbstractOperatorOne-qubit operator corresponding to a projection onto \(|+\rangle\).
Matrix Representation
\[\begin{split}\frac{a}{2} \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}\end{split}\]This matrix is parametrized by a to allow for phases/rescaling.
The parameter a is optional and is set to 1 by default.
See also
- Parameters:
a (complex, optional) – Scaling factor for the matrix. Defaults to 1.
Examples
>>> from mimiqcircuits import * >>> ProjectorX0() PX₀(1)
>>> ProjectorX0(0.5) PX₀(0.5)
>>> c = Circuit() >>> c.push(ExpectationValue(ProjectorX0()), 1, 1) 2-qubit, 2-zvar circuit with 1 instruction: └── ⟨PX₀(1)⟩ @ q[1], z[1]
- property parnames¶
- class mimiqcircuits.operations.operators.projectors.ProjectorZ1[source]¶
Bases:
AbstractOperatorAlias for
Projector1
- class mimiqcircuits.operations.operators.projectors.ProjectorZ0[source]¶
Bases:
AbstractOperatorAlias for
Projector0