quantumflow.
inner_product
(vec0: qf.QubitVector, vec1: qf.QubitVector) → BKTensor¶HilbertSchmidt inner product between qubit vectors
The tensor rank and qubits must match.
quantumflow.
fubini_study_angle
(vec0: qf.QubitVector, vec1: qf.QubitVector) → BKTensor¶Calculate the Fubini–Study metric between elements of a Hilbert space.
The Fubini–Study metric is a distance measure between vectors in a projective Hilbert space. For gates this space is the Hilbert space of operators induced by the HilbertSchmidt inner product. For 1qubit rotation gates, RX, RY and RZ, this is half the angle (theta) in the Bloch sphere.
The Fubini–Study metric between states is equal to the Burr angle between pure states.
quantumflow.
vectors_close
(vec0: qf.QubitVector, vec1: qf.QubitVector, tolerance: float = 1e06) → bool¶Return True if vectors in close in the projective Hilbert space.
Similarity is measured with the Fubini–Study metric.
quantumflow.
state_angle
(ket0: qf.State, ket1: qf.State) → BKTensor¶The FubiniStudy angle between states.
Equal to the Burrs angle for pure states.
quantumflow.
states_close
(state0: qf.State, state1: qf.State, tolerance: float = 1e06) → bool¶Returns True if states are almost identical.
Closeness is measured with the metric FubiniStudy angle.
quantumflow.
state_fidelity
(state0: qf.State, state1: qf.State) → BKTensor¶Return the quantum fidelity between pure states.
quantumflow.
density_angle
(rho0: qf.Density, rho1: qf.Density) → BKTensor¶The FubiniStudy angle between density matrices
quantumflow.
densities_close
(rho0: qf.Density, rho1: qf.Density, tolerance: float = 1e06) → bool¶Returns True if densities are almost identical.
Closeness is measured with the metric FubiniStudy angle.
quantumflow.
fidelity
(rho0: qf.Density, rho1: qf.Density) → float¶Return the fidelity F(rho0, rho1) between two mixed quantum states.
Note: Fidelity cannot be calculated entirely within the tensor backend.
quantumflow.
bures_distance
(rho0: qf.Density, rho1: qf.Density) → float¶Return the Bures distance between mixed quantum states
Note: Bures distance cannot be calculated within the tensor backend.
quantumflow.
bures_angle
(rho0: qf.Density, rho1: qf.Density) → float¶Return the Bures angle between mixed quantum states
Note: Bures angle cannot be calculated within the tensor backend.
quantumflow.
entropy
(rho: qf.Density, base: float = None) → float¶Returns the vonNeumann entropy of a mixed quantum state.
Parameters: 


Returns:  The vonNeumann entropy of rho 
quantumflow.
mutual_info
(rho: qf.Density, qubits0: Qubits, qubits1: Qubits = None, base: float = None) → float¶Compute the bipartite vonNeumann mutual information of a mixed quantum state.
Parameters: 


Returns:  The bipartite vonNeumann mutual information. 
quantumflow.
gate_angle
(gate0: qf.Gate, gate1: qf.Gate) → BKTensor¶The FubiniStudy angle between gates
quantumflow.
gates_close
(gate0: qf.Gate, gate1: qf.Gate, tolerance: float = 1e06) → bool¶Returns: True if gates are almost identical.
Closeness is measured with the gate angle.
quantumflow.
channel_angle
(chan0: qf.Channel, chan1: qf.Channel) → BKTensor¶The FubiniStudy angle between channels
quantumflow.
channels_close
(chan0: qf.Channel, chan1: qf.Channel, tolerance: float = 1e06) → bool¶Returns: True if channels are almost identical.
Closeness is measured with the channel angle.
quantumflow.
diamond_norm
(chan0: qf.Channel, chan1: qf.Channel) → float¶Return the diamond norm between two completely positive tracepreserving (CPTP) superoperators.
The calculation uses the simplified semidefinite program of Watrous [arXiv:0901.4709](http://arxiv.org/abs/0901.4709) [J. Watrous, [Theory of Computing 5, 11, pp. 217238 (2009)](http://theoryofcomputing.org/articles/v005a011/)]