Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/Simulation/QsharpCore/Reset.qs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace Microsoft.Quantum.Measurement {
open Microsoft.Quantum.Intrinsic;
open Microsoft.Quantum.Targeting;

internal operation BasisChangeZtoY(target : Qubit) : Unit is Adj + Ctl {
H(target);
Expand Down Expand Up @@ -45,6 +46,10 @@ namespace Microsoft.Quantum.Measurement {
///
/// # Output
/// The result of measuring `target` in the Pauli $Z$ basis.
@RequiresCapability(
"BasicQuantumFunctionality",
"MResetZ is replaced by a supported implementation on all execution targets."
)
operation MResetZ (target : Qubit) : Result {
let result = M(target);

Expand Down Expand Up @@ -75,6 +80,10 @@ namespace Microsoft.Quantum.Measurement {
///
/// # Output
/// The result of measuring `target` in the Pauli $X$ basis.
@RequiresCapability(
"BasicQuantumFunctionality",
"MResetX is replaced by a supported implementation on all execution targets."
)
operation MResetX (target : Qubit) : Result {
let result = Measure([PauliX], [target]);

Expand Down Expand Up @@ -108,6 +117,10 @@ namespace Microsoft.Quantum.Measurement {
///
/// # Output
/// The result of measuring `target` in the Pauli $Y$ basis.
@RequiresCapability(
"BasicQuantumFunctionality",
"MResetY is replaced by a supported implementation on all execution targets."
)
operation MResetY (target : Qubit) : Result {
let result = Measure([PauliY], [target]);

Expand Down