AfirmaQubitAssertQubit operation
Espaço de nome: Microsoft.Quantum.DiagnosticsNamespace: Microsoft.Quantum.Diagnostics
Pacote: Microsoft.Quantum.QSharp.CorePackage: Microsoft.Quantum.QSharp.Core
Afirma que o qubit q
está no estado esperado do operador Pauli Z.Asserts that the qubit q
is in the expected eigenstate of the Pauli Z operator.
operation AssertQubit (expected : Result, q : Qubit) : Unit
EntradaInput
esperado : inválido expected : invalid
Em que estado se espera que o qubit esteja: Zero
ou One
.Which state the qubit is expected to be in: Zero
or One
.
q: Qubitq : Qubit
O qubit cujo estado é afirmado.The qubit whose state is asserted.
Saída : UnidadeOutput : Unit
ObservaçõesRemarks
<xref:microsoft.quantum.diagnostics.assertqubitisinstatewithintolerance> permite afirmar estados de qubit arbit arbit em vez de apenas $Z dólares.<xref:microsoft.quantum.diagnostics.assertqubitisinstatewithintolerance> allows for asserting arbitrary qubit states rather than only $Z$ eigenstates.