tensorcircuit
tensorcircuit copied to clipboard
Wired input and output of function "c.amplitude"
Issue Description
For a quantum circuit with n qubits, function "c.amplitude" returns the amplitude of a given quantum state. It will work when an n-bit binary string is passed into. An error will raise if the length of the string is not n, except n+1. If an (n+1)-bit string is passed into, "c.amplitude" will return the amplitude of a state corresponding to the first n bits, while the last bit controls the "phase". For example, if a circuit has 3 qubits, and one amplitude is "000" -> 0.5 then "0000" -> 0.5 "0001" -> 0.5*j and j is the imaginary unit
How to Reproduce
Error Output
Environment Context
macOS 13.3.1(a)
tensorcircuit 0.8.0
BTW, why tc.about() gives me "module 'tensorcircuit' has no attribute 'about'"?