microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
brlackey/ising-model-sample

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

library/src/tests/logical.rs

27lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4use super::test_expression;
5use qsc::interpret::Value;
6
7// Tests for Microsoft.Quantum.Logical namespace
8
9#[test]
10fn check_xor() {
11 test_expression(
12 "Microsoft.Quantum.Logical.Xor(false, false)",
13 &Value::Bool(false),
14 );
15 test_expression(
16 "Microsoft.Quantum.Logical.Xor(false, true)",
17 &Value::Bool(true),
18 );
19 test_expression(
20 "Microsoft.Quantum.Logical.Xor(true, false)",
21 &Value::Bool(true),
22 );
23 test_expression(
24 "Microsoft.Quantum.Logical.Xor(true, true)",
25 &Value::Bool(false),
26 );
27}
28