Class QuantumProperty
Gives an object the ability to exist in a quantum state.
Namespace: QRG.QuantumForge.Runtime
Assembly: .dll
Syntax
[Serializable]
public class QuantumProperty : MonoBehaviour
Fields
| Improve this Doc View Sourcebasis
The basis associated with this quantum property.
Declaration
public Basis basis
Field Value
Type | Description |
---|---|
Basis |
Properties
| Improve this Doc View SourceDimension
The dimension, or number of basis values, of the quantum property.
Declaration
public int Dimension { get; }
Property Value
Type | Description |
---|---|
int |
Methods
| Improve this Doc View SourceClock(params Predicate[])
The full qudit Z gate. Applies a phase rotation to all basis values, based on the value_string. Let w = exp(2pii/Dimension) For basis value_string v, the phase rotation is w^v
Declaration
public void Clock(params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
Predicate[] | predicates |
Clock(QuantumProperty, params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public static void Clock(QuantumProperty property, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty | property | |
Predicate[] | predicates |
Clock(QuantumProperty, float, params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public static void Clock(QuantumProperty property, float fraction, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty | property | |
float | fraction | |
Predicate[] | predicates |
Clock(float, params Predicate[])
The full qudit Z gate. Applies a phase rotation to all basis values, based on the value_string. Let w = exp(2pii/Dimension) For basis value_string v, the phase rotation is w^v
Declaration
public void Clock(float fraction, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
float | fraction | |
Predicate[] | predicates |
CorrelationMatrix(params QuantumProperty[])
Gives an object the ability to exist in a quantum state.
Declaration
public static float[,] CorrelationMatrix(params QuantumProperty[] properties)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty[] | properties |
Returns
Type | Description |
---|---|
float[,] |
Cycle(params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public void Cycle(params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
Predicate[] | predicates |
Cycle(QuantumProperty, params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public static void Cycle(QuantumProperty prop, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty | prop | |
Predicate[] | predicates |
Cycle(QuantumProperty, float, params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public static void Cycle(QuantumProperty prop, float fraction, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty | prop | |
float | fraction | |
Predicate[] | predicates |
Cycle(float, params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public void Cycle(float fraction, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
float | fraction | |
Predicate[] | predicates |
Hadamard(params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public void Hadamard(params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
Predicate[] | predicates |
Hadamard(QuantumProperty, params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public static void Hadamard(QuantumProperty prop, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty | prop | |
Predicate[] | predicates |
ISwap(QuantumProperty, QuantumProperty)
Gives an object the ability to exist in a quantum state.
Declaration
public static void ISwap(QuantumProperty prop1, QuantumProperty prop2)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty | prop1 | |
QuantumProperty | prop2 |
ISwap(QuantumProperty, QuantumProperty, float)
Gives an object the ability to exist in a quantum state.
Declaration
public static void ISwap(QuantumProperty prop1, QuantumProperty prop2, float fraction)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty | prop1 | |
QuantumProperty | prop2 | |
float | fraction |
InverseHadamard(params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public void InverseHadamard(params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
Predicate[] | predicates |
InverseHadamard(QuantumProperty, params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public static void InverseHadamard(QuantumProperty prop, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty | prop | |
Predicate[] | predicates |
Measure(params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public static int Measure(params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
Predicate[] | predicates |
Returns
Type | Description |
---|---|
int |
Measure(params QuantumProperty[])
Gives an object the ability to exist in a quantum state.
Declaration
public static int[] Measure(params QuantumProperty[] properties)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty[] | properties |
Returns
Type | Description |
---|---|
int[] |
MutualInformation(params QuantumProperty[])
Gives an object the ability to exist in a quantum state.
Declaration
public static float[] MutualInformation(params QuantumProperty[] properties)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty[] | properties |
Returns
Type | Description |
---|---|
float[] |
NCycle(QuantumProperty, QuantumProperty)
Entangling operation. Performs a number of predicated (controlled) cycles on prop2 based on the value_string of prop1. Ex. Prop1 is in superposition of 0, 1, and 2 : |prop1> = 1/sqrt(3) * (|0> + |1> + |2>) Prop2 starts in state 0: |prop2> = |0> Result: |prop1,prop2> = 1/sqrt(3) * (|0,0> + |1,1> + |2,2>) Note: if prop2 starts in a different state, the result will be a different entanglement structure. Ex. Prop2 starts in state 1: |prop2> = |1> Result: |prop1,prop2> = 1/sqrt(3) * (|0,1> + |1,2> + |2,0>)
Declaration
public static void NCycle(QuantumProperty prop1, QuantumProperty prop2)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty | prop1 | |
QuantumProperty | prop2 |
PhaseRotate(float, params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public static void PhaseRotate(float angle, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
float | angle | |
Predicate[] | predicates |
Probabilities(params QuantumProperty[])
Gives an object the ability to exist in a quantum state.
Declaration
public static QuantumProperty.BasisProbability[] Probabilities(params QuantumProperty[] properties)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty[] | properties |
Returns
Type | Description |
---|---|
BasisProbability[] |
ReducedDensityMatrix(params QuantumProperty[])
Gives an object the ability to exist in a quantum state.
Declaration
public static Complex[,] ReducedDensityMatrix(params QuantumProperty[] properties)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty[] | properties |
Returns
Type | Description |
---|---|
Complex[,] |
Shift(params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public void Shift(params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
Predicate[] | predicates |
Shift(QuantumProperty, params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public static void Shift(QuantumProperty prop, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty | prop | |
Predicate[] | predicates |
Shift(QuantumProperty, float, params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public static void Shift(QuantumProperty prop, float fraction, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty | prop | |
float | fraction | |
Predicate[] | predicates |
Shift(float, params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public void Shift(float fraction, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
float | fraction | |
Predicate[] | predicates |
Swap(QuantumProperty, QuantumProperty, params Predicate[])
Gives an object the ability to exist in a quantum state.
Declaration
public static void Swap(QuantumProperty prop1, QuantumProperty prop2, params Predicate[] predicates)
Parameters
Type | Name | Description |
---|---|---|
QuantumProperty | prop1 | |
QuantumProperty | prop2 | |
Predicate[] | predicates |
is_not_value(BasisValue)
Creates a predicate that checks if the quantum property does not have the specified basis value.
Declaration
public Predicate is_not_value(BasisValue value)
Parameters
Type | Name | Description |
---|---|---|
BasisValue | value | The basis value to check against. |
Returns
Type | Description |
---|---|
Predicate | A predicate representing the condition. |
is_not_value(int)
Creates a predicate that checks if the quantum property does not have the specified basis value by index.
Declaration
public Predicate is_not_value(int value)
Parameters
Type | Name | Description |
---|---|---|
int | value | The index of the basis value to check against. |
Returns
Type | Description |
---|---|
Predicate | A predicate representing the condition. |
is_not_value(string)
Creates a predicate that checks if the quantum property does not have the specified basis value by name.
Declaration
public Predicate is_not_value(string valueName)
Parameters
Type | Name | Description |
---|---|---|
string | valueName | The name of the basis value to check against. |
Returns
Type | Description |
---|---|
Predicate | A predicate representing the condition. |
is_value(BasisValue)
Creates a predicate that checks if the quantum property has the specified basis value.
Declaration
public Predicate is_value(BasisValue value)
Parameters
Type | Name | Description |
---|---|---|
BasisValue | value | The basis value to check. |
Returns
Type | Description |
---|---|
Predicate | A predicate representing the condition. |
is_value(int)
Creates a predicate that checks if the quantum property has the specified basis value by index.
Declaration
public Predicate is_value(int valueIndex)
Parameters
Type | Name | Description |
---|---|---|
int | valueIndex | The index of the basis value to check. |
Returns
Type | Description |
---|---|
Predicate | A predicate representing the condition. |
is_value(string)
Creates a predicate that checks if the quantum property has the specified basis value by name.
Declaration
public Predicate is_value(string valueName)
Parameters
Type | Name | Description |
---|---|---|
string | valueName | The name of the basis value to check. |
Returns
Type | Description |
---|---|
Predicate | A predicate representing the condition. |