mimiqcircuits.operations.operators.sigmas¶
Classes
|
One-qubit operator corresponding to \(|0 \rangle\langle 1|\). |
|
One-qubit operator corresponding to \(|1 \rangle\langle 0|\). |
- class SigmaMinus(a=1)[source]¶
Bases:
AbstractOperatorOne-qubit operator corresponding to \(|0 \rangle\langle 1|\).
Matrix Representation
\[\begin{split}\begin{pmatrix} 0 & a\\ 0 & 0 \end{pmatrix}\end{split}\]The factor
ascales the operator, for example to add a phase. The operator is not unitary, so it cannot be applied to a circuit directly; use it in anExpectationValueor as a Kraus operator.- Parameters:
a (complex) – Scaling factor. Defaults to 1.
See also
Examples
>>> from mimiqcircuits import * >>> SigmaMinus() SigmaMinus(1)
>>> SigmaMinus(0.5) SigmaMinus(0.5)
>>> # expectation value on qubit 1, stored in z-variable 1 >>> c = Circuit() >>> c.push(ExpectationValue(SigmaMinus()), 1, 1) 2-qubit, 2-zvar circuit with 1 instruction: └── ⟨SigmaMinus(1)⟩ @ q[1], z[1]
- property parnames¶
Names of the operation’s parameters, as a tuple of strings.
Read-only: assigning to it raises
ValueError.
- property num_qubits¶
Number of qubits the operation acts on.
Read-only: assigning to it raises
ValueError.
- class SigmaPlus(a=1)[source]¶
Bases:
AbstractOperatorOne-qubit operator corresponding to \(|1 \rangle\langle 0|\).
Matrix Representation
\[\begin{split}\begin{pmatrix} 0 & 0\\ a & 0 \end{pmatrix}\end{split}\]The factor
ascales the operator, for example to add a phase. The operator is not unitary, so it cannot be applied to a circuit directly; use it in anExpectationValueor as a Kraus operator.- Parameters:
a (complex) – Scaling factor. Defaults to 1.
See also
Examples
>>> from mimiqcircuits import * >>> SigmaPlus() SigmaPlus(1)
>>> SigmaPlus(0.5) SigmaPlus(0.5)
>>> # expectation value on qubit 1, stored in z-variable 1 >>> c = Circuit() >>> c.push(ExpectationValue(SigmaPlus()), 1, 1) 2-qubit, 2-zvar circuit with 1 instruction: └── ⟨SigmaPlus(1)⟩ @ q[1], z[1]
- property parnames¶
Names of the operation’s parameters, as a tuple of strings.
Read-only: assigning to it raises
ValueError.
- property num_qubits¶
Number of qubits the operation acts on.
Read-only: assigning to it raises
ValueError.