Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
6 changes: 4 additions & 2 deletions src/QsCompiler/Compiler/RewriteSteps/ClassicallyControlled.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
namespace Microsoft.Quantum.QsCompiler.BuiltInRewriteSteps
{
/// <summary>
/// Replaces if-statements with the corresponding calls to built-in quantum operations if possible.
/// Replaces if-statements with the corresponding calls to built-in quantum operations if possible.
/// </summary>
internal class ClassicallyControlled : IRewriteStep
{
public string Name => "Classically Controlled";
public int Priority => RewriteStepPriorities.ControlFlowSubstitutions;
public int Priority => RewriteStepPriorities.ControlFlowSubstitutions;
public IDictionary<string, string> AssemblyConstants { get; }
public IEnumerable<IRewriteStep.Diagnostic> GeneratedDiagnostics => null;

Expand Down Expand Up @@ -44,6 +44,8 @@ public bool PreconditionVerification(QsCompilation compilation)
.ToHashSet();
var requiredBuiltIns = new HashSet<QsQualifiedName>()
{
BuiltIn.NoOp.FullName,

BuiltIn.ApplyIfZero.FullName,
BuiltIn.ApplyIfZeroA.FullName,
BuiltIn.ApplyIfZeroC.FullName,
Expand Down