normalize_check {qvirus} | R Documentation |
Normalize Check Function for qstate Class Object
Description
Check the normalization of a qstate object created by qsimulatR package.
Usage
normalize_check(qstate_obj, probs = FALSE)
Arguments
qstate_obj |
A quantum state object. |
probs |
Are probabilities required as output? |
Value
Either the sum of the squared magnitudes of the coefficients of the qstate object or its probabilities.
Examples
library(qsimulatR)
ket0 <- qstate(nbits = 1)
normalize_check(ket0)
[Package qvirus version 0.0.3 Index]