From ac1e290231fe5ba9cc7071806043702eb8a972ff Mon Sep 17 00:00:00 2001 From: Samuel Banning Date: Wed, 14 Apr 2021 17:20:39 -0700 Subject: [PATCH 1/6] fixed some issues with driver generation --- src/QsCompiler/Compiler/Templates/CppInterop.cs | 2 +- src/QsCompiler/Compiler/Templates/QirDriverCpp.cs | 6 +++++- src/QsCompiler/Compiler/Templates/QirDriverCpp.tt | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/QsCompiler/Compiler/Templates/CppInterop.cs b/src/QsCompiler/Compiler/Templates/CppInterop.cs index 4caa2242cb..57b427d8ec 100644 --- a/src/QsCompiler/Compiler/Templates/CppInterop.cs +++ b/src/QsCompiler/Compiler/Templates/CppInterop.cs @@ -30,7 +30,7 @@ public string CppType() DataType.RangeType => "InteropRange*", DataType.ResultType => "char", DataType.StringType => "const char*", - DataType.ArrayType => "InteropArray *", + DataType.ArrayType => "InteropArray*", _ => throw new NotSupportedException($"Unsupported argument type {this.Type}") }; } diff --git a/src/QsCompiler/Compiler/Templates/QirDriverCpp.cs b/src/QsCompiler/Compiler/Templates/QirDriverCpp.cs index 176fcef63a..8987912fd4 100644 --- a/src/QsCompiler/Compiler/Templates/QirDriverCpp.cs +++ b/src/QsCompiler/Compiler/Templates/QirDriverCpp.cs @@ -71,6 +71,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} "); } if (entryPointOperation.ContainsArgumentType(DataType.RangeType) || entryPointOperation.ContainsArrayType(DataType.RangeType)) { @@ -170,8 +171,9 @@ unique_ptr CreateInteropRange(RangeTuple rangeTuple) if (arg.CppCliVariableInitialValue() != null) { WriteLine($" {arg.CliValueVariableName()} = {arg.CppCliVariableInitialValue()};"); } - WriteLine($" app.add_option(\"{arg.CliOptionString()}\", {arg.CliValueVariableName()}, \"{arg.CliDescription()}\")->required()"); + Write($" app.add_option(\"{arg.CliOptionString()}\", {arg.CliValueVariableName()}, \"{arg.CliDescription()}\")->required()"); if (arg.TransformerMapName() != null) { + WriteLine(""); Write($" ->transform(CLI::CheckedTransformer({arg.TransformerMapName()}, CLI::ignore_case))"); } WriteLine(";"); @@ -222,6 +224,7 @@ unique_ptr CreateInteropRange(RangeTuple rangeTuple) WriteLine($" {arg.CppCliValueType()} {arg.InteropVariableName()} = {arg.CliValueVariableName()};"); break; } + WriteLine(""); } this.Write(@" // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -244,6 +247,7 @@ unique_ptr CreateInteropRange(RangeTuple rangeTuple) Write($" {arg.InteropVariableName()}.c_str()"); break; case DataType.ArrayType: + case DataType.RangeType: Write($" {arg.InteropVariableName()}.get()"); break; default: diff --git a/src/QsCompiler/Compiler/Templates/QirDriverCpp.tt b/src/QsCompiler/Compiler/Templates/QirDriverCpp.tt index 2704c4c8a2..edfd4468d0 100644 --- a/src/QsCompiler/Compiler/Templates/QirDriverCpp.tt +++ b/src/QsCompiler/Compiler/Templates/QirDriverCpp.tt @@ -47,6 +47,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} <# } #> <# if (entryPointOperation.ContainsArgumentType(DataType.RangeType) || entryPointOperation.ContainsArrayType(DataType.RangeType)) { #> @@ -167,8 +168,9 @@ int main(int argc, char* argv[]) if (arg.CppCliVariableInitialValue() != null) { WriteLine($" {arg.CliValueVariableName()} = {arg.CppCliVariableInitialValue()};"); } - WriteLine($" app.add_option(\"{arg.CliOptionString()}\", {arg.CliValueVariableName()}, \"{arg.CliDescription()}\")->required()"); + Write($" app.add_option(\"{arg.CliOptionString()}\", {arg.CliValueVariableName()}, \"{arg.CliDescription()}\")->required()"); if (arg.TransformerMapName() != null) { + WriteLine(""); Write($" ->transform(CLI::CheckedTransformer({arg.TransformerMapName()}, CLI::ignore_case))"); } WriteLine(";"); @@ -221,6 +223,7 @@ int main(int argc, char* argv[]) WriteLine($" {arg.CppCliValueType()} {arg.InteropVariableName()} = {arg.CliValueVariableName()};"); break; } + WriteLine(""); } #> // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -241,6 +244,7 @@ int main(int argc, char* argv[]) Write($" {arg.InteropVariableName()}.c_str()"); break; case DataType.ArrayType: + case DataType.RangeType: Write($" {arg.InteropVariableName()}.get()"); break; default: From a87793a800079350944b97e16692ec4b18465667 Mon Sep 17 00:00:00 2001 From: Samuel Banning Date: Thu, 15 Apr 2021 09:45:28 -0700 Subject: [PATCH 2/6] fixed some template bugs --- .../TestCases/QirEntryPointTests/UseBoolArg.cpp | 1 + .../TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp | 1 + .../TestCases/QirEntryPointTests/UseBoolArrayArg.cpp | 4 +++- .../QirEntryPointTests/UseBoolArrayArgWithValues.cpp | 4 +++- .../TestCases/QirEntryPointTests/UseDoubleArg.cpp | 4 ++-- .../QirEntryPointTests/UseDoubleArgWithValues.cpp | 4 ++-- .../TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp | 7 ++++--- .../QirEntryPointTests/UseDoubleArrayArgWithValues.cpp | 7 ++++--- .../TestCases/QirEntryPointTests/UseIntegerArg.cpp | 4 ++-- .../QirEntryPointTests/UseIntegerArgWithValues.cpp | 4 ++-- .../TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp | 7 ++++--- .../QirEntryPointTests/UseIntegerArrayArgWithValues.cpp | 7 ++++--- .../TestCases/QirEntryPointTests/UsePauliArg.cpp | 1 + .../TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp | 1 + .../TestCases/QirEntryPointTests/UsePauliArrayArg.cpp | 4 +++- .../QirEntryPointTests/UsePauliArrayArgWithValues.cpp | 4 +++- .../TestCases/QirEntryPointTests/UseRangeArg.cpp | 6 +++--- .../TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp | 6 +++--- .../TestCases/QirEntryPointTests/UseRangeArrayArg.cpp | 7 ++++--- .../QirEntryPointTests/UseRangeArrayArgWithValues.cpp | 7 ++++--- .../TestCases/QirEntryPointTests/UseResultArg.cpp | 1 + .../QirEntryPointTests/UseResultArgWithValues.cpp | 1 + .../TestCases/QirEntryPointTests/UseResultArrayArg.cpp | 4 +++- .../QirEntryPointTests/UseResultArrayArgWithValues.cpp | 4 +++- .../TestCases/QirEntryPointTests/UseStringArg.cpp | 4 ++-- .../QirEntryPointTests/UseStringArgWithValues.cpp | 4 ++-- 26 files changed, 66 insertions(+), 42 deletions(-) diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArg.cpp index 5ea6cc4407..56edc2ea4a 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArg.cpp @@ -60,6 +60,7 @@ int main(int argc, char* argv[]) CLI11_PARSE(app, argc, argv); char BoolArgInteropValue = BoolArgCliValue; + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp index d747b4744e..f62cde2437 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp @@ -60,6 +60,7 @@ int main(int argc, char* argv[]) CLI11_PARSE(app, argc, argv); char BoolArgInteropValue = BoolArgCliValue; + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArg.cpp index 6d09bc4410..5fb3c9fccb 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArg.cpp @@ -44,10 +44,11 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} // This is the function corresponding to the QIR entry-point. extern "C" void UseBoolArrayArg( // NOLINT - InteropArray * BoolArrayArgInteropValue + InteropArray* BoolArrayArgInteropValue ); @@ -84,6 +85,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. unique_ptr BoolArrayArgInteropValue = CreateInteropArray(BoolArrayArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArgWithValues.cpp index 6c9d4879cc..bf7d49b63f 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArgWithValues.cpp @@ -44,10 +44,11 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} // This is the function corresponding to the QIR entry-point. extern "C" void UseBoolArrayArgWithValues( // NOLINT - InteropArray * BoolArrayArgInteropValue + InteropArray* BoolArrayArgInteropValue ); @@ -84,6 +85,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. unique_ptr BoolArrayArgInteropValue = CreateInteropArray(BoolArrayArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArg.cpp index 7602eee7bd..af2bbb469b 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArg.cpp @@ -45,13 +45,13 @@ int main(int argc, char* argv[]) double_t DoubleArgCliValue; DoubleArgCliValue = 0.0; - app.add_option("--DoubleArg", DoubleArgCliValue, "A double value for the DoubleArg argument")->required() -; + app.add_option("--DoubleArg", DoubleArgCliValue, "A double value for the DoubleArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); double_t DoubleArgInteropValue = DoubleArgCliValue; + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArgWithValues.cpp index 03a9b4ffac..de3249a5ea 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArgWithValues.cpp @@ -45,13 +45,13 @@ int main(int argc, char* argv[]) double_t DoubleArgCliValue; DoubleArgCliValue = 0.0; - app.add_option("--DoubleArg", DoubleArgCliValue, "A double value for the DoubleArg argument")->required() -; + app.add_option("--DoubleArg", DoubleArgCliValue, "A double value for the DoubleArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); double_t DoubleArgInteropValue = DoubleArgCliValue; + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp index 8b7f9d1da5..987e0f8fa4 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp @@ -44,10 +44,11 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} // This is the function corresponding to the QIR entry-point. extern "C" void UseDoubleArrayArg( // NOLINT - InteropArray * DoubleArrayArgInteropValue + InteropArray* DoubleArrayArgInteropValue ); @@ -67,8 +68,7 @@ int main(int argc, char* argv[]) "File where the output produced during the simulation is written"); vector DoubleArrayArgCliValue; - app.add_option("--DoubleArrayArg", DoubleArrayArgCliValue, "A double array value for the DoubleArrayArg argument")->required() -; + app.add_option("--DoubleArrayArg", DoubleArrayArgCliValue, "A double array value for the DoubleArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); @@ -76,6 +76,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. unique_ptr DoubleArrayArgInteropValue = CreateInteropArray(DoubleArrayArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArgWithValues.cpp index f28042f1ca..892a379d73 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArgWithValues.cpp @@ -44,10 +44,11 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} // This is the function corresponding to the QIR entry-point. extern "C" void UseDoubleArrayArgWithValues( // NOLINT - InteropArray * DoubleArrayArgInteropValue + InteropArray* DoubleArrayArgInteropValue ); @@ -67,8 +68,7 @@ int main(int argc, char* argv[]) "File where the output produced during the simulation is written"); vector DoubleArrayArgCliValue; - app.add_option("--DoubleArrayArg", DoubleArrayArgCliValue, "A double array value for the DoubleArrayArg argument")->required() -; + app.add_option("--DoubleArrayArg", DoubleArrayArgCliValue, "A double array value for the DoubleArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); @@ -76,6 +76,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. unique_ptr DoubleArrayArgInteropValue = CreateInteropArray(DoubleArrayArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArg.cpp index 71d948eebe..bded3a9fc5 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArg.cpp @@ -45,13 +45,13 @@ int main(int argc, char* argv[]) int64_t IntegerArgCliValue; IntegerArgCliValue = 0; - app.add_option("--IntegerArg", IntegerArgCliValue, "A integer value for the IntegerArg argument")->required() -; + app.add_option("--IntegerArg", IntegerArgCliValue, "A integer value for the IntegerArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); int64_t IntegerArgInteropValue = IntegerArgCliValue; + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArgWithValues.cpp index 1e92592eea..cfec6a208a 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArgWithValues.cpp @@ -45,13 +45,13 @@ int main(int argc, char* argv[]) int64_t IntegerArgCliValue; IntegerArgCliValue = 0; - app.add_option("--IntegerArg", IntegerArgCliValue, "A integer value for the IntegerArg argument")->required() -; + app.add_option("--IntegerArg", IntegerArgCliValue, "A integer value for the IntegerArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); int64_t IntegerArgInteropValue = IntegerArgCliValue; + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp index f8c9ac6724..e0f847a330 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp @@ -44,10 +44,11 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} // This is the function corresponding to the QIR entry-point. extern "C" void UseIntegerArrayArg( // NOLINT - InteropArray * IntegerArrayArgInteropValue + InteropArray* IntegerArrayArgInteropValue ); @@ -67,8 +68,7 @@ int main(int argc, char* argv[]) "File where the output produced during the simulation is written"); vector IntegerArrayArgCliValue; - app.add_option("--IntegerArrayArg", IntegerArrayArgCliValue, "A integer array value for the IntegerArrayArg argument")->required() -; + app.add_option("--IntegerArrayArg", IntegerArrayArgCliValue, "A integer array value for the IntegerArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); @@ -76,6 +76,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. unique_ptr IntegerArrayArgInteropValue = CreateInteropArray(IntegerArrayArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArgWithValues.cpp index 1a486871be..41c5c80822 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArgWithValues.cpp @@ -44,10 +44,11 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} // This is the function corresponding to the QIR entry-point. extern "C" void UseIntegerArrayArgWithValues( // NOLINT - InteropArray * IntegerArrayArgInteropValue + InteropArray* IntegerArrayArgInteropValue ); @@ -67,8 +68,7 @@ int main(int argc, char* argv[]) "File where the output produced during the simulation is written"); vector IntegerArrayArgCliValue; - app.add_option("--IntegerArrayArg", IntegerArrayArgCliValue, "A integer array value for the IntegerArrayArg argument")->required() -; + app.add_option("--IntegerArrayArg", IntegerArrayArgCliValue, "A integer array value for the IntegerArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); @@ -76,6 +76,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. unique_ptr IntegerArrayArgInteropValue = CreateInteropArray(IntegerArrayArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArg.cpp index c50d98f056..978a164b7f 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArg.cpp @@ -65,6 +65,7 @@ int main(int argc, char* argv[]) // Translate a PauliID value to its char representation. char PauliArgInteropValue = TranslatePauliToChar(PauliArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp index 298959cef8..4b7aa9f256 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp @@ -65,6 +65,7 @@ int main(int argc, char* argv[]) // Translate a PauliID value to its char representation. char PauliArgInteropValue = TranslatePauliToChar(PauliArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArg.cpp index 109e311fd6..2c7f05c128 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArg.cpp @@ -44,10 +44,11 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} // This is the function corresponding to the QIR entry-point. extern "C" void UsePauliArrayArg( // NOLINT - InteropArray * PauliArrayArgInteropValue + InteropArray* PauliArrayArgInteropValue ); @@ -89,6 +90,7 @@ int main(int argc, char* argv[]) vector PauliArrayArgIntermediateValue; TranslateVector(PauliArrayArgCliValue, PauliArrayArgIntermediateValue, TranslatePauliToChar); unique_ptr PauliArrayArgInteropValue = CreateInteropArray(PauliArrayArgIntermediateValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArgWithValues.cpp index ece502508e..e03a11beb5 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArgWithValues.cpp @@ -44,10 +44,11 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} // This is the function corresponding to the QIR entry-point. extern "C" void UsePauliArrayArgWithValues( // NOLINT - InteropArray * PauliArrayArgInteropValue + InteropArray* PauliArrayArgInteropValue ); @@ -89,6 +90,7 @@ int main(int argc, char* argv[]) vector PauliArrayArgIntermediateValue; TranslateVector(PauliArrayArgCliValue, PauliArrayArgIntermediateValue, TranslatePauliToChar); unique_ptr PauliArrayArgInteropValue = CreateInteropArray(PauliArrayArgIntermediateValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArg.cpp index a003b57446..f078f2dca2 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArg.cpp @@ -74,14 +74,14 @@ int main(int argc, char* argv[]) "File where the output produced during the simulation is written"); RangeTuple RangeArgCliValue; - app.add_option("--RangeArg", RangeArgCliValue, "A Range (start, step, end) value for the RangeArg argument")->required() -; + app.add_option("--RangeArg", RangeArgCliValue, "A Range (start, step, end) value for the RangeArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Create an interop range. unique_ptr RangeArgInteropValue = CreateInteropRange(RangeArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; @@ -94,7 +94,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseRangeArg( - RangeArgInteropValue + RangeArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp index 07382702e5..0481d1ab14 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp @@ -74,14 +74,14 @@ int main(int argc, char* argv[]) "File where the output produced during the simulation is written"); RangeTuple RangeArgCliValue; - app.add_option("--RangeArg", RangeArgCliValue, "A Range (start, step, end) value for the RangeArg argument")->required() -; + app.add_option("--RangeArg", RangeArgCliValue, "A Range (start, step, end) value for the RangeArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Create an interop range. unique_ptr RangeArgInteropValue = CreateInteropRange(RangeArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; @@ -94,7 +94,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseRangeArgWithValues( - RangeArgInteropValue + RangeArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArg.cpp index b037917453..6f7622f2cf 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArg.cpp @@ -44,6 +44,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} using RangeTuple = tuple; struct InteropRange @@ -86,7 +87,7 @@ void FreePointerVector(vector& v) // This is the function corresponding to the QIR entry-point. extern "C" void UseRangeArrayArg( // NOLINT - InteropArray * RangeArrayArgInteropValue + InteropArray* RangeArrayArgInteropValue ); @@ -106,8 +107,7 @@ int main(int argc, char* argv[]) "File where the output produced during the simulation is written"); vector RangeArrayArgCliValue; - app.add_option("--RangeArrayArg", RangeArrayArgCliValue, "A Range array value for the RangeArrayArg argument")->required() -; + app.add_option("--RangeArrayArg", RangeArrayArgCliValue, "A Range array value for the RangeArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); @@ -115,6 +115,7 @@ int main(int argc, char* argv[]) vector RangeArrayArgIntermediateValue; TranslateVector(RangeArrayArgCliValue, RangeArrayArgIntermediateValue, TranslateRangeTupleToInteropRangePointer); unique_ptr RangeArrayArgInteropValue = CreateInteropArray(RangeArrayArgIntermediateValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArgWithValues.cpp index d85f3e7748..fd94f3bad5 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArgWithValues.cpp @@ -44,6 +44,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} using RangeTuple = tuple; struct InteropRange @@ -86,7 +87,7 @@ void FreePointerVector(vector& v) // This is the function corresponding to the QIR entry-point. extern "C" void UseRangeArrayArgWithValues( // NOLINT - InteropArray * RangeArrayArgInteropValue + InteropArray* RangeArrayArgInteropValue ); @@ -106,8 +107,7 @@ int main(int argc, char* argv[]) "File where the output produced during the simulation is written"); vector RangeArrayArgCliValue; - app.add_option("--RangeArrayArg", RangeArrayArgCliValue, "A Range array value for the RangeArrayArg argument")->required() -; + app.add_option("--RangeArrayArg", RangeArrayArgCliValue, "A Range array value for the RangeArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); @@ -115,6 +115,7 @@ int main(int argc, char* argv[]) vector RangeArrayArgIntermediateValue; TranslateVector(RangeArrayArgCliValue, RangeArrayArgIntermediateValue, TranslateRangeTupleToInteropRangePointer); unique_ptr RangeArrayArgInteropValue = CreateInteropArray(RangeArrayArgIntermediateValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArg.cpp index 977bf6d415..90437295ce 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArg.cpp @@ -61,6 +61,7 @@ int main(int argc, char* argv[]) CLI11_PARSE(app, argc, argv); char ResultArgInteropValue = ResultArgCliValue; + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArgWithValues.cpp index c4509acff4..186dd217ad 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArgWithValues.cpp @@ -61,6 +61,7 @@ int main(int argc, char* argv[]) CLI11_PARSE(app, argc, argv); char ResultArgInteropValue = ResultArgCliValue; + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArg.cpp index 1e3d364e90..1a13c0c276 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArg.cpp @@ -44,10 +44,11 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} // This is the function corresponding to the QIR entry-point. extern "C" void UseResultArrayArg( // NOLINT - InteropArray * ResultArrayArgInteropValue + InteropArray* ResultArrayArgInteropValue ); @@ -85,6 +86,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. unique_ptr ResultArrayArgInteropValue = CreateInteropArray(ResultArrayArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArgWithValues.cpp index 4ad81dbb32..eb10cb2c3b 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArgWithValues.cpp @@ -44,10 +44,11 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} // This is the function corresponding to the QIR entry-point. extern "C" void UseResultArrayArgWithValues( // NOLINT - InteropArray * ResultArrayArgInteropValue + InteropArray* ResultArrayArgInteropValue ); @@ -85,6 +86,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. unique_ptr ResultArrayArgInteropValue = CreateInteropArray(ResultArrayArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArg.cpp index 1a640bd777..11106fca8d 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArg.cpp @@ -49,13 +49,13 @@ int main(int argc, char* argv[]) "File where the output produced during the simulation is written"); string StringArgCliValue; - app.add_option("--StringArg", StringArgCliValue, "A String value for the StringArg argument")->required() -; + app.add_option("--StringArg", StringArgCliValue, "A String value for the StringArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); string StringArgInteropValue = StringArgCliValue; + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArgWithValues.cpp index bb96cdb95b..6dae3fe59b 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArgWithValues.cpp @@ -49,13 +49,13 @@ int main(int argc, char* argv[]) "File where the output produced during the simulation is written"); string StringArgCliValue; - app.add_option("--StringArg", StringArgCliValue, "A String value for the StringArg argument")->required() -; + app.add_option("--StringArg", StringArgCliValue, "A String value for the StringArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); string StringArgInteropValue = StringArgCliValue; + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; From c1c035d461e6436d6e20c7e90621f2e23c7503f0 Mon Sep 17 00:00:00 2001 From: Samuel Banning Date: Thu, 15 Apr 2021 09:47:45 -0700 Subject: [PATCH 3/6] fixed variable names --- src/QsCompiler/Compiler/Templates/CppInterop.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/QsCompiler/Compiler/Templates/CppInterop.cs b/src/QsCompiler/Compiler/Templates/CppInterop.cs index 57b427d8ec..e7c7ee8e21 100644 --- a/src/QsCompiler/Compiler/Templates/CppInterop.cs +++ b/src/QsCompiler/Compiler/Templates/CppInterop.cs @@ -159,17 +159,17 @@ public string CppCliValueType() public string CliValueVariableName() { - return this.Name + "CliValue"; + return + "v" + this.Name + "CliValue"; } public string InteropVariableName() { - return this.Name + "InteropValue"; + return "v" + this.Name + "InteropValue"; } public string IntermediateVariableName() { - return this.Name + "IntermediateValue"; + return "v" + this.Name + "IntermediateValue"; } } From 5b5ae61f181a82e1e45f4a9ebf370cb85847d24c Mon Sep 17 00:00:00 2001 From: Samuel Banning Date: Thu, 15 Apr 2021 10:10:34 -0700 Subject: [PATCH 4/6] fixed --- src/QsCompiler/Compiler/Templates/CppInterop.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/QsCompiler/Compiler/Templates/CppInterop.cs b/src/QsCompiler/Compiler/Templates/CppInterop.cs index e7c7ee8e21..8dfff20144 100644 --- a/src/QsCompiler/Compiler/Templates/CppInterop.cs +++ b/src/QsCompiler/Compiler/Templates/CppInterop.cs @@ -159,7 +159,7 @@ public string CppCliValueType() public string CliValueVariableName() { - return + "v" + this.Name + "CliValue"; + return "v" + this.Name + "CliValue"; } public string InteropVariableName() From 79d7986a4a3b58cf7f9d64d1e9d8d9a4aec9ac0b Mon Sep 17 00:00:00 2001 From: Samuel Banning Date: Thu, 15 Apr 2021 10:12:07 -0700 Subject: [PATCH 5/6] fixed asset files --- .../QirEntryPointTests/UseBoolArg.cpp | 12 +++--- .../UseBoolArgWithValues.cpp | 12 +++--- .../QirEntryPointTests/UseBoolArrayArg.cpp | 10 ++--- .../UseBoolArrayArgWithValues.cpp | 10 ++--- .../QirEntryPointTests/UseDoubleArg.cpp | 12 +++--- .../UseDoubleArgWithValues.cpp | 12 +++--- .../QirEntryPointTests/UseDoubleArrayArg.cpp | 10 ++--- .../UseDoubleArrayArgWithValues.cpp | 10 ++--- .../QirEntryPointTests/UseIntegerArg.cpp | 12 +++--- .../UseIntegerArgWithValues.cpp | 12 +++--- .../QirEntryPointTests/UseIntegerArrayArg.cpp | 10 ++--- .../UseIntegerArrayArgWithValues.cpp | 10 ++--- .../QirEntryPointTests/UseMiscArgs.cpp | 38 ++++++++++--------- .../QirEntryPointTests/UsePauliArg.cpp | 12 +++--- .../UsePauliArgWithValues.cpp | 12 +++--- .../QirEntryPointTests/UsePauliArrayArg.cpp | 14 +++---- .../UsePauliArrayArgWithValues.cpp | 14 +++---- .../QirEntryPointTests/UseRangeArg.cpp | 10 ++--- .../UseRangeArgWithValues.cpp | 10 ++--- .../QirEntryPointTests/UseRangeArrayArg.cpp | 14 +++---- .../UseRangeArrayArgWithValues.cpp | 14 +++---- .../QirEntryPointTests/UseResultArg.cpp | 12 +++--- .../UseResultArgWithValues.cpp | 12 +++--- .../QirEntryPointTests/UseResultArrayArg.cpp | 10 ++--- .../UseResultArrayArgWithValues.cpp | 10 ++--- .../QirEntryPointTests/UseStringArg.cpp | 10 ++--- .../UseStringArgWithValues.cpp | 10 ++--- 27 files changed, 169 insertions(+), 165 deletions(-) diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArg.cpp index 56edc2ea4a..dee9291b43 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArg.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseBoolArg( // NOLINT - char BoolArgInteropValue + char vBoolArgInteropValue ); @@ -51,15 +51,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - char BoolArgCliValue; - BoolArgCliValue = InteropFalseAsChar; - app.add_option("--BoolArg", BoolArgCliValue, "A bool value for the BoolArg argument")->required() + char vBoolArgCliValue; + vBoolArgCliValue = InteropFalseAsChar; + app.add_option("--BoolArg", vBoolArgCliValue, "A bool value for the BoolArg argument")->required() ->transform(CLI::CheckedTransformer(BoolAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - char BoolArgInteropValue = BoolArgCliValue; + char vBoolArgInteropValue = vBoolArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -73,7 +73,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseBoolArg( - BoolArgInteropValue + vBoolArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp index f62cde2437..007c9480e4 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseBoolArgWithValues( // NOLINT - char BoolArgInteropValue + char vBoolArgInteropValue ); @@ -51,15 +51,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - char BoolArgCliValue; - BoolArgCliValue = InteropFalseAsChar; - app.add_option("--BoolArg", BoolArgCliValue, "A bool value for the BoolArg argument")->required() + char vBoolArgCliValue; + vBoolArgCliValue = InteropFalseAsChar; + app.add_option("--BoolArg", vBoolArgCliValue, "A bool value for the BoolArg argument")->required() ->transform(CLI::CheckedTransformer(BoolAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - char BoolArgInteropValue = BoolArgCliValue; + char vBoolArgInteropValue = vBoolArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -73,7 +73,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseBoolArgWithValues( - BoolArgInteropValue + vBoolArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArg.cpp index 5fb3c9fccb..fc4d0ec7db 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArg.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseBoolArrayArg( // NOLINT - InteropArray* BoolArrayArgInteropValue + InteropArray* vBoolArrayArgInteropValue ); @@ -75,8 +75,8 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector BoolArrayArgCliValue; - app.add_option("--BoolArrayArg", BoolArrayArgCliValue, "A bool array value for the BoolArrayArg argument")->required() + vector vBoolArrayArgCliValue; + app.add_option("--BoolArrayArg", vBoolArrayArgCliValue, "A bool array value for the BoolArrayArg argument")->required() ->transform(CLI::CheckedTransformer(BoolAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. @@ -84,7 +84,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr BoolArrayArgInteropValue = CreateInteropArray(BoolArrayArgCliValue); + unique_ptr vBoolArrayArgInteropValue = CreateInteropArray(vBoolArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -98,7 +98,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseBoolArrayArg( - BoolArrayArgInteropValue.get() + vBoolArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArgWithValues.cpp index bf7d49b63f..2605e5b25a 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArgWithValues.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseBoolArrayArgWithValues( // NOLINT - InteropArray* BoolArrayArgInteropValue + InteropArray* vBoolArrayArgInteropValue ); @@ -75,8 +75,8 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector BoolArrayArgCliValue; - app.add_option("--BoolArrayArg", BoolArrayArgCliValue, "A bool array value for the BoolArrayArg argument")->required() + vector vBoolArrayArgCliValue; + app.add_option("--BoolArrayArg", vBoolArrayArgCliValue, "A bool array value for the BoolArrayArg argument")->required() ->transform(CLI::CheckedTransformer(BoolAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. @@ -84,7 +84,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr BoolArrayArgInteropValue = CreateInteropArray(BoolArrayArgCliValue); + unique_ptr vBoolArrayArgInteropValue = CreateInteropArray(vBoolArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -98,7 +98,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseBoolArrayArgWithValues( - BoolArrayArgInteropValue.get() + vBoolArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArg.cpp index af2bbb469b..7f1829299f 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArg.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseDoubleArg( // NOLINT - double DoubleArgInteropValue + double vDoubleArgInteropValue ); @@ -43,14 +43,14 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - double_t DoubleArgCliValue; - DoubleArgCliValue = 0.0; - app.add_option("--DoubleArg", DoubleArgCliValue, "A double value for the DoubleArg argument")->required(); + double_t vDoubleArgCliValue; + vDoubleArgCliValue = 0.0; + app.add_option("--DoubleArg", vDoubleArgCliValue, "A double value for the DoubleArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - double_t DoubleArgInteropValue = DoubleArgCliValue; + double_t vDoubleArgInteropValue = vDoubleArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseDoubleArg( - DoubleArgInteropValue + vDoubleArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArgWithValues.cpp index de3249a5ea..e0b27ff261 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArgWithValues.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseDoubleArgWithValues( // NOLINT - double DoubleArgInteropValue + double vDoubleArgInteropValue ); @@ -43,14 +43,14 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - double_t DoubleArgCliValue; - DoubleArgCliValue = 0.0; - app.add_option("--DoubleArg", DoubleArgCliValue, "A double value for the DoubleArg argument")->required(); + double_t vDoubleArgCliValue; + vDoubleArgCliValue = 0.0; + app.add_option("--DoubleArg", vDoubleArgCliValue, "A double value for the DoubleArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - double_t DoubleArgInteropValue = DoubleArgCliValue; + double_t vDoubleArgInteropValue = vDoubleArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseDoubleArgWithValues( - DoubleArgInteropValue + vDoubleArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp index 987e0f8fa4..34e6b50fbd 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseDoubleArrayArg( // NOLINT - InteropArray* DoubleArrayArgInteropValue + InteropArray* vDoubleArrayArgInteropValue ); @@ -67,15 +67,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector DoubleArrayArgCliValue; - app.add_option("--DoubleArrayArg", DoubleArrayArgCliValue, "A double array value for the DoubleArrayArg argument")->required(); + vector vDoubleArrayArgCliValue; + app.add_option("--DoubleArrayArg", vDoubleArrayArgCliValue, "A double array value for the DoubleArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr DoubleArrayArgInteropValue = CreateInteropArray(DoubleArrayArgCliValue); + unique_ptr vDoubleArrayArgInteropValue = CreateInteropArray(vDoubleArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -89,7 +89,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseDoubleArrayArg( - DoubleArrayArgInteropValue.get() + vDoubleArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArgWithValues.cpp index 892a379d73..73e6953726 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArgWithValues.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseDoubleArrayArgWithValues( // NOLINT - InteropArray* DoubleArrayArgInteropValue + InteropArray* vDoubleArrayArgInteropValue ); @@ -67,15 +67,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector DoubleArrayArgCliValue; - app.add_option("--DoubleArrayArg", DoubleArrayArgCliValue, "A double array value for the DoubleArrayArg argument")->required(); + vector vDoubleArrayArgCliValue; + app.add_option("--DoubleArrayArg", vDoubleArrayArgCliValue, "A double array value for the DoubleArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr DoubleArrayArgInteropValue = CreateInteropArray(DoubleArrayArgCliValue); + unique_ptr vDoubleArrayArgInteropValue = CreateInteropArray(vDoubleArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -89,7 +89,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseDoubleArrayArgWithValues( - DoubleArrayArgInteropValue.get() + vDoubleArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArg.cpp index bded3a9fc5..afee69b600 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArg.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseIntegerArg( // NOLINT - int64_t IntegerArgInteropValue + int64_t vIntegerArgInteropValue ); @@ -43,14 +43,14 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - int64_t IntegerArgCliValue; - IntegerArgCliValue = 0; - app.add_option("--IntegerArg", IntegerArgCliValue, "A integer value for the IntegerArg argument")->required(); + int64_t vIntegerArgCliValue; + vIntegerArgCliValue = 0; + app.add_option("--IntegerArg", vIntegerArgCliValue, "A integer value for the IntegerArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - int64_t IntegerArgInteropValue = IntegerArgCliValue; + int64_t vIntegerArgInteropValue = vIntegerArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseIntegerArg( - IntegerArgInteropValue + vIntegerArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArgWithValues.cpp index cfec6a208a..a9ba9eebef 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArgWithValues.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseIntegerArgWithValues( // NOLINT - int64_t IntegerArgInteropValue + int64_t vIntegerArgInteropValue ); @@ -43,14 +43,14 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - int64_t IntegerArgCliValue; - IntegerArgCliValue = 0; - app.add_option("--IntegerArg", IntegerArgCliValue, "A integer value for the IntegerArg argument")->required(); + int64_t vIntegerArgCliValue; + vIntegerArgCliValue = 0; + app.add_option("--IntegerArg", vIntegerArgCliValue, "A integer value for the IntegerArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - int64_t IntegerArgInteropValue = IntegerArgCliValue; + int64_t vIntegerArgInteropValue = vIntegerArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseIntegerArgWithValues( - IntegerArgInteropValue + vIntegerArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp index e0f847a330..6b01a3cc86 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseIntegerArrayArg( // NOLINT - InteropArray* IntegerArrayArgInteropValue + InteropArray* vIntegerArrayArgInteropValue ); @@ -67,15 +67,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector IntegerArrayArgCliValue; - app.add_option("--IntegerArrayArg", IntegerArrayArgCliValue, "A integer array value for the IntegerArrayArg argument")->required(); + vector vIntegerArrayArgCliValue; + app.add_option("--IntegerArrayArg", vIntegerArrayArgCliValue, "A integer array value for the IntegerArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr IntegerArrayArgInteropValue = CreateInteropArray(IntegerArrayArgCliValue); + unique_ptr vIntegerArrayArgInteropValue = CreateInteropArray(vIntegerArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -89,7 +89,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseIntegerArrayArg( - IntegerArrayArgInteropValue.get() + vIntegerArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArgWithValues.cpp index 41c5c80822..a521cdf6ad 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArgWithValues.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseIntegerArrayArgWithValues( // NOLINT - InteropArray* IntegerArrayArgInteropValue + InteropArray* vIntegerArrayArgInteropValue ); @@ -67,15 +67,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector IntegerArrayArgCliValue; - app.add_option("--IntegerArrayArg", IntegerArrayArgCliValue, "A integer array value for the IntegerArrayArg argument")->required(); + vector vIntegerArrayArgCliValue; + app.add_option("--IntegerArrayArg", vIntegerArrayArgCliValue, "A integer array value for the IntegerArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr IntegerArrayArgInteropValue = CreateInteropArray(IntegerArrayArgCliValue); + unique_ptr vIntegerArrayArgInteropValue = CreateInteropArray(vIntegerArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -89,7 +89,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseIntegerArrayArgWithValues( - IntegerArrayArgInteropValue.get() + vIntegerArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseMiscArgs.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseMiscArgs.cpp index 54d6ff372c..2b59ae182d 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseMiscArgs.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseMiscArgs.cpp @@ -44,12 +44,13 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func { destinationVector.resize(sourceVector.size()); transform(sourceVector.begin(), sourceVector.end(), destinationVector.begin(), translationFunction); +} // This is the function corresponding to the QIR entry-point. extern "C" void UseMiscArgs( // NOLINT - char IntegerArgInteropValue, - char PauliArgInteropValue, - InteropArray * ResultArrayArgInteropValue + char vIntegerArgInteropValue, + char vPauliArgInteropValue, + InteropArray* vResultArrayArgInteropValue ); @@ -97,29 +98,32 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - char IntegerArgCliValue; - IntegerArgCliValue = InteropFalseAsChar; - app.add_option("--IntegerArg", IntegerArgCliValue, "A bool value for the IntegerArg argument")->required() + char vIntegerArgCliValue; + vIntegerArgCliValue = InteropFalseAsChar; + app.add_option("--IntegerArg", vIntegerArgCliValue, "A bool value for the IntegerArg argument")->required() ->transform(CLI::CheckedTransformer(BoolAsCharMap, CLI::ignore_case)); - PauliId PauliArgCliValue; - PauliArgCliValue = PauliId::PauliId_I; - app.add_option("--PauliArg", PauliArgCliValue, "A Pauli value for the PauliArg argument")->required() + PauliId vPauliArgCliValue; + vPauliArgCliValue = PauliId::PauliId_I; + app.add_option("--PauliArg", vPauliArgCliValue, "A Pauli value for the PauliArg argument")->required() ->transform(CLI::CheckedTransformer(PauliMap, CLI::ignore_case)); - vector ResultArrayArgCliValue; - app.add_option("--ResultArrayArg", ResultArrayArgCliValue, "A Result array value for the ResultArrayArg argument")->required() + vector vResultArrayArgCliValue; + app.add_option("--ResultArrayArg", vResultArrayArgCliValue, "A Result array value for the ResultArrayArg argument")->required() ->transform(CLI::CheckedTransformer(ResultAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - char IntegerArgInteropValue = IntegerArgCliValue; + char vIntegerArgInteropValue = vIntegerArgCliValue; + // Translate a PauliID value to its char representation. - char PauliArgInteropValue = TranslatePauliToChar(PauliArgCliValue); + char vPauliArgInteropValue = TranslatePauliToChar(vPauliArgCliValue); + // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr ResultArrayArgInteropValue = CreateInteropArray(ResultArrayArgCliValue); + unique_ptr vResultArrayArgInteropValue = CreateInteropArray(vResultArrayArgCliValue); + // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; ofstream simulationOutputFileStream; @@ -132,9 +136,9 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseMiscArgs( - IntegerArgInteropValue, - PauliArgInteropValue, - ResultArrayArgInteropValue.get() + vIntegerArgInteropValue, + vPauliArgInteropValue, + vResultArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArg.cpp index 978a164b7f..e368e9cd90 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArg.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UsePauliArg( // NOLINT - char PauliArgInteropValue + char vPauliArgInteropValue ); @@ -55,16 +55,16 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - PauliId PauliArgCliValue; - PauliArgCliValue = PauliId::PauliId_I; - app.add_option("--PauliArg", PauliArgCliValue, "A Pauli value for the PauliArg argument")->required() + PauliId vPauliArgCliValue; + vPauliArgCliValue = PauliId::PauliId_I; + app.add_option("--PauliArg", vPauliArgCliValue, "A Pauli value for the PauliArg argument")->required() ->transform(CLI::CheckedTransformer(PauliMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Translate a PauliID value to its char representation. - char PauliArgInteropValue = TranslatePauliToChar(PauliArgCliValue); + char vPauliArgInteropValue = TranslatePauliToChar(vPauliArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -78,7 +78,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UsePauliArg( - PauliArgInteropValue + vPauliArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp index 4b7aa9f256..143f139305 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UsePauliArgWithValues( // NOLINT - char PauliArgInteropValue + char vPauliArgInteropValue ); @@ -55,16 +55,16 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - PauliId PauliArgCliValue; - PauliArgCliValue = PauliId::PauliId_I; - app.add_option("--PauliArg", PauliArgCliValue, "A Pauli value for the PauliArg argument")->required() + PauliId vPauliArgCliValue; + vPauliArgCliValue = PauliId::PauliId_I; + app.add_option("--PauliArg", vPauliArgCliValue, "A Pauli value for the PauliArg argument")->required() ->transform(CLI::CheckedTransformer(PauliMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Translate a PauliID value to its char representation. - char PauliArgInteropValue = TranslatePauliToChar(PauliArgCliValue); + char vPauliArgInteropValue = TranslatePauliToChar(vPauliArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -78,7 +78,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UsePauliArgWithValues( - PauliArgInteropValue + vPauliArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArg.cpp index 2c7f05c128..44de14ad3b 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArg.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UsePauliArrayArg( // NOLINT - InteropArray* PauliArrayArgInteropValue + InteropArray* vPauliArrayArgInteropValue ); @@ -79,17 +79,17 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - std::vector PauliArrayArgCliValue; - app.add_option("--PauliArrayArg", PauliArrayArgCliValue, "A Pauli array value for the PauliArrayArg argument")->required() + std::vector vPauliArrayArgCliValue; + app.add_option("--PauliArrayArg", vPauliArrayArgCliValue, "A Pauli array value for the PauliArrayArg argument")->required() ->transform(CLI::CheckedTransformer(PauliMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Create an interop array of Pauli values represented as chars. - vector PauliArrayArgIntermediateValue; - TranslateVector(PauliArrayArgCliValue, PauliArrayArgIntermediateValue, TranslatePauliToChar); - unique_ptr PauliArrayArgInteropValue = CreateInteropArray(PauliArrayArgIntermediateValue); + vector vPauliArrayArgIntermediateValue; + TranslateVector(vPauliArrayArgCliValue, vPauliArrayArgIntermediateValue, TranslatePauliToChar); + unique_ptr vPauliArrayArgInteropValue = CreateInteropArray(vPauliArrayArgIntermediateValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -103,7 +103,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UsePauliArrayArg( - PauliArrayArgInteropValue.get() + vPauliArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArgWithValues.cpp index e03a11beb5..9c7bcfced6 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArgWithValues.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UsePauliArrayArgWithValues( // NOLINT - InteropArray* PauliArrayArgInteropValue + InteropArray* vPauliArrayArgInteropValue ); @@ -79,17 +79,17 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - std::vector PauliArrayArgCliValue; - app.add_option("--PauliArrayArg", PauliArrayArgCliValue, "A Pauli array value for the PauliArrayArg argument")->required() + std::vector vPauliArrayArgCliValue; + app.add_option("--PauliArrayArg", vPauliArrayArgCliValue, "A Pauli array value for the PauliArrayArg argument")->required() ->transform(CLI::CheckedTransformer(PauliMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Create an interop array of Pauli values represented as chars. - vector PauliArrayArgIntermediateValue; - TranslateVector(PauliArrayArgCliValue, PauliArrayArgIntermediateValue, TranslatePauliToChar); - unique_ptr PauliArrayArgInteropValue = CreateInteropArray(PauliArrayArgIntermediateValue); + vector vPauliArrayArgIntermediateValue; + TranslateVector(vPauliArrayArgCliValue, vPauliArrayArgIntermediateValue, TranslatePauliToChar); + unique_ptr vPauliArrayArgInteropValue = CreateInteropArray(vPauliArrayArgIntermediateValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -103,7 +103,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UsePauliArrayArgWithValues( - PauliArrayArgInteropValue.get() + vPauliArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArg.cpp index f078f2dca2..079fa11fd3 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArg.cpp @@ -54,7 +54,7 @@ InteropRange* TranslateRangeTupleToInteropRangePointer(RangeTuple& rangeTuple) // This is the function corresponding to the QIR entry-point. extern "C" void UseRangeArg( // NOLINT - InteropRange* RangeArgInteropValue + InteropRange* vRangeArgInteropValue ); @@ -73,14 +73,14 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - RangeTuple RangeArgCliValue; - app.add_option("--RangeArg", RangeArgCliValue, "A Range (start, step, end) value for the RangeArg argument")->required(); + RangeTuple vRangeArgCliValue; + app.add_option("--RangeArg", vRangeArgCliValue, "A Range (start, step, end) value for the RangeArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Create an interop range. - unique_ptr RangeArgInteropValue = CreateInteropRange(RangeArgCliValue); + unique_ptr vRangeArgInteropValue = CreateInteropRange(vRangeArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -94,7 +94,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseRangeArg( - RangeArgInteropValue.get() + vRangeArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp index 0481d1ab14..9fecf40add 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp @@ -54,7 +54,7 @@ InteropRange* TranslateRangeTupleToInteropRangePointer(RangeTuple& rangeTuple) // This is the function corresponding to the QIR entry-point. extern "C" void UseRangeArgWithValues( // NOLINT - InteropRange* RangeArgInteropValue + InteropRange* vRangeArgInteropValue ); @@ -73,14 +73,14 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - RangeTuple RangeArgCliValue; - app.add_option("--RangeArg", RangeArgCliValue, "A Range (start, step, end) value for the RangeArg argument")->required(); + RangeTuple vRangeArgCliValue; + app.add_option("--RangeArg", vRangeArgCliValue, "A Range (start, step, end) value for the RangeArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Create an interop range. - unique_ptr RangeArgInteropValue = CreateInteropRange(RangeArgCliValue); + unique_ptr vRangeArgInteropValue = CreateInteropRange(vRangeArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -94,7 +94,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseRangeArgWithValues( - RangeArgInteropValue.get() + vRangeArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArg.cpp index 6f7622f2cf..2a0142f5ce 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArg.cpp @@ -87,7 +87,7 @@ void FreePointerVector(vector& v) // This is the function corresponding to the QIR entry-point. extern "C" void UseRangeArrayArg( // NOLINT - InteropArray* RangeArrayArgInteropValue + InteropArray* vRangeArrayArgInteropValue ); @@ -106,15 +106,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector RangeArrayArgCliValue; - app.add_option("--RangeArrayArg", RangeArrayArgCliValue, "A Range array value for the RangeArrayArg argument")->required(); + vector vRangeArrayArgCliValue; + app.add_option("--RangeArrayArg", vRangeArrayArgCliValue, "A Range array value for the RangeArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - vector RangeArrayArgIntermediateValue; - TranslateVector(RangeArrayArgCliValue, RangeArrayArgIntermediateValue, TranslateRangeTupleToInteropRangePointer); - unique_ptr RangeArrayArgInteropValue = CreateInteropArray(RangeArrayArgIntermediateValue); + vector vRangeArrayArgIntermediateValue; + TranslateVector(vRangeArrayArgCliValue, vRangeArrayArgIntermediateValue, TranslateRangeTupleToInteropRangePointer); + unique_ptr vRangeArrayArgInteropValue = CreateInteropArray(vRangeArrayArgIntermediateValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -128,7 +128,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseRangeArrayArg( - RangeArrayArgInteropValue.get() + vRangeArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArgWithValues.cpp index fd94f3bad5..dde9c5a4c7 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArgWithValues.cpp @@ -87,7 +87,7 @@ void FreePointerVector(vector& v) // This is the function corresponding to the QIR entry-point. extern "C" void UseRangeArrayArgWithValues( // NOLINT - InteropArray* RangeArrayArgInteropValue + InteropArray* vRangeArrayArgInteropValue ); @@ -106,15 +106,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector RangeArrayArgCliValue; - app.add_option("--RangeArrayArg", RangeArrayArgCliValue, "A Range array value for the RangeArrayArg argument")->required(); + vector vRangeArrayArgCliValue; + app.add_option("--RangeArrayArg", vRangeArrayArgCliValue, "A Range array value for the RangeArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - vector RangeArrayArgIntermediateValue; - TranslateVector(RangeArrayArgCliValue, RangeArrayArgIntermediateValue, TranslateRangeTupleToInteropRangePointer); - unique_ptr RangeArrayArgInteropValue = CreateInteropArray(RangeArrayArgIntermediateValue); + vector vRangeArrayArgIntermediateValue; + TranslateVector(vRangeArrayArgCliValue, vRangeArrayArgIntermediateValue, TranslateRangeTupleToInteropRangePointer); + unique_ptr vRangeArrayArgInteropValue = CreateInteropArray(vRangeArrayArgIntermediateValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -128,7 +128,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseRangeArrayArgWithValues( - RangeArrayArgInteropValue.get() + vRangeArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArg.cpp index 90437295ce..ae706ff7ff 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArg.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseResultArg( // NOLINT - char ResultArgInteropValue + char vResultArgInteropValue ); @@ -52,15 +52,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - char ResultArgCliValue; - ResultArgCliValue = InteropResultZeroAsChar; - app.add_option("--ResultArg", ResultArgCliValue, "A Result value for the ResultArg argument")->required() + char vResultArgCliValue; + vResultArgCliValue = InteropResultZeroAsChar; + app.add_option("--ResultArg", vResultArgCliValue, "A Result value for the ResultArg argument")->required() ->transform(CLI::CheckedTransformer(ResultAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - char ResultArgInteropValue = ResultArgCliValue; + char vResultArgInteropValue = vResultArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -74,7 +74,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseResultArg( - ResultArgInteropValue + vResultArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArgWithValues.cpp index 186dd217ad..19488cbc22 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArgWithValues.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseResultArgWithValues( // NOLINT - char ResultArgInteropValue + char vResultArgInteropValue ); @@ -52,15 +52,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - char ResultArgCliValue; - ResultArgCliValue = InteropResultZeroAsChar; - app.add_option("--ResultArg", ResultArgCliValue, "A Result value for the ResultArg argument")->required() + char vResultArgCliValue; + vResultArgCliValue = InteropResultZeroAsChar; + app.add_option("--ResultArg", vResultArgCliValue, "A Result value for the ResultArg argument")->required() ->transform(CLI::CheckedTransformer(ResultAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - char ResultArgInteropValue = ResultArgCliValue; + char vResultArgInteropValue = vResultArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -74,7 +74,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseResultArgWithValues( - ResultArgInteropValue + vResultArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArg.cpp index 1a13c0c276..0782eb3ae6 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArg.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseResultArrayArg( // NOLINT - InteropArray* ResultArrayArgInteropValue + InteropArray* vResultArrayArgInteropValue ); @@ -76,8 +76,8 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector ResultArrayArgCliValue; - app.add_option("--ResultArrayArg", ResultArrayArgCliValue, "A Result array value for the ResultArrayArg argument")->required() + vector vResultArrayArgCliValue; + app.add_option("--ResultArrayArg", vResultArrayArgCliValue, "A Result array value for the ResultArrayArg argument")->required() ->transform(CLI::CheckedTransformer(ResultAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. @@ -85,7 +85,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr ResultArrayArgInteropValue = CreateInteropArray(ResultArrayArgCliValue); + unique_ptr vResultArrayArgInteropValue = CreateInteropArray(vResultArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -99,7 +99,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseResultArrayArg( - ResultArrayArgInteropValue.get() + vResultArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArgWithValues.cpp index eb10cb2c3b..537ab92ae3 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArgWithValues.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseResultArrayArgWithValues( // NOLINT - InteropArray* ResultArrayArgInteropValue + InteropArray* vResultArrayArgInteropValue ); @@ -76,8 +76,8 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector ResultArrayArgCliValue; - app.add_option("--ResultArrayArg", ResultArrayArgCliValue, "A Result array value for the ResultArrayArg argument")->required() + vector vResultArrayArgCliValue; + app.add_option("--ResultArrayArg", vResultArrayArgCliValue, "A Result array value for the ResultArrayArg argument")->required() ->transform(CLI::CheckedTransformer(ResultAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. @@ -85,7 +85,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr ResultArrayArgInteropValue = CreateInteropArray(ResultArrayArgCliValue); + unique_ptr vResultArrayArgInteropValue = CreateInteropArray(vResultArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -99,7 +99,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseResultArrayArgWithValues( - ResultArrayArgInteropValue.get() + vResultArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArg.cpp index 11106fca8d..2884466639 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArg.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseStringArg( // NOLINT - const char* StringArgInteropValue + const char* vStringArgInteropValue ); @@ -48,13 +48,13 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - string StringArgCliValue; - app.add_option("--StringArg", StringArgCliValue, "A String value for the StringArg argument")->required(); + string vStringArgCliValue; + app.add_option("--StringArg", vStringArgCliValue, "A String value for the StringArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - string StringArgInteropValue = StringArgCliValue; + string vStringArgInteropValue = vStringArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseStringArg( - StringArgInteropValue.c_str() + vStringArgInteropValue.c_str() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArgWithValues.cpp index 6dae3fe59b..2072596a54 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArgWithValues.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseStringArgWithValues( // NOLINT - const char* StringArgInteropValue + const char* vStringArgInteropValue ); @@ -48,13 +48,13 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - string StringArgCliValue; - app.add_option("--StringArg", StringArgCliValue, "A String value for the StringArg argument")->required(); + string vStringArgCliValue; + app.add_option("--StringArg", vStringArgCliValue, "A String value for the StringArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - string StringArgInteropValue = StringArgCliValue; + string vStringArgInteropValue = vStringArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseStringArgWithValues( - StringArgInteropValue.c_str() + vStringArgInteropValue.c_str() ); From cc6a616a6c2e50e4daca6296154d6ca3267e8d97 Mon Sep 17 00:00:00 2001 From: Samuel Banning Date: Thu, 15 Apr 2021 10:48:52 -0700 Subject: [PATCH 6/6] reverted variable naming change --- .../Compiler/Templates/CppInterop.cs | 6 ++-- .../QirEntryPointTests/UseBoolArg.cpp | 12 +++---- .../UseBoolArgWithValues.cpp | 12 +++---- .../QirEntryPointTests/UseBoolArrayArg.cpp | 10 +++--- .../UseBoolArrayArgWithValues.cpp | 10 +++--- .../QirEntryPointTests/UseDoubleArg.cpp | 12 +++---- .../UseDoubleArgWithValues.cpp | 12 +++---- .../QirEntryPointTests/UseDoubleArrayArg.cpp | 10 +++--- .../UseDoubleArrayArgWithValues.cpp | 10 +++--- .../QirEntryPointTests/UseIntegerArg.cpp | 12 +++---- .../UseIntegerArgWithValues.cpp | 12 +++---- .../QirEntryPointTests/UseIntegerArrayArg.cpp | 10 +++--- .../UseIntegerArrayArgWithValues.cpp | 10 +++--- .../QirEntryPointTests/UseMiscArgs.cpp | 34 +++++++++---------- .../QirEntryPointTests/UsePauliArg.cpp | 12 +++---- .../UsePauliArgWithValues.cpp | 12 +++---- .../QirEntryPointTests/UsePauliArrayArg.cpp | 14 ++++---- .../UsePauliArrayArgWithValues.cpp | 14 ++++---- .../QirEntryPointTests/UseRangeArg.cpp | 10 +++--- .../UseRangeArgWithValues.cpp | 10 +++--- .../QirEntryPointTests/UseRangeArrayArg.cpp | 14 ++++---- .../UseRangeArrayArgWithValues.cpp | 14 ++++---- .../QirEntryPointTests/UseResultArg.cpp | 12 +++---- .../UseResultArgWithValues.cpp | 12 +++---- .../QirEntryPointTests/UseResultArrayArg.cpp | 10 +++--- .../UseResultArrayArgWithValues.cpp | 10 +++--- .../QirEntryPointTests/UseStringArg.cpp | 10 +++--- .../UseStringArgWithValues.cpp | 10 +++--- 28 files changed, 168 insertions(+), 168 deletions(-) diff --git a/src/QsCompiler/Compiler/Templates/CppInterop.cs b/src/QsCompiler/Compiler/Templates/CppInterop.cs index 8dfff20144..57b427d8ec 100644 --- a/src/QsCompiler/Compiler/Templates/CppInterop.cs +++ b/src/QsCompiler/Compiler/Templates/CppInterop.cs @@ -159,17 +159,17 @@ public string CppCliValueType() public string CliValueVariableName() { - return "v" + this.Name + "CliValue"; + return this.Name + "CliValue"; } public string InteropVariableName() { - return "v" + this.Name + "InteropValue"; + return this.Name + "InteropValue"; } public string IntermediateVariableName() { - return "v" + this.Name + "IntermediateValue"; + return this.Name + "IntermediateValue"; } } diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArg.cpp index dee9291b43..56edc2ea4a 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArg.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseBoolArg( // NOLINT - char vBoolArgInteropValue + char BoolArgInteropValue ); @@ -51,15 +51,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - char vBoolArgCliValue; - vBoolArgCliValue = InteropFalseAsChar; - app.add_option("--BoolArg", vBoolArgCliValue, "A bool value for the BoolArg argument")->required() + char BoolArgCliValue; + BoolArgCliValue = InteropFalseAsChar; + app.add_option("--BoolArg", BoolArgCliValue, "A bool value for the BoolArg argument")->required() ->transform(CLI::CheckedTransformer(BoolAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - char vBoolArgInteropValue = vBoolArgCliValue; + char BoolArgInteropValue = BoolArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -73,7 +73,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseBoolArg( - vBoolArgInteropValue + BoolArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp index 007c9480e4..f62cde2437 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArgWithValues.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseBoolArgWithValues( // NOLINT - char vBoolArgInteropValue + char BoolArgInteropValue ); @@ -51,15 +51,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - char vBoolArgCliValue; - vBoolArgCliValue = InteropFalseAsChar; - app.add_option("--BoolArg", vBoolArgCliValue, "A bool value for the BoolArg argument")->required() + char BoolArgCliValue; + BoolArgCliValue = InteropFalseAsChar; + app.add_option("--BoolArg", BoolArgCliValue, "A bool value for the BoolArg argument")->required() ->transform(CLI::CheckedTransformer(BoolAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - char vBoolArgInteropValue = vBoolArgCliValue; + char BoolArgInteropValue = BoolArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -73,7 +73,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseBoolArgWithValues( - vBoolArgInteropValue + BoolArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArg.cpp index fc4d0ec7db..5fb3c9fccb 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArg.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseBoolArrayArg( // NOLINT - InteropArray* vBoolArrayArgInteropValue + InteropArray* BoolArrayArgInteropValue ); @@ -75,8 +75,8 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector vBoolArrayArgCliValue; - app.add_option("--BoolArrayArg", vBoolArrayArgCliValue, "A bool array value for the BoolArrayArg argument")->required() + vector BoolArrayArgCliValue; + app.add_option("--BoolArrayArg", BoolArrayArgCliValue, "A bool array value for the BoolArrayArg argument")->required() ->transform(CLI::CheckedTransformer(BoolAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. @@ -84,7 +84,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr vBoolArrayArgInteropValue = CreateInteropArray(vBoolArrayArgCliValue); + unique_ptr BoolArrayArgInteropValue = CreateInteropArray(BoolArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -98,7 +98,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseBoolArrayArg( - vBoolArrayArgInteropValue.get() + BoolArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArgWithValues.cpp index 2605e5b25a..bf7d49b63f 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseBoolArrayArgWithValues.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseBoolArrayArgWithValues( // NOLINT - InteropArray* vBoolArrayArgInteropValue + InteropArray* BoolArrayArgInteropValue ); @@ -75,8 +75,8 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector vBoolArrayArgCliValue; - app.add_option("--BoolArrayArg", vBoolArrayArgCliValue, "A bool array value for the BoolArrayArg argument")->required() + vector BoolArrayArgCliValue; + app.add_option("--BoolArrayArg", BoolArrayArgCliValue, "A bool array value for the BoolArrayArg argument")->required() ->transform(CLI::CheckedTransformer(BoolAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. @@ -84,7 +84,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr vBoolArrayArgInteropValue = CreateInteropArray(vBoolArrayArgCliValue); + unique_ptr BoolArrayArgInteropValue = CreateInteropArray(BoolArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -98,7 +98,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseBoolArrayArgWithValues( - vBoolArrayArgInteropValue.get() + BoolArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArg.cpp index 7f1829299f..af2bbb469b 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArg.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseDoubleArg( // NOLINT - double vDoubleArgInteropValue + double DoubleArgInteropValue ); @@ -43,14 +43,14 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - double_t vDoubleArgCliValue; - vDoubleArgCliValue = 0.0; - app.add_option("--DoubleArg", vDoubleArgCliValue, "A double value for the DoubleArg argument")->required(); + double_t DoubleArgCliValue; + DoubleArgCliValue = 0.0; + app.add_option("--DoubleArg", DoubleArgCliValue, "A double value for the DoubleArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - double_t vDoubleArgInteropValue = vDoubleArgCliValue; + double_t DoubleArgInteropValue = DoubleArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseDoubleArg( - vDoubleArgInteropValue + DoubleArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArgWithValues.cpp index e0b27ff261..de3249a5ea 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArgWithValues.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseDoubleArgWithValues( // NOLINT - double vDoubleArgInteropValue + double DoubleArgInteropValue ); @@ -43,14 +43,14 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - double_t vDoubleArgCliValue; - vDoubleArgCliValue = 0.0; - app.add_option("--DoubleArg", vDoubleArgCliValue, "A double value for the DoubleArg argument")->required(); + double_t DoubleArgCliValue; + DoubleArgCliValue = 0.0; + app.add_option("--DoubleArg", DoubleArgCliValue, "A double value for the DoubleArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - double_t vDoubleArgInteropValue = vDoubleArgCliValue; + double_t DoubleArgInteropValue = DoubleArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseDoubleArgWithValues( - vDoubleArgInteropValue + DoubleArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp index 34e6b50fbd..987e0f8fa4 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArg.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseDoubleArrayArg( // NOLINT - InteropArray* vDoubleArrayArgInteropValue + InteropArray* DoubleArrayArgInteropValue ); @@ -67,15 +67,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector vDoubleArrayArgCliValue; - app.add_option("--DoubleArrayArg", vDoubleArrayArgCliValue, "A double array value for the DoubleArrayArg argument")->required(); + vector DoubleArrayArgCliValue; + app.add_option("--DoubleArrayArg", DoubleArrayArgCliValue, "A double array value for the DoubleArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr vDoubleArrayArgInteropValue = CreateInteropArray(vDoubleArrayArgCliValue); + unique_ptr DoubleArrayArgInteropValue = CreateInteropArray(DoubleArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -89,7 +89,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseDoubleArrayArg( - vDoubleArrayArgInteropValue.get() + DoubleArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArgWithValues.cpp index 73e6953726..892a379d73 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseDoubleArrayArgWithValues.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseDoubleArrayArgWithValues( // NOLINT - InteropArray* vDoubleArrayArgInteropValue + InteropArray* DoubleArrayArgInteropValue ); @@ -67,15 +67,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector vDoubleArrayArgCliValue; - app.add_option("--DoubleArrayArg", vDoubleArrayArgCliValue, "A double array value for the DoubleArrayArg argument")->required(); + vector DoubleArrayArgCliValue; + app.add_option("--DoubleArrayArg", DoubleArrayArgCliValue, "A double array value for the DoubleArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr vDoubleArrayArgInteropValue = CreateInteropArray(vDoubleArrayArgCliValue); + unique_ptr DoubleArrayArgInteropValue = CreateInteropArray(DoubleArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -89,7 +89,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseDoubleArrayArgWithValues( - vDoubleArrayArgInteropValue.get() + DoubleArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArg.cpp index afee69b600..bded3a9fc5 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArg.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseIntegerArg( // NOLINT - int64_t vIntegerArgInteropValue + int64_t IntegerArgInteropValue ); @@ -43,14 +43,14 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - int64_t vIntegerArgCliValue; - vIntegerArgCliValue = 0; - app.add_option("--IntegerArg", vIntegerArgCliValue, "A integer value for the IntegerArg argument")->required(); + int64_t IntegerArgCliValue; + IntegerArgCliValue = 0; + app.add_option("--IntegerArg", IntegerArgCliValue, "A integer value for the IntegerArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - int64_t vIntegerArgInteropValue = vIntegerArgCliValue; + int64_t IntegerArgInteropValue = IntegerArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseIntegerArg( - vIntegerArgInteropValue + IntegerArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArgWithValues.cpp index a9ba9eebef..cfec6a208a 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArgWithValues.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseIntegerArgWithValues( // NOLINT - int64_t vIntegerArgInteropValue + int64_t IntegerArgInteropValue ); @@ -43,14 +43,14 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - int64_t vIntegerArgCliValue; - vIntegerArgCliValue = 0; - app.add_option("--IntegerArg", vIntegerArgCliValue, "A integer value for the IntegerArg argument")->required(); + int64_t IntegerArgCliValue; + IntegerArgCliValue = 0; + app.add_option("--IntegerArg", IntegerArgCliValue, "A integer value for the IntegerArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - int64_t vIntegerArgInteropValue = vIntegerArgCliValue; + int64_t IntegerArgInteropValue = IntegerArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseIntegerArgWithValues( - vIntegerArgInteropValue + IntegerArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp index 6b01a3cc86..e0f847a330 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArg.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseIntegerArrayArg( // NOLINT - InteropArray* vIntegerArrayArgInteropValue + InteropArray* IntegerArrayArgInteropValue ); @@ -67,15 +67,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector vIntegerArrayArgCliValue; - app.add_option("--IntegerArrayArg", vIntegerArrayArgCliValue, "A integer array value for the IntegerArrayArg argument")->required(); + vector IntegerArrayArgCliValue; + app.add_option("--IntegerArrayArg", IntegerArrayArgCliValue, "A integer array value for the IntegerArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr vIntegerArrayArgInteropValue = CreateInteropArray(vIntegerArrayArgCliValue); + unique_ptr IntegerArrayArgInteropValue = CreateInteropArray(IntegerArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -89,7 +89,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseIntegerArrayArg( - vIntegerArrayArgInteropValue.get() + IntegerArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArgWithValues.cpp index a521cdf6ad..41c5c80822 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseIntegerArrayArgWithValues.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseIntegerArrayArgWithValues( // NOLINT - InteropArray* vIntegerArrayArgInteropValue + InteropArray* IntegerArrayArgInteropValue ); @@ -67,15 +67,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector vIntegerArrayArgCliValue; - app.add_option("--IntegerArrayArg", vIntegerArrayArgCliValue, "A integer array value for the IntegerArrayArg argument")->required(); + vector IntegerArrayArgCliValue; + app.add_option("--IntegerArrayArg", IntegerArrayArgCliValue, "A integer array value for the IntegerArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr vIntegerArrayArgInteropValue = CreateInteropArray(vIntegerArrayArgCliValue); + unique_ptr IntegerArrayArgInteropValue = CreateInteropArray(IntegerArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -89,7 +89,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseIntegerArrayArgWithValues( - vIntegerArrayArgInteropValue.get() + IntegerArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseMiscArgs.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseMiscArgs.cpp index 2b59ae182d..01844bd2df 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseMiscArgs.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseMiscArgs.cpp @@ -48,9 +48,9 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseMiscArgs( // NOLINT - char vIntegerArgInteropValue, - char vPauliArgInteropValue, - InteropArray* vResultArrayArgInteropValue + char IntegerArgInteropValue, + char PauliArgInteropValue, + InteropArray* ResultArrayArgInteropValue ); @@ -98,31 +98,31 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - char vIntegerArgCliValue; - vIntegerArgCliValue = InteropFalseAsChar; - app.add_option("--IntegerArg", vIntegerArgCliValue, "A bool value for the IntegerArg argument")->required() + char IntegerArgCliValue; + IntegerArgCliValue = InteropFalseAsChar; + app.add_option("--IntegerArg", IntegerArgCliValue, "A bool value for the IntegerArg argument")->required() ->transform(CLI::CheckedTransformer(BoolAsCharMap, CLI::ignore_case)); - PauliId vPauliArgCliValue; - vPauliArgCliValue = PauliId::PauliId_I; - app.add_option("--PauliArg", vPauliArgCliValue, "A Pauli value for the PauliArg argument")->required() + PauliId PauliArgCliValue; + PauliArgCliValue = PauliId::PauliId_I; + app.add_option("--PauliArg", PauliArgCliValue, "A Pauli value for the PauliArg argument")->required() ->transform(CLI::CheckedTransformer(PauliMap, CLI::ignore_case)); - vector vResultArrayArgCliValue; - app.add_option("--ResultArrayArg", vResultArrayArgCliValue, "A Result array value for the ResultArrayArg argument")->required() + vector ResultArrayArgCliValue; + app.add_option("--ResultArrayArg", ResultArrayArgCliValue, "A Result array value for the ResultArrayArg argument")->required() ->transform(CLI::CheckedTransformer(ResultAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - char vIntegerArgInteropValue = vIntegerArgCliValue; + char IntegerArgInteropValue = IntegerArgCliValue; // Translate a PauliID value to its char representation. - char vPauliArgInteropValue = TranslatePauliToChar(vPauliArgCliValue); + char PauliArgInteropValue = TranslatePauliToChar(PauliArgCliValue); // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr vResultArrayArgInteropValue = CreateInteropArray(vResultArrayArgCliValue); + unique_ptr ResultArrayArgInteropValue = CreateInteropArray(ResultArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -136,9 +136,9 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseMiscArgs( - vIntegerArgInteropValue, - vPauliArgInteropValue, - vResultArrayArgInteropValue.get() + IntegerArgInteropValue, + PauliArgInteropValue, + ResultArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArg.cpp index e368e9cd90..978a164b7f 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArg.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UsePauliArg( // NOLINT - char vPauliArgInteropValue + char PauliArgInteropValue ); @@ -55,16 +55,16 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - PauliId vPauliArgCliValue; - vPauliArgCliValue = PauliId::PauliId_I; - app.add_option("--PauliArg", vPauliArgCliValue, "A Pauli value for the PauliArg argument")->required() + PauliId PauliArgCliValue; + PauliArgCliValue = PauliId::PauliId_I; + app.add_option("--PauliArg", PauliArgCliValue, "A Pauli value for the PauliArg argument")->required() ->transform(CLI::CheckedTransformer(PauliMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Translate a PauliID value to its char representation. - char vPauliArgInteropValue = TranslatePauliToChar(vPauliArgCliValue); + char PauliArgInteropValue = TranslatePauliToChar(PauliArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -78,7 +78,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UsePauliArg( - vPauliArgInteropValue + PauliArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp index 143f139305..4b7aa9f256 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArgWithValues.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UsePauliArgWithValues( // NOLINT - char vPauliArgInteropValue + char PauliArgInteropValue ); @@ -55,16 +55,16 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - PauliId vPauliArgCliValue; - vPauliArgCliValue = PauliId::PauliId_I; - app.add_option("--PauliArg", vPauliArgCliValue, "A Pauli value for the PauliArg argument")->required() + PauliId PauliArgCliValue; + PauliArgCliValue = PauliId::PauliId_I; + app.add_option("--PauliArg", PauliArgCliValue, "A Pauli value for the PauliArg argument")->required() ->transform(CLI::CheckedTransformer(PauliMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Translate a PauliID value to its char representation. - char vPauliArgInteropValue = TranslatePauliToChar(vPauliArgCliValue); + char PauliArgInteropValue = TranslatePauliToChar(PauliArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -78,7 +78,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UsePauliArgWithValues( - vPauliArgInteropValue + PauliArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArg.cpp index 44de14ad3b..2c7f05c128 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArg.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UsePauliArrayArg( // NOLINT - InteropArray* vPauliArrayArgInteropValue + InteropArray* PauliArrayArgInteropValue ); @@ -79,17 +79,17 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - std::vector vPauliArrayArgCliValue; - app.add_option("--PauliArrayArg", vPauliArrayArgCliValue, "A Pauli array value for the PauliArrayArg argument")->required() + std::vector PauliArrayArgCliValue; + app.add_option("--PauliArrayArg", PauliArrayArgCliValue, "A Pauli array value for the PauliArrayArg argument")->required() ->transform(CLI::CheckedTransformer(PauliMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Create an interop array of Pauli values represented as chars. - vector vPauliArrayArgIntermediateValue; - TranslateVector(vPauliArrayArgCliValue, vPauliArrayArgIntermediateValue, TranslatePauliToChar); - unique_ptr vPauliArrayArgInteropValue = CreateInteropArray(vPauliArrayArgIntermediateValue); + vector PauliArrayArgIntermediateValue; + TranslateVector(PauliArrayArgCliValue, PauliArrayArgIntermediateValue, TranslatePauliToChar); + unique_ptr PauliArrayArgInteropValue = CreateInteropArray(PauliArrayArgIntermediateValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -103,7 +103,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UsePauliArrayArg( - vPauliArrayArgInteropValue.get() + PauliArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArgWithValues.cpp index 9c7bcfced6..e03a11beb5 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UsePauliArrayArgWithValues.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UsePauliArrayArgWithValues( // NOLINT - InteropArray* vPauliArrayArgInteropValue + InteropArray* PauliArrayArgInteropValue ); @@ -79,17 +79,17 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - std::vector vPauliArrayArgCliValue; - app.add_option("--PauliArrayArg", vPauliArrayArgCliValue, "A Pauli array value for the PauliArrayArg argument")->required() + std::vector PauliArrayArgCliValue; + app.add_option("--PauliArrayArg", PauliArrayArgCliValue, "A Pauli array value for the PauliArrayArg argument")->required() ->transform(CLI::CheckedTransformer(PauliMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Create an interop array of Pauli values represented as chars. - vector vPauliArrayArgIntermediateValue; - TranslateVector(vPauliArrayArgCliValue, vPauliArrayArgIntermediateValue, TranslatePauliToChar); - unique_ptr vPauliArrayArgInteropValue = CreateInteropArray(vPauliArrayArgIntermediateValue); + vector PauliArrayArgIntermediateValue; + TranslateVector(PauliArrayArgCliValue, PauliArrayArgIntermediateValue, TranslatePauliToChar); + unique_ptr PauliArrayArgInteropValue = CreateInteropArray(PauliArrayArgIntermediateValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -103,7 +103,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UsePauliArrayArgWithValues( - vPauliArrayArgInteropValue.get() + PauliArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArg.cpp index 079fa11fd3..f078f2dca2 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArg.cpp @@ -54,7 +54,7 @@ InteropRange* TranslateRangeTupleToInteropRangePointer(RangeTuple& rangeTuple) // This is the function corresponding to the QIR entry-point. extern "C" void UseRangeArg( // NOLINT - InteropRange* vRangeArgInteropValue + InteropRange* RangeArgInteropValue ); @@ -73,14 +73,14 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - RangeTuple vRangeArgCliValue; - app.add_option("--RangeArg", vRangeArgCliValue, "A Range (start, step, end) value for the RangeArg argument")->required(); + RangeTuple RangeArgCliValue; + app.add_option("--RangeArg", RangeArgCliValue, "A Range (start, step, end) value for the RangeArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Create an interop range. - unique_ptr vRangeArgInteropValue = CreateInteropRange(vRangeArgCliValue); + unique_ptr RangeArgInteropValue = CreateInteropRange(RangeArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -94,7 +94,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseRangeArg( - vRangeArgInteropValue.get() + RangeArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp index 9fecf40add..0481d1ab14 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArgWithValues.cpp @@ -54,7 +54,7 @@ InteropRange* TranslateRangeTupleToInteropRangePointer(RangeTuple& rangeTuple) // This is the function corresponding to the QIR entry-point. extern "C" void UseRangeArgWithValues( // NOLINT - InteropRange* vRangeArgInteropValue + InteropRange* RangeArgInteropValue ); @@ -73,14 +73,14 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - RangeTuple vRangeArgCliValue; - app.add_option("--RangeArg", vRangeArgCliValue, "A Range (start, step, end) value for the RangeArg argument")->required(); + RangeTuple RangeArgCliValue; + app.add_option("--RangeArg", RangeArgCliValue, "A Range (start, step, end) value for the RangeArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); // Create an interop range. - unique_ptr vRangeArgInteropValue = CreateInteropRange(vRangeArgCliValue); + unique_ptr RangeArgInteropValue = CreateInteropRange(RangeArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -94,7 +94,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseRangeArgWithValues( - vRangeArgInteropValue.get() + RangeArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArg.cpp index 2a0142f5ce..6f7622f2cf 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArg.cpp @@ -87,7 +87,7 @@ void FreePointerVector(vector& v) // This is the function corresponding to the QIR entry-point. extern "C" void UseRangeArrayArg( // NOLINT - InteropArray* vRangeArrayArgInteropValue + InteropArray* RangeArrayArgInteropValue ); @@ -106,15 +106,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector vRangeArrayArgCliValue; - app.add_option("--RangeArrayArg", vRangeArrayArgCliValue, "A Range array value for the RangeArrayArg argument")->required(); + vector RangeArrayArgCliValue; + app.add_option("--RangeArrayArg", RangeArrayArgCliValue, "A Range array value for the RangeArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - vector vRangeArrayArgIntermediateValue; - TranslateVector(vRangeArrayArgCliValue, vRangeArrayArgIntermediateValue, TranslateRangeTupleToInteropRangePointer); - unique_ptr vRangeArrayArgInteropValue = CreateInteropArray(vRangeArrayArgIntermediateValue); + vector RangeArrayArgIntermediateValue; + TranslateVector(RangeArrayArgCliValue, RangeArrayArgIntermediateValue, TranslateRangeTupleToInteropRangePointer); + unique_ptr RangeArrayArgInteropValue = CreateInteropArray(RangeArrayArgIntermediateValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -128,7 +128,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseRangeArrayArg( - vRangeArrayArgInteropValue.get() + RangeArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArgWithValues.cpp index dde9c5a4c7..fd94f3bad5 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseRangeArrayArgWithValues.cpp @@ -87,7 +87,7 @@ void FreePointerVector(vector& v) // This is the function corresponding to the QIR entry-point. extern "C" void UseRangeArrayArgWithValues( // NOLINT - InteropArray* vRangeArrayArgInteropValue + InteropArray* RangeArrayArgInteropValue ); @@ -106,15 +106,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector vRangeArrayArgCliValue; - app.add_option("--RangeArrayArg", vRangeArrayArgCliValue, "A Range array value for the RangeArrayArg argument")->required(); + vector RangeArrayArgCliValue; + app.add_option("--RangeArrayArg", RangeArrayArgCliValue, "A Range array value for the RangeArrayArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - vector vRangeArrayArgIntermediateValue; - TranslateVector(vRangeArrayArgCliValue, vRangeArrayArgIntermediateValue, TranslateRangeTupleToInteropRangePointer); - unique_ptr vRangeArrayArgInteropValue = CreateInteropArray(vRangeArrayArgIntermediateValue); + vector RangeArrayArgIntermediateValue; + TranslateVector(RangeArrayArgCliValue, RangeArrayArgIntermediateValue, TranslateRangeTupleToInteropRangePointer); + unique_ptr RangeArrayArgInteropValue = CreateInteropArray(RangeArrayArgIntermediateValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -128,7 +128,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseRangeArrayArgWithValues( - vRangeArrayArgInteropValue.get() + RangeArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArg.cpp index ae706ff7ff..90437295ce 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArg.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseResultArg( // NOLINT - char vResultArgInteropValue + char ResultArgInteropValue ); @@ -52,15 +52,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - char vResultArgCliValue; - vResultArgCliValue = InteropResultZeroAsChar; - app.add_option("--ResultArg", vResultArgCliValue, "A Result value for the ResultArg argument")->required() + char ResultArgCliValue; + ResultArgCliValue = InteropResultZeroAsChar; + app.add_option("--ResultArg", ResultArgCliValue, "A Result value for the ResultArg argument")->required() ->transform(CLI::CheckedTransformer(ResultAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - char vResultArgInteropValue = vResultArgCliValue; + char ResultArgInteropValue = ResultArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -74,7 +74,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseResultArg( - vResultArgInteropValue + ResultArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArgWithValues.cpp index 19488cbc22..186dd217ad 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArgWithValues.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseResultArgWithValues( // NOLINT - char vResultArgInteropValue + char ResultArgInteropValue ); @@ -52,15 +52,15 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - char vResultArgCliValue; - vResultArgCliValue = InteropResultZeroAsChar; - app.add_option("--ResultArg", vResultArgCliValue, "A Result value for the ResultArg argument")->required() + char ResultArgCliValue; + ResultArgCliValue = InteropResultZeroAsChar; + app.add_option("--ResultArg", ResultArgCliValue, "A Result value for the ResultArg argument")->required() ->transform(CLI::CheckedTransformer(ResultAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - char vResultArgInteropValue = vResultArgCliValue; + char ResultArgInteropValue = ResultArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -74,7 +74,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseResultArgWithValues( - vResultArgInteropValue + ResultArgInteropValue ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArg.cpp index 0782eb3ae6..1a13c0c276 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArg.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseResultArrayArg( // NOLINT - InteropArray* vResultArrayArgInteropValue + InteropArray* ResultArrayArgInteropValue ); @@ -76,8 +76,8 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector vResultArrayArgCliValue; - app.add_option("--ResultArrayArg", vResultArrayArgCliValue, "A Result array value for the ResultArrayArg argument")->required() + vector ResultArrayArgCliValue; + app.add_option("--ResultArrayArg", ResultArrayArgCliValue, "A Result array value for the ResultArrayArg argument")->required() ->transform(CLI::CheckedTransformer(ResultAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. @@ -85,7 +85,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr vResultArrayArgInteropValue = CreateInteropArray(vResultArrayArgCliValue); + unique_ptr ResultArrayArgInteropValue = CreateInteropArray(ResultArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -99,7 +99,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseResultArrayArg( - vResultArrayArgInteropValue.get() + ResultArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArgWithValues.cpp index 537ab92ae3..eb10cb2c3b 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseResultArrayArgWithValues.cpp @@ -48,7 +48,7 @@ void TranslateVector(vector& sourceVector, vector& destinationVector, func // This is the function corresponding to the QIR entry-point. extern "C" void UseResultArrayArgWithValues( // NOLINT - InteropArray* vResultArrayArgInteropValue + InteropArray* ResultArrayArgInteropValue ); @@ -76,8 +76,8 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - vector vResultArrayArgCliValue; - app.add_option("--ResultArrayArg", vResultArrayArgCliValue, "A Result array value for the ResultArrayArg argument")->required() + vector ResultArrayArgCliValue; + app.add_option("--ResultArrayArg", ResultArrayArgCliValue, "A Result array value for the ResultArrayArg argument")->required() ->transform(CLI::CheckedTransformer(ResultAsCharMap, CLI::ignore_case)); // With all the options added, parse arguments from the command line. @@ -85,7 +85,7 @@ int main(int argc, char* argv[]) // Translate values to its final form after parsing. // Create an interop array of values. - unique_ptr vResultArrayArgInteropValue = CreateInteropArray(vResultArrayArgCliValue); + unique_ptr ResultArrayArgInteropValue = CreateInteropArray(ResultArrayArgCliValue); // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -99,7 +99,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseResultArrayArgWithValues( - vResultArrayArgInteropValue.get() + ResultArrayArgInteropValue.get() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArg.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArg.cpp index 2884466639..11106fca8d 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArg.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArg.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseStringArg( // NOLINT - const char* vStringArgInteropValue + const char* StringArgInteropValue ); @@ -48,13 +48,13 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - string vStringArgCliValue; - app.add_option("--StringArg", vStringArgCliValue, "A String value for the StringArg argument")->required(); + string StringArgCliValue; + app.add_option("--StringArg", StringArgCliValue, "A String value for the StringArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - string vStringArgInteropValue = vStringArgCliValue; + string StringArgInteropValue = StringArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseStringArg( - vStringArgInteropValue.c_str() + StringArgInteropValue.c_str() ); diff --git a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArgWithValues.cpp b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArgWithValues.cpp index 2072596a54..6dae3fe59b 100644 --- a/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArgWithValues.cpp +++ b/src/QsCompiler/Tests.Compiler/TestCases/QirEntryPointTests/UseStringArgWithValues.cpp @@ -24,7 +24,7 @@ using namespace std; // This is the function corresponding to the QIR entry-point. extern "C" void UseStringArgWithValues( // NOLINT - const char* vStringArgInteropValue + const char* StringArgInteropValue ); @@ -48,13 +48,13 @@ int main(int argc, char* argv[]) "--simulation-output", simulationOutputFile, "File where the output produced during the simulation is written"); - string vStringArgCliValue; - app.add_option("--StringArg", vStringArgCliValue, "A String value for the StringArg argument")->required(); + string StringArgCliValue; + app.add_option("--StringArg", StringArgCliValue, "A String value for the StringArg argument")->required(); // With all the options added, parse arguments from the command line. CLI11_PARSE(app, argc, argv); - string vStringArgInteropValue = vStringArgCliValue; + string StringArgInteropValue = StringArgCliValue; // Redirect the simulator output from std::cout if the --simulation-output option is present. ostream* simulatorOutputStream = &cout; @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) // Run simulation and write the output of the operation to the corresponding stream. UseStringArgWithValues( - vStringArgInteropValue.c_str() + StringArgInteropValue.c_str() );