diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 40571d5..102e66a 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-01-29T05:25:18","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-02-06T01:04:31","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/dev/API/index.html b/dev/API/index.html index a7aa49b..5d63b7b 100644 --- a/dev/API/index.html +++ b/dev/API/index.html @@ -4,7 +4,7 @@ padding-top: 0 !important; padding-bottom: 0 !important; } -

States

Use BellState to represent a tensor product of Bell states.

We can represent only Bell states. Here is the basis being used:

BPGates notationStabilizer tableauxKetsin X basisin Y basis
00+XX +ZZ∣00⟩+∣11⟩∣++⟩+∣--⟩∣i₊i₋⟩+∣i₋i₊⟩
01+XX -ZZ∣01⟩+∣10⟩∣++⟩-∣--⟩∣i₊i₊⟩-∣i₋i₋⟩
10-XX +ZZ∣00⟩-∣11⟩∣+-⟩+∣-+⟩∣i₊i₊⟩+∣i₋i₋⟩
11-XX -ZZ∣01⟩-∣10⟩∣+-⟩-∣-+⟩∣i₊i₋⟩-∣i₋i₊⟩

You can convert between these descriptions using

Operations

Most often you would only need CNOTPerm as an operation type. There is a documentation section dedicated to it. It is of the following form:

The most general gate is BellGate. It is built out of smaller gates. It is of the following form:

For measurements use BellMeasure which provides coincidence measurements as described in their section of the documentation.

For noisy operations you can use TODO.

The QuantumClifford.apply! function and company (e.g. mctrajectory) can be used for these operations.

Autogenerated API list

BPGates.BellDoublePermutationType

Bell preserving gate performing one of 20 possible "Clifford phaseless two-pair permutations" on a two Bell pairs.

Equivalent to applying the same two-qubit Clifford gate to both Alice's and Bob's half-pairs.

The first argument, pidx, specifies the permutation (between 1 and 20). The second argument, sidx indicates which Bell pairs are acted on.

source
BPGates.BellGateType

Most general representation of a Bell preserving gate on two qubits. The general gate consists of a two Pauli permutations, a double qubit permutation, two single qubit permutations, and two indices indicating which pair of Bell states the general Bell preserving gate will be applied to.

source
BPGates.BellMeasureType

Coincidence measurement on Bell pairs.

The first argument, midx, specifies the X, Y, Z basis respectively. The second argument, sidx, indicates which Bell pair is being measured.

The state will be reset to 00 after being applied measurement.

source
BPGates.BellPauliPermutationType

Bell preserving gate performing one of 4 possible "Pauli permutations" on a single Bell pair.

Equivalent to applying a Pauli gate to Alice's side of the Bell pair.

The first argument, pidx, specifies the permutation (between 1 and 4). The second argument, sidx indicates which Bell pair is acted on.

julia> BellPauliPermutation(1,1)*BellState(1) |> Stabilizer
+

States

Use BellState to represent a tensor product of Bell states.

We can represent only Bell states. Here is the basis being used:

BPGates notationStabilizer tableauxKetsin X basisin Y basis
00+XX +ZZ∣00⟩+∣11⟩∣++⟩+∣--⟩∣i₊i₋⟩+∣i₋i₊⟩
01+XX -ZZ∣01⟩+∣10⟩∣++⟩-∣--⟩∣i₊i₊⟩-∣i₋i₋⟩
10-XX +ZZ∣00⟩-∣11⟩∣+-⟩+∣-+⟩∣i₊i₊⟩+∣i₋i₋⟩
11-XX -ZZ∣01⟩-∣10⟩∣+-⟩-∣-+⟩∣i₊i₋⟩-∣i₋i₊⟩

You can convert between these descriptions using

  • BPGates to stabilizer state with QuantumClifford.Stabilizer(bpgates_state)
  • stabilizer state to state vector ket with QuantumOptics.Ket

Operations

Most often you would only need CNOTPerm as an operation type. There is a documentation section dedicated to it. It is of the following form:

The most general gate is BellGate. It is built out of smaller gates. It is of the following form:

For measurements use BellMeasure which provides coincidence measurements as described in their section of the documentation.

For noisy operations you can use TODO.

The QuantumClifford.apply! function and company (e.g. mctrajectory) can be used for these operations.

Autogenerated API list

BPGates.BellDoublePermutationType

Bell preserving gate performing one of 20 possible "Clifford phaseless two-pair permutations" on a two Bell pairs.

Equivalent to applying the same two-qubit Clifford gate to both Alice's and Bob's half-pairs.

The first argument, pidx, specifies the permutation (between 1 and 20). The second argument, sidx indicates which Bell pairs are acted on.

source
BPGates.BellGateType

Most general representation of a Bell preserving gate on two qubits. The general gate consists of a two Pauli permutations, a double qubit permutation, two single qubit permutations, and two indices indicating which pair of Bell states the general Bell preserving gate will be applied to.

source
BPGates.BellMeasureType

Coincidence measurement on Bell pairs.

The first argument, midx, specifies the X, Y, Z basis respectively. The second argument, sidx, indicates which Bell pair is being measured.

The state will be reset to 00 after being applied measurement.

source
BPGates.BellPauliPermutationType

Bell preserving gate performing one of 4 possible "Pauli permutations" on a single Bell pair.

Equivalent to applying a Pauli gate to Alice's side of the Bell pair.

The first argument, pidx, specifies the permutation (between 1 and 4). The second argument, sidx indicates which Bell pair is acted on.

julia> BellPauliPermutation(1,1)*BellState(1) |> Stabilizer
 + XX
 + ZZ
 
@@ -18,7 +18,7 @@
 
 julia> BellPauliPermutation(4,1)*BellState(1) |> Stabilizer
 - XX
-- ZZ
source
BPGates.BellSinglePermutationType

Bell preserving gate performing one of 6 possible "Clifford phaseless permutations" on a single Bell pair.

Equivalent to applying certain single-qubit Clifford gates to both Alice and Bob.

The first argument, pidx, specifies the permutation (between 1 and 6). The second argument, sidx indicates which Bell pair is acted on.

source
BPGates.BellStateType

A diagonal representation of Bell diagonal states that only tracks the phases in front of the stabilizers tableau instead of the whole stabilizer tableau.

Capable of representing only tensor products of one or more of the states

±XX
+- ZZ
source
BPGates.BellSinglePermutationType

Bell preserving gate performing one of 6 possible "Clifford phaseless permutations" on a single Bell pair.

Equivalent to applying certain single-qubit Clifford gates to both Alice and Bob.

The first argument, pidx, specifies the permutation (between 1 and 6). The second argument, sidx indicates which Bell pair is acted on.

source
BPGates.BellStateType

A diagonal representation of Bell diagonal states that only tracks the phases in front of the stabilizers tableau instead of the whole stabilizer tableau.

Capable of representing only tensor products of one or more of the states

±XX
 ±ZZ

by tracking only the phases in the first column. For example, XX -ZZ is represented as the bitstring 01.

This representation permits drastically faster simulation of entanglement purification circuits.

The BellState(n) constructor will create n Bell pairs.

julia> bell_state = BellState([0,1,1,0])
 BellState(Bool[0, 1, 1, 0])
 
@@ -26,12 +26,12 @@
 + XX__
 - ZZ__
 - __XX
-+ __ZZ

As mentioned above, we can represent only Bell states. Here is the basis being used:

BPGates notationStabilizer tableauxKetsin X basisin Y basis
00+XX +ZZ∣00⟩+∣11⟩∣++⟩+∣--⟩∣i₊i₋⟩+∣i₋i₊⟩
01+XX -ZZ∣01⟩+∣10⟩∣++⟩-∣--⟩∣i₊i₊⟩-∣i₋i₋⟩
10-XX +ZZ∣00⟩-∣11⟩∣+-⟩+∣-+⟩∣i₊i₊⟩+∣i₋i₋⟩
11-XX -ZZ∣01⟩-∣10⟩∣+-⟩-∣-+⟩∣i₊i₋⟩-∣i₋i₊⟩

You can convert between these descriptions using

  • BPGates to stabilizer state with QuantumClifford.Stabilizer(bpgates_state)
  • stabilizer state to ket with QuantumOptics.Ket
source
BPGates.CNOTPermType

A bilateral CNOT preceded by permutations on each of the pairs that map the 00 state to itself.

source
BPGates.PauliNoiseOpType

PauliNoiseOp(idx,px,py,pz) causes qubit-pair idx to flip to one of the other 3 Bell states with probabilities px, py, pz respectively.

julia> apply!(BellState([0,0]), PauliNoiseOp(1,1,0,0))
++ __ZZ

As mentioned above, we can represent only Bell states. Here is the basis being used:

BPGates notationStabilizer tableauxKetsin X basisin Y basis
00+XX +ZZ∣00⟩+∣11⟩∣++⟩+∣--⟩∣i₊i₋⟩+∣i₋i₊⟩
01+XX -ZZ∣01⟩+∣10⟩∣++⟩-∣--⟩∣i₊i₊⟩-∣i₋i₋⟩
10-XX +ZZ∣00⟩-∣11⟩∣+-⟩+∣-+⟩∣i₊i₊⟩+∣i₋i₋⟩
11-XX -ZZ∣01⟩-∣10⟩∣+-⟩-∣-+⟩∣i₊i₋⟩-∣i₋i₊⟩

You can convert between these descriptions using

  • BPGates to stabilizer state with QuantumClifford.Stabilizer(bpgates_state)
  • stabilizer state to ket with QuantumOptics.Ket
source
BPGates.CNOTPermType

A bilateral CNOT preceded by permutations on each of the pairs that map the 00 state to itself.

source
BPGates.PauliNoiseOpType

PauliNoiseOp(idx,px,py,pz) causes qubit-pair idx to flip to one of the other 3 Bell states with probabilities px, py, pz respectively.

julia> apply!(BellState([0,0]), PauliNoiseOp(1,1,0,0))
 BellState(Bool[0, 1])
 
 julia> apply!(BellState([0,0]), PauliNoiseOp(1,0,1,0))
 BellState(Bool[1, 1])
 
 julia> apply!(BellState([0,0]), PauliNoiseOp(1,0,0,1))
-BellState(Bool[1, 0])
source
BPGates.bellmeasure!Method

Apply coincidence measurement on a Bell state.

Return state and measurement result (false if an error is detected).

The measured state will be reset to 00.

julia> bellmeasure!(BellState([0,1,1,1]), BellMeasure(2,1))
-(BellState(Bool[0, 0, 1, 1]), false)
source
+BellState(Bool[1, 0])source
BPGates.bellmeasure!Method

Apply coincidence measurement on a Bell state.

Return state and measurement result (false if an error is detected).

The measured state will be reset to 00.

julia> bellmeasure!(BellState([0,1,1,1]), BellMeasure(2,1))
+(BellState(Bool[0, 0, 1, 1]), false)
source
diff --git a/dev/index.html b/dev/index.html index 91ef706..6f829cf 100644 --- a/dev/index.html +++ b/dev/index.html @@ -21,4 +21,4 @@ BellState(Bool[0, 1]) julia> apply!(BellState([0,1,1,1]), NoisyBellMeasure(2,1)) -(BellState(Bool[0, 0, 1, 1]), false) +(BellState(Bool[0, 0, 1, 1]), false) diff --git a/dev/measurements/index.html b/dev/measurements/index.html index 796be02..b20d9eb 100644 --- a/dev/measurements/index.html +++ b/dev/measurements/index.html @@ -7,4 +7,4 @@ BellState(Bool[0, 0]) BellState(Bool[1, 1])
julia> filter_true(BellMeasure(3,1))2-element Vector{BellState}: BellState(Bool[0, 0]) - BellState(Bool[1, 0]) + BellState(Bool[1, 0]) diff --git a/dev/most_common/index.html b/dev/most_common/index.html index 42b6717..3d470c6 100644 --- a/dev/most_common/index.html +++ b/dev/most_common/index.html @@ -9,4 +9,4 @@ +ZZ 11 = 3 = -XX - -ZZ

If we consider purification circuits that preserve the 00 state, the majority of useful gates in purification circuits can be written in the form:

Above the entangled pairs are qubit 1&3 and qubits 2&4.

The main property of this type of circuits is that they always map the "good" state to itself, while they permute the rest of the Bell basis states.

The $h_a\otimes h_b$ (and $f_a\otimes f_b$) can be one of the six permutations of 01, 10, 11, implemented by single-qubit Clifford gates. There are 6 possible such operations. The hard-coded CNOT gate provides the necessary entangling.

These gates are implemented as CNOTPerm.

The 6 permutations (i.e. the gates $h_a\otimes h_b$ and $f_a\otimes f_b$) are:

julia> BPGates.good_perm_tuple((1, 2, 3, 4), (1, 2, 4, 3), (1, 3, 2, 4), (1, 3, 4, 2), (1, 4, 2, 3), (1, 4, 3, 2))

The gates represented as Clifford operations are:

TODO finish this listing

+ -ZZ

If we consider purification circuits that preserve the 00 state, the majority of useful gates in purification circuits can be written in the form:

Above the entangled pairs are qubit 1&3 and qubits 2&4.

The main property of this type of circuits is that they always map the "good" state to itself, while they permute the rest of the Bell basis states.

The $h_a\otimes h_b$ (and $f_a\otimes f_b$) can be one of the six permutations of 01, 10, 11, implemented by single-qubit Clifford gates. There are 6 possible such operations. The hard-coded CNOT gate provides the necessary entangling.

These gates are implemented as CNOTPerm.

The 6 permutations (i.e. the gates $h_a\otimes h_b$ and $f_a\otimes f_b$) are:

julia> BPGates.good_perm_tuple((1, 2, 3, 4), (1, 2, 4, 3), (1, 3, 2, 4), (1, 3, 4, 2), (1, 4, 2, 3), (1, 4, 3, 2))

The gates represented as Clifford operations are:

TODO finish this listing

diff --git a/dev/noisy/index.html b/dev/noisy/index.html index f429c2b..d7542c3 100644 --- a/dev/noisy/index.html +++ b/dev/noisy/index.html @@ -6,4 +6,4 @@ BellState(Bool[1, 1]) julia> apply!(BellState([0,0]), PauliNoiseOp(1,0,0,1)) -BellState(Bool[1, 0])

Noisy gate wrapper

PauliNoiseBellGate can be used to wrap a normal gate with a noise process.

Noisy measurements

NoisyBellMeasureNoisyReset performs a BellMeasurement with a chance p to report the opposite result for a coincidence measurement, and chances px, py, and pz to flip the new Bell state to (respectively) one of the other 3 Bell states.

It implements applywstatus! which enables its use with mctrajectories from QuantumClifford.

+BellState(Bool[1, 0])

Noisy gate wrapper

PauliNoiseBellGate can be used to wrap a normal gate with a noise process.

Noisy measurements

NoisyBellMeasureNoisyReset performs a BellMeasurement with a chance p to report the opposite result for a coincidence measurement, and chances px, py, and pz to flip the new Bell state to (respectively) one of the other 3 Bell states.

It implements applywstatus! which enables its use with mctrajectories from QuantumClifford.