Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

AssertQubitState requires explicit Complex() call #276

Closed
cpalmer2020 opened this issue Jul 11, 2018 · 1 comment
Closed

AssertQubitState requires explicit Complex() call #276

cpalmer2020 opened this issue Jul 11, 2018 · 1 comment

Comments

@cpalmer2020
Copy link
Contributor

From Q# Language User Voice (ID:
34713733):

Example from documentation does not compile:
AssertQubitState(((1., 0.), (0., 0.)), qubits0, 1e-5);
However, this code does:
AssertQubitState((Complex(1., 0.), Complex(0., 0.)), qubits0, 1e-5);
Error being:
Severity Code Description
Error QS0001 Type mismatch for argument: (Microsoft.Quantum.Extensions.Math.Complex, Microsoft.Quantum.Extensions.Math.Complex) expected, but ((Double, Double), (Double, Double)) was provided
Error QS0001 expected type Microsoft.Quantum.Extensions.Math.Complex, instead got type (Double, Double)
Error QS0001 expected type Microsoft.Quantum.Extensions.Math.Complex, instead got type (Double, Double)

@tcNickolas
Copy link
Collaborator

The documentation has been updated accordingly.

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

No branches or pull requests

2 participants