├── .acrolinx-config.edn ├── .devcontainer ├── devcontainer.json └── Dockerfile ├── .gitignore ├── .vscode ├── extensions.json └── settings.json ├── .gitattributes ├── api ├── qsharp │ ├── microsoft.quantum.canon.md │ ├── microsoft.quantum.random.md │ ├── microsoft.quantum.chemistry.md │ ├── microsoft.quantum.intrinsic.md │ ├── microsoft.quantum.diagnostics.md │ ├── microsoft.quantum.measurement.md │ ├── microsoft.quantum.extensions.math.md │ ├── microsoft.quantum.extensions.bitwise.md │ ├── microsoft.quantum.extensions.testing.md │ ├── microsoft.quantum.chemistry.jordanwigner.md │ ├── microsoft.quantum.extensions.diagnostics.md │ ├── microsoft.quantum.chemistry.jordanwigner.vqe.md │ ├── microsoft.quantum.core.md │ ├── microsoft.quantum.math.md │ ├── microsoft.quantum.optimization.md │ ├── microsoft.quantum.logical.md │ ├── microsoft.quantum.simulation.quantumprocessor.extensions.md │ ├── microsoft.quantum.targeting.md │ ├── microsoft.quantum.arrays.md │ ├── microsoft.quantum.convert.md │ ├── microsoft.quantum.arithmetic.md │ ├── microsoft.quantum.environment.md │ ├── microsoft.quantum.bitwise.md │ ├── microsoft.quantum.preparation.md │ ├── microsoft.quantum.research.chemistry.md │ ├── microsoft.quantum.machinelearning.md │ ├── microsoft.quantum.simulation.md │ ├── microsoft.quantum.errorcorrection.md │ ├── microsoft.quantum.machinelearning.datasets.md │ ├── microsoft.quantum.synthesis.md │ ├── microsoft.quantum.extensions.convert.md │ ├── microsoft.quantum.research.characterization.md │ ├── microsoft.quantum.characterization.md │ ├── microsoft.quantum.oracles.md │ ├── microsoft.quantum.simulation.unitary.md │ ├── microsoft.quantum.arrays.identity.md │ ├── microsoft.quantum.math.logof2.md │ ├── microsoft.quantum.random.drawstandardnormalvariate.md │ ├── microsoft.quantum.core.attribute.md │ ├── microsoft.quantum.core.entrypoint.md │ ├── microsoft.quantum.canon.resultstack.md │ ├── microsoft.quantum.core.default.md │ ├── microsoft.quantum.machinelearning.samplingschedule.md │ ├── microsoft.quantum.simulation.quantumprocessor.extensions.noop.md │ ├── microsoft.quantum.math.e.md │ ├── microsoft.quantum.machinelearning.datasets.winedata.md │ ├── microsoft.quantum.arrays.prefix.md │ ├── microsoft.quantum.arithmetic.signedlittleendian.md │ ├── microsoft.quantum.random.drawrandompauli.md │ ├── microsoft.quantum.errorcorrection.syndrome.md │ ├── microsoft.quantum.measurement.basischangeztoy.md │ ├── microsoft.quantum.errorcorrection.logicalregister.md │ ├── microsoft.quantum.machinelearning.datasets.iristrainingdata.md │ ├── microsoft.quantum.preparation.splitsign.md │ ├── microsoft.quantum.chemistry.jordanwigner.optimizedbetermindex.md │ ├── microsoft.quantum.diagnostics.test.md │ ├── microsoft.quantum.machinelearning._label.md │ ├── microsoft.quantum.canon.ignore.md │ ├── microsoft.quantum.math.lg.md │ ├── microsoft.quantum.core.length.md │ ├── microsoft.quantum.arrays.elementatdiagonal.md │ ├── microsoft.quantum.characterization.headmeasurement.md │ ├── microsoft.quantum.math.max.md │ ├── microsoft.quantum.math.min.md │ ├── microsoft.quantum.math.negationi.md │ ├── microsoft.quantum.synthesis.rmencoding.md │ ├── microsoft.quantum.synthesis.tbsmain.md │ ├── microsoft.quantum.arrays.isvaluepresent.md │ ├── microsoft.quantum.machinelearning._canapplytwoqubitcase.md │ ├── microsoft.quantum.machinelearning._features.md │ ├── microsoft.quantum.machinelearning._tailmeasurement.md │ ├── microsoft.quantum.math.arctanh.md │ ├── microsoft.quantum.canon.israngeempty.md │ ├── microsoft.quantum.canon.isresultone.md │ ├── microsoft.quantum.canon.stackpeek.md │ ├── microsoft.quantum.math.arccosh.md │ ├── microsoft.quantum.math.negationd.md │ ├── microsoft.quantum.math.negationl.md │ ├── microsoft.quantum.arrays.emptyarray.md │ ├── microsoft.quantum.math.arcsinh.md │ ├── microsoft.quantum.arrays.tail.md │ ├── microsoft.quantum.canon.isresultzero.md │ ├── microsoft.quantum.canon.stacknew.md │ ├── microsoft.quantum.math.absi.md │ ├── microsoft.quantum.math.pi.md │ ├── microsoft.quantum.arrays.head.md │ ├── microsoft.quantum.canon.ccnotop.md │ ├── microsoft.quantum.canon.fst.md │ ├── microsoft.quantum.math.round.md │ ├── microsoft.quantum.math.tan.md │ ├── microsoft.quantum.arrays.isempty.md │ ├── microsoft.quantum.canon.snd.md │ ├── microsoft.quantum.chemistry.hterm.md │ ├── microsoft.quantum.math.cos.md │ ├── microsoft.quantum.math.expd.md │ ├── microsoft.quantum.math.plusi.md │ ├── microsoft.quantum.math.sin.md │ ├── microsoft.quantum.canon.stacklength.md │ ├── microsoft.quantum.chemistry.jordanwigner._selectz_.md │ ├── microsoft.quantum.measurement.multim.md │ ├── microsoft.quantum.optimization.width.md │ ├── microsoft.quantum.errorcorrection.recoveryfn.md │ ├── microsoft.quantum.math.sqrt.md │ ├── microsoft.quantum.chemistry.jordanwigner._topaulibases_.md │ ├── microsoft.quantum.math.negationc.md │ ├── microsoft.quantum.math.signi.md │ ├── microsoft.quantum.synthesis.squarematrixfact.md │ ├── microsoft.quantum.canon.anyoutsidetoleranced.md │ ├── microsoft.quantum.canon.stackcapacity.md │ ├── microsoft.quantum.math.sinh.md │ ├── microsoft.quantum.simulation.blockencodingreflection.md │ ├── microsoft.quantum.canon.stackpop.md │ ├── microsoft.quantum.math.cosh.md │ ├── microsoft.quantum.math.signd.md │ ├── microsoft.quantum.math.signl.md │ ├── microsoft.quantum.math.tanh.md │ ├── microsoft.quantum.math.truncate.md │ ├── microsoft.quantum.oracles.discreteoracle.md │ ├── microsoft.quantum.machinelearning._allnearlyequald.md │ ├── microsoft.quantum.math.plusd.md │ ├── microsoft.quantum.math.plusl.md │ ├── microsoft.quantum.optimization.midpoint.md │ ├── microsoft.quantum.math.absl.md │ ├── microsoft.quantum.math.arcsin.md │ ├── microsoft.quantum.math.timesi.md │ ├── microsoft.quantum.errorcorrection.qecc.md │ ├── microsoft.quantum.math.arccos.md │ ├── microsoft.quantum.math.arctan.md │ ├── microsoft.quantum.math.log10.md │ ├── microsoft.quantum.math.powi.md │ ├── microsoft.quantum.random.delay.md │ ├── microsoft.quantum.chemistry.jordanwigner._selectz.md │ ├── microsoft.quantum.machinelearning._uncontrolledspansequence.md │ ├── microsoft.quantum.math.log.md │ ├── microsoft.quantum.math.minusi.md │ ├── microsoft.quantum.chemistry.isnotzero.md │ ├── microsoft.quantum.convert.boolarrayasint.md │ ├── microsoft.quantum.convert.resultarrayasint.md │ ├── microsoft.quantum.extensions.math.e.md │ ├── microsoft.quantum.math.dividedbyi.md │ ├── microsoft.quantum.math.negationcp.md │ ├── microsoft.quantum.chemistry.jordanwigner._topaulibases.md │ ├── microsoft.quantum.machinelearning._flipped.md │ ├── microsoft.quantum.math.powl.md │ ├── microsoft.quantum.simulation.evolutionschedule.md │ ├── microsoft.quantum.arithmetic.bigendian.md │ ├── microsoft.quantum.canon.anyoutsidetolerancecp.md │ ├── microsoft.quantum.math.absd.md │ ├── microsoft.quantum.math.timesd.md │ ├── microsoft.quantum.math.timesl.md │ ├── microsoft.quantum.extensions.math.pi.md │ ├── microsoft.quantum.math.floor.md │ ├── microsoft.quantum.math.randomsinglequbitpauli.md │ ├── microsoft.quantum.canon.withfirstinputapplied.md │ ├── microsoft.quantum.intrinsic.message.md │ ├── microsoft.quantum.logical.not.md │ ├── microsoft.quantum.math.dividedbyd.md │ ├── microsoft.quantum.math.dividedbyl.md │ ├── microsoft.quantum.math.maxi.md │ ├── microsoft.quantum.math.mini.md │ ├── microsoft.quantum.math.minusd.md │ ├── microsoft.quantum.math.minusl.md │ ├── microsoft.quantum.math.randomint.md │ ├── microsoft.quantum.simulation.inttopauli.md │ ├── microsoft.quantum.arrays.headandrest.md │ ├── microsoft.quantum.arrays.mostandtail.md │ ├── microsoft.quantum.canon.applybound.md │ ├── microsoft.quantum.arithmetic.littleendian.md │ ├── microsoft.quantum.math.abscomplex.md │ ├── microsoft.quantum.math.argcomplex.md │ ├── microsoft.quantum.synthesis.encoded.md │ ├── microsoft.quantum.canon.applycurriedop.md │ ├── microsoft.quantum.machinelearning._unnegate.md │ ├── microsoft.quantum.math.ceiling.md │ ├── microsoft.quantum.math.plusa.md │ ├── microsoft.quantum.math.accumulatedbitsizei.md │ ├── microsoft.quantum.math.plusc.md │ ├── microsoft.quantum.synthesis._twoleveldecomposition.md │ ├── microsoft.quantum.synthesis.extended.md │ ├── microsoft.quantum.intrinsic.random.md │ ├── microsoft.quantum.machinelearning._negativelocations.md │ ├── microsoft.quantum.math.maxd.md │ ├── microsoft.quantum.math.powd.md │ ├── microsoft.quantum.canon.cnotchain.md │ ├── microsoft.quantum.math.accumulatedbitsizel.md │ ├── microsoft.quantum.math.mind.md │ ├── microsoft.quantum.math.randomreal.md │ ├── microsoft.quantum.canon.applybounda.md │ ├── microsoft.quantum.canon.applyboundc.md │ ├── microsoft.quantum.canon.stackpush.md │ ├── microsoft.quantum.diagnostics.enabletestingvianame.md │ ├── microsoft.quantum.logical.xor.md │ ├── microsoft.quantum.machinelearning._applytwoqubitcase.md │ ├── microsoft.quantum.math.argcomplexpolar.md │ ├── microsoft.quantum.math.randomintpow2.md │ ├── microsoft.quantum.canon.hammingweighti.md │ ├── microsoft.quantum.simulation.timedependentgeneratorsystem.md │ ├── microsoft.quantum.arithmetic.invert2ssi.md │ ├── microsoft.quantum.canon.applycurriedopa.md │ ├── microsoft.quantum.canon.applycurriedopc.md │ ├── microsoft.quantum.intrinsic.reset.md │ ├── microsoft.quantum.math.modi.md │ ├── microsoft.quantum.amplitudeamplification.rotationphases.md │ ├── microsoft.quantum.core.deprecated.md │ ├── microsoft.quantum.errorcorrection.tablelookuprecoveryimpl.md │ ├── microsoft.quantum.intrinsic.s.md │ ├── microsoft.quantum.math.abscomplexpolar.md │ ├── microsoft.quantum.math.timesc.md │ ├── microsoft.quantum.convert.boolasresult.md │ ├── microsoft.quantum.convert.resultasbool.md │ └── microsoft.quantum.diagnostics.assertallzero.md ├── dot-net-libraries.md ├── toc.yml ├── index.md └── iqsharp-magic │ ├── chemistry.fh.add_terms.md │ ├── chemistry.encode.md │ ├── chemistry.inputstate.load.md │ └── chemistry.broombridge.md └── .github └── workflows └── check-samples-branch.yml /.acrolinx-config.edn: -------------------------------------------------------------------------------- 1 | {:allowed-branchname-matches ["^master$" "^release..*"] 2 | :allowed-filename-matches ["articles" "includes"]} 3 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "dockerFile": "./Dockerfile", 3 | "extensions": [ 4 | "docsmsft.docs-authoring-pack" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | log/ 2 | obj/ 3 | _site/ 4 | .optemp/ 5 | _themes*/ 6 | _repo.*/ 7 | 8 | tex2pdf.*/ 9 | 10 | .openpublishing.buildcore.ps1 11 | 12 | *.orig 13 | .vs/ 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/powershell:lts-debian-buster-slim 2 | 3 | RUN apt-get -y update && \ 4 | apt-get -y install git && \ 5 | apt-get clean && rm -rf /var/lib/apt/lists/ 6 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | // Suggest that users have the MS Docs Authoring Pack, which provides 4 | // a number of tools for working with DocFX-based documentation repos. 5 | "docsmsft.docs-authoring-pack" 6 | ] 7 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | *.sh text eol=lf 6 | *.sh.v.template text eol=lf 7 | 8 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon 3 | title: Microsoft.Quantum.Canon namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Canon 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Canon namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.random.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Random 3 | title: Microsoft.Quantum.Random namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Random 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Random namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "markdownlint.config": { 3 | "default": true, 4 | // Use #-style section headings without the ending # marks, as that can 5 | // cause problems working with the Samples Browser. 6 | "MD003": {"style": "atx"}, 7 | "MD013": false 8 | }, 9 | "cSpell.words": [ 10 | "Quickstart" 11 | ] 12 | } -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.chemistry.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Chemistry 3 | title: Microsoft.Quantum.Chemistry namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Chemistry 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Chemistry namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.intrinsic.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Intrinsic 3 | title: Microsoft.Quantum.Intrinsic namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Intrinsic 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Intrinsic namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.diagnostics.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Diagnostics 3 | title: Microsoft.Quantum.Diagnostics namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Diagnostics 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Diagnostics namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.measurement.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Measurement 3 | title: Microsoft.Quantum.Measurement namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Measurement 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Measurement namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.extensions.math.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Extensions.Math 3 | title: Microsoft.Quantum.Extensions.Math namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Extensions.Math 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Extensions.Math namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.extensions.bitwise.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Extensions.Bitwise 3 | title: Microsoft.Quantum.Extensions.Bitwise namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Extensions.Bitwise 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Extensions.Bitwise namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.extensions.testing.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Extensions.Testing 3 | title: Microsoft.Quantum.Extensions.Testing namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Extensions.Testing 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Extensions.Testing namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.chemistry.jordanwigner.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Chemistry.JordanWigner 3 | title: Microsoft.Quantum.Chemistry.JordanWigner namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Chemistry.JordanWigner 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Chemistry.JordanWigner namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.extensions.diagnostics.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Extensions.Diagnostics 3 | title: Microsoft.Quantum.Extensions.Diagnostics namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Extensions.Diagnostics 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Extensions.Diagnostics namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.chemistry.jordanwigner.vqe.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Chemistry.JordanWigner.VQE 3 | title: Microsoft.Quantum.Chemistry.JordanWigner.VQE namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Chemistry.JordanWigner.VQE 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Chemistry.JordanWigner.VQE namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.core.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Core 3 | title: Microsoft.Quantum.Core namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Core 8 | qsharp.summary: This namespace includes Q# core functions and operations. 9 | --- 10 | 11 | # Microsoft.Quantum.Core namespace 12 | 13 | This namespace includes Q# core functions and operations. 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math 3 | title: Microsoft.Quantum.Math namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Math 8 | qsharp.summary: This namespace contains classical mathematical functions and data types. 9 | --- 10 | 11 | # Microsoft.Quantum.Math namespace 12 | 13 | This namespace contains classical mathematical functions and data types. 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.optimization.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Optimization 3 | title: Microsoft.Quantum.Optimization namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Optimization 8 | qsharp.summary: Contains functions and optimizations for finding minima. 9 | --- 10 | 11 | # Microsoft.Quantum.Optimization namespace 12 | 13 | Contains functions and optimizations for finding minima. 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.logical.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Logical 3 | title: Microsoft.Quantum.Logical namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Logical 8 | qsharp.summary: Contains functions for working with logical expressions and Boolean logic. 9 | --- 10 | 11 | # Microsoft.Quantum.Logical namespace 12 | 13 | Contains functions for working with logical expressions and Boolean logic. 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.simulation.quantumprocessor.extensions.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Simulation.QuantumProcessor.Extensions 3 | title: Microsoft.Quantum.Simulation.QuantumProcessor.Extensions namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Simulation.QuantumProcessor.Extensions 8 | qsharp.summary: '' 9 | --- 10 | 11 | # Microsoft.Quantum.Simulation.QuantumProcessor.Extensions namespace 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.targeting.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Targeting 3 | title: Microsoft.Quantum.Targeting namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Targeting 8 | qsharp.summary: This namespace provides functionality for targeting specific quantum processors. 9 | --- 10 | 11 | # Microsoft.Quantum.Targeting namespace 12 | 13 | This namespace provides functionality for targeting specific quantum processors. 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arrays.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arrays 3 | title: Microsoft.Quantum.Arrays namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Arrays 8 | qsharp.summary: >- 9 | This namespace contains functions for creating and manipulating arrays of 10 | data. 11 | --- 12 | 13 | # Microsoft.Quantum.Arrays namespace 14 | 15 | This namespace contains functions for creating and manipulating arrays of data. 16 | 17 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.convert.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Convert 3 | title: Microsoft.Quantum.Convert namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Convert 8 | qsharp.summary: >- 9 | This namespace contains functions for converting between various Q# data 10 | types. 11 | --- 12 | 13 | # Microsoft.Quantum.Convert namespace 14 | 15 | This namespace contains functions for converting between various Q# data types. 16 | 17 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arithmetic.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arithmetic 3 | title: Microsoft.Quantum.Arithmetic namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Arithmetic 8 | qsharp.summary: >- 9 | This namespace contains functions and operations used for coherently 10 | computing arithmetic. 11 | --- 12 | 13 | # Microsoft.Quantum.Arithmetic namespace 14 | 15 | This namespace contains functions and operations used for coherently computing arithmetic. 16 | 17 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.environment.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Environment 3 | title: Microsoft.Quantum.Environment namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Environment 8 | qsharp.summary: These functions provide information about the environment in which the quantum computation is occuring. 9 | --- 10 | 11 | # Microsoft.Quantum.Environment namespace 12 | 13 | These functions provide information about the environment in which the quantum computation is occuring. 14 | 15 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.bitwise.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Bitwise 3 | title: Microsoft.Quantum.Bitwise namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Bitwise 8 | qsharp.summary: >- 9 | This namespace contains functions for acting on the bitwise representation of 10 | classical data types. 11 | --- 12 | 13 | # Microsoft.Quantum.Bitwise namespace 14 | 15 | This namespace contains functions for acting on the bitwise representation of classical data types. 16 | 17 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.preparation.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Preparation 3 | title: Microsoft.Quantum.Preparation namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Preparation 8 | qsharp.summary: >- 9 | This namespace contains functions and operations for preparing qubits into 10 | arbitrary initial states. 11 | --- 12 | 13 | # Microsoft.Quantum.Preparation namespace 14 | 15 | This namespace contains functions and operations for preparing qubits into arbitrary initial states. 16 | 17 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.research.chemistry.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Research.Chemistry 3 | title: Microsoft.Quantum.Research.Chemistry namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Research.Chemistry 8 | qsharp.summary: >- 9 | This namespace provides advanced research methods for quantum 10 | chemistry simulation. 11 | --- 12 | 13 | # Microsoft.Quantum.Research.Chemistry namespace 14 | 15 | This namespace provides advanced research methods for quantum chemistry simulation. 16 | 17 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning 3 | title: Microsoft.Quantum.MachineLearning namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.MachineLearning 8 | qsharp.summary: >- 9 | This namespace provides functions and operations used in 10 | quantum machine learning applications. 11 | --- 12 | 13 | # Microsoft.Quantum.MachineLearning namespace 14 | 15 | This namespace provides functions and operations used in quantum machine learning applications. 16 | 17 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.simulation.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Simulation 3 | title: Microsoft.Quantum.Simulation namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Simulation 8 | qsharp.summary: >- 9 | This namespace contains functions and operations for coherently simulating 10 | the dynamics of quantum systems. 11 | --- 12 | 13 | # Microsoft.Quantum.Simulation namespace 14 | 15 | This namespace contains functions and operations for coherently simulating the dynamics of quantum systems. 16 | 17 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.errorcorrection.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.ErrorCorrection 3 | title: Microsoft.Quantum.ErrorCorrection namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.ErrorCorrection 8 | qsharp.summary: >- 9 | This namespace contains functions, operations, and user-defined types for 10 | quantum error correction. 11 | --- 12 | 13 | # Microsoft.Quantum.ErrorCorrection namespace 14 | 15 | This namespace contains functions, operations, and user-defined types for quantum error correction. 16 | 17 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning.datasets.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning.Datasets 3 | title: Microsoft.Quantum.MachineLearning.Datasets namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.MachineLearning.Datasets 8 | qsharp.summary: >- 9 | This namespace provides example datasets for use 10 | with quantum machine learning classifiers. 11 | --- 12 | 13 | # Microsoft.Quantum.MachineLearning.Datasets namespace 14 | 15 | This namespace provides example datasets for use with quantum machine learning classifiers. 16 | 17 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.synthesis.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Synthesis 3 | title: Microsoft.Quantum.Synthesis namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Synthesis 8 | qsharp.summary: >- 9 | This namespace contains functions and operations for 10 | synthesizing quantum operations based on permutations 11 | and Boolean functions. 12 | --- 13 | 14 | # Microsoft.Quantum.Synthesis namespace 15 | 16 | This namespace contains functions and operations for synthesizing quantum operations based on permutations and Boolean functions. 17 | 18 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.extensions.convert.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Extensions.Convert 3 | title: Microsoft.Quantum.Extensions.Convert namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Extensions.Convert 8 | qsharp.summary: >- 9 | These are some of the functions from System.Convert namespace of .NET CLR 10 | that are relevant within Q# type system. 11 | --- 12 | 13 | # Microsoft.Quantum.Extensions.Convert namespace 14 | 15 | These are some of the functions from System.Convert namespace of .NET CLR that are relevant within Q# type system. 16 | 17 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.research.characterization.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Research.Characterization 3 | title: Microsoft.Quantum.Research.Characterization namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Research.Characterization 8 | qsharp.summary: >- 9 | This namespace provides advanced research methods for quantum 10 | characterization and phase estimation. 11 | --- 12 | 13 | # Microsoft.Quantum.Research.Characterization namespace 14 | 15 | This namespace provides advanced research methods for quantum characterization and phase estimation. 16 | 17 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.characterization.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Characterization 3 | title: Microsoft.Quantum.Characterization namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Characterization 8 | qsharp.summary: >- 9 | This namespace contains functions and operations for learning properties of 10 | quantum states and processes, including tomography and phase estimation. 11 | --- 12 | 13 | # Microsoft.Quantum.Characterization namespace 14 | 15 | This namespace contains functions and operations for learning properties of quantum states and processes, including tomography and phase estimation. 16 | 17 | -------------------------------------------------------------------------------- /api/dot-net-libraries.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: microsoft.quantum.dotnetlibsintro 3 | title: .NET library for Microsoft Quantum 4 | description: Reference documentation for the .NET library for Microsoft Quantum 5 | author: bradben 6 | ms.author: v-benbra 7 | ms.date: 03/04/2020 8 | ms.topic: landing-page 9 | --- 10 | 11 | # .NET libraries for Q# # 12 | 13 | In addition to the operations and functions of the Q# standard library, there are also .NET libraries available for Q#. 14 | 15 | - [.NET library: Trace simulator namespace](https://docs.microsoft.com/dotnet/api/microsoft.quantum.simulation.simulators.qctracesimulators) 16 | - [.NET library: Quantum chemistry namespace](https://docs.microsoft.com/dotnet/api/microsoft.quantum.chemistry) 17 | -------------------------------------------------------------------------------- /api/toc.yml: -------------------------------------------------------------------------------- 1 | - name: API reference 2 | items: 3 | - name: API reference 4 | href: index.md 5 | - name: Q# libraries 6 | topicHref: qsharp/index.md 7 | href: qsharp/toc.yml 8 | - name: .NET libraries 9 | items: 10 | - name: .NET libraries 11 | href: dot-net-libraries.md 12 | - name: Trace simulator 13 | href: https://docs.microsoft.com/dotnet/api/microsoft.quantum.simulation.simulators.qctracesimulators 14 | - name: Quantum chemistry 15 | href: https://docs.microsoft.com/dotnet/api/microsoft.quantum.chemistry 16 | - name: Python libraries 17 | href: https://docs.microsoft.com/python/qsharp-core/qsharp 18 | - name: IQ# magic commands 19 | href: iqsharp-magic/toc.yml 20 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.oracles.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Oracles 3 | title: Microsoft.Quantum.Oracles namespace 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: managed-reference 6 | qsharp.kind: namespace 7 | qsharp.name: Microsoft.Quantum.Oracles 8 | qsharp.summary: >- 9 | This namespaces provides user-defined types to decorate various kinds of 10 | oracles by their intended use in quantum algorithms such as phase estimation 11 | and amplitude amplification. 12 | --- 13 | 14 | # Microsoft.Quantum.Oracles namespace 15 | 16 | This namespaces provides user-defined types to decorate various kinds of oracles by their intended use in quantum algorithms such as phase estimation and amplitude amplification. 17 | 18 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.simulation.unitary.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Simulation.Unitary 3 | title: Unitary user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Simulation 8 | qsharp.name: Unitary 9 | qsharp.summary: Represents evolution under a unitary operator. 10 | --- 11 | 12 | # Unitary user defined type 13 | 14 | Namespace: [Microsoft.Quantum.Simulation](xref:Microsoft.Quantum.Simulation) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Represents evolution under a unitary operator. 20 | 21 | ```qsharp 22 | 23 | newtype Unitary = ((Qubit[] => Unit is Adj + Ctl)); 24 | ``` 25 | 26 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arrays.identity.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arrays.Identity 3 | title: Identity function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Arrays 8 | qsharp.name: Identity 9 | qsharp.summary: '' 10 | --- 11 | 12 | # Identity function 13 | 14 | Namespace: [Microsoft.Quantum.Arrays](xref:Microsoft.Quantum.Arrays) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function Identity<'T> (input : 'T) : 'T 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### input : 'T 29 | 30 | 31 | 32 | 33 | 34 | ## Output : 'T 35 | 36 | 37 | 38 | ## Type Parameters 39 | 40 | ### 'T 41 | 42 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.logof2.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.LogOf2 3 | title: LogOf2 function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: LogOf2 9 | qsharp.summary: Returns the natural logarithm of 2. 10 | --- 11 | 12 | # LogOf2 function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the natural logarithm of 2. 20 | 21 | ```qsharp 22 | function LogOf2 () : Double 23 | ``` 24 | 25 | 26 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 27 | 28 | Returns a `Double` equal to $0.6931471805599453$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.random.drawstandardnormalvariate.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Random.DrawStandardNormalVariate 3 | title: DrawStandardNormalVariate operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Random 8 | qsharp.name: DrawStandardNormalVariate 9 | qsharp.summary: '' 10 | --- 11 | 12 | # DrawStandardNormalVariate operation 13 | 14 | Namespace: [Microsoft.Quantum.Random](xref:Microsoft.Quantum.Random) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation DrawStandardNormalVariate () : Double 23 | ``` 24 | 25 | 26 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 27 | 28 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.core.attribute.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Core.Attribute 3 | title: Attribute user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Core 8 | qsharp.name: Attribute 9 | qsharp.summary: Compiler-recognized attribute used to mark user-defined types as attributes. 10 | --- 11 | 12 | # Attribute user defined type 13 | 14 | Namespace: [Microsoft.Quantum.Core](xref:Microsoft.Quantum.Core) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Compiler-recognized attribute used to mark user-defined types as attributes. 20 | 21 | ```qsharp 22 | 23 | @ Microsoft.Quantum.Core.Attribute() 24 | newtype Attribute = (Unit); 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.core.entrypoint.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Core.EntryPoint 3 | title: EntryPoint user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Core 8 | qsharp.name: EntryPoint 9 | qsharp.summary: Compiler-recognized attribute used to mark the entry point of an executable. 10 | --- 11 | 12 | # EntryPoint user defined type 13 | 14 | Namespace: [Microsoft.Quantum.Core](xref:Microsoft.Quantum.Core) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Compiler-recognized attribute used to mark the entry point of an executable. 20 | 21 | ```qsharp 22 | 23 | @ Microsoft.Quantum.Core.Attribute() 24 | newtype EntryPoint = (Unit); 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.resultstack.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.ResultStack 3 | title: ResultStack user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: ResultStack 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > ResultStack has been deprecated. 13 | 14 | --- 15 | 16 | # ResultStack user defined type 17 | 18 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | > [!WARNING] 24 | > ResultStack has been deprecated. 25 | 26 | 27 | 28 | ```qsharp 29 | 30 | @ Microsoft.Quantum.Core.Deprecated("") 31 | newtype ResultStack = (Int, Int, Result[]); 32 | ``` 33 | 34 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.core.default.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Core.Default 3 | title: Default function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Core 8 | qsharp.name: Default 9 | qsharp.summary: Returns a default instance of the specified type. 10 | --- 11 | 12 | # Default function 13 | 14 | Namespace: [Microsoft.Quantum.Core](xref:Microsoft.Quantum.Core) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns a default instance of the specified type. 20 | 21 | ```qsharp 22 | function Default<'T> () : 'T 23 | ``` 24 | 25 | 26 | ## Output : 'T 27 | 28 | Default value. 29 | 30 | ## Type Parameters 31 | 32 | ### 'T 33 | 34 | The type of the default value to return. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning.samplingschedule.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning.SamplingSchedule 3 | title: SamplingSchedule user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning 8 | qsharp.name: SamplingSchedule 9 | qsharp.summary: A schedule for drawing batches from a set of samples. 10 | --- 11 | 12 | # SamplingSchedule user defined type 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning](xref:Microsoft.Quantum.MachineLearning) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | A schedule for drawing batches from a set of samples. 20 | 21 | ```qsharp 22 | 23 | newtype SamplingSchedule = (Range[]); 24 | ``` 25 | 26 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.simulation.quantumprocessor.extensions.noop.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.NoOp 3 | title: NoOp operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Simulation.QuantumProcessor.Extensions 8 | qsharp.name: NoOp 9 | qsharp.summary: '' 10 | --- 11 | 12 | # NoOp operation 13 | 14 | Namespace: [Microsoft.Quantum.Simulation.QuantumProcessor.Extensions](xref:Microsoft.Quantum.Simulation.QuantumProcessor.Extensions) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation NoOp () : Unit is Adj + Ctl 23 | ``` 24 | 25 | 26 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 27 | 28 | -------------------------------------------------------------------------------- /api/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: microsoft.quantum.apiref-intro 3 | title: Q# libraries for Microsoft Quantum 4 | description: Reference documentation for the Q# libraries for Microsoft Quantum 5 | author: bradben 6 | ms.author: v-benbra 7 | ms.date: 09/04/2019 8 | ms.topic: landing-page 9 | --- 10 | 11 | # Q# API reference # 12 | 13 | This API reference includes the Q# standard library and the three libraries built on top of it - the chemistry, numerics, and machine learning libraries. There are also .NET and Python libraries available for Q#. 14 | 15 | - [Q# libraries](xref:microsoft.quantum.qsharplibintro) 16 | - [.NET libraries](xref:microsoft.quantum.dotnetlibsintro) 17 | - [Python libraries](https://docs.microsoft.com/python/qsharp-core/qsharp) 18 | 19 | For more information about the Q# libraries, see . 20 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.e.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.E 3 | title: E function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: E 9 | qsharp.summary: Returns the natural logarithmic base $e$. 10 | --- 11 | 12 | # E function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the natural logarithmic base $e$. 20 | 21 | ```qsharp 22 | function E () : Double 23 | ``` 24 | 25 | 26 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 27 | 28 | 29 | 30 | ## Remarks 31 | 32 | See [System.Math.E](https://docs.microsoft.com/dotnet/api/system.math.e) for more details. -------------------------------------------------------------------------------- /.github/workflows/check-samples-branch.yml: -------------------------------------------------------------------------------- 1 | on: 2 | pull_request: 3 | branches: 4 | - main 5 | 6 | jobs: 7 | check-samples-branch: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v2 11 | - name: Check that samples branch refers to main. 12 | run: | 13 | $configPath = ".openpublishing.publish.config.json"; 14 | $config = Get-Content $configPath | ConvertFrom-Json; 15 | $samplesRepo = $config.dependent_repositories | Where-Object { 16 | $_.url -eq "https://github.com/microsoft/quantum" 17 | } 18 | if ($samplesRepo.branch -ne "main") { 19 | 20 | Write-Host "::error file=$configPath::Samples repository branch is not set to main for a PR targeting main." 21 | 22 | exit 1; 23 | } 24 | shell: pwsh 25 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning.datasets.winedata.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning.Datasets.WineData 3 | title: WineData operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning.Datasets 8 | qsharp.name: WineData 9 | qsharp.summary: '' 10 | --- 11 | 12 | # WineData operation 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning.Datasets](xref:Microsoft.Quantum.MachineLearning.Datasets) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation WineData () : Microsoft.Quantum.MachineLearning.LabeledSample[] 23 | ``` 24 | 25 | 26 | ## Output : [LabeledSample](xref:Microsoft.Quantum.MachineLearning.LabeledSample)[] 27 | 28 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arrays.prefix.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arrays.Prefix 3 | title: Prefix function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Arrays 8 | qsharp.name: Prefix 9 | qsharp.summary: '' 10 | --- 11 | 12 | # Prefix function 13 | 14 | Namespace: [Microsoft.Quantum.Arrays](xref:Microsoft.Quantum.Arrays) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function Prefix<'T> (to : Int, array : 'T[]) : 'T[] 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### to : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | ### array : 'T[] 34 | 35 | 36 | 37 | 38 | 39 | ## Output : 'T[] 40 | 41 | 42 | 43 | ## Type Parameters 44 | 45 | ### 'T 46 | 47 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arithmetic.signedlittleendian.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arithmetic.SignedLittleEndian 3 | title: SignedLittleEndian user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Arithmetic 8 | qsharp.name: SignedLittleEndian 9 | qsharp.summary: Type of a signed integer stored in little endian (see LittleEndian). 10 | --- 11 | 12 | # SignedLittleEndian user defined type 13 | 14 | Namespace: [Microsoft.Quantum.Arithmetic](xref:Microsoft.Quantum.Arithmetic) 15 | 16 | Package: [Microsoft.Quantum.Numerics](https://nuget.org/packages/Microsoft.Quantum.Numerics) 17 | 18 | 19 | Type of a signed integer stored in little endian (see LittleEndian). 20 | 21 | ```qsharp 22 | 23 | newtype SignedLittleEndian = (Microsoft.Quantum.Arithmetic.LittleEndian); 24 | ``` 25 | 26 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.random.drawrandompauli.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Random.DrawRandomPauli 3 | title: DrawRandomPauli operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Random 8 | qsharp.name: DrawRandomPauli 9 | qsharp.summary: Draws a random Pauli value. 10 | --- 11 | 12 | # DrawRandomPauli operation 13 | 14 | Namespace: [Microsoft.Quantum.Random](xref:Microsoft.Quantum.Random) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Draws a random Pauli value. 20 | 21 | ```qsharp 22 | operation DrawRandomPauli () : Pauli 23 | ``` 24 | 25 | 26 | ## Output : [Pauli](xref:microsoft.quantum.lang-ref.pauli) 27 | 28 | Either `PauliI`, `PauliX`, `PauliY`, or `PauliZ` with equal probability. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.errorcorrection.syndrome.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.ErrorCorrection.Syndrome 3 | title: Syndrome user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.ErrorCorrection 8 | qsharp.name: Syndrome 9 | qsharp.summary: >- 10 | Type for measurement results `Result[]` that specify an error syndrome 11 | of a quantum code. 12 | --- 13 | 14 | # Syndrome user defined type 15 | 16 | Namespace: [Microsoft.Quantum.ErrorCorrection](xref:Microsoft.Quantum.ErrorCorrection) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Type for measurement results `Result[]` that specify an error syndrome of a quantum code. 22 | 23 | ```qsharp 24 | 25 | newtype Syndrome = (Result[]); 26 | ``` 27 | 28 | -------------------------------------------------------------------------------- /api/iqsharp-magic/chemistry.fh.add_terms.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: '%chemistry.fh.add_terms (magic command)' 3 | description: Adds terms to a fermion Hamiltonian. 4 | author: rmshaffer 5 | uid: microsoft.quantum.iqsharp.magic-ref.chemistry.fh.add_terms 6 | ms.author: ryansha 7 | ms.date: 01/24/2021 8 | ms.topic: managed-reference 9 | --- 10 | 11 | 18 | 19 | # `%chemistry.fh.add_terms` 20 | 21 | ## Summary 22 | 23 | Adds terms to a fermion Hamiltonian. 24 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.measurement.basischangeztoy.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Measurement.BasisChangeZtoY 3 | title: BasisChangeZtoY operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Measurement 8 | qsharp.name: BasisChangeZtoY 9 | qsharp.summary: '' 10 | --- 11 | 12 | # BasisChangeZtoY operation 13 | 14 | Namespace: [Microsoft.Quantum.Measurement](xref:Microsoft.Quantum.Measurement) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation BasisChangeZtoY (target : Qubit) : Unit is Adj + Ctl 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### target : [Qubit](xref:microsoft.quantum.lang-ref.qubit) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.errorcorrection.logicalregister.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.ErrorCorrection.LogicalRegister 3 | title: LogicalRegister user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.ErrorCorrection 8 | qsharp.name: LogicalRegister 9 | qsharp.summary: >- 10 | Type for register of physical qubits `Qubit[]` that encode the 11 | logical qubits. 12 | --- 13 | 14 | # LogicalRegister user defined type 15 | 16 | Namespace: [Microsoft.Quantum.ErrorCorrection](xref:Microsoft.Quantum.ErrorCorrection) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Type for register of physical qubits `Qubit[]` that encode the logical qubits. 22 | 23 | ```qsharp 24 | 25 | newtype LogicalRegister = (Qubit[]); 26 | ``` 27 | 28 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning.datasets.iristrainingdata.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning.Datasets.IrisTrainingData 3 | title: IrisTrainingData operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning.Datasets 8 | qsharp.name: IrisTrainingData 9 | qsharp.summary: '' 10 | --- 11 | 12 | # IrisTrainingData operation 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning.Datasets](xref:Microsoft.Quantum.MachineLearning.Datasets) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation IrisTrainingData () : Microsoft.Quantum.MachineLearning.LabeledSample[] 23 | ``` 24 | 25 | 26 | ## Output : [LabeledSample](xref:Microsoft.Quantum.MachineLearning.LabeledSample)[] 27 | 28 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.preparation.splitsign.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Preparation.SplitSign 3 | title: SplitSign function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Preparation 8 | qsharp.name: SplitSign 9 | qsharp.summary: '' 10 | --- 11 | 12 | # SplitSign function 13 | 14 | Namespace: [Microsoft.Quantum.Preparation](xref:Microsoft.Quantum.Preparation) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function SplitSign (coefficient : Double) : (Double, Int) 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### coefficient : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : ([Double](xref:microsoft.quantum.lang-ref.double),[Int](xref:microsoft.quantum.lang-ref.int)) 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.chemistry.jordanwigner.optimizedbetermindex.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Chemistry.JordanWigner.OptimizedBETermIndex 3 | title: OptimizedBETermIndex user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Chemistry.JordanWigner 8 | qsharp.name: OptimizedBETermIndex 9 | qsharp.summary: Term data in the optimized block-encoding algorithm. 10 | --- 11 | 12 | # OptimizedBETermIndex user defined type 13 | 14 | Namespace: [Microsoft.Quantum.Chemistry.JordanWigner](xref:Microsoft.Quantum.Chemistry.JordanWigner) 15 | 16 | Package: [Microsoft.Quantum.Chemistry](https://nuget.org/packages/Microsoft.Quantum.Chemistry) 17 | 18 | 19 | Term data in the optimized block-encoding algorithm. 20 | 21 | ```qsharp 22 | 23 | newtype OptimizedBETermIndex = (Double, Bool, Bool[], Bool[], Int[], Int[]); 24 | ``` 25 | 26 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.diagnostics.test.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Diagnostics.Test 3 | title: Test user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Diagnostics 8 | qsharp.name: Test 9 | qsharp.summary: Compiler-recognized attribute used to mark a unit test. 10 | --- 11 | 12 | # Test user defined type 13 | 14 | Namespace: [Microsoft.Quantum.Diagnostics](xref:Microsoft.Quantum.Diagnostics) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Compiler-recognized attribute used to mark a unit test. 20 | 21 | ```qsharp 22 | 23 | @ Microsoft.Quantum.Core.Attribute() 24 | newtype Test = (ExecutionTarget : String); 25 | ``` 26 | 27 | 28 | 29 | ## Named Items 30 | 31 | ### ExecutionTarget : [String](xref:microsoft.quantum.lang-ref.string) 32 | 33 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning._label.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning._Label 3 | title: _Label function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning 8 | qsharp.name: _Label 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _Label function 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning](xref:Microsoft.Quantum.MachineLearning) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function _Label (sample : Microsoft.Quantum.MachineLearning.LabeledSample) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### sample : [LabeledSample](xref:Microsoft.Quantum.MachineLearning.LabeledSample) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.ignore.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.Ignore 3 | title: Ignore function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: Ignore 9 | qsharp.summary: Ignores the output of an operation or function. 10 | --- 11 | 12 | # Ignore function 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Ignores the output of an operation or function. 20 | 21 | ```qsharp 22 | function Ignore<'T> (value : 'T) : Unit 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### value : 'T 29 | 30 | A value to be ignored. 31 | 32 | 33 | 34 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 35 | 36 | 37 | 38 | ## Type Parameters 39 | 40 | ### 'T 41 | 42 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.lg.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Lg 3 | title: Lg function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Lg 9 | qsharp.summary: Computes the base-2 logarithm of a number. 10 | --- 11 | 12 | # Lg function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Computes the base-2 logarithm of a number. 20 | 21 | ```qsharp 22 | function Lg (input : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### input : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | A real number $x$. 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | The base-2 logarithm $y = \log_2(x)$ such that $x = 2^y$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.core.length.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Core.Length 3 | title: Length function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Core 8 | qsharp.name: Length 9 | qsharp.summary: Returns the number of elements in an array. 10 | --- 11 | 12 | # Length function 13 | 14 | Namespace: [Microsoft.Quantum.Core](xref:Microsoft.Quantum.Core) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the number of elements in an array. 20 | 21 | ```qsharp 22 | function Length<'T> (a : 'T[]) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : 'T[] 29 | 30 | Input array. 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | The total count of elements in an array. 37 | 38 | ## Type Parameters 39 | 40 | ### 'T 41 | 42 | -------------------------------------------------------------------------------- /api/iqsharp-magic/chemistry.encode.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: '%chemistry.encode (magic command)' 3 | description: Encodes a fermion Hamiltonian to a format consumable by Q#. 4 | author: rmshaffer 5 | uid: microsoft.quantum.iqsharp.magic-ref.chemistry.encode 6 | ms.author: ryansha 7 | ms.date: 01/24/2021 8 | ms.topic: managed-reference 9 | --- 10 | 11 | 18 | 19 | # `%chemistry.encode` 20 | 21 | ## Summary 22 | 23 | Encodes a fermion Hamiltonian to a format consumable by Q#. 24 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arrays.elementatdiagonal.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arrays.ElementAtDiagonal 3 | title: ElementAtDiagonal function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Arrays 8 | qsharp.name: ElementAtDiagonal 9 | qsharp.summary: '' 10 | --- 11 | 12 | # ElementAtDiagonal function 13 | 14 | Namespace: [Microsoft.Quantum.Arrays](xref:Microsoft.Quantum.Arrays) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function ElementAtDiagonal<'T> (index : Int, matrix : 'T[][]) : 'T 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### index : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | ### matrix : 'T[][] 34 | 35 | 36 | 37 | 38 | 39 | ## Output : 'T 40 | 41 | 42 | 43 | ## Type Parameters 44 | 45 | ### 'T 46 | 47 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.characterization.headmeasurement.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Characterization.HeadMeasurement 3 | title: HeadMeasurement function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Characterization 8 | qsharp.name: HeadMeasurement 9 | qsharp.summary: '' 10 | --- 11 | 12 | # HeadMeasurement function 13 | 14 | Namespace: [Microsoft.Quantum.Characterization](xref:Microsoft.Quantum.Characterization) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function HeadMeasurement (nQubits : Int) : (Qubit[] => Result) 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### nQubits : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Qubit](xref:microsoft.quantum.lang-ref.qubit)[] => __invalid__ 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.max.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Max 3 | title: Max function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Max 9 | qsharp.summary: Given an array of integers, returns the largest element. 10 | --- 11 | 12 | # Max function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Given an array of integers, returns the largest element. 20 | 21 | ```qsharp 22 | function Max (values : Int[]) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### values : [Int](xref:microsoft.quantum.lang-ref.int)[] 29 | 30 | An array to take the maximum of. 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | The largest element of `values`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.min.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Min 3 | title: Min function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Min 9 | qsharp.summary: Given an array of integers, returns the smallest element. 10 | --- 11 | 12 | # Min function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Given an array of integers, returns the smallest element. 20 | 21 | ```qsharp 22 | function Min (values : Int[]) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### values : [Int](xref:microsoft.quantum.lang-ref.int)[] 29 | 30 | An array to take the minimum of. 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | The smallest element of `values`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.negationi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.NegationI 3 | title: NegationI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: NegationI 9 | qsharp.summary: Returns the unary negation of an input. 10 | --- 11 | 12 | # NegationI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the unary negation of an input. 20 | 21 | ```qsharp 22 | function NegationI (input : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### input : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | A value whose negation is to be returned. 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | The unary negation of `input`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.synthesis.rmencoding.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Synthesis.RMEncoding 3 | title: RMEncoding function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Synthesis 8 | qsharp.name: RMEncoding 9 | qsharp.summary: '{-1,1} coding of a Boolean truth value' 10 | --- 11 | 12 | # RMEncoding function 13 | 14 | Namespace: [Microsoft.Quantum.Synthesis](xref:Microsoft.Quantum.Synthesis) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | {-1,1} coding of a Boolean truth value 20 | 21 | ```qsharp 22 | function RMEncoding (b : Bool) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### b : [Bool](xref:microsoft.quantum.lang-ref.bool) 29 | 30 | Boolean value 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | 1, if `b` is false, otherwise -1 -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.synthesis.tbsmain.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Synthesis.TBSMain 3 | title: TBSMain function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Synthesis 8 | qsharp.name: TBSMain 9 | qsharp.summary: Compute gate masks to synthesize permutation. 10 | --- 11 | 12 | # TBSMain function 13 | 14 | Namespace: [Microsoft.Quantum.Synthesis](xref:Microsoft.Quantum.Synthesis) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Compute gate masks to synthesize permutation. 20 | 21 | ```qsharp 22 | function TBSMain (perm : Int[]) : Microsoft.Quantum.Synthesis.MCMTMask[] 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### perm : [Int](xref:microsoft.quantum.lang-ref.int)[] 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [MCMTMask](xref:Microsoft.Quantum.Synthesis.MCMTMask)[] 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arrays.isvaluepresent.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arrays.IsValuePresent 3 | title: IsValuePresent function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Arrays 8 | qsharp.name: IsValuePresent 9 | qsharp.summary: '' 10 | --- 11 | 12 | # IsValuePresent function 13 | 14 | Namespace: [Microsoft.Quantum.Arrays](xref:Microsoft.Quantum.Arrays) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function IsValuePresent (permutation : Int[], value : Int) : Bool 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### permutation : [Int](xref:microsoft.quantum.lang-ref.int)[] 29 | 30 | 31 | 32 | 33 | ### value : [Int](xref:microsoft.quantum.lang-ref.int) 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning._canapplytwoqubitcase.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning._CanApplyTwoQubitCase 3 | title: _CanApplyTwoQubitCase function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning 8 | qsharp.name: _CanApplyTwoQubitCase 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _CanApplyTwoQubitCase function 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning](xref:Microsoft.Quantum.MachineLearning) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function _CanApplyTwoQubitCase (datum : Double[]) : Bool 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### datum : [Double](xref:microsoft.quantum.lang-ref.double)[] 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning._features.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning._Features 3 | title: _Features function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning 8 | qsharp.name: _Features 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _Features function 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning](xref:Microsoft.Quantum.MachineLearning) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function _Features (sample : Microsoft.Quantum.MachineLearning.LabeledSample) : Double[] 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### sample : [LabeledSample](xref:Microsoft.Quantum.MachineLearning.LabeledSample) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double)[] 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning._tailmeasurement.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning._TailMeasurement 3 | title: _TailMeasurement function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning 8 | qsharp.name: _TailMeasurement 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _TailMeasurement function 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning](xref:Microsoft.Quantum.MachineLearning) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function _TailMeasurement (nQubits : Int) : (Qubit[] => Result) 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### nQubits : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Qubit](xref:microsoft.quantum.lang-ref.qubit)[] => __invalid__ 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.arctanh.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.ArcTanh 3 | title: ArcTanh function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: ArcTanh 9 | qsharp.summary: Computes the inverse hyperbolic tangent of a number. 10 | --- 11 | 12 | # ArcTanh function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Computes the inverse hyperbolic tangent of a number. 20 | 21 | ```qsharp 22 | function ArcTanh (x : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### x : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | A real number $x$. 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | A real number $y$ such that $x = \tanh(y)$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.israngeempty.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.IsRangeEmpty 3 | title: IsRangeEmpty function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: IsRangeEmpty 9 | qsharp.summary: Returns true if and only if input range is empty. 10 | --- 11 | 12 | # IsRangeEmpty function 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns true if and only if input range is empty. 20 | 21 | ```qsharp 22 | function IsRangeEmpty (rng : Range) : Bool 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### rng : [Range](xref:microsoft.quantum.lang-ref.range) 29 | 30 | Any range 31 | 32 | 33 | 34 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 35 | 36 | True, if and only if `rng` is empty -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.isresultone.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.IsResultOne 3 | title: IsResultOne function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: IsResultOne 9 | qsharp.summary: Tests if a given Result value is equal to `One`. 10 | --- 11 | 12 | # IsResultOne function 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Tests if a given Result value is equal to `One`. 20 | 21 | ```qsharp 22 | function IsResultOne (input : Result) : Bool 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### input : __invalid__ 29 | 30 | `Result` value to be tested. 31 | 32 | 33 | 34 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 35 | 36 | Returns `true` if `input` is equal to `One`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.stackpeek.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.StackPeek 3 | title: StackPeek function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: StackPeek 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > StackPeek has been deprecated. 13 | 14 | --- 15 | 16 | # StackPeek function 17 | 18 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | > [!WARNING] 24 | > StackPeek has been deprecated. 25 | 26 | 27 | 28 | ```qsharp 29 | function StackPeek (stack : Microsoft.Quantum.Canon.ResultStack) : Result 30 | ``` 31 | 32 | 33 | ## Input 34 | 35 | ### stack : [ResultStack](xref:Microsoft.Quantum.Canon.ResultStack) 36 | 37 | 38 | 39 | 40 | 41 | ## Output : __invalid__ 42 | 43 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.arccosh.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.ArcCosh 3 | title: ArcCosh function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: ArcCosh 9 | qsharp.summary: Computes the inverse hyperbolic cosine of a number. 10 | --- 11 | 12 | # ArcCosh function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Computes the inverse hyperbolic cosine of a number. 20 | 21 | ```qsharp 22 | function ArcCosh (x : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### x : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | A real number $x\geq 1$. 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | A real number $y$ such that $x = \cosh(y)$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.negationd.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.NegationD 3 | title: NegationD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: NegationD 9 | qsharp.summary: Returns the unary negation of an input. 10 | --- 11 | 12 | # NegationD function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the unary negation of an input. 20 | 21 | ```qsharp 22 | function NegationD (input : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### input : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | A value whose negation is to be returned. 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | The unary negation of `input`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.negationl.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.NegationL 3 | title: NegationL function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: NegationL 9 | qsharp.summary: Returns the unary negation of an input. 10 | --- 11 | 12 | # NegationL function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the unary negation of an input. 20 | 21 | ```qsharp 22 | function NegationL (input : BigInt) : BigInt 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### input : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 29 | 30 | A value whose negation is to be returned. 31 | 32 | 33 | 34 | ## Output : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 35 | 36 | The unary negation of `input`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arrays.emptyarray.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arrays.EmptyArray 3 | title: EmptyArray function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Arrays 8 | qsharp.name: EmptyArray 9 | qsharp.summary: Returns the empty array of a given type. 10 | --- 11 | 12 | # EmptyArray function 13 | 14 | Namespace: [Microsoft.Quantum.Arrays](xref:Microsoft.Quantum.Arrays) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the empty array of a given type. 20 | 21 | ```qsharp 22 | function EmptyArray<'TElement> () : 'TElement[] 23 | ``` 24 | 25 | 26 | ## Output : 'TElement[] 27 | 28 | The empty array. 29 | 30 | ## Type Parameters 31 | 32 | ### 'TElement 33 | 34 | The type of elements of the array. 35 | 36 | ## Example 37 | 38 | ```qsharp 39 | let empty = EmptyArray(); 40 | ``` -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.arcsinh.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.ArcSinh 3 | title: ArcSinh function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: ArcSinh 9 | qsharp.summary: Computes the inverse hyperbolic sine of a number. 10 | --- 11 | 12 | # ArcSinh function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Computes the inverse hyperbolic sine of a number. 20 | 21 | ```qsharp 22 | function ArcSinh (x : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### x : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | A real number $x$. 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | A real number $y$ such that $x = \operatorname{sinh}(y)$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arrays.tail.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arrays.Tail 3 | title: Tail function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Arrays 8 | qsharp.name: Tail 9 | qsharp.summary: Returns the last element of the array. 10 | --- 11 | 12 | # Tail function 13 | 14 | Namespace: [Microsoft.Quantum.Arrays](xref:Microsoft.Quantum.Arrays) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the last element of the array. 20 | 21 | ```qsharp 22 | function Tail<'A> (array : 'A[]) : 'A 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### array : 'A[] 29 | 30 | Array of which the last element is taken. Array must have length at least 1. 31 | 32 | 33 | 34 | ## Output : 'A 35 | 36 | The last element of the array. 37 | 38 | ## Type Parameters 39 | 40 | ### 'A 41 | 42 | The type of the array elements. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.isresultzero.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.IsResultZero 3 | title: IsResultZero function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: IsResultZero 9 | qsharp.summary: Tests if a given Result value is equal to `Zero`. 10 | --- 11 | 12 | # IsResultZero function 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Tests if a given Result value is equal to `Zero`. 20 | 21 | ```qsharp 22 | function IsResultZero (input : Result) : Bool 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### input : __invalid__ 29 | 30 | `Result` value to be tested. 31 | 32 | 33 | 34 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 35 | 36 | Returns `true` if `input` is equal to `Zero`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.stacknew.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.StackNew 3 | title: StackNew function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: StackNew 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > StackNew has been deprecated. 13 | 14 | --- 15 | 16 | # StackNew function 17 | 18 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | > [!WARNING] 24 | > StackNew has been deprecated. 25 | 26 | 27 | 28 | ```qsharp 29 | function StackNew (size : Int) : Microsoft.Quantum.Canon.ResultStack 30 | ``` 31 | 32 | 33 | ## Input 34 | 35 | ### size : [Int](xref:microsoft.quantum.lang-ref.int) 36 | 37 | 38 | 39 | 40 | 41 | ## Output : [ResultStack](xref:Microsoft.Quantum.Canon.ResultStack) 42 | 43 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.absi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.AbsI 3 | title: AbsI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: AbsI 9 | qsharp.summary: Returns the absolute value of an integer. 10 | --- 11 | 12 | # AbsI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the absolute value of an integer. 20 | 21 | ```qsharp 22 | function AbsI (a : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Abs](https://docs.microsoft.com/dotnet/api/system.math.abs) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.pi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.PI 3 | title: PI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: PI 9 | qsharp.summary: Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π. 10 | --- 11 | 12 | # PI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π. 20 | 21 | ```qsharp 22 | function PI () : Double 23 | ``` 24 | 25 | 26 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 27 | 28 | 29 | 30 | ## Remarks 31 | 32 | See [System.Math.PI](https://docs.microsoft.com/dotnet/api/system.math.pi) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arrays.head.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arrays.Head 3 | title: Head function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Arrays 8 | qsharp.name: Head 9 | qsharp.summary: Returns the first element of the array. 10 | --- 11 | 12 | # Head function 13 | 14 | Namespace: [Microsoft.Quantum.Arrays](xref:Microsoft.Quantum.Arrays) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the first element of the array. 20 | 21 | ```qsharp 22 | function Head<'A> (array : 'A[]) : 'A 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### array : 'A[] 29 | 30 | Array of which the first element is taken. Array must have length at least 1. 31 | 32 | 33 | 34 | ## Output : 'A 35 | 36 | The first element of the array. 37 | 38 | ## Type Parameters 39 | 40 | ### 'A 41 | 42 | The type of the array elements. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.ccnotop.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.CCNOTop 3 | title: CCNOTop user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: CCNOTop 9 | qsharp.summary: The signature type of CCNOT gate. 10 | --- 11 | 12 | # CCNOTop user defined type 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | The signature type of CCNOT gate. 20 | 21 | ```qsharp 22 | 23 | newtype CCNOTop = (Apply : ((Qubit, Qubit, Qubit) => Unit is Adj)); 24 | ``` 25 | 26 | 27 | 28 | ## Named Items 29 | 30 | ### Apply : ([Qubit](xref:microsoft.quantum.lang-ref.qubit),[Qubit](xref:microsoft.quantum.lang-ref.qubit),[Qubit](xref:microsoft.quantum.lang-ref.qubit)) => [Unit](xref:microsoft.quantum.lang-ref.unit) is Adj 31 | 32 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.fst.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.Fst 3 | title: Fst function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: Fst 9 | qsharp.summary: Given a pair, returns its first element. 10 | --- 11 | 12 | # Fst function 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Given a pair, returns its first element. 20 | 21 | ```qsharp 22 | function Fst<'T, 'U> (pair : ('T, 'U)) : 'T 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### pair : ('T,'U) 29 | 30 | A tuple with two elements. 31 | 32 | 33 | 34 | ## Output : 'T 35 | 36 | The first element of `pair`. 37 | 38 | ## Type Parameters 39 | 40 | ### 'T 41 | 42 | The type of the pair's first member. 43 | ### 'U 44 | 45 | The type of the pair's second member. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.round.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Round 3 | title: Round function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Round 9 | qsharp.summary: Rounds a value to the nearest integer. 10 | --- 11 | 12 | # Round function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Rounds a value to the nearest integer. 20 | 21 | ```qsharp 22 | function Round (a : Double) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Round](https://docs.microsoft.com/dotnet/api/system.math.round) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.tan.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Tan 3 | title: Tan function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Tan 9 | qsharp.summary: Returns the tangent of the specified angle. 10 | --- 11 | 12 | # Tan function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the tangent of the specified angle. 20 | 21 | ```qsharp 22 | function Tan (d : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### d : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Tan](https://docs.microsoft.com/dotnet/api/system.math.tan) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arrays.isempty.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arrays.IsEmpty 3 | title: IsEmpty function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Arrays 8 | qsharp.name: IsEmpty 9 | qsharp.summary: Returns true if and only if an array is empty. 10 | --- 11 | 12 | # IsEmpty function 13 | 14 | Namespace: [Microsoft.Quantum.Arrays](xref:Microsoft.Quantum.Arrays) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns true if and only if an array is empty. 20 | 21 | ```qsharp 22 | function IsEmpty<'T> (array : 'T[]) : Bool 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### array : 'T[] 29 | 30 | The array to be checked. 31 | 32 | 33 | 34 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 35 | 36 | `true` if and only if the array is empty (has length 0). 37 | 38 | ## Type Parameters 39 | 40 | ### 'T 41 | 42 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.snd.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.Snd 3 | title: Snd function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: Snd 9 | qsharp.summary: Given a pair, returns its second element. 10 | --- 11 | 12 | # Snd function 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Given a pair, returns its second element. 20 | 21 | ```qsharp 22 | function Snd<'T, 'U> (pair : ('T, 'U)) : 'U 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### pair : ('T,'U) 29 | 30 | A tuple with two elements. 31 | 32 | 33 | 34 | ## Output : 'U 35 | 36 | The second element of `pair`. 37 | 38 | ## Type Parameters 39 | 40 | ### 'T 41 | 42 | The type of the pair's first member. 43 | ### 'U 44 | 45 | The type of the pair's second member. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.chemistry.hterm.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Chemistry.HTerm 3 | title: HTerm user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Chemistry 8 | qsharp.name: HTerm 9 | qsharp.summary: >- 10 | Format of data passed from C# to Q# to represent a term of the Hamiltonian. 11 | The meaning of the data represented is determined by the algorithm that receives it. 12 | --- 13 | 14 | # HTerm user defined type 15 | 16 | Namespace: [Microsoft.Quantum.Chemistry](xref:Microsoft.Quantum.Chemistry) 17 | 18 | Package: [Microsoft.Quantum.Chemistry](https://nuget.org/packages/Microsoft.Quantum.Chemistry) 19 | 20 | 21 | Format of data passed from C# to Q# to represent a term of the Hamiltonian. The meaning of the data represented is determined by the algorithm that receives it. 22 | 23 | ```qsharp 24 | 25 | newtype HTerm = (Int[], Double[]); 26 | ``` 27 | 28 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.cos.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Cos 3 | title: Cos function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Cos 9 | qsharp.summary: Returns the cosine of the specified angle. 10 | --- 11 | 12 | # Cos function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the cosine of the specified angle. 20 | 21 | ```qsharp 22 | function Cos (theta : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### theta : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Cos](https://docs.microsoft.com/dotnet/api/system.math.cos) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.expd.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.ExpD 3 | title: ExpD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: ExpD 9 | qsharp.summary: Returns $e$ raised to the specified power. 10 | --- 11 | 12 | # ExpD function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns $e$ raised to the specified power. 20 | 21 | ```qsharp 22 | function ExpD (a : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Exp](https://docs.microsoft.com/dotnet/api/system.math.exp) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.plusi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.PlusI 3 | title: PlusI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: PlusI 9 | qsharp.summary: Returns the sum of two inputs. 10 | --- 11 | 12 | # PlusI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the sum of two inputs. 20 | 21 | ```qsharp 22 | function PlusI (a : Int, b : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | The first input $a$ to be summed. 31 | 32 | 33 | ### b : [Int](xref:microsoft.quantum.lang-ref.int) 34 | 35 | The second input $b$ to be summed. 36 | 37 | 38 | 39 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 40 | 41 | The sum $a + b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.sin.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Sin 3 | title: Sin function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Sin 9 | qsharp.summary: Returns the sine of the specified angle. 10 | --- 11 | 12 | # Sin function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the sine of the specified angle. 20 | 21 | ```qsharp 22 | function Sin (theta : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### theta : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Sin](https://docs.microsoft.com/dotnet/api/system.math.sin) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.stacklength.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.StackLength 3 | title: StackLength function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: StackLength 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > StackLength has been deprecated. 13 | 14 | --- 15 | 16 | # StackLength function 17 | 18 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | > [!WARNING] 24 | > StackLength has been deprecated. 25 | 26 | 27 | 28 | ```qsharp 29 | function StackLength (stack : Microsoft.Quantum.Canon.ResultStack) : Int 30 | ``` 31 | 32 | 33 | ## Input 34 | 35 | ### stack : [ResultStack](xref:Microsoft.Quantum.Canon.ResultStack) 36 | 37 | 38 | 39 | 40 | 41 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 42 | 43 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.chemistry.jordanwigner._selectz_.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Chemistry.JordanWigner._SelectZ_ 3 | title: _SelectZ_ function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Chemistry.JordanWigner 8 | qsharp.name: _SelectZ_ 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _SelectZ_ function 13 | 14 | Namespace: [Microsoft.Quantum.Chemistry.JordanWigner](xref:Microsoft.Quantum.Chemistry.JordanWigner) 15 | 16 | Package: [Microsoft.Quantum.Chemistry](https://nuget.org/packages/Microsoft.Quantum.Chemistry) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function _SelectZ_ (targetIndex : Int) : (Qubit[] => Unit is Adj + Ctl) 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### targetIndex : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Qubit](xref:microsoft.quantum.lang-ref.qubit)[] => [Unit](xref:microsoft.quantum.lang-ref.unit) is Adj + Ctl 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.measurement.multim.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Measurement.MultiM 3 | title: MultiM operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Measurement 8 | qsharp.name: MultiM 9 | qsharp.summary: Measures each qubit in a given array in the standard basis. 10 | --- 11 | 12 | # MultiM operation 13 | 14 | Namespace: [Microsoft.Quantum.Measurement](xref:Microsoft.Quantum.Measurement) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Measures each qubit in a given array in the standard basis. 20 | 21 | ```qsharp 22 | operation MultiM (targets : Qubit[]) : Result[] 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### targets : [Qubit](xref:microsoft.quantum.lang-ref.qubit)[] 29 | 30 | An array of qubits to be measured. 31 | 32 | 33 | 34 | ## Output : __invalid__[] 35 | 36 | An array of measurement results. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.optimization.width.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Optimization.Width 3 | title: Width function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Optimization 8 | qsharp.name: Width 9 | qsharp.summary: Returns the width of an interval. 10 | --- 11 | 12 | # Width function 13 | 14 | Namespace: [Microsoft.Quantum.Optimization](xref:Microsoft.Quantum.Optimization) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the width of an interval. 20 | 21 | ```qsharp 22 | function Width (left : Double, right : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### left : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | ### right : [Double](xref:microsoft.quantum.lang-ref.double) 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.errorcorrection.recoveryfn.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.ErrorCorrection.RecoveryFn 3 | title: RecoveryFn user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.ErrorCorrection 8 | qsharp.name: RecoveryFn 9 | qsharp.summary: >- 10 | Type for function that maps an error syndrome to a sequence of `Pauli[]` 11 | operations that correct the detected error. 12 | --- 13 | 14 | # RecoveryFn user defined type 15 | 16 | Namespace: [Microsoft.Quantum.ErrorCorrection](xref:Microsoft.Quantum.ErrorCorrection) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Type for function that maps an error syndrome to a sequence of `Pauli[]` operations that correct the detected error. 22 | 23 | ```qsharp 24 | 25 | newtype RecoveryFn = ((Microsoft.Quantum.ErrorCorrection.Syndrome -> Pauli[])); 26 | ``` 27 | 28 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.sqrt.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Sqrt 3 | title: Sqrt function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Sqrt 9 | qsharp.summary: Returns the square root of a specified number. 10 | --- 11 | 12 | # Sqrt function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the square root of a specified number. 20 | 21 | ```qsharp 22 | function Sqrt (d : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### d : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Sqrt](https://docs.microsoft.com/dotnet/api/system.math.sqrt) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.chemistry.jordanwigner._topaulibases_.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Chemistry.JordanWigner._ToPauliBases_ 3 | title: _ToPauliBases_ function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Chemistry.JordanWigner 8 | qsharp.name: _ToPauliBases_ 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _ToPauliBases_ function 13 | 14 | Namespace: [Microsoft.Quantum.Chemistry.JordanWigner](xref:Microsoft.Quantum.Chemistry.JordanWigner) 15 | 16 | Package: [Microsoft.Quantum.Chemistry](https://nuget.org/packages/Microsoft.Quantum.Chemistry) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function _ToPauliBases_ (idx : Int) : (Qubit[] => Unit is Adj + Ctl) 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### idx : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Qubit](xref:microsoft.quantum.lang-ref.qubit)[] => [Unit](xref:microsoft.quantum.lang-ref.unit) is Adj + Ctl 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.negationc.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.NegationC 3 | title: NegationC function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: NegationC 9 | qsharp.summary: Returns the unary negation of an input. 10 | --- 11 | 12 | # NegationC function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the unary negation of an input. 20 | 21 | ```qsharp 22 | function NegationC (input : Microsoft.Quantum.Math.Complex) : Microsoft.Quantum.Math.Complex 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### input : [Complex](xref:Microsoft.Quantum.Math.Complex) 29 | 30 | A value whose negation is to be returned. 31 | 32 | 33 | 34 | ## Output : [Complex](xref:Microsoft.Quantum.Math.Complex) 35 | 36 | The unary negation of `input`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.signi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.SignI 3 | title: SignI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: SignI 9 | qsharp.summary: Returns an integer that indicates the sign of a number. 10 | --- 11 | 12 | # SignI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns an integer that indicates the sign of a number. 20 | 21 | ```qsharp 22 | function SignI (a : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Sign](https://docs.microsoft.com/dotnet/api/system.math.sign) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.synthesis.squarematrixfact.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Synthesis.SquareMatrixFact 3 | title: SquareMatrixFact function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Synthesis 8 | qsharp.name: SquareMatrixFact 9 | qsharp.summary: Checks that given array represents a square matrix. 10 | --- 11 | 12 | # SquareMatrixFact function 13 | 14 | Namespace: [Microsoft.Quantum.Synthesis](xref:Microsoft.Quantum.Synthesis) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Checks that given array represents a square matrix. 20 | 21 | ```qsharp 22 | function SquareMatrixFact (matrix : Microsoft.Quantum.Math.Complex[][]) : Unit 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### matrix : [Complex](xref:Microsoft.Quantum.Math.Complex)[][] 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.anyoutsidetoleranced.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.AnyOutsideToleranceD 3 | title: AnyOutsideToleranceD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: AnyOutsideToleranceD 9 | qsharp.summary: '' 10 | --- 11 | 12 | # AnyOutsideToleranceD function 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function AnyOutsideToleranceD (tolerance : Double, coefficients : Double[]) : Bool 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### tolerance : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | ### coefficients : [Double](xref:microsoft.quantum.lang-ref.double)[] 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.stackcapacity.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.StackCapacity 3 | title: StackCapacity function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: StackCapacity 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > StackCapacity has been deprecated. 13 | 14 | --- 15 | 16 | # StackCapacity function 17 | 18 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | > [!WARNING] 24 | > StackCapacity has been deprecated. 25 | 26 | 27 | 28 | ```qsharp 29 | function StackCapacity (stack : Microsoft.Quantum.Canon.ResultStack) : Int 30 | ``` 31 | 32 | 33 | ## Input 34 | 35 | ### stack : [ResultStack](xref:Microsoft.Quantum.Canon.ResultStack) 36 | 37 | 38 | 39 | 40 | 41 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 42 | 43 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.sinh.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Sinh 3 | title: Sinh function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Sinh 9 | qsharp.summary: Returns the hyperbolic sine of the specified angle. 10 | --- 11 | 12 | # Sinh function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the hyperbolic sine of the specified angle. 20 | 21 | ```qsharp 22 | function Sinh (d : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### d : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Sinh](https://docs.microsoft.com/dotnet/api/system.math.sinh) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.simulation.blockencodingreflection.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Simulation.BlockEncodingReflection 3 | title: BlockEncodingReflection user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Simulation 8 | qsharp.name: BlockEncodingReflection 9 | qsharp.summary: Represents a `BlockEncoding` that is also a reflection. 10 | --- 11 | 12 | # BlockEncodingReflection user defined type 13 | 14 | Namespace: [Microsoft.Quantum.Simulation](xref:Microsoft.Quantum.Simulation) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Represents a `BlockEncoding` that is also a reflection. 20 | 21 | ```qsharp 22 | 23 | newtype BlockEncodingReflection = (Microsoft.Quantum.Simulation.BlockEncoding); 24 | ``` 25 | 26 | 27 | 28 | ## See Also 29 | 30 | - [Microsoft.Quantum.Simulation.BlockEncoding](xref:Microsoft.Quantum.Simulation.BlockEncoding) -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.stackpop.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.StackPop 3 | title: StackPop function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: StackPop 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > StackPop has been deprecated. 13 | 14 | --- 15 | 16 | # StackPop function 17 | 18 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | > [!WARNING] 24 | > StackPop has been deprecated. 25 | 26 | 27 | 28 | ```qsharp 29 | function StackPop (stack : Microsoft.Quantum.Canon.ResultStack) : Microsoft.Quantum.Canon.ResultStack 30 | ``` 31 | 32 | 33 | ## Input 34 | 35 | ### stack : [ResultStack](xref:Microsoft.Quantum.Canon.ResultStack) 36 | 37 | 38 | 39 | 40 | 41 | ## Output : [ResultStack](xref:Microsoft.Quantum.Canon.ResultStack) 42 | 43 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.cosh.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Cosh 3 | title: Cosh function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Cosh 9 | qsharp.summary: Returns the hyperbolic cosine of the specified angle. 10 | --- 11 | 12 | # Cosh function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the hyperbolic cosine of the specified angle. 20 | 21 | ```qsharp 22 | function Cosh (d : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### d : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Cosh](https://docs.microsoft.com/dotnet/api/system.math.cosh) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.signd.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.SignD 3 | title: SignD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: SignD 9 | qsharp.summary: Returns an integer that indicates the sign of a number. 10 | --- 11 | 12 | # SignD function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns an integer that indicates the sign of a number. 20 | 21 | ```qsharp 22 | function SignD (a : Double) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Sign](https://docs.microsoft.com/dotnet/api/system.math.sign) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.signl.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.SignL 3 | title: SignL function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: SignL 9 | qsharp.summary: Returns an integer that indicates the sign of a number. 10 | --- 11 | 12 | # SignL function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns an integer that indicates the sign of a number. 20 | 21 | ```qsharp 22 | function SignL (a : BigInt) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Sign](https://docs.microsoft.com/dotnet/api/system.math.sign) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.tanh.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Tanh 3 | title: Tanh function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Tanh 9 | qsharp.summary: Returns the hyperbolic tangent of the specified angle. 10 | --- 11 | 12 | # Tanh function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the hyperbolic tangent of the specified angle. 20 | 21 | ```qsharp 22 | function Tanh (d : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### d : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Tanh](https://docs.microsoft.com/dotnet/api/system.math.tanh) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.truncate.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Truncate 3 | title: Truncate function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Truncate 9 | qsharp.summary: Calculates the integral part of a number. 10 | --- 11 | 12 | # Truncate function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Calculates the integral part of a number. 20 | 21 | ```qsharp 22 | function Truncate (a : Double) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Truncate](https://docs.microsoft.com/dotnet/api/system.math.truncate) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.oracles.discreteoracle.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Oracles.DiscreteOracle 3 | title: DiscreteOracle user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Oracles 8 | qsharp.name: DiscreteOracle 9 | qsharp.summary: >- 10 | Represents a discrete-time oracle. 11 | 12 | This is an oracle that implements $U^m$ for a fixed operation $U$ 13 | and a non-negative integer $m$. 14 | --- 15 | 16 | # DiscreteOracle user defined type 17 | 18 | Namespace: [Microsoft.Quantum.Oracles](xref:Microsoft.Quantum.Oracles) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | Represents a discrete-time oracle. This is an oracle that implements $U^m$ for a fixed operation $U$ and a non-negative integer $m$. 24 | 25 | ```qsharp 26 | 27 | newtype DiscreteOracle = (((Int, Qubit[]) => Unit is Adj + Ctl)); 28 | ``` 29 | 30 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning._allnearlyequald.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning._AllNearlyEqualD 3 | title: _AllNearlyEqualD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning 8 | qsharp.name: _AllNearlyEqualD 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _AllNearlyEqualD function 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning](xref:Microsoft.Quantum.MachineLearning) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function _AllNearlyEqualD (v1 : Double[], v2 : Double[]) : Bool 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### v1 : [Double](xref:microsoft.quantum.lang-ref.double)[] 29 | 30 | 31 | 32 | 33 | ### v2 : [Double](xref:microsoft.quantum.lang-ref.double)[] 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.plusd.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.PlusD 3 | title: PlusD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: PlusD 9 | qsharp.summary: Returns the sum of two inputs. 10 | --- 11 | 12 | # PlusD function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the sum of two inputs. 20 | 21 | ```qsharp 22 | function PlusD (a : Double, b : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | The first input $a$ to be summed. 31 | 32 | 33 | ### b : [Double](xref:microsoft.quantum.lang-ref.double) 34 | 35 | The second input $b$ to be summed. 36 | 37 | 38 | 39 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 40 | 41 | The sum $a + b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.plusl.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.PlusL 3 | title: PlusL function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: PlusL 9 | qsharp.summary: Returns the sum of two inputs. 10 | --- 11 | 12 | # PlusL function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the sum of two inputs. 20 | 21 | ```qsharp 22 | function PlusL (a : BigInt, b : BigInt) : BigInt 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 29 | 30 | The first input $a$ to be summed. 31 | 32 | 33 | ### b : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 34 | 35 | The second input $b$ to be summed. 36 | 37 | 38 | 39 | ## Output : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 40 | 41 | The sum $a + b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.optimization.midpoint.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Optimization.Midpoint 3 | title: Midpoint function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Optimization 8 | qsharp.name: Midpoint 9 | qsharp.summary: Returns the midpoint for an interval. 10 | --- 11 | 12 | # Midpoint function 13 | 14 | Namespace: [Microsoft.Quantum.Optimization](xref:Microsoft.Quantum.Optimization) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the midpoint for an interval. 20 | 21 | ```qsharp 22 | function Midpoint (left : Double, right : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### left : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | ### right : [Double](xref:microsoft.quantum.lang-ref.double) 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.absl.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.AbsL 3 | title: AbsL function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: AbsL 9 | qsharp.summary: Returns the absolute value of a big integer. 10 | --- 11 | 12 | # AbsL function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the absolute value of a big integer. 20 | 21 | ```qsharp 22 | function AbsL (a : BigInt) : BigInt 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Numerics.BigInteger.Abs](https://docs.microsoft.com/dotnet/api/system.numerics.biginteger.abs) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.arcsin.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.ArcSin 3 | title: ArcSin function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: ArcSin 9 | qsharp.summary: Returns the angle whose sine is the specified number. 10 | --- 11 | 12 | # ArcSin function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the angle whose sine is the specified number. 20 | 21 | ```qsharp 22 | function ArcSin (y : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### y : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Asin](https://docs.microsoft.com/dotnet/api/system.math.asin) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.timesi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.TimesI 3 | title: TimesI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: TimesI 9 | qsharp.summary: Returns the product of two inputs. 10 | --- 11 | 12 | # TimesI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the product of two inputs. 20 | 21 | ```qsharp 22 | function TimesI (a : Int, b : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | The first input $a$ to be multiplied. 31 | 32 | 33 | ### b : [Int](xref:microsoft.quantum.lang-ref.int) 34 | 35 | The second input $b$ to be multiplied. 36 | 37 | 38 | 39 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 40 | 41 | The product $a \times b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.errorcorrection.qecc.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.ErrorCorrection.QECC 3 | title: QECC user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.ErrorCorrection 8 | qsharp.name: QECC 9 | qsharp.summary: >- 10 | Represents an error-correcting code as defined by its encoder, 11 | decoder, and syndrome measurement procedure. 12 | --- 13 | 14 | # QECC user defined type 15 | 16 | Namespace: [Microsoft.Quantum.ErrorCorrection](xref:Microsoft.Quantum.ErrorCorrection) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Represents an error-correcting code as defined by its encoder, decoder, and syndrome measurement procedure. 22 | 23 | ```qsharp 24 | 25 | newtype QECC = (Microsoft.Quantum.ErrorCorrection.EncodeOp, Microsoft.Quantum.ErrorCorrection.DecodeOp, Microsoft.Quantum.ErrorCorrection.SyndromeMeasOp); 26 | ``` 27 | 28 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.arccos.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.ArcCos 3 | title: ArcCos function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: ArcCos 9 | qsharp.summary: Returns the angle whose cosine is the specified number. 10 | --- 11 | 12 | # ArcCos function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the angle whose cosine is the specified number. 20 | 21 | ```qsharp 22 | function ArcCos (x : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### x : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Acos](https://docs.microsoft.com/dotnet/api/system.math.acos) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.arctan.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.ArcTan 3 | title: ArcTan function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: ArcTan 9 | qsharp.summary: Returns the angle whose tangent is the specified number. 10 | --- 11 | 12 | # ArcTan function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the angle whose tangent is the specified number. 20 | 21 | ```qsharp 22 | function ArcTan (d : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### d : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Atan](https://docs.microsoft.com/dotnet/api/system.math.atan) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.log10.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Log10 3 | title: Log10 function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Log10 9 | qsharp.summary: Returns the base 10 logarithm of a specified number. 10 | --- 11 | 12 | # Log10 function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the base 10 logarithm of a specified number. 20 | 21 | ```qsharp 22 | function Log10 (input : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### input : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Log10](https://docs.microsoft.com/dotnet/api/system.math.log10) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.powi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.PowI 3 | title: PowI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: PowI 9 | qsharp.summary: Returns a number raised to a given power. 10 | --- 11 | 12 | # PowI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns a number raised to a given power. 20 | 21 | ```qsharp 22 | function PowI (a : Int, power : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | The number $a$ that is to be raised. 31 | 32 | 33 | ### power : [Int](xref:microsoft.quantum.lang-ref.int) 34 | 35 | The power $b$ to which $a$ should be raised. 36 | 37 | 38 | 39 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 40 | 41 | The power $a^b$ -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.random.delay.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Random.Delay 3 | title: Delay operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Random 8 | qsharp.name: Delay 9 | qsharp.summary: '' 10 | --- 11 | 12 | # Delay operation 13 | 14 | Namespace: [Microsoft.Quantum.Random](xref:Microsoft.Quantum.Random) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation Delay<'TInput, 'TOutput> (op : ('TInput => 'TOutput), input : 'TInput, delay : Unit) : 'TOutput 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### op : 'TInput => 'TOutput 29 | 30 | 31 | 32 | 33 | ### input : 'TInput 34 | 35 | 36 | 37 | 38 | ### delay : [Unit](xref:microsoft.quantum.lang-ref.unit) 39 | 40 | 41 | 42 | 43 | 44 | ## Output : 'TOutput 45 | 46 | 47 | 48 | ## Type Parameters 49 | 50 | ### 'TInput 51 | 52 | 53 | ### 'TOutput 54 | 55 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.chemistry.jordanwigner._selectz.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Chemistry.JordanWigner._SelectZ 3 | title: _SelectZ operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Chemistry.JordanWigner 8 | qsharp.name: _SelectZ 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _SelectZ operation 13 | 14 | Namespace: [Microsoft.Quantum.Chemistry.JordanWigner](xref:Microsoft.Quantum.Chemistry.JordanWigner) 15 | 16 | Package: [Microsoft.Quantum.Chemistry](https://nuget.org/packages/Microsoft.Quantum.Chemistry) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation _SelectZ (targetIndex : Int, targetRegister : Qubit[]) : Unit is Adj + Ctl 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### targetIndex : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | ### targetRegister : [Qubit](xref:microsoft.quantum.lang-ref.qubit)[] 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning._uncontrolledspansequence.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning._UncontrolledSpanSequence 3 | title: _UncontrolledSpanSequence function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning 8 | qsharp.name: _UncontrolledSpanSequence 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _UncontrolledSpanSequence function 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning](xref:Microsoft.Quantum.MachineLearning) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function _UncontrolledSpanSequence (idxsQubits : Int[]) : (Int, Int[])[] 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### idxsQubits : [Int](xref:microsoft.quantum.lang-ref.int)[] 29 | 30 | 31 | 32 | 33 | 34 | ## Output : ([Int](xref:microsoft.quantum.lang-ref.int),[Int](xref:microsoft.quantum.lang-ref.int)[])[] 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.log.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Log 3 | title: Log function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Log 9 | qsharp.summary: Returns the natural (base $e$) logarithm of a specified number. 10 | --- 11 | 12 | # Log function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the natural (base $e$) logarithm of a specified number. 20 | 21 | ```qsharp 22 | function Log (input : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### input : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Log](https://docs.microsoft.com/dotnet/api/system.math.log) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.minusi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.MinusI 3 | title: MinusI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: MinusI 9 | qsharp.summary: Returns the difference between two inputs. 10 | --- 11 | 12 | # MinusI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the difference between two inputs. 20 | 21 | ```qsharp 22 | function MinusI (a : Int, b : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | The first input $a$ to be subtracted. 31 | 32 | 33 | ### b : [Int](xref:microsoft.quantum.lang-ref.int) 34 | 35 | The second input $b$ to be subtracted. 36 | 37 | 38 | 39 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 40 | 41 | The difference $a - b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.chemistry.isnotzero.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Chemistry.IsNotZero 3 | title: IsNotZero function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Chemistry 8 | qsharp.name: IsNotZero 9 | qsharp.summary: Checks whether a `Double` number is not approximately zero. 10 | --- 11 | 12 | # IsNotZero function 13 | 14 | Namespace: [Microsoft.Quantum.Chemistry](xref:Microsoft.Quantum.Chemistry) 15 | 16 | Package: [Microsoft.Quantum.Chemistry](https://nuget.org/packages/Microsoft.Quantum.Chemistry) 17 | 18 | 19 | Checks whether a `Double` number is not approximately zero. 20 | 21 | ```qsharp 22 | function IsNotZero (number : Double) : Bool 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### number : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | Number to be checked 31 | 32 | 33 | 34 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 35 | 36 | Returns true if `number` has an absolute value greater than `1e-15`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.convert.boolarrayasint.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Convert.BoolArrayAsInt 3 | title: BoolArrayAsInt function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Convert 8 | qsharp.name: BoolArrayAsInt 9 | qsharp.summary: Produces a non-negative integer from a string of bits in little endian format. 10 | --- 11 | 12 | # BoolArrayAsInt function 13 | 14 | Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Produces a non-negative integer from a string of bits in little endian format. 20 | 21 | ```qsharp 22 | function BoolArrayAsInt (bits : Bool[]) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### bits : [Bool](xref:microsoft.quantum.lang-ref.bool)[] 29 | 30 | Bits in binary representation of number. 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.convert.resultarrayasint.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Convert.ResultArrayAsInt 3 | title: ResultArrayAsInt function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Convert 8 | qsharp.name: ResultArrayAsInt 9 | qsharp.summary: Produces a non-negative integer from a string of Results in little endian format. 10 | --- 11 | 12 | # ResultArrayAsInt function 13 | 14 | Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Produces a non-negative integer from a string of Results in little endian format. 20 | 21 | ```qsharp 22 | function ResultArrayAsInt (results : Result[]) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### results : __invalid__[] 29 | 30 | Results in binary representation of number. 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.extensions.math.e.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Extensions.Math.E 3 | title: E function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Extensions.Math 8 | qsharp.name: E 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > E has been deprecated. Please use instead. 13 | 14 | > 15 | 16 | > Please use @"microsoft.quantum.math.e". 17 | 18 | --- 19 | 20 | # E function 21 | 22 | Namespace: [Microsoft.Quantum.Extensions.Math](xref:Microsoft.Quantum.Extensions.Math) 23 | 24 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 25 | 26 | 27 | > [!WARNING] 28 | > E has been deprecated. Please use instead. 29 | > 30 | > Please use @"microsoft.quantum.math.e". 31 | 32 | 33 | 34 | ```qsharp 35 | function E () : Double 36 | ``` 37 | 38 | 39 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.dividedbyi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.DividedByI 3 | title: DividedByI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: DividedByI 9 | qsharp.summary: Returns the quotient of two inputs. 10 | --- 11 | 12 | # DividedByI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the quotient of two inputs. 20 | 21 | ```qsharp 22 | function DividedByI (a : Int, b : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | The first input $a$ to be divided. 31 | 32 | 33 | ### b : [Int](xref:microsoft.quantum.lang-ref.int) 34 | 35 | The second input $b$ to be divided. 36 | 37 | 38 | 39 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 40 | 41 | The quotient $a / b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.negationcp.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.NegationCP 3 | title: NegationCP function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: NegationCP 9 | qsharp.summary: Returns the unary negation of an input. 10 | --- 11 | 12 | # NegationCP function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the unary negation of an input. 20 | 21 | ```qsharp 22 | function NegationCP (input : Microsoft.Quantum.Math.ComplexPolar) : Microsoft.Quantum.Math.ComplexPolar 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### input : [ComplexPolar](xref:Microsoft.Quantum.Math.ComplexPolar) 29 | 30 | A value whose negation is to be returned. 31 | 32 | 33 | 34 | ## Output : [ComplexPolar](xref:Microsoft.Quantum.Math.ComplexPolar) 35 | 36 | The unary negation of `input`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.chemistry.jordanwigner._topaulibases.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Chemistry.JordanWigner._ToPauliBases 3 | title: _ToPauliBases operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Chemistry.JordanWigner 8 | qsharp.name: _ToPauliBases 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _ToPauliBases operation 13 | 14 | Namespace: [Microsoft.Quantum.Chemistry.JordanWigner](xref:Microsoft.Quantum.Chemistry.JordanWigner) 15 | 16 | Package: [Microsoft.Quantum.Chemistry](https://nuget.org/packages/Microsoft.Quantum.Chemistry) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation _ToPauliBases (idx : Int, pauliBases : Qubit[]) : Unit is Adj + Ctl 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### idx : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | ### pauliBases : [Qubit](xref:microsoft.quantum.lang-ref.qubit)[] 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning._flipped.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning._Flipped 3 | title: _Flipped function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning 8 | qsharp.name: _Flipped 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _Flipped function 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning](xref:Microsoft.Quantum.MachineLearning) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function _Flipped<'TInput1, 'TInput2, 'TOutput> (fn : (('TInput1, 'TInput2) -> 'TOutput)) : (('TInput2, 'TInput1) -> 'TOutput) 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### fn : ('TInput1,'TInput2) -> 'TOutput 29 | 30 | 31 | 32 | 33 | 34 | ## Output : ('TInput2,'TInput1) -> 'TOutput 35 | 36 | 37 | 38 | ## Type Parameters 39 | 40 | ### 'TInput1 41 | 42 | 43 | ### 'TInput2 44 | 45 | 46 | ### 'TOutput 47 | 48 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.powl.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.PowL 3 | title: PowL function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: PowL 9 | qsharp.summary: Returns a number raised to a given power. 10 | --- 11 | 12 | # PowL function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns a number raised to a given power. 20 | 21 | ```qsharp 22 | function PowL (a : BigInt, power : Int) : BigInt 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 29 | 30 | The number $a$ that is to be raised. 31 | 32 | 33 | ### power : [Int](xref:microsoft.quantum.lang-ref.int) 34 | 35 | The power $b$ to which $a$ should be raised. 36 | 37 | 38 | 39 | ## Output : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 40 | 41 | The power $a^b$ -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.simulation.evolutionschedule.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Simulation.EvolutionSchedule 3 | title: EvolutionSchedule user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Simulation 8 | qsharp.name: EvolutionSchedule 9 | qsharp.summary: >- 10 | Represents a time-dependent dynamical generator. 11 | 12 | The `Double` 13 | parameter is a schedule in $[0, 1]$. 14 | --- 15 | 16 | # EvolutionSchedule user defined type 17 | 18 | Namespace: [Microsoft.Quantum.Simulation](xref:Microsoft.Quantum.Simulation) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | Represents a time-dependent dynamical generator. The `Double` parameter is a schedule in $[0, 1]$. 24 | 25 | ```qsharp 26 | 27 | newtype EvolutionSchedule = (Microsoft.Quantum.Simulation.EvolutionSet, (Double -> Microsoft.Quantum.Simulation.GeneratorSystem)); 28 | ``` 29 | 30 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arithmetic.bigendian.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arithmetic.BigEndian 3 | title: BigEndian user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Arithmetic 8 | qsharp.name: BigEndian 9 | qsharp.summary: >- 10 | Register that encodes an unsigned integer in big-endian order. The 11 | qubit with index `0` encodes the highest bit of an unsigned integer. 12 | --- 13 | 14 | # BigEndian user defined type 15 | 16 | Namespace: [Microsoft.Quantum.Arithmetic](xref:Microsoft.Quantum.Arithmetic) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Register that encodes an unsigned integer in big-endian order. The qubit with index `0` encodes the highest bit of an unsigned integer. 22 | 23 | ```qsharp 24 | 25 | newtype BigEndian = (Qubit[]); 26 | ``` 27 | 28 | 29 | 30 | ## Remarks 31 | 32 | We abbreviate `BigEndian` as `BE` in the documentation. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.anyoutsidetolerancecp.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.AnyOutsideToleranceCP 3 | title: AnyOutsideToleranceCP function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: AnyOutsideToleranceCP 9 | qsharp.summary: '' 10 | --- 11 | 12 | # AnyOutsideToleranceCP function 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function AnyOutsideToleranceCP (tolerance : Double, coefficients : Microsoft.Quantum.Math.ComplexPolar[]) : Bool 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### tolerance : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | ### coefficients : [ComplexPolar](xref:Microsoft.Quantum.Math.ComplexPolar)[] 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.absd.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.AbsD 3 | title: AbsD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: AbsD 9 | qsharp.summary: Returns the absolute value of a double-precision floating-point number. 10 | --- 11 | 12 | # AbsD function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the absolute value of a double-precision floating-point number. 20 | 21 | ```qsharp 22 | function AbsD (a : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Abs](https://docs.microsoft.com/dotnet/api/system.math.abs) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.timesd.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.TimesD 3 | title: TimesD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: TimesD 9 | qsharp.summary: Returns the product of two inputs. 10 | --- 11 | 12 | # TimesD function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the product of two inputs. 20 | 21 | ```qsharp 22 | function TimesD (a : Double, b : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | The first input $a$ to be multiplied. 31 | 32 | 33 | ### b : [Double](xref:microsoft.quantum.lang-ref.double) 34 | 35 | The second input $b$ to be multiplied. 36 | 37 | 38 | 39 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 40 | 41 | The product $a \times b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.timesl.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.TimesL 3 | title: TimesL function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: TimesL 9 | qsharp.summary: Returns the product of two inputs. 10 | --- 11 | 12 | # TimesL function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the product of two inputs. 20 | 21 | ```qsharp 22 | function TimesL (a : BigInt, b : BigInt) : BigInt 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 29 | 30 | The first input $a$ to be multiplied. 31 | 32 | 33 | ### b : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 34 | 35 | The second input $b$ to be multiplied. 36 | 37 | 38 | 39 | ## Output : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 40 | 41 | The product $a \times b$. -------------------------------------------------------------------------------- /api/iqsharp-magic/chemistry.inputstate.load.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: '%chemistry.inputstate.load (magic command)' 3 | description: Loads Broombridge electronic structure problem and returns selected input 4 | state. 5 | author: rmshaffer 6 | uid: microsoft.quantum.iqsharp.magic-ref.chemistry.inputstate.load 7 | ms.author: ryansha 8 | ms.date: 01/24/2021 9 | ms.topic: managed-reference 10 | --- 11 | 12 | 19 | 20 | # `%chemistry.inputstate.load` 21 | 22 | ## Summary 23 | 24 | Loads Broombridge electronic structure problem and returns selected input state. 25 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.extensions.math.pi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Extensions.Math.PI 3 | title: PI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Extensions.Math 8 | qsharp.name: PI 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > PI has been deprecated. Please use instead. 13 | 14 | > 15 | 16 | > Please use @"microsoft.quantum.math.pi". 17 | 18 | --- 19 | 20 | # PI function 21 | 22 | Namespace: [Microsoft.Quantum.Extensions.Math](xref:Microsoft.Quantum.Extensions.Math) 23 | 24 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 25 | 26 | 27 | > [!WARNING] 28 | > PI has been deprecated. Please use instead. 29 | > 30 | > Please use @"microsoft.quantum.math.pi". 31 | 32 | 33 | 34 | ```qsharp 35 | function PI () : Double 36 | ``` 37 | 38 | 39 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.floor.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Floor 3 | title: Floor function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Floor 9 | qsharp.summary: Returns the largest integer less than or equal to the specified number. 10 | --- 11 | 12 | # Floor function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the largest integer less than or equal to the specified number. 20 | 21 | ```qsharp 22 | function Floor (value : Double) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### value : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Floor](https://docs.microsoft.com/dotnet/api/system.math.floor) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.randomsinglequbitpauli.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.RandomSingleQubitPauli 3 | title: RandomSingleQubitPauli operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: RandomSingleQubitPauli 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > RandomSingleQubitPauli has been deprecated. Please use instead. 13 | 14 | --- 15 | 16 | # RandomSingleQubitPauli operation 17 | 18 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | > [!WARNING] 24 | > RandomSingleQubitPauli has been deprecated. Please use instead. 25 | 26 | 27 | 28 | ```qsharp 29 | operation RandomSingleQubitPauli () : Pauli 30 | ``` 31 | 32 | 33 | ## Output : [Pauli](xref:microsoft.quantum.lang-ref.pauli) 34 | 35 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.withfirstinputapplied.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.WithFirstInputApplied 3 | title: WithFirstInputApplied function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: WithFirstInputApplied 9 | qsharp.summary: '' 10 | --- 11 | 12 | # WithFirstInputApplied function 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function WithFirstInputApplied<'T, 'U> (op : (('T, 'U) => Unit), arg1 : 'T) : ('U => Unit) 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### op : ('T,'U) => [Unit](xref:microsoft.quantum.lang-ref.unit) 29 | 30 | 31 | 32 | 33 | ### arg1 : 'T 34 | 35 | 36 | 37 | 38 | 39 | ## Output : 'U => [Unit](xref:microsoft.quantum.lang-ref.unit) 40 | 41 | 42 | 43 | ## Type Parameters 44 | 45 | ### 'T 46 | 47 | 48 | ### 'U 49 | 50 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.intrinsic.message.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Intrinsic.Message 3 | title: Message function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Intrinsic 8 | qsharp.name: Message 9 | qsharp.summary: Logs a message. 10 | --- 11 | 12 | # Message function 13 | 14 | Namespace: [Microsoft.Quantum.Intrinsic](xref:Microsoft.Quantum.Intrinsic) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Logs a message. 20 | 21 | ```qsharp 22 | function Message (msg : String) : Unit 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### msg : [String](xref:microsoft.quantum.lang-ref.string) 29 | 30 | The message to be reported. 31 | 32 | 33 | 34 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | The specific behavior of this function is simulator-dependent, but in most cases the given message will be written to the console. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.logical.not.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Logical.Not 3 | title: Not function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Logical 8 | qsharp.name: Not 9 | qsharp.summary: Returns the Boolean negation of a value. 10 | --- 11 | 12 | # Not function 13 | 14 | Namespace: [Microsoft.Quantum.Logical](xref:Microsoft.Quantum.Logical) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the Boolean negation of a value. 20 | 21 | ```qsharp 22 | function Not (value : Bool) : Bool 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### value : [Bool](xref:microsoft.quantum.lang-ref.bool) 29 | 30 | The value to be negated. 31 | 32 | 33 | 34 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 35 | 36 | `true` if and only if `value` is `false`. 37 | 38 | ## Remarks 39 | 40 | The following are equivalent: 41 | 42 | ```qsharp 43 | let x = not value; 44 | let x = Not(value); 45 | ``` -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.dividedbyd.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.DividedByD 3 | title: DividedByD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: DividedByD 9 | qsharp.summary: Returns the quotient of two inputs. 10 | --- 11 | 12 | # DividedByD function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the quotient of two inputs. 20 | 21 | ```qsharp 22 | function DividedByD (a : Double, b : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | The first input $a$ to be divided. 31 | 32 | 33 | ### b : [Double](xref:microsoft.quantum.lang-ref.double) 34 | 35 | The second input $b$ to be divided. 36 | 37 | 38 | 39 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 40 | 41 | The quotient $a / b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.dividedbyl.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.DividedByL 3 | title: DividedByL function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: DividedByL 9 | qsharp.summary: Returns the quotient of two inputs. 10 | --- 11 | 12 | # DividedByL function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the quotient of two inputs. 20 | 21 | ```qsharp 22 | function DividedByL (a : BigInt, b : BigInt) : BigInt 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 29 | 30 | The first input $a$ to be divided. 31 | 32 | 33 | ### b : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 34 | 35 | The second input $b$ to be divided. 36 | 37 | 38 | 39 | ## Output : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 40 | 41 | The quotient $a / b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.maxi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.MaxI 3 | title: MaxI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: MaxI 9 | qsharp.summary: Returns the larger of two specified numbers. 10 | --- 11 | 12 | # MaxI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the larger of two specified numbers. 20 | 21 | ```qsharp 22 | function MaxI (a : Int, b : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | ### b : [Int](xref:microsoft.quantum.lang-ref.int) 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 40 | 41 | 42 | 43 | ## Remarks 44 | 45 | See [System.Math.Max](https://docs.microsoft.com/dotnet/api/system.math.max) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.mini.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.MinI 3 | title: MinI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: MinI 9 | qsharp.summary: Returns the smaller of two specified numbers. 10 | --- 11 | 12 | # MinI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the smaller of two specified numbers. 20 | 21 | ```qsharp 22 | function MinI (a : Int, b : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | ### b : [Int](xref:microsoft.quantum.lang-ref.int) 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 40 | 41 | 42 | 43 | ## Remarks 44 | 45 | See [System.Math.Min](https://docs.microsoft.com/dotnet/api/system.math.min) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.minusd.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.MinusD 3 | title: MinusD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: MinusD 9 | qsharp.summary: Returns the difference between two inputs. 10 | --- 11 | 12 | # MinusD function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the difference between two inputs. 20 | 21 | ```qsharp 22 | function MinusD (a : Double, b : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | The first input $a$ to be subtracted. 31 | 32 | 33 | ### b : [Double](xref:microsoft.quantum.lang-ref.double) 34 | 35 | The second input $b$ to be subtracted. 36 | 37 | 38 | 39 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 40 | 41 | The difference $a - b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.minusl.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.MinusL 3 | title: MinusL function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: MinusL 9 | qsharp.summary: Returns the difference between two inputs. 10 | --- 11 | 12 | # MinusL function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the difference between two inputs. 20 | 21 | ```qsharp 22 | function MinusL (a : BigInt, b : BigInt) : BigInt 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 29 | 30 | The first input $a$ to be subtracted. 31 | 32 | 33 | ### b : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 34 | 35 | The second input $b$ to be subtracted. 36 | 37 | 38 | 39 | ## Output : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 40 | 41 | The difference $a - b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.randomint.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.RandomInt 3 | title: RandomInt operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: RandomInt 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > RandomInt has been deprecated. Please use instead. 13 | 14 | --- 15 | 16 | # RandomInt operation 17 | 18 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | > [!WARNING] 24 | > RandomInt has been deprecated. Please use instead. 25 | 26 | 27 | 28 | ```qsharp 29 | operation RandomInt (maxInt : Int) : Int 30 | ``` 31 | 32 | 33 | ## Input 34 | 35 | ### maxInt : [Int](xref:microsoft.quantum.lang-ref.int) 36 | 37 | 38 | 39 | 40 | 41 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 42 | 43 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.simulation.inttopauli.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Simulation.IntToPauli 3 | title: IntToPauli function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Simulation 8 | qsharp.name: IntToPauli 9 | qsharp.summary: Converts a integer to a single-qubit Pauli operator. 10 | --- 11 | 12 | # IntToPauli function 13 | 14 | Namespace: [Microsoft.Quantum.Simulation](xref:Microsoft.Quantum.Simulation) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Converts a integer to a single-qubit Pauli operator. 20 | 21 | ```qsharp 22 | function IntToPauli (idx : Int) : Pauli 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### idx : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | Integer in the range `0..3` to be converted to Pauli operators. 31 | 32 | 33 | 34 | ## Output : [Pauli](xref:microsoft.quantum.lang-ref.pauli) 35 | 36 | A `Pauli` operator given by `[PauliI, PauliX, PauliY, PauliZ][idx]`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arrays.headandrest.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arrays.HeadAndRest 3 | title: HeadAndRest function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Arrays 8 | qsharp.name: HeadAndRest 9 | qsharp.summary: Returns a tuple of first and all remaining elements of the array. 10 | --- 11 | 12 | # HeadAndRest function 13 | 14 | Namespace: [Microsoft.Quantum.Arrays](xref:Microsoft.Quantum.Arrays) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns a tuple of first and all remaining elements of the array. 20 | 21 | ```qsharp 22 | function HeadAndRest<'A> (array : 'A[]) : ('A, 'A[]) 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### array : 'A[] 29 | 30 | An array with at least one element. 31 | 32 | 33 | 34 | ## Output : ('A,'A[]) 35 | 36 | A tuple of first and all remaining elements of the array. 37 | 38 | ## Type Parameters 39 | 40 | ### 'A 41 | 42 | The type of the array elements. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arrays.mostandtail.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arrays.MostAndTail 3 | title: MostAndTail function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Arrays 8 | qsharp.name: MostAndTail 9 | qsharp.summary: Returns a tuple of all but one and the last element of the array. 10 | --- 11 | 12 | # MostAndTail function 13 | 14 | Namespace: [Microsoft.Quantum.Arrays](xref:Microsoft.Quantum.Arrays) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns a tuple of all but one and the last element of the array. 20 | 21 | ```qsharp 22 | function MostAndTail<'A> (array : 'A[]) : ('A[], 'A) 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### array : 'A[] 29 | 30 | An array with at least one element. 31 | 32 | 33 | 34 | ## Output : ('A[],'A) 35 | 36 | A tuple of all but one and the last element of the array. 37 | 38 | ## Type Parameters 39 | 40 | ### 'A 41 | 42 | The type of the array elements. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.applybound.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.ApplyBound 3 | title: ApplyBound operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: ApplyBound 9 | qsharp.summary: '' 10 | --- 11 | 12 | # ApplyBound operation 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation ApplyBound<'T> (operations : ('T => Unit)[], target : 'T) : Unit 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### operations : 'T => [Unit](xref:microsoft.quantum.lang-ref.unit) [] 29 | 30 | 31 | 32 | 33 | ### target : 'T 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 40 | 41 | 42 | 43 | ## Type Parameters 44 | 45 | ### 'T 46 | 47 | 48 | 49 | ## See Also 50 | 51 | - [Microsoft.Quantum.Canon.Bound](xref:Microsoft.Quantum.Canon.Bound) -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arithmetic.littleendian.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arithmetic.LittleEndian 3 | title: LittleEndian user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Arithmetic 8 | qsharp.name: LittleEndian 9 | qsharp.summary: >- 10 | Register that encodes an unsigned integer in little-endian order. The 11 | qubit with index `0` encodes the lowest bit of an unsigned integer. 12 | --- 13 | 14 | # LittleEndian user defined type 15 | 16 | Namespace: [Microsoft.Quantum.Arithmetic](xref:Microsoft.Quantum.Arithmetic) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Register that encodes an unsigned integer in little-endian order. The qubit with index `0` encodes the lowest bit of an unsigned integer. 22 | 23 | ```qsharp 24 | 25 | newtype LittleEndian = (Qubit[]); 26 | ``` 27 | 28 | 29 | 30 | ## Remarks 31 | 32 | We abbreviate `LittleEndian` as `LE` in the documentation. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.abscomplex.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.AbsComplex 3 | title: AbsComplex function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: AbsComplex 9 | qsharp.summary: >- 10 | Returns the absolute value of a complex number of type 11 | `Complex`. 12 | --- 13 | 14 | # AbsComplex function 15 | 16 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Returns the absolute value of a complex number of type `Complex`. 22 | 23 | ```qsharp 24 | function AbsComplex (input : Microsoft.Quantum.Math.Complex) : Double 25 | ``` 26 | 27 | 28 | ## Input 29 | 30 | ### input : [Complex](xref:Microsoft.Quantum.Math.Complex) 31 | 32 | Complex number $c = x + i y$. 33 | 34 | 35 | 36 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 37 | 38 | Absolute value $|c| = \sqrt{x^2 + y^2}$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.argcomplex.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.ArgComplex 3 | title: ArgComplex function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: ArgComplex 9 | qsharp.summary: >- 10 | Returns the phase of a complex number of type 11 | `Complex`. 12 | --- 13 | 14 | # ArgComplex function 15 | 16 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Returns the phase of a complex number of type `Complex`. 22 | 23 | ```qsharp 24 | function ArgComplex (input : Microsoft.Quantum.Math.Complex) : Double 25 | ``` 26 | 27 | 28 | ## Input 29 | 30 | ### input : [Complex](xref:Microsoft.Quantum.Math.Complex) 31 | 32 | Complex number $c = x + i y$. 33 | 34 | 35 | 36 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 37 | 38 | Phase $\text{Arg}[c] = \text{ArcTan}(y,x) \in (-\pi,\pi]$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.synthesis.encoded.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Synthesis.Encoded 3 | title: Encoded function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Synthesis 8 | qsharp.name: Encoded 9 | qsharp.summary: Encode truth table in {1,-1} coding 10 | --- 11 | 12 | # Encoded function 13 | 14 | Namespace: [Microsoft.Quantum.Synthesis](xref:Microsoft.Quantum.Synthesis) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Encode truth table in {1,-1} coding 20 | 21 | ```qsharp 22 | function Encoded (table : Bool[]) : Int[] 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### table : [Bool](xref:microsoft.quantum.lang-ref.bool)[] 29 | 30 | Truth table as array of truth values 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int)[] 35 | 36 | Truth table as array of {1,-1} integers 37 | 38 | ## Example 39 | 40 | ```qsharp 41 | Encoded([false, false, false, true]); // [1, 1, 1, -1] 42 | ``` -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.applycurriedop.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.ApplyCurriedOp 3 | title: ApplyCurriedOp operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: ApplyCurriedOp 9 | qsharp.summary: '' 10 | --- 11 | 12 | # ApplyCurriedOp operation 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation ApplyCurriedOp<'T, 'U> (curriedOp : ('T -> ('U => Unit)), first : 'T, second : 'U) : Unit 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### curriedOp : 'T -> 'U => [Unit](xref:microsoft.quantum.lang-ref.unit) 29 | 30 | 31 | 32 | 33 | ### first : 'T 34 | 35 | 36 | 37 | 38 | ### second : 'U 39 | 40 | 41 | 42 | 43 | 44 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 45 | 46 | 47 | 48 | ## Type Parameters 49 | 50 | ### 'T 51 | 52 | 53 | ### 'U 54 | 55 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning._unnegate.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning._Unnegate 3 | title: _Unnegate function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning 8 | qsharp.name: _Unnegate 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _Unnegate function 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning](xref:Microsoft.Quantum.MachineLearning) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function _Unnegate (negLocs : Int[], coefficients : Microsoft.Quantum.Math.ComplexPolar[]) : Microsoft.Quantum.Math.ComplexPolar[] 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### negLocs : [Int](xref:microsoft.quantum.lang-ref.int)[] 29 | 30 | 31 | 32 | 33 | ### coefficients : [ComplexPolar](xref:Microsoft.Quantum.Math.ComplexPolar)[] 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [ComplexPolar](xref:Microsoft.Quantum.Math.ComplexPolar)[] 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.ceiling.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.Ceiling 3 | title: Ceiling function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: Ceiling 9 | qsharp.summary: Returns the smallest integer greater than or equal to the specified number. 10 | --- 11 | 12 | # Ceiling function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the smallest integer greater than or equal to the specified number. 20 | 21 | ```qsharp 22 | function Ceiling (value : Double) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### value : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 35 | 36 | 37 | 38 | ## Remarks 39 | 40 | See [System.Math.Ceiling](https://docs.microsoft.com/dotnet/api/system.math.ceiling) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.plusa.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.PlusA 3 | title: PlusA function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: PlusA 9 | qsharp.summary: Returns the sum (concatenation) of two inputs. 10 | --- 11 | 12 | # PlusA function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the sum (concatenation) of two inputs. 20 | 21 | ```qsharp 22 | function PlusA<'Element> (a : 'Element[], b : 'Element[]) : 'Element[] 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : 'Element[] 29 | 30 | The first input $a$ to be summed. 31 | 32 | 33 | ### b : 'Element[] 34 | 35 | The second input $b$ to be summed. 36 | 37 | 38 | 39 | ## Output : 'Element[] 40 | 41 | The sum $a + b$. 42 | 43 | ## Type Parameters 44 | 45 | ### 'Element 46 | 47 | The type of each element in each of the two input arrays. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.accumulatedbitsizei.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.AccumulatedBitsizeI 3 | title: AccumulatedBitsizeI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: AccumulatedBitsizeI 9 | qsharp.summary: Helper function used to recursively calculate the bitsize of a value. 10 | --- 11 | 12 | # AccumulatedBitsizeI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Helper function used to recursively calculate the bitsize of a value. 20 | 21 | ```qsharp 22 | function AccumulatedBitsizeI (val : Int, bitsize : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### val : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | ### bitsize : [Int](xref:microsoft.quantum.lang-ref.int) 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.plusc.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.PlusC 3 | title: PlusC function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: PlusC 9 | qsharp.summary: Returns the sum of two inputs. 10 | --- 11 | 12 | # PlusC function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the sum of two inputs. 20 | 21 | ```qsharp 22 | function PlusC (a : Microsoft.Quantum.Math.Complex, b : Microsoft.Quantum.Math.Complex) : Microsoft.Quantum.Math.Complex 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Complex](xref:Microsoft.Quantum.Math.Complex) 29 | 30 | The first input $a$ to be summed. 31 | 32 | 33 | ### b : [Complex](xref:Microsoft.Quantum.Math.Complex) 34 | 35 | The second input $b$ to be summed. 36 | 37 | 38 | 39 | ## Output : [Complex](xref:Microsoft.Quantum.Math.Complex) 40 | 41 | The sum $a + b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.synthesis._twoleveldecomposition.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Synthesis._TwoLevelDecomposition 3 | title: _TwoLevelDecomposition function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Synthesis 8 | qsharp.name: _TwoLevelDecomposition 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _TwoLevelDecomposition function 13 | 14 | Namespace: [Microsoft.Quantum.Synthesis](xref:Microsoft.Quantum.Synthesis) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function _TwoLevelDecomposition (unitary : Microsoft.Quantum.Math.Complex[][]) : (Microsoft.Quantum.Math.Complex[][], Int, Int)[] 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### unitary : [Complex](xref:Microsoft.Quantum.Math.Complex)[][] 29 | 30 | 31 | 32 | 33 | 34 | ## Output : ([Complex](xref:Microsoft.Quantum.Math.Complex)[][],[Int](xref:microsoft.quantum.lang-ref.int),[Int](xref:microsoft.quantum.lang-ref.int))[] 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.synthesis.extended.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Synthesis.Extended 3 | title: Extended function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Synthesis 8 | qsharp.name: Extended 9 | qsharp.summary: Extends a spectrum by inverted coefficients 10 | --- 11 | 12 | # Extended function 13 | 14 | Namespace: [Microsoft.Quantum.Synthesis](xref:Microsoft.Quantum.Synthesis) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Extends a spectrum by inverted coefficients 20 | 21 | ```qsharp 22 | function Extended (spectrum : Int[]) : Int[] 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### spectrum : [Int](xref:microsoft.quantum.lang-ref.int)[] 29 | 30 | Spectral coefficients 31 | 32 | 33 | 34 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int)[] 35 | 36 | Coefficients followed by inverted copy 37 | 38 | ## Example 39 | 40 | ```qsharp 41 | Extended([2, 2, 2, -2]); // [2, 2, 2, -2, -2, -2, -2, 2] 42 | ``` -------------------------------------------------------------------------------- /api/iqsharp-magic/chemistry.broombridge.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: '%chemistry.broombridge (magic command)' 3 | description: Loads and returns Broombridge electronic structure problem representation 4 | from a given .yaml file. 5 | author: rmshaffer 6 | uid: microsoft.quantum.iqsharp.magic-ref.chemistry.broombridge 7 | ms.author: ryansha 8 | ms.date: 01/24/2021 9 | ms.topic: managed-reference 10 | --- 11 | 12 | 19 | 20 | # `%chemistry.broombridge` 21 | 22 | ## Summary 23 | 24 | Loads and returns Broombridge electronic structure problem representation from a given .yaml file. 25 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.intrinsic.random.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Intrinsic.Random 3 | title: Random operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Intrinsic 8 | qsharp.name: Random 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > Random has been deprecated. Please use instead. 13 | 14 | --- 15 | 16 | # Random operation 17 | 18 | Namespace: [Microsoft.Quantum.Intrinsic](xref:Microsoft.Quantum.Intrinsic) 19 | 20 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 21 | 22 | 23 | > [!WARNING] 24 | > Random has been deprecated. Please use instead. 25 | 26 | 27 | 28 | ```qsharp 29 | operation Random (probs : Double[]) : Int 30 | ``` 31 | 32 | 33 | ## Input 34 | 35 | ### probs : [Double](xref:microsoft.quantum.lang-ref.double)[] 36 | 37 | 38 | 39 | 40 | 41 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 42 | 43 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning._negativelocations.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning._NegativeLocations 3 | title: _NegativeLocations function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning 8 | qsharp.name: _NegativeLocations 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _NegativeLocations function 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning](xref:Microsoft.Quantum.MachineLearning) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function _NegativeLocations (cNegative : Int, coefficients : Microsoft.Quantum.Math.ComplexPolar[]) : Int[] 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### cNegative : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | 31 | 32 | 33 | ### coefficients : [ComplexPolar](xref:Microsoft.Quantum.Math.ComplexPolar)[] 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int)[] 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.maxd.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.MaxD 3 | title: MaxD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: MaxD 9 | qsharp.summary: Returns the larger of two specified numbers. 10 | --- 11 | 12 | # MaxD function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the larger of two specified numbers. 20 | 21 | ```qsharp 22 | function MaxD (a : Double, b : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | ### b : [Double](xref:microsoft.quantum.lang-ref.double) 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 40 | 41 | 42 | 43 | ## Remarks 44 | 45 | See [System.Math.Max](https://docs.microsoft.com/dotnet/api/system.math.max) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.powd.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.PowD 3 | title: PowD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: PowD 9 | qsharp.summary: Returns the number x raised to the power y. 10 | --- 11 | 12 | # PowD function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the number x raised to the power y. 20 | 21 | ```qsharp 22 | function PowD (x : Double, y : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### x : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | ### y : [Double](xref:microsoft.quantum.lang-ref.double) 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 40 | 41 | 42 | 43 | ## Remarks 44 | 45 | See [System.Math.Pow](https://docs.microsoft.com/dotnet/api/system.math.pow) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.cnotchain.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.CNOTChain 3 | title: CNOTChain operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: CNOTChain 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > CNOTChain has been deprecated. Please use instead. 13 | 14 | --- 15 | 16 | # CNOTChain operation 17 | 18 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | > [!WARNING] 24 | > CNOTChain has been deprecated. Please use instead. 25 | 26 | 27 | 28 | ```qsharp 29 | operation CNOTChain (qubits : Qubit[]) : Unit is Adj + Ctl 30 | ``` 31 | 32 | 33 | ## Input 34 | 35 | ### qubits : [Qubit](xref:microsoft.quantum.lang-ref.qubit)[] 36 | 37 | 38 | 39 | 40 | 41 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 42 | 43 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.accumulatedbitsizel.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.AccumulatedBitsizeL 3 | title: AccumulatedBitsizeL function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: AccumulatedBitsizeL 9 | qsharp.summary: Helper function used to recursively calculate the bitsize of a value. 10 | --- 11 | 12 | # AccumulatedBitsizeL function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Helper function used to recursively calculate the bitsize of a value. 20 | 21 | ```qsharp 22 | function AccumulatedBitsizeL (val : BigInt, bitsize : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### val : [BigInt](xref:microsoft.quantum.lang-ref.bigint) 29 | 30 | 31 | 32 | 33 | ### bitsize : [Int](xref:microsoft.quantum.lang-ref.int) 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.mind.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.MinD 3 | title: MinD function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: MinD 9 | qsharp.summary: Returns the smaller of two specified numbers. 10 | --- 11 | 12 | # MinD function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Returns the smaller of two specified numbers. 20 | 21 | ```qsharp 22 | function MinD (a : Double, b : Double) : Double 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Double](xref:microsoft.quantum.lang-ref.double) 29 | 30 | 31 | 32 | 33 | ### b : [Double](xref:microsoft.quantum.lang-ref.double) 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 40 | 41 | 42 | 43 | ## Remarks 44 | 45 | See [System.Math.Min](https://docs.microsoft.com/dotnet/api/system.math.min) for more details. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.randomreal.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.RandomReal 3 | title: RandomReal operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: RandomReal 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > RandomReal has been deprecated. Please use instead. 13 | 14 | --- 15 | 16 | # RandomReal operation 17 | 18 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | > [!WARNING] 24 | > RandomReal has been deprecated. Please use instead. 25 | 26 | 27 | 28 | ```qsharp 29 | operation RandomReal (bitsRandom : Int) : Double 30 | ``` 31 | 32 | 33 | ## Input 34 | 35 | ### bitsRandom : [Int](xref:microsoft.quantum.lang-ref.int) 36 | 37 | 38 | 39 | 40 | 41 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 42 | 43 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.applybounda.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.ApplyBoundA 3 | title: ApplyBoundA operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: ApplyBoundA 9 | qsharp.summary: '' 10 | --- 11 | 12 | # ApplyBoundA operation 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation ApplyBoundA<'T> (operations : ('T => Unit is Adj)[], target : 'T) : Unit is Adj 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### operations : 'T => [Unit](xref:microsoft.quantum.lang-ref.unit) is Adj[] 29 | 30 | 31 | 32 | 33 | ### target : 'T 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 40 | 41 | 42 | 43 | ## Type Parameters 44 | 45 | ### 'T 46 | 47 | 48 | 49 | ## See Also 50 | 51 | - [Microsoft.Quantum.Canon.BoundA](xref:Microsoft.Quantum.Canon.BoundA) -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.applyboundc.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.ApplyBoundC 3 | title: ApplyBoundC operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: ApplyBoundC 9 | qsharp.summary: '' 10 | --- 11 | 12 | # ApplyBoundC operation 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation ApplyBoundC<'T> (operations : ('T => Unit is Ctl)[], target : 'T) : Unit is Ctl 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### operations : 'T => [Unit](xref:microsoft.quantum.lang-ref.unit) is Ctl[] 29 | 30 | 31 | 32 | 33 | ### target : 'T 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 40 | 41 | 42 | 43 | ## Type Parameters 44 | 45 | ### 'T 46 | 47 | 48 | 49 | ## See Also 50 | 51 | - [Microsoft.Quantum.Canon.BoundC](xref:Microsoft.Quantum.Canon.BoundC) -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.stackpush.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.StackPush 3 | title: StackPush function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: StackPush 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > StackPush has been deprecated. 13 | 14 | --- 15 | 16 | # StackPush function 17 | 18 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | > [!WARNING] 24 | > StackPush has been deprecated. 25 | 26 | 27 | 28 | ```qsharp 29 | function StackPush (stack : Microsoft.Quantum.Canon.ResultStack, datum : Result) : Microsoft.Quantum.Canon.ResultStack 30 | ``` 31 | 32 | 33 | ## Input 34 | 35 | ### stack : [ResultStack](xref:Microsoft.Quantum.Canon.ResultStack) 36 | 37 | 38 | 39 | 40 | ### datum : __invalid__ 41 | 42 | 43 | 44 | 45 | 46 | ## Output : [ResultStack](xref:Microsoft.Quantum.Canon.ResultStack) 47 | 48 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.diagnostics.enabletestingvianame.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Diagnostics.EnableTestingViaName 3 | title: EnableTestingViaName user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Diagnostics 8 | qsharp.name: EnableTestingViaName 9 | qsharp.summary: >- 10 | Compiler-recognized attribute via which an alternative name can be defined 11 | that may be used when loading a type or callable for testing purposes. 12 | --- 13 | 14 | # EnableTestingViaName user defined type 15 | 16 | Namespace: [Microsoft.Quantum.Diagnostics](xref:Microsoft.Quantum.Diagnostics) 17 | 18 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 19 | 20 | 21 | Compiler-recognized attribute via which an alternative name can be defined that may be used when loading a type or callable for testing purposes. 22 | 23 | ```qsharp 24 | 25 | @ Microsoft.Quantum.Core.Attribute() 26 | newtype EnableTestingViaName = (String); 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.logical.xor.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Logical.Xor 3 | title: Xor function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Logical 8 | qsharp.name: Xor 9 | qsharp.summary: Returns the Boolean exclusive disjunction of two values. 10 | --- 11 | 12 | # Xor function 13 | 14 | Namespace: [Microsoft.Quantum.Logical](xref:Microsoft.Quantum.Logical) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the Boolean exclusive disjunction of two values. 20 | 21 | ```qsharp 22 | function Xor (a : Bool, b : Bool) : Bool 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Bool](xref:microsoft.quantum.lang-ref.bool) 29 | 30 | The first value to be considered. 31 | 32 | 33 | ### b : [Bool](xref:microsoft.quantum.lang-ref.bool) 34 | 35 | The second value to be considered. 36 | 37 | 38 | 39 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 40 | 41 | `true` if and only if exactly one of `a` and `b` is `true`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.machinelearning._applytwoqubitcase.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.MachineLearning._ApplyTwoQubitCase 3 | title: _ApplyTwoQubitCase operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.MachineLearning 8 | qsharp.name: _ApplyTwoQubitCase 9 | qsharp.summary: '' 10 | --- 11 | 12 | # _ApplyTwoQubitCase operation 13 | 14 | Namespace: [Microsoft.Quantum.MachineLearning](xref:Microsoft.Quantum.MachineLearning) 15 | 16 | Package: [Microsoft.Quantum.MachineLearning](https://nuget.org/packages/Microsoft.Quantum.MachineLearning) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation _ApplyTwoQubitCase (datum : Double[], reg : Microsoft.Quantum.Arithmetic.LittleEndian) : Unit is Adj + Ctl 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### datum : [Double](xref:microsoft.quantum.lang-ref.double)[] 29 | 30 | 31 | 32 | 33 | ### reg : [LittleEndian](xref:Microsoft.Quantum.Arithmetic.LittleEndian) 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.argcomplexpolar.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.ArgComplexPolar 3 | title: ArgComplexPolar function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: ArgComplexPolar 9 | qsharp.summary: >- 10 | Returns the phase of a complex number of type 11 | `ComplexPolar`. 12 | --- 13 | 14 | # ArgComplexPolar function 15 | 16 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Returns the phase of a complex number of type `ComplexPolar`. 22 | 23 | ```qsharp 24 | function ArgComplexPolar (input : Microsoft.Quantum.Math.ComplexPolar) : Double 25 | ``` 26 | 27 | 28 | ## Input 29 | 30 | ### input : [ComplexPolar](xref:Microsoft.Quantum.Math.ComplexPolar) 31 | 32 | Complex number $c = r e^{i t}$. 33 | 34 | 35 | 36 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 37 | 38 | Phase $\text{Arg}[c] = t$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.randomintpow2.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.RandomIntPow2 3 | title: RandomIntPow2 operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: RandomIntPow2 9 | qsharp.summary: >+ 10 | > [!WARNING] 11 | 12 | > RandomIntPow2 has been deprecated. Please use instead. 13 | 14 | --- 15 | 16 | # RandomIntPow2 operation 17 | 18 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 19 | 20 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 21 | 22 | 23 | > [!WARNING] 24 | > RandomIntPow2 has been deprecated. Please use instead. 25 | 26 | 27 | 28 | ```qsharp 29 | operation RandomIntPow2 (maxBits : Int) : Int 30 | ``` 31 | 32 | 33 | ## Input 34 | 35 | ### maxBits : [Int](xref:microsoft.quantum.lang-ref.int) 36 | 37 | 38 | 39 | 40 | 41 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 42 | 43 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.hammingweighti.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.HammingWeightI 3 | title: HammingWeightI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: HammingWeightI 9 | qsharp.summary: >- 10 | Computes the Hamming weight of an integer, i.e., the number of 1s in its 11 | binary expansion. 12 | --- 13 | 14 | # HammingWeightI function 15 | 16 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Computes the Hamming weight of an integer, i.e., the number of 1s in its binary expansion. 22 | 23 | ```qsharp 24 | function HammingWeightI (number : Int) : Int 25 | ``` 26 | 27 | 28 | ## Input 29 | 30 | ### number : [Int](xref:microsoft.quantum.lang-ref.int) 31 | 32 | Number to compute Hamming weight 33 | 34 | 35 | 36 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 37 | 38 | Hamming weight of the number -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.simulation.timedependentgeneratorsystem.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Simulation.TimeDependentGeneratorSystem 3 | title: TimeDependentGeneratorSystem user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Simulation 8 | qsharp.name: TimeDependentGeneratorSystem 9 | qsharp.summary: >- 10 | Represents a time-dependent dynamical generator as a function 11 | from time to the value of the dynamical generator at that time. 12 | --- 13 | 14 | # TimeDependentGeneratorSystem user defined type 15 | 16 | Namespace: [Microsoft.Quantum.Simulation](xref:Microsoft.Quantum.Simulation) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Represents a time-dependent dynamical generator as a function from time to the value of the dynamical generator at that time. 22 | 23 | ```qsharp 24 | 25 | newtype TimeDependentGeneratorSystem = ((Double -> Microsoft.Quantum.Simulation.GeneratorSystem)); 26 | ``` 27 | 28 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.arithmetic.invert2ssi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Arithmetic.Invert2sSI 3 | title: Invert2sSI operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Arithmetic 8 | qsharp.name: Invert2sSI 9 | qsharp.summary: Inverts a given integer modulo 2's complement. 10 | --- 11 | 12 | # Invert2sSI operation 13 | 14 | Namespace: [Microsoft.Quantum.Arithmetic](xref:Microsoft.Quantum.Arithmetic) 15 | 16 | Package: [Microsoft.Quantum.Numerics](https://nuget.org/packages/Microsoft.Quantum.Numerics) 17 | 18 | 19 | Inverts a given integer modulo 2's complement. 20 | 21 | ```qsharp 22 | operation Invert2sSI (xs : Microsoft.Quantum.Arithmetic.SignedLittleEndian) : Unit is Adj + Ctl 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### xs : [SignedLittleEndian](xref:Microsoft.Quantum.Arithmetic.SignedLittleEndian) 29 | 30 | n-bit signed integer (SignedLittleEndian), will be inverted modulo 2's complement. 31 | 32 | 33 | 34 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 35 | 36 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.applycurriedopa.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.ApplyCurriedOpA 3 | title: ApplyCurriedOpA operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: ApplyCurriedOpA 9 | qsharp.summary: '' 10 | --- 11 | 12 | # ApplyCurriedOpA operation 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation ApplyCurriedOpA<'T, 'U> (curriedOp : ('T -> ('U => Unit is Adj)), first : 'T, second : 'U) : Unit is Adj 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### curriedOp : 'T -> 'U => [Unit](xref:microsoft.quantum.lang-ref.unit) is Adj 29 | 30 | 31 | 32 | 33 | ### first : 'T 34 | 35 | 36 | 37 | 38 | ### second : 'U 39 | 40 | 41 | 42 | 43 | 44 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 45 | 46 | 47 | 48 | ## Type Parameters 49 | 50 | ### 'T 51 | 52 | 53 | ### 'U 54 | 55 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.canon.applycurriedopc.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Canon.ApplyCurriedOpC 3 | title: ApplyCurriedOpC operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Canon 8 | qsharp.name: ApplyCurriedOpC 9 | qsharp.summary: '' 10 | --- 11 | 12 | # ApplyCurriedOpC operation 13 | 14 | Namespace: [Microsoft.Quantum.Canon](xref:Microsoft.Quantum.Canon) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | operation ApplyCurriedOpC<'T, 'U> (curriedOp : ('T -> ('U => Unit is Ctl)), first : 'T, second : 'U) : Unit is Ctl 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### curriedOp : 'T -> 'U => [Unit](xref:microsoft.quantum.lang-ref.unit) is Ctl 29 | 30 | 31 | 32 | 33 | ### first : 'T 34 | 35 | 36 | 37 | 38 | ### second : 'U 39 | 40 | 41 | 42 | 43 | 44 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 45 | 46 | 47 | 48 | ## Type Parameters 49 | 50 | ### 'T 51 | 52 | 53 | ### 'U 54 | 55 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.intrinsic.reset.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Intrinsic.Reset 3 | title: Reset operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Intrinsic 8 | qsharp.name: Reset 9 | qsharp.summary: >- 10 | Given a single qubit, measures it and ensures it is in the |0⟩ state 11 | such that it can be safely released. 12 | --- 13 | 14 | # Reset operation 15 | 16 | Namespace: [Microsoft.Quantum.Intrinsic](xref:Microsoft.Quantum.Intrinsic) 17 | 18 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 19 | 20 | 21 | Given a single qubit, measures it and ensures it is in the |0⟩ state such that it can be safely released. 22 | 23 | ```qsharp 24 | operation Reset (target : Qubit) : Unit 25 | ``` 26 | 27 | 28 | ## Input 29 | 30 | ### target : [Qubit](xref:microsoft.quantum.lang-ref.qubit) 31 | 32 | The qubit whose state is to be reset to $\ket{0}$. 33 | 34 | 35 | 36 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 37 | 38 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.modi.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.ModI 3 | title: ModI function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: ModI 9 | qsharp.summary: Returns the modulus of a number with respect to another number. 10 | --- 11 | 12 | # ModI function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the modulus of a number with respect to another number. 20 | 21 | ```qsharp 22 | function ModI (a : Int, b : Int) : Int 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Int](xref:microsoft.quantum.lang-ref.int) 29 | 30 | The input $a$ whose modulus is to be returned. 31 | 32 | 33 | ### b : [Int](xref:microsoft.quantum.lang-ref.int) 34 | 35 | The number with respect to which the modulus of $a$ is to be returned. 36 | 37 | 38 | 39 | ## Output : [Int](xref:microsoft.quantum.lang-ref.int) 40 | 41 | The modulus $a \bmod b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.amplitudeamplification.rotationphases.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.AmplitudeAmplification.RotationPhases 3 | title: RotationPhases user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.AmplitudeAmplification 8 | qsharp.name: RotationPhases 9 | qsharp.summary: Phases for a sequence of single-qubit rotations in amplitude amplification. 10 | --- 11 | 12 | # RotationPhases user defined type 13 | 14 | Namespace: [Microsoft.Quantum.AmplitudeAmplification](xref:Microsoft.Quantum.AmplitudeAmplification) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Phases for a sequence of single-qubit rotations in amplitude amplification. 20 | 21 | ```qsharp 22 | 23 | newtype RotationPhases = (Double[]); 24 | ``` 25 | 26 | 27 | 28 | ## Remarks 29 | 30 | The first parameter is an array of phases for reflections, expressed as a product of single-qubit rotations. [ G.H. Low, I. L. Chuang, https://arxiv.org/abs/1707.05391]. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.core.deprecated.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Core.Deprecated 3 | title: Deprecated user defined type 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: udt 7 | qsharp.namespace: Microsoft.Quantum.Core 8 | qsharp.name: Deprecated 9 | qsharp.summary: Compiler-recognized attribute used to mark a type or callable as deprecated. 10 | --- 11 | 12 | # Deprecated user defined type 13 | 14 | Namespace: [Microsoft.Quantum.Core](xref:Microsoft.Quantum.Core) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Compiler-recognized attribute used to mark a type or callable as deprecated. 20 | 21 | ```qsharp 22 | 23 | @ Microsoft.Quantum.Core.Attribute() 24 | newtype Deprecated = (NewName : String); 25 | ``` 26 | 27 | 28 | 29 | ## Named Items 30 | 31 | ### NewName : [String](xref:microsoft.quantum.lang-ref.string) 32 | 33 | The full name of the type or callable to use instead. Is set to the empty String if a type or callable has been deprecated without substitution. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.errorcorrection.tablelookuprecoveryimpl.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.ErrorCorrection.TableLookupRecoveryImpl 3 | title: TableLookupRecoveryImpl function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.ErrorCorrection 8 | qsharp.name: TableLookupRecoveryImpl 9 | qsharp.summary: '' 10 | --- 11 | 12 | # TableLookupRecoveryImpl function 13 | 14 | Namespace: [Microsoft.Quantum.ErrorCorrection](xref:Microsoft.Quantum.ErrorCorrection) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | 20 | 21 | ```qsharp 22 | function TableLookupRecoveryImpl (table : Pauli[][], syndrome : Microsoft.Quantum.ErrorCorrection.Syndrome) : Pauli[] 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### table : [Pauli](xref:microsoft.quantum.lang-ref.pauli)[][] 29 | 30 | 31 | 32 | 33 | ### syndrome : [Syndrome](xref:Microsoft.Quantum.ErrorCorrection.Syndrome) 34 | 35 | 36 | 37 | 38 | 39 | ## Output : [Pauli](xref:microsoft.quantum.lang-ref.pauli)[] 40 | 41 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.intrinsic.s.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Intrinsic.S 3 | title: S operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Intrinsic 8 | qsharp.name: S 9 | qsharp.summary: Applies the S gate to a single qubit. 10 | --- 11 | 12 | # S operation 13 | 14 | Namespace: [Microsoft.Quantum.Intrinsic](xref:Microsoft.Quantum.Intrinsic) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Applies the S gate to a single qubit. 20 | 21 | ```qsharp 22 | operation S (qubit : Qubit) : Unit is Adj + Ctl 23 | ``` 24 | 25 | 26 | ## Description 27 | 28 | This operation can be simulated by the unitary matrix \begin{align} S \mathrel{:=} \begin{bmatrix} 1 & 0 \\\\ 0 & i \end{bmatrix}. \end{align} 29 | 30 | ## Input 31 | 32 | ### qubit : [Qubit](xref:microsoft.quantum.lang-ref.qubit) 33 | 34 | Qubit to which the gate should be applied. 35 | 36 | 37 | 38 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 39 | 40 | -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.abscomplexpolar.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.AbsComplexPolar 3 | title: AbsComplexPolar function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: AbsComplexPolar 9 | qsharp.summary: >- 10 | Returns the absolute value of a complex number of type 11 | `ComplexPolar`. 12 | --- 13 | 14 | # AbsComplexPolar function 15 | 16 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Returns the absolute value of a complex number of type `ComplexPolar`. 22 | 23 | ```qsharp 24 | function AbsComplexPolar (input : Microsoft.Quantum.Math.ComplexPolar) : Double 25 | ``` 26 | 27 | 28 | ## Input 29 | 30 | ### input : [ComplexPolar](xref:Microsoft.Quantum.Math.ComplexPolar) 31 | 32 | Complex number $c = r e^{i t}$. 33 | 34 | 35 | 36 | ## Output : [Double](xref:microsoft.quantum.lang-ref.double) 37 | 38 | Absolute value $|c| = r$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.math.timesc.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Math.TimesC 3 | title: TimesC function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Math 8 | qsharp.name: TimesC 9 | qsharp.summary: Returns the product of two inputs. 10 | --- 11 | 12 | # TimesC function 13 | 14 | Namespace: [Microsoft.Quantum.Math](xref:Microsoft.Quantum.Math) 15 | 16 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 17 | 18 | 19 | Returns the product of two inputs. 20 | 21 | ```qsharp 22 | function TimesC (a : Microsoft.Quantum.Math.Complex, b : Microsoft.Quantum.Math.Complex) : Microsoft.Quantum.Math.Complex 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### a : [Complex](xref:Microsoft.Quantum.Math.Complex) 29 | 30 | The first input $a$ to be multiplied. 31 | 32 | 33 | ### b : [Complex](xref:Microsoft.Quantum.Math.Complex) 34 | 35 | The second input $b$ to be multiplied. 36 | 37 | 38 | 39 | ## Output : [Complex](xref:Microsoft.Quantum.Math.Complex) 40 | 41 | The product $a \times b$. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.convert.boolasresult.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Convert.BoolAsResult 3 | title: BoolAsResult function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Convert 8 | qsharp.name: BoolAsResult 9 | qsharp.summary: >- 10 | Converts a `Bool` type to a `Result` type, where `true` is mapped to 11 | `One` and `false` is mapped to `Zero`. 12 | --- 13 | 14 | # BoolAsResult function 15 | 16 | Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Converts a `Bool` type to a `Result` type, where `true` is mapped to `One` and `false` is mapped to `Zero`. 22 | 23 | ```qsharp 24 | function BoolAsResult (input : Bool) : Result 25 | ``` 26 | 27 | 28 | ## Input 29 | 30 | ### input : [Bool](xref:microsoft.quantum.lang-ref.bool) 31 | 32 | `Bool` to be converted. 33 | 34 | 35 | 36 | ## Output : __invalid__ 37 | 38 | A `Result` representing the `input`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.convert.resultasbool.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Convert.ResultAsBool 3 | title: ResultAsBool function 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: function 7 | qsharp.namespace: Microsoft.Quantum.Convert 8 | qsharp.name: ResultAsBool 9 | qsharp.summary: >- 10 | Converts a `Result` type to a `Bool` type, where `One` is mapped to 11 | `true` and `Zero` is mapped to `false`. 12 | --- 13 | 14 | # ResultAsBool function 15 | 16 | Namespace: [Microsoft.Quantum.Convert](xref:Microsoft.Quantum.Convert) 17 | 18 | Package: [Microsoft.Quantum.Standard](https://nuget.org/packages/Microsoft.Quantum.Standard) 19 | 20 | 21 | Converts a `Result` type to a `Bool` type, where `One` is mapped to `true` and `Zero` is mapped to `false`. 22 | 23 | ```qsharp 24 | function ResultAsBool (input : Result) : Bool 25 | ``` 26 | 27 | 28 | ## Input 29 | 30 | ### input : __invalid__ 31 | 32 | `Result` to be converted. 33 | 34 | 35 | 36 | ## Output : [Bool](xref:microsoft.quantum.lang-ref.bool) 37 | 38 | A `Bool` representing the `input`. -------------------------------------------------------------------------------- /api/qsharp/microsoft.quantum.diagnostics.assertallzero.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Microsoft.Quantum.Diagnostics.AssertAllZero 3 | title: AssertAllZero operation 4 | ms.date: 1/23/2021 12:00:00 AM 5 | ms.topic: article 6 | qsharp.kind: operation 7 | qsharp.namespace: Microsoft.Quantum.Diagnostics 8 | qsharp.name: AssertAllZero 9 | qsharp.summary: Assert that given qubits are all in $\ket{0}$ state. 10 | --- 11 | 12 | # AssertAllZero operation 13 | 14 | Namespace: [Microsoft.Quantum.Diagnostics](xref:Microsoft.Quantum.Diagnostics) 15 | 16 | Package: [Microsoft.Quantum.QSharp.Core](https://nuget.org/packages/Microsoft.Quantum.QSharp.Core) 17 | 18 | 19 | Assert that given qubits are all in $\ket{0}$ state. 20 | 21 | ```qsharp 22 | operation AssertAllZero (qubits : Qubit[]) : Unit is Adj + Ctl 23 | ``` 24 | 25 | 26 | ## Input 27 | 28 | ### qubits : [Qubit](xref:microsoft.quantum.lang-ref.qubit)[] 29 | 30 | 31 | 32 | 33 | 34 | ## Output : [Unit](xref:microsoft.quantum.lang-ref.unit) 35 | 36 | 37 | 38 | ## See Also 39 | 40 | - [Microsoft.Quantum.Diagnostics.AssertQubit](xref:Microsoft.Quantum.Diagnostics.AssertQubit) --------------------------------------------------------------------------------