QuantumLibraries/Standard/tests/CombinatorTests.qs

417 строки
15 KiB
Plaintext
Исходник Постоянная ссылка Обычный вид История

Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
namespace Microsoft.Quantum.Tests {
open Microsoft.Quantum.Math;
open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Intrinsic;
open Microsoft.Quantum.Diagnostics;
open Microsoft.Quantum.Arrays;
@Test("QuantumSimulator")
function ComposeIsCorrect() : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
let target = [3, 17, 2];
EqualityFactI((Compose(ModulusI(_, 14), Max))(target), 3, $"Compose(ModulusI(_, 14), Max) did not return expected result.");
}
@Test("QuantumSimulator")
operation TestWith() : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
let actual = ApplyWith(H, X, _);
let expected = Z;
AssertOperationsEqualReferenced(4, ApplyToEach(actual, _), ApplyToEachA(expected, _));
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
// Make sure that if CurryTest fails, it's because of Curry and not
// something else.
@Test("QuantumSimulator")
operation PreTestCurried() : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
AssertOperationsEqualInPlace(1, Exp([PauliZ], 1.7, _), Exp([PauliZ], 1.7, _));
AssertOperationsEqualReferenced(1, Exp([PauliZ], 1.7, _), Exp([PauliZ], 1.7, _));
}
@Test("QuantumSimulator")
operation TestCurried() : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
let curried = CurriedOp(Exp([PauliZ], _, _));
AssertOperationsEqualInPlace(1, curried(1.7), Exp([PauliZ], 1.7, _));
AssertOperationsEqualReferenced(1, curried(1.7), Exp([PauliZ], 1.7, _));
}
2021-02-18 11:22:11 +03:00
@Test("QuantumSimulator")
operation TestCurriedA() : Unit {
let curried = CurriedOpA(Exp([PauliZ], _, _));
AssertOperationsEqualInPlace(1, curried(1.7), Exp([PauliZ], 1.7, _));
AssertOperationsEqualReferenced(1, curried(1.7), Exp([PauliZ], 1.7, _));
}
@Test("QuantumSimulator")
operation TestCurriedC() : Unit {
let curried = CurriedOpC(Exp([PauliZ], _, _));
AssertOperationsEqualInPlace(1, curried(1.7), Exp([PauliZ], 1.7, _));
AssertOperationsEqualReferenced(1, curried(1.7), Exp([PauliZ], 1.7, _));
}
@Test("QuantumSimulator")
operation TestCurriedCA() : Unit {
let curried = CurriedOpCA(Exp([PauliZ], _, _));
AssertOperationsEqualInPlace(1, curried(1.7), Exp([PauliZ], 1.7, _));
AssertOperationsEqualReferenced(1, curried(1.7), Exp([PauliZ], 1.7, _));
}
@Test("QuantumSimulator")
operation TestBind() : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
let bound = BoundCA([H, X, H]);
AssertOperationsEqualReferenced(3, ApplyToEach(bound, _), ApplyToEachA(Z, _));
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
function StripControlled<'T> (op : ('T => Unit is Adj + Ctl)) : ('T => Unit is Adj) {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
return op;
}
@Test("QuantumSimulator")
operation TestBindA() : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
let bound = BoundA(Mapped(StripControlled<Qubit>, [T, T]));
AssertOperationsEqualReferenced(3, ApplyToEach(bound, _), ApplyToEachA(S, _));
AssertOperationsEqualReferenced(3, ApplyToEach(Adjoint bound, _), ApplyToEachA(Adjoint S, _));
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
operation BindCTestHelper0 (op : (Qubit => Unit is Ctl), qubits : Qubit[]) : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
Controlled op([qubits[0]], qubits[1]);
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
operation BindCTestHelper1 (op : (Qubit => Unit is Adj + Ctl), qubits : Qubit[]) : Unit {
body (...) {
Controlled op([qubits[0]], qubits[1]);
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
adjoint invert;
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
function StripAdjoint<'T> (op : ('T => Unit is Adj + Ctl)) : ('T => Unit is Ctl) {
return op;
}
@Test("QuantumSimulator")
operation TestBindC() : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
let stripped = Mapped(StripAdjoint<Qubit>, [T, T]);
let bound = BoundC(stripped);
AssertOperationsEqualReferenced(3, ApplyToEach(bound, _), ApplyToEachA(S, _));
let op = BindCTestHelper0(bound, _);
let target = BindCTestHelper1(S, _);
AssertOperationsEqualReferenced(6, op, target);
}
@Test("QuantumSimulator")
operation TestBindCA() : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
let bound = BoundCA([T, T]);
AssertOperationsEqualReferenced(3, ApplyToEach(bound, _), ApplyToEachA(S, _));
AssertOperationsEqualReferenced(3, ApplyToEach(Adjoint bound, _), ApplyToEachA(Adjoint S, _));
let op = BindCTestHelper0(Adjoint bound, _);
let target = BindCTestHelper1(Adjoint S, _);
AssertOperationsEqualReferenced(4, op, target);
}
@Test("QuantumSimulator")
operation TestOperationPow() : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
AssertOperationsEqualReferenced(3, ApplyToEach(OperationPow(H, 2), _), NoOp<Qubit[]>);
AssertOperationsEqualReferenced(3, ApplyToEach(OperationPow(Z, 2), _), NoOp<Qubit[]>);
AssertOperationsEqualReferenced(3, ApplyToEach(OperationPow(S, 4), _), NoOp<Qubit[]>);
AssertOperationsEqualReferenced(3, ApplyToEach(OperationPow(T, 8), _), NoOp<Qubit[]>);
}
@Test("QuantumSimulator")
operation TestApplyToSubregister() : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
let bigOp = ApplyPauli([PauliI, PauliX, PauliY, PauliZ, PauliI], _);
let smallOp = ApplyPauli([PauliX, PauliY, PauliZ], _);
AssertOperationsEqualReferenced(5, ApplyToSubregister(smallOp, [1, 2, 3], _), bigOp);
AssertOperationsEqualReferenced(5, RestrictedToSubregister(smallOp, [1, 2, 3]), bigOp);
AssertOperationsEqualReferenced(5, ApplyToSubregisterC(smallOp, [1, 2, 3], _), bigOp);
AssertOperationsEqualReferenced(5, RestrictedToSubregisterC(smallOp, [1, 2, 3]), bigOp);
AssertOperationsEqualReferenced(5, ApplyToSubregisterA(smallOp, [1, 2, 3], _), bigOp);
AssertOperationsEqualReferenced(5, RestrictedToSubregisterA(smallOp, [1, 2, 3]), bigOp);
AssertOperationsEqualReferenced(5, ApplyToSubregisterCA(smallOp, [1, 2, 3], _), bigOp);
AssertOperationsEqualReferenced(5, RestrictedToSubregisterCA(smallOp, [1, 2, 3]), bigOp);
}
operation CControlledExpected (op : (Qubit => Unit is Adj + Ctl), target : Qubit[]) : Unit is Adj + Ctl {
op(target[0]);
op(target[2]);
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
operation CControlledActual (op : (Qubit => Unit), target : Qubit[]) : Unit {
ApplyToEach(CControlled(op), Zipped([true, false, true], target));
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
operation CControlledActualC (op : (Qubit => Unit is Ctl), target : Qubit[]) : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
body (...) {
ApplyToEachC(CControlledC(op), Zipped([true, false, true], target));
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
controlled distribute;
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
operation CControlledActualA (op : (Qubit => Unit is Adj), target : Qubit[]) : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
body (...) {
ApplyToEachA(CControlledA(op), Zipped([true, false, true], target));
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
adjoint invert;
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
operation CControlledActualCA (op : (Qubit => Unit is Adj + Ctl), target : Qubit[]) : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
body (...) {
ApplyToEachCA(CControlledCA(op), Zipped([true, false, true], target));
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
adjoint invert;
controlled distribute;
controlled adjoint distribute;
}
@Test("QuantumSimulator")
operation TestCControlled() : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
AssertOperationsEqualReferenced(3, CControlledActual(H, _), CControlledExpected(H, _));
AssertOperationsEqualReferenced(3, CControlledActual(Z, _), CControlledExpected(Z, _));
AssertOperationsEqualReferenced(3, CControlledActual(S, _), CControlledExpected(S, _));
AssertOperationsEqualReferenced(3, CControlledActual(T, _), CControlledExpected(T, _));
}
@Test("QuantumSimulator")
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
operation CControlledTestC () : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
AssertOperationsEqualReferenced(3, CControlledActualC(H, _), CControlledExpected(H, _));
AssertOperationsEqualReferenced(3, CControlledActualC(Z, _), CControlledExpected(Z, _));
AssertOperationsEqualReferenced(3, CControlledActualC(S, _), CControlledExpected(S, _));
AssertOperationsEqualReferenced(3, CControlledActualC(T, _), CControlledExpected(T, _));
}
@Test("QuantumSimulator")
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
operation CControlledTestA () : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
AssertOperationsEqualReferenced(3, CControlledActualA(H, _), CControlledExpected(H, _));
AssertOperationsEqualReferenced(3, CControlledActualA(Z, _), CControlledExpected(Z, _));
AssertOperationsEqualReferenced(3, CControlledActualA(S, _), CControlledExpected(S, _));
AssertOperationsEqualReferenced(3, CControlledActualA(T, _), CControlledExpected(T, _));
}
@Test("QuantumSimulator")
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
operation CControlledTestCA () : Unit {
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
AssertOperationsEqualReferenced(3, CControlledActualCA(H, _), CControlledExpected(H, _));
AssertOperationsEqualReferenced(3, CControlledActualCA(Z, _), CControlledExpected(Z, _));
AssertOperationsEqualReferenced(3, CControlledActualCA(S, _), CControlledExpected(S, _));
AssertOperationsEqualReferenced(3, CControlledActualCA(T, _), CControlledExpected(T, _));
}
@Test("QuantumSimulator")
operation TestApplyIfZero() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfZero(One, (ApplyToEach(H, _), _)), ApplyToEachA(I, _));
AssertOperationsEqualReferenced(2, ApplyIfZero(Zero, (ApplyToEach(H, _), _)), ApplyToEachA(H, _));
}
@Test("QuantumSimulator")
operation TestApplyIfOne() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfOne(One, (ApplyToEach(H, _), _)), ApplyToEachA(H, _));
AssertOperationsEqualReferenced(2, ApplyIfOne(Zero, (ApplyToEach(H, _), _)), ApplyToEachA(I, _));
}
Release v0.6 to master. (#98) * Begin refactoring standard libraries (#39) * Began splitting up namespaces. * Began refactoring tests. * Updated chemistry src and tests for new namespaces. * Remove unused opens. * Began renaming operations and functions. * Separated out and updated ApplyReversed*. * Updated BE ↔ LE type conversions. * Added new transformed operation fns. * Whitespace fix * Eliminated some redundant code in applyreversed * Fixed deprecation comments. * Began working on refactoring With. * Refactored With further. * More renaming for consistency with LE/BE suffix convention. * Added Zip3, Zip4 * Added shorthand for MAJ and updated some type conv. * Fixed a typo in Zip4. * Separated out and updated arithmetic measurements. * Other minor maintenance changes. * Started separating out modular arithmetic. * Began refactoring ripple-carry comparators. * Refactored integer increment operations. * Fixed some See Also blocks. * Some minor progress. * Moved new arithmetic functionality into right folders. * Renamed integer arithmetic namespaces. * Split out qecc namespace. * Added documentation file for Microsoft.Quantum.ErrorCorrection. * Progress on renaming type conversion functions. * More progress on updating type conversion names. * Split out AA namespace. * Split out oracles namespace as well. * Renamed UDTs to remove "AmpAmp" prefix. This prefix is now implied by the Microsoft.Quantum.AmplitudeAmplification namespace. * Renamed some Qecc operations/fns * Moved more conversions into Convert.qs. * Updated some deprecated syntax. * Split out M.Q.Convert. * Added missing open stmt. * Started separating out classical math. * Began separating out QCVV. * Fixing namespaces in tests. * Update to use new docgen. * Began making arrays namespace. * Updated to use new arrays and diagnostics namespaces. * Updated names for claims * Started extracting measurements from Paulis.qs. * Updated namespaces in tests as well. * Updating chemistry for most recent changes. * Added ForEach, used to simplify measurements. * Updating deprecated Q# syntax. * Minor fix for XML error. * Fixed infinite recursion in deprecation stubs. * Started trying to reduce # of warnings. * Fixed some minor build errors. * Resolved a couple TODOs. * Removed BigEndian support. * Resolved warnings due to && and ||. * Update Standard/src/Arithmetic/Shorthand.qs Co-Authored-By: cgranade <cgranade@gmail.com> * Addressing feedback. * Claim → Fact * Moved MeasureInteger back to Microsoft.Quantum.Arithmetic. * Resolved more deprecated syntax. * Removed one more LE suffix. * Addressing feedback. * Cgranade/complete 0.6 move (#57) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Complete move of standard library refactoring to release branch This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Explicitly qualify all names in M.Q.Ext.Math. (#74) * Explicitly qualify all names in M.Q.Ext.Math. * Fixed two missing qualified names. * Removed more occurances of M.Q.Ext.Math. * Removed Microsoft.Quantum.Extensions.Math from tests as well. * Reverted slight change to QuantumROM. * New array functions (#75) * Added new IndexRange function to eliminate `-1` in for loops. * Added some missing open statements. * New Enumerated function. * Port library and test code to new 0.6 names to reduce warning count. (#72) * Updating to use new syntax, namespace names, etc. * More primitive → intrinsic. * Updated test project to use beta version. * Updated chemistry proiects to beta. * Finding a few more calls to deprecated fns. * Cleaned up some assert and qcvv tests. * Removed uses of deprecated IntArrayFromRange * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Some trivial change to retrigger build. * Resolved package downgrade. * Move Microsoft.Quantum.Math.Complex UDT and resolve Microsoft.Quantum.Diagnostics deprecation stubs. (#77) * More primitive → intrinsic. * Finding a few more calls to deprecated fns. * Resolved some more deprecated functions and ops. * Minor maintenance in QubitizationTests. * Bumped versions to latest beta. * Resolved package downgrade. * Use Complex UDT at its new name. * Adapted tests. * A few more test adaptations. * Updated name of AssertQubitState to 0.6 name. * Fixes to chemistry. * Getting updates from master (#80) * Revert "Begin refactoring standard libraries (#39)" (#56) As Chris pointed out, reverting these breaking changes until we have a chance to change everything... * Missing return statement when compiling more than one Q# snippet from Python. (#60) * Fixing bug * Adding tests * Change Assembly.Version to Python.Version. (#64) * Prevent loading Q# modules when Python client is busy. (#71) * Prevent loading Q# modules when Python client is busy. * Linux build failed with some unrelated problem. Committing. * modifying contructor calls for QArray in preparation for a simulation framework change (#78) * Revert "Revert "Begin refactoring standard libraries (#39)" (#56)" This reverts commit 058048983c4d0509e5d522888d3d47ae49cd300e. * Update to 0.6.1904.1302-beta. (#81) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Addressed feedback from @bettinaheim. * Standard.sln builds again, Standard.sln builds (#84) * Gulow/v0.6 chemistry deprecation (#82) * Update to 0.6.1904.1302-beta. * Removed deprecation warnings for Microsoft.Quantum.Math. * Resolved a few more deprecations. * Resolved a few more deprecation warnings. * A few more deprecation resolutions. * Removed some duplicate namespace opens. * Slight code cleanup. * Update test * . * Remove deprecated operations from chemistry and dependencies. * Fix comments * Update to use 0.65 syntax from latest beta. (#87) * Ported stateprep.qs to 0.65 syntax. * Fixed deprecation in test. * Updated to latest beta. * Fix mutable array issue in chemistry data model. (#88) * Explicitly call new QArray. (#89) * do not rely on collections.immutable (#93) * Continue migrating libraries to Q# 0.6 (#91) * Continue migrating to 0.65 syntax and applying style guidance. * A bit more progress normalizing private names. * Resolved more deprecated syntax, updated a name. * Resolved some more syntax warnings. * Ported more syntax and updated more names. * Resolved all remaining compile-time warnings in Standard. * Addressed all Q#-level compile-time warnings in chem. * Migrated a bit more syntax and updated to newest beta. * Moved to using intrinsic warnings. * Fixed endianness of exact QFT. * Fixed Microsoft.Quantum.Warnings. * Addressing @bettinaheim's feedback. * Removed some warnings in unit tests. * Adding DocsOutDir for single doc output location across projects. (#94) * Adding DocsOutDir for single doc output location across projects. * Begin adding more classical math functions for BigInt. (#96) * Begin adding more classical math functions for BigInt. * Addressing @beheim's feedback. * Minor fixes. * Bump to latest beta. * Fixed two minor bugs. * Fixed the type of signs. * Bump version to released packages.
2019-05-04 01:44:41 +03:00
@Test("QuantumSimulator")
operation TestApplyIfZeroC() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfZeroC(One, (ApplyToEachC(H, _), _)), ApplyToEachA(I, _));
AssertOperationsEqualReferenced(2, ApplyIfZeroC(Zero, (ApplyToEachC(H, _), _)), ApplyToEachA(H, _));
}
@Test("QuantumSimulator")
operation TestApplyIfOneC() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfOneC(One, (ApplyToEachC(H, _), _)), ApplyToEachA(H, _));
AssertOperationsEqualReferenced(2, ApplyIfOneC(Zero, (ApplyToEachC(H, _), _)), ApplyToEachA(I, _));
}
@Test("QuantumSimulator")
operation TestApplyIfZeroCA() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfZeroCA(One, (ApplyToEachCA(H, _), _)), ApplyToEachA(I, _));
AssertOperationsEqualReferenced(2, ApplyIfZeroCA(Zero, (ApplyToEachCA(H, _), _)), ApplyToEachA(H, _));
}
@Test("QuantumSimulator")
operation TestApplyIfOneCA() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfOneCA(One, (ApplyToEachCA(H, _), _)), ApplyToEachA(H, _));
AssertOperationsEqualReferenced(2, ApplyIfOneCA(Zero, (ApplyToEachCA(H, _), _)), ApplyToEachA(I, _));
}
@Test("QuantumSimulator")
operation TestApplyIfZeroA() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfZeroA(One, (ApplyToEachA(H, _), _)), ApplyToEachA(I, _));
AssertOperationsEqualReferenced(2, ApplyIfZeroA(Zero, (ApplyToEachA(H, _), _)), ApplyToEachA(H, _));
}
@Test("QuantumSimulator")
operation TestApplyIfOneA() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfOneA(One, (ApplyToEachA(H, _), _)), ApplyToEachA(H, _));
AssertOperationsEqualReferenced(2, ApplyIfOneA(Zero, (ApplyToEachA(H, _), _)), ApplyToEachA(I, _));
}
operation ApplyIfElseRCase(result : Result, register : Qubit[]) : Unit {
ApplyIfElseR(
result,
(ApplyToEach(H, _), register),
(ApplyToEach(X, _), register)
);
}
@Test("QuantumSimulator")
operation TestApplyIfElseR() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfElseRCase(Zero, _), ApplyToEachA(H, _));
AssertOperationsEqualReferenced(2, ApplyIfElseRCase(One, _), ApplyToEachA(X, _));
}
operation ApplyIfElseRACase(result : Result, register : Qubit[]) : Unit is Adj {
ApplyIfElseRA(
result,
(ApplyToEachA(H, _), register),
(ApplyToEachA(X, _), register)
);
}
@Test("QuantumSimulator")
operation TestApplyIfElseRA() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfElseRACase(Zero, _), ApplyToEachA(H, _));
AssertOperationsEqualReferenced(2, ApplyIfElseRACase(One, _), ApplyToEachA(X, _));
}
operation ApplyIfElseRCCase(result : Result, register : Qubit[]) : Unit is Ctl {
ApplyIfElseRC(
result,
(ApplyToEachC(H, _), register),
(ApplyToEachC(X, _), register)
);
}
@Test("QuantumSimulator")
operation TestApplyIfElseRC() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfElseRCCase(Zero, _), ApplyToEachA(H, _));
AssertOperationsEqualReferenced(2, ApplyIfElseRCCase(One, _), ApplyToEachA(X, _));
}
operation ApplyIfElseRCACase(result : Result, register : Qubit[]) : Unit is Adj + Ctl {
ApplyIfElseRCA(
result,
(ApplyToEachCA(H, _), register),
(ApplyToEachCA(X, _), register)
);
}
@Test("QuantumSimulator")
operation TestApplyIfElseRCA() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfElseRCACase(Zero, _), ApplyToEachA(H, _));
AssertOperationsEqualReferenced(2, ApplyIfElseRCACase(One, _), ApplyToEachA(X, _));
}
operation ApplyIfElseBCase(bit : Bool, register : Qubit[]) : Unit {
ApplyIfElseB(
bit,
(ApplyToEach(H, _), register),
(ApplyToEach(X, _), register)
);
}
@Test("QuantumSimulator")
operation TestApplyIfElseB() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfElseBCase(true, _), ApplyToEachA(H, _));
AssertOperationsEqualReferenced(2, ApplyIfElseBCase(false, _), ApplyToEachA(X, _));
}
operation ApplyIfElseBACase(bit : Bool, register : Qubit[]) : Unit is Adj {
ApplyIfElseBA(
bit,
(ApplyToEachA(H, _), register),
(ApplyToEachA(X, _), register)
);
}
@Test("QuantumSimulator")
operation TestApplyIfElseBA() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfElseBACase(true, _), ApplyToEachA(H, _));
AssertOperationsEqualReferenced(2, ApplyIfElseBACase(false, _), ApplyToEachA(X, _));
}
operation ApplyIfElseBCCase(bit : Bool, register : Qubit[]) : Unit is Ctl {
ApplyIfElseBC(
bit,
(ApplyToEachC(H, _), register),
(ApplyToEachC(X, _), register)
);
}
@Test("QuantumSimulator")
operation TestApplyIfElseBC() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfElseBCCase(true, _), ApplyToEachA(H, _));
AssertOperationsEqualReferenced(2, ApplyIfElseBCCase(false, _), ApplyToEachA(X, _));
}
operation ApplyIfElseBCACase(bit : Bool, register : Qubit[]) : Unit is Adj + Ctl {
ApplyIfElseBCA(
bit,
(ApplyToEachCA(H, _), register),
(ApplyToEachCA(X, _), register)
);
}
@Test("QuantumSimulator")
operation TestApplyIfElseBCA() : Unit {
AssertOperationsEqualReferenced(2, ApplyIfElseBCACase(true, _), ApplyToEachA(H, _));
AssertOperationsEqualReferenced(2, ApplyIfElseBCACase(false, _), ApplyToEachA(X, _));
}
operation ApplyXToSecondQubit(qubits : Qubit[]) : Unit is Adj + Ctl {
X(qubits[1]);
}
@Test("QuantumSimulator")
operation TestApplyToElement() : Unit {
AssertOperationsEqualReferenced(3,
ApplyToElement(X, 1, _),
ApplyXToSecondQubit
);
AssertOperationsEqualReferenced(3,
ApplyToElementC(X, 1, _),
ApplyXToSecondQubit
);
AssertOperationsEqualReferenced(3,
ApplyToElementA(X, 1, _),
ApplyXToSecondQubit
);
AssertOperationsEqualReferenced(3,
ApplyToElementCA(X, 1, _),
ApplyXToSecondQubit
);
}
}