mimiqcircuits.operations.entanglement¶
Entanglement measures (BondDim, VonNeumannEntropy, etc.).
Classes
|
Operation to get the bond dimension between two halves of the system and store it in a z-register. |
Operation to get the Schmidt rank of a bipartition and store it in a z-register. |
|
Operation to get the bipartite Von Neumann entanglement entropy and store it in a z-register. |
- class mimiqcircuits.operations.entanglement.BondDim[source]¶
Bases:
OperationOperation to get the bond dimension between two halves of the system and store it in a z-register.
The bond dimension is only defined for a matrix-product state (MPS), which can be written as:
State Representation
\[|\psi \rangle = \sum_{s_1,s_2,\ldots=1}^2 \sum_{i_1}^{\chi_1} \sum_{i_2}^{\chi_2} \ldots \sum_{i_N}^{\chi_N} A^{(s_1)}_{i_0i_1} A^{(s_2)}_{i_1 i_2} A^{(s_3)}_{i_2 i_3} \ldots A^{(s_N)}_{i_{N-1}i_N} | s_1, s_2, s_3, \ldots, s_N \rangle .\]Here, \(\chi_k\) is the bond dimension, i.e., the dimension of the index \(i_k\). The first and last bond dimensions are dummies, \(\chi_0=\chi_N=1\). A bond dimension of 1 means there is no entanglement between the two halves of the system.
See also
Examples
When pushing to a circuit, the qubit index k that we give will return the bond dimension \(i_{k-1}\) in the above notation. In other words, we associate link k with qubit k+1. For k=1, the bond dimension returned will always be 1.
>>> from mimiqcircuits import * >>> k = 5 >>> c = Circuit() >>> c.push(BondDim(), k, 1) 6-qubit, 2-zvar circuit with 1 instruction: └── BondDim @ q[5], z[1]
- property num_qubits¶
- property parnames¶
- class mimiqcircuits.operations.entanglement.VonNeumannEntropy[source]¶
Bases:
OperationOperation to get the bipartite Von Neumann entanglement entropy and store it in a z-register.
The entanglement entropy for a bipartition into subsystems \(A\) and \(B\) is defined for a pure state \(\rho = | \psi \rangle\langle \psi |\) as:
Entanglement Entropy
\[\mathcal{S}(\rho_A) = - \mathrm{Tr}(\rho_A \log_2 \rho_A) = - \mathrm{Tr}(\rho_B \log_2 \rho_B) = \mathcal{S}(\rho_A)\]where \(\rho_A = \mathrm{Tr}_B(\rho)\) is the reduced density matrix. A product state has \(\mathcal{S}(\rho_A)=0\) and a maximally entangled state between \(A\) and \(B\) gives \(\mathcal{S}(\rho_A)=1\).
We only consider bipartitions where \(A=\{1,\ldots,k-1\}\) and \(B=\{k,\ldots,N\}\), for some \(k\) and where \(N\) is the total number of qubits.
When the system is open (i.e., with noise) and we are using quantum trajectories, the entanglement entropy of each trajectory is returned during execution.
See also
Examples
When pushing to a circuit, the qubit index k takes the role of the above bipartition into A and B. For k=1, A is empty and the entanglement entropy will always return 0.
>>> from mimiqcircuits import * >>> k = 5 >>> c = Circuit() >>> c.push(VonNeumannEntropy(), k, 1) 6-qubit, 2-zvar circuit with 1 instruction: └── VonNeumannEntropy @ q[5], z[1]
- property num_qubits¶
- property parnames¶
- class mimiqcircuits.operations.entanglement.SchmidtRank[source]¶
Bases:
OperationOperation to get the Schmidt rank of a bipartition and store it in a z-register.
A Schmidt decomposition for a bipartition into subsystems \(A\) and \(B\) is defined for a pure state as:
Schmidt Decomposition
\[|\psi\rangle = \sum_{i=1}^{r} s_i |\alpha_i\rangle \otimes |\beta_i\rangle,\]where \(|\alpha_i\rangle\) (\(|\beta_i\rangle\)) are orthonormal states acting on \(A\) (\(B\)). The Schmidt rank is the number of terms \(r\) in the sum. A product state gives \(r=1\), and \(r>1\) signals entanglement.
We only consider bipartitions where \(A=\{1,\ldots,k-1\}\) and \(B=\{k,\ldots,N\}\), for some \(k\) and where \(N\) is the total number of qubits.
In MPS (Matrix Product States), when the state is optimally compressed, the Schmidt rank should be equal to the bond dimension (see
BondDim).See also
Examples
When pushing to a circuit, the qubit index k takes the role of the above bipartition into A and B. For k=1, A is empty and the Schmidt rank will always return 1.
>>> from mimiqcircuits import * >>> k = 5 >>> c = Circuit() >>> c.push(SchmidtRank(), k, 1) 6-qubit, 2-zvar circuit with 1 instruction: └── SchmidtRank @ q[5], z[1]
- property num_qubits¶
- property parnames¶