Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename QubitRegister numQubits field #37

Closed
TysonRayJones opened this issue Jul 20, 2018 · 1 comment
Closed

Rename QubitRegister numQubits field #37

TysonRayJones opened this issue Jul 20, 2018 · 1 comment

Comments

@TysonRayJones
Copy link
Member

Since this is the number of qubits suggested by the dimensions of the state-vector, which is twice too many when the register is storing a density matrix (and should instead refer to numDensityQubits).

Consider renaming

  • numDensityQubits -> numQubitsRepresented
  • numQubits -> numQubitsInStateVec

Still seems hacky and gross ¯\(ツ)

@TysonRayJones
Copy link
Member Author

The above renaming has been done in the density-matrix branch, though could be improved.
Operations performed on statevecs (prefixed with statevec_) consult qureg.numQubitsInStateVec.
Operations on general QubitRegisters consult qureg.numQubitsRepresented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant