Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit 904a942

Browse files
authored
Update target package intrinsic names (#789)
This updates the custom instruction names set by the `TargetInstruction` attribute in the Type1, Type2, and Type3 target packages so that they match the naming conventions in the QIR spec. This will avoid unnecessary duplication of instructions, such as `__quantum__qis__x__body` vs `__quantum__qis__x`.
1 parent fafc454 commit 904a942

20 files changed

+17
-20
lines changed

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"msbuild-sdks": {
3-
"Microsoft.Quantum.Sdk": "0.18.2107151063-beta"
3+
"Microsoft.Quantum.Sdk": "0.18.2108156289-beta"
44
}
55
}

src/Qir/Tools/Microsoft.Quantum.Qir.Runtime.Tools.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
<ItemGroup>
3636
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
37-
<PackageReference Include="Microsoft.Quantum.QirGeneration" Version="0.18.2107151063-beta" />
37+
<PackageReference Include="Microsoft.Quantum.QirGeneration" Version="0.18.2108156289-beta" />
3838
</ItemGroup>
3939

4040
<ItemGroup>

src/Simulation/AutoSubstitution/Microsoft.Quantum.AutoSubstitution.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="Microsoft.Quantum.Compiler" Version="0.18.2107151063-beta" />
22+
<PackageReference Include="Microsoft.Quantum.Compiler" Version="0.18.2108156289-beta" />
2323
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.6.0" />
2424
</ItemGroup>
2525

src/Simulation/TargetDefinitions/Intrinsic/ApplyControlledX.qs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace Microsoft.Quantum.Intrinsic {
3232
/// ```qsharp
3333
/// CNOT(control, target);
3434
/// ```
35-
@TargetInstruction("cnot")
35+
@TargetInstruction("cnot__body")
3636
internal operation ApplyControlledX (control : Qubit, target : Qubit) : Unit is Adj {
3737
body intrinsic;
3838
adjoint self;

src/Simulation/TargetDefinitions/Intrinsic/ApplyControlledZ.qs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace Microsoft.Quantum.Intrinsic {
2828
/// ```qsharp
2929
/// Controlled Z([control], target);
3030
/// ```
31-
@TargetInstruction("cz")
31+
@TargetInstruction("cz__body")
3232
internal operation ApplyControlledZ (control : Qubit, target : Qubit) : Unit is Adj {
3333
body intrinsic;
3434
adjoint self;

src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledH.qs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Microsoft.Quantum.Intrinsic {
2121
/// # Input
2222
/// ## qubit
2323
/// Qubit to which the gate should be applied.
24-
@TargetInstruction("h")
24+
@TargetInstruction("h__body")
2525
internal operation ApplyUncontrolledH (qubit : Qubit) : Unit is Adj {
2626
body intrinsic;
2727
adjoint self;

src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRx.qs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Microsoft.Quantum.Intrinsic {
2929
/// ```qsharp
3030
/// R(PauliX, theta, qubit);
3131
/// ```
32-
@TargetInstruction("rx")
32+
@TargetInstruction("rx__body")
3333
internal operation ApplyUncontrolledRx (theta : Double, qubit : Qubit) : Unit {
3434
body intrinsic;
3535
}

src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRy.qs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Microsoft.Quantum.Intrinsic {
2929
/// ```qsharp
3030
/// R(PauliY, theta, qubit);
3131
/// ```
32-
@TargetInstruction("ry")
32+
@TargetInstruction("ry__body")
3333
internal operation ApplyUncontrolledRy (theta : Double, qubit : Qubit) : Unit {
3434
body intrinsic;
3535
}

src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledRz.qs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Microsoft.Quantum.Intrinsic {
2929
/// ```qsharp
3030
/// R(PauliZ, theta, qubit);
3131
/// ```
32-
@TargetInstruction("rz")
32+
@TargetInstruction("rz__body")
3333
internal operation ApplyUncontrolledRz (theta : Double, qubit : Qubit) : Unit {
3434
body intrinsic;
3535
}

src/Simulation/TargetDefinitions/Intrinsic/ApplyUncontrolledS.qs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Microsoft.Quantum.Intrinsic {
2020
/// # Input
2121
/// ## qubit
2222
/// Qubit to which the gate should be applied.
23-
@TargetInstruction("s")
23+
@TargetInstruction("s__body")
2424
internal operation ApplyUncontrolledS (qubit : Qubit) : Unit {
2525
body intrinsic;
2626
}

0 commit comments

Comments
 (0)