Exemplo n.º 1
0
 public ApplyFunctorToOperationCalls(QsFunctor functor)
     : base(new TransformationsState(functor))
 {
     this.StatementKinds  = new IgnoreOuterBlockInConjugations <TransformationsState>(this);
     this.ExpressionKinds = new ExpressionKindTransformation(this);
     this.Types           = new TypeTransformation <TransformationsState>(this, TransformationOptions.Disabled);
 }
Exemplo n.º 2
0
 public ApplyFunctorToOperationCalls(QsFunctor functor)
     : base(new TransformationsState(functor))
 {
     if (functor.IsControlled)
     {
         this.Statements = new AddVariableDeclarations <TransformationsState>(this, ControlQubitsDeclaration);
     }
     this.StatementKinds  = new IgnoreOuterBlockInConjugations <TransformationsState>(this);
     this.ExpressionKinds = new ExpressionKindTransformation(this);
     this.Types           = new TypeTransformation <TransformationsState>(this, TransformationOptions.Disabled);
 }
Exemplo n.º 3
0
 public ApplyToExpressionKind(Core.ExpressionTransformation expression, QsFunctor functor) :
     base(expression) =>
     this.FunctorToApply = functor ?? throw new ArgumentNullException(nameof(functor));
Exemplo n.º 4
0
 public ApplyFunctorToOperationCalls(QsFunctor functor) : base(
         s => new IgnoreOuterBlockInConjugations <ApplyFunctorToOperationCalls>(s as ApplyFunctorToOperationCalls),
         new ExpressionTransformation <ApplyToExpressionKind>(e => new ApplyToExpressionKind(e, functor)))
 {
 }
Exemplo n.º 5
0
 public ExpressionKindTransformation(QsFunctor functor)
     : base(new TransformationsState(functor))
 {
 }
Exemplo n.º 6
0
 public TransformationsState(QsFunctor functor) =>
 this.FunctorToApply = functor ?? throw new ArgumentNullException(nameof(functor));
Exemplo n.º 7
0
 public TransformationsState(QsFunctor functor) => this.FunctorToApply = functor;
Exemplo n.º 8
0
 public ApplyFunctorToOperationCalls(QsFunctor functor) :
     base(new ExpressionTransformation <ApplyToExpressionKind>(e => new ApplyToExpressionKind(e, functor)))
 {
 }