This repository was archived by the owner on Jan 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
src/Simulation/Simulators/QCTraceSimulator Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -148,11 +148,24 @@ protected virtual void InitializeQCTracerCoreListeners(IList<IQCTraceSimulatorLi
148148
149149 private void RegisterPrimitiveOperationsGivenAsCircuits ( )
150150 {
151- IEnumerable < Type > primitiveOperationTypes =
152- from op in typeof ( Intrinsic . X ) . Assembly . GetExportedTypes ( )
151+ var dllAssembly = typeof ( Intrinsic . X ) . Assembly ;
152+ var localAssembly = typeof ( Intrinsic . ExpFrac ) . Assembly ;
153+
154+ IEnumerable < Type > primitiveOperationTypes =
155+ from op in dllAssembly . GetExportedTypes ( )
153156 where op . IsSubclassOf ( typeof ( AbstractCallable ) )
154157 select op ;
155158
159+ if ( dllAssembly . FullName != localAssembly . FullName )
160+ {
161+ var localPrimatives =
162+ from op in localAssembly . GetExportedTypes ( )
163+ where op . IsSubclassOf ( typeof ( AbstractCallable ) )
164+ select op ;
165+
166+ primitiveOperationTypes = primitiveOperationTypes . Concat ( localPrimatives ) ;
167+ }
168+
156169 IEnumerable < Type > primitiveOperationAsCircuits =
157170 from op in typeof ( Circuits . X ) . Assembly . GetExportedTypes ( )
158171 where op . IsSubclassOf ( typeof ( AbstractCallable ) )
You can’t perform that action at this time.
0 commit comments