Skip to content

Commit b467812

Browse files
committed
Updating from main
1 parent 4cb169e commit b467812

12 files changed

+193
-196
lines changed

compiler/qsc_qasm/src/tests/expression/explicit_cast_from_angle.rs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ fn angle_to_bool() {
2727
check(
2828
source,
2929
&expect![[r#"
30-
import QasmStd.Intrinsic.*;
31-
mutable a = new QasmStd.Angle.Angle {
30+
import Std.OpenQASM.Intrinsic.*;
31+
mutable a = new Std.OpenQASM.Angle.Angle {
3232
Value = 0,
3333
Size = 53
3434
};
35-
QasmStd.Angle.AngleAsBool(a);
35+
Std.OpenQASM.Angle.AngleAsBool(a);
3636
"#]],
3737
);
3838
}
@@ -46,12 +46,12 @@ fn sized_angle_to_bool() {
4646
check(
4747
source,
4848
&expect![[r#"
49-
import QasmStd.Intrinsic.*;
50-
mutable a = new QasmStd.Angle.Angle {
49+
import Std.OpenQASM.Intrinsic.*;
50+
mutable a = new Std.OpenQASM.Angle.Angle {
5151
Value = 0,
5252
Size = 53
5353
};
54-
QasmStd.Angle.AngleAsBool(a);
54+
Std.OpenQASM.Angle.AngleAsBool(a);
5555
"#]],
5656
);
5757
}
@@ -543,8 +543,8 @@ fn angle_to_angle() {
543543
check(
544544
source,
545545
&expect![[r#"
546-
import QasmStd.Intrinsic.*;
547-
mutable a = new QasmStd.Angle.Angle {
546+
import Std.OpenQASM.Intrinsic.*;
547+
mutable a = new Std.OpenQASM.Angle.Angle {
548548
Value = 0,
549549
Size = 53
550550
};
@@ -562,8 +562,8 @@ fn angle_to_sized_angle() {
562562
check(
563563
source,
564564
&expect![[r#"
565-
import QasmStd.Intrinsic.*;
566-
mutable a = new QasmStd.Angle.Angle {
565+
import Std.OpenQASM.Intrinsic.*;
566+
mutable a = new Std.OpenQASM.Angle.Angle {
567567
Value = 0,
568568
Size = 53
569569
};
@@ -581,8 +581,8 @@ fn sized_angle_to_angle() {
581581
check(
582582
source,
583583
&expect![[r#"
584-
import QasmStd.Intrinsic.*;
585-
mutable a = new QasmStd.Angle.Angle {
584+
import Std.OpenQASM.Intrinsic.*;
585+
mutable a = new Std.OpenQASM.Angle.Angle {
586586
Value = 0,
587587
Size = 53
588588
};
@@ -600,8 +600,8 @@ fn sized_angle_to_sized_angle() {
600600
check(
601601
source,
602602
&expect![[r#"
603-
import QasmStd.Intrinsic.*;
604-
mutable a = new QasmStd.Angle.Angle {
603+
import Std.OpenQASM.Intrinsic.*;
604+
mutable a = new Std.OpenQASM.Angle.Angle {
605605
Value = 0,
606606
Size = 53
607607
};
@@ -619,8 +619,8 @@ fn sized_angle_to_sized_angle_truncating() {
619619
check(
620620
source,
621621
&expect![[r#"
622-
import QasmStd.Intrinsic.*;
623-
mutable a = new QasmStd.Angle.Angle {
622+
import Std.OpenQASM.Intrinsic.*;
623+
mutable a = new Std.OpenQASM.Angle.Angle {
624624
Value = 0,
625625
Size = 53
626626
};
@@ -638,12 +638,12 @@ fn sized_angle_to_sized_angle_expanding() {
638638
check(
639639
source,
640640
&expect![[r#"
641-
import QasmStd.Intrinsic.*;
642-
mutable a = new QasmStd.Angle.Angle {
641+
import Std.OpenQASM.Intrinsic.*;
642+
mutable a = new Std.OpenQASM.Angle.Angle {
643643
Value = 0,
644644
Size = 53
645645
};
646-
QasmStd.Angle.AdjustAngleSizeNoTruncation(a, 64);
646+
Std.OpenQASM.Angle.AdjustAngleSizeNoTruncation(a, 64);
647647
"#]],
648648
);
649649
}
@@ -803,12 +803,12 @@ fn angle_to_bit() {
803803
check(
804804
source,
805805
&expect![[r#"
806-
import QasmStd.Intrinsic.*;
807-
mutable a = new QasmStd.Angle.Angle {
806+
import Std.OpenQASM.Intrinsic.*;
807+
mutable a = new Std.OpenQASM.Angle.Angle {
808808
Value = 0,
809809
Size = 53
810810
};
811-
QasmStd.Angle.AngleAsResult(a);
811+
Std.OpenQASM.Angle.AngleAsResult(a);
812812
"#]],
813813
);
814814
}
@@ -845,12 +845,12 @@ fn sized_angle_to_bit() {
845845
check(
846846
source,
847847
&expect![[r#"
848-
import QasmStd.Intrinsic.*;
849-
mutable a = new QasmStd.Angle.Angle {
848+
import Std.OpenQASM.Intrinsic.*;
849+
mutable a = new Std.OpenQASM.Angle.Angle {
850850
Value = 0,
851851
Size = 53
852852
};
853-
QasmStd.Angle.AngleAsResult(a);
853+
Std.OpenQASM.Angle.AngleAsResult(a);
854854
"#]],
855855
);
856856
}
@@ -864,12 +864,12 @@ fn sized_angle_to_bitarray() {
864864
check(
865865
source,
866866
&expect![[r#"
867-
import QasmStd.Intrinsic.*;
868-
mutable a = new QasmStd.Angle.Angle {
867+
import Std.OpenQASM.Intrinsic.*;
868+
mutable a = new Std.OpenQASM.Angle.Angle {
869869
Value = 0,
870870
Size = 53
871871
};
872-
QasmStd.Angle.AngleAsResultArrayBE(a);
872+
Std.OpenQASM.Angle.AngleAsResultArrayBE(a);
873873
"#]],
874874
);
875875
}

compiler/qsc_qasm/src/tests/expression/explicit_cast_from_bit.rs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ fn bit_to_bool() {
2727
check(
2828
source,
2929
&expect![[r#"
30-
import QasmStd.Intrinsic.*;
30+
import Std.OpenQASM.Intrinsic.*;
3131
mutable a = Zero;
32-
QasmStd.Convert.ResultAsBool(a);
32+
Std.OpenQASM.Convert.ResultAsBool(a);
3333
"#]],
3434
);
3535
}
@@ -43,9 +43,9 @@ fn bitarray_to_bool() {
4343
check(
4444
source,
4545
&expect![[r#"
46-
import QasmStd.Intrinsic.*;
46+
import Std.OpenQASM.Intrinsic.*;
4747
mutable a = [Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero];
48-
QasmStd.Convert.ResultArrayAsBool(a);
48+
Std.OpenQASM.Convert.ResultArrayAsBool(a);
4949
"#]],
5050
);
5151
}
@@ -111,9 +111,9 @@ fn bit_to_int() {
111111
check(
112112
source,
113113
&expect![[r#"
114-
import QasmStd.Intrinsic.*;
114+
import Std.OpenQASM.Intrinsic.*;
115115
mutable a = Zero;
116-
QasmStd.Convert.ResultAsInt(a);
116+
Std.OpenQASM.Convert.ResultAsInt(a);
117117
"#]],
118118
);
119119
}
@@ -127,9 +127,9 @@ fn bit_to_sized_int() {
127127
check(
128128
source,
129129
&expect![[r#"
130-
import QasmStd.Intrinsic.*;
130+
import Std.OpenQASM.Intrinsic.*;
131131
mutable a = Zero;
132-
QasmStd.Convert.ResultAsInt(a);
132+
Std.OpenQASM.Convert.ResultAsInt(a);
133133
"#]],
134134
);
135135
}
@@ -167,9 +167,9 @@ fn bitarray_to_sized_int() {
167167
check(
168168
source,
169169
&expect![[r#"
170-
import QasmStd.Intrinsic.*;
170+
import Std.OpenQASM.Intrinsic.*;
171171
mutable a = [Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero];
172-
QasmStd.Convert.ResultArrayAsIntBE(a);
172+
Std.OpenQASM.Convert.ResultArrayAsIntBE(a);
173173
"#]],
174174
);
175175
}
@@ -233,9 +233,9 @@ fn bit_to_uint() {
233233
check(
234234
source,
235235
&expect![[r#"
236-
import QasmStd.Intrinsic.*;
236+
import Std.OpenQASM.Intrinsic.*;
237237
mutable a = Zero;
238-
QasmStd.Convert.ResultAsInt(a);
238+
Std.OpenQASM.Convert.ResultAsInt(a);
239239
"#]],
240240
);
241241
}
@@ -249,9 +249,9 @@ fn bit_to_sized_uint() {
249249
check(
250250
source,
251251
&expect![[r#"
252-
import QasmStd.Intrinsic.*;
252+
import Std.OpenQASM.Intrinsic.*;
253253
mutable a = Zero;
254-
QasmStd.Convert.ResultAsInt(a);
254+
Std.OpenQASM.Convert.ResultAsInt(a);
255255
"#]],
256256
);
257257
}
@@ -289,9 +289,9 @@ fn bitarray_to_sized_uint() {
289289
check(
290290
source,
291291
&expect![[r#"
292-
import QasmStd.Intrinsic.*;
292+
import Std.OpenQASM.Intrinsic.*;
293293
mutable a = [Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero];
294-
QasmStd.Convert.ResultArrayAsIntBE(a);
294+
Std.OpenQASM.Convert.ResultArrayAsIntBE(a);
295295
"#]],
296296
);
297297
}
@@ -355,9 +355,9 @@ fn bit_to_float() {
355355
check(
356356
source,
357357
&expect![[r#"
358-
import QasmStd.Intrinsic.*;
358+
import Std.OpenQASM.Intrinsic.*;
359359
mutable a = Zero;
360-
QasmStd.Convert.ResultAsDouble(a);
360+
Std.OpenQASM.Convert.ResultAsDouble(a);
361361
"#]],
362362
);
363363
}
@@ -371,9 +371,9 @@ fn bit_to_sized_float() {
371371
check(
372372
source,
373373
&expect![[r#"
374-
import QasmStd.Intrinsic.*;
374+
import Std.OpenQASM.Intrinsic.*;
375375
mutable a = Zero;
376-
QasmStd.Convert.ResultAsDouble(a);
376+
Std.OpenQASM.Convert.ResultAsDouble(a);
377377
"#]],
378378
);
379379
}
@@ -550,9 +550,9 @@ fn bitarray_to_sized_angle() {
550550
check(
551551
source,
552552
&expect![[r#"
553-
import QasmStd.Intrinsic.*;
553+
import Std.OpenQASM.Intrinsic.*;
554554
mutable a = [Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero];
555-
QasmStd.Convert.ResultArrayAsAngleBE(a);
555+
Std.OpenQASM.Convert.ResultArrayAsAngleBE(a);
556556
"#]],
557557
);
558558
}
@@ -756,7 +756,7 @@ fn bit_to_bit() {
756756
check(
757757
source,
758758
&expect![[r#"
759-
import QasmStd.Intrinsic.*;
759+
import Std.OpenQASM.Intrinsic.*;
760760
mutable a = Zero;
761761
a;
762762
"#]],
@@ -772,9 +772,9 @@ fn bit_to_bitarray() {
772772
check(
773773
source,
774774
&expect![[r#"
775-
import QasmStd.Intrinsic.*;
775+
import Std.OpenQASM.Intrinsic.*;
776776
mutable a = Zero;
777-
QasmStd.Convert.ResultAsResultArrayBE(a, 32);
777+
Std.OpenQASM.Convert.ResultAsResultArrayBE(a, 32);
778778
"#]],
779779
);
780780
}
@@ -788,9 +788,9 @@ fn bitarray_to_bit() {
788788
check(
789789
source,
790790
&expect![[r#"
791-
import QasmStd.Intrinsic.*;
791+
import Std.OpenQASM.Intrinsic.*;
792792
mutable a = [Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero];
793-
QasmStd.Convert.ResultArrayAsResultBE(a);
793+
Std.OpenQASM.Convert.ResultArrayAsResultBE(a);
794794
"#]],
795795
);
796796
}
@@ -804,7 +804,7 @@ fn bitarray_to_bitarray() {
804804
check(
805805
source,
806806
&expect![[r#"
807-
import QasmStd.Intrinsic.*;
807+
import Std.OpenQASM.Intrinsic.*;
808808
mutable a = [Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero];
809809
a;
810810
"#]],

0 commit comments

Comments
 (0)